1.1.6. macOS: The App-based system setup

Welcome to the Jungle [1]

The following is a set of scripts packaged as an app. It is designed to automate the AFNI installation steps. You should launch the script by double clicking the icon like a regular program.

This app will download and install the recommended versions of the following:
  1. Xcode command line tools
  2. Xquartz
  3. R
  4. AFNI

If a package is already installed, you may be asked if you want to reinstall it. But you can skip it if you like. This script will also setup your ~/.cshrc, ~/.bashrc, and ~/.bash_profile. It will add the appropriate entries to your paths specified there. After completion, you should restart your computer just in case.

This is a BETA script, so your feedback is welcome. We have tested the app on 10.10 to 10.13 with various hardware.

If you are seeking the non-App version of install instructions, please see HERE.

Break It Down Again [3]

  • Download the file and open it to extract or mount.

  • Read the README!!

  • Double click the “afni_macOS_install_BETA” icon.

  • You may get a popup notification about an “unidentified developer”.

    ../../_images/unknown_dev_warning.png
    If so, you can continue by:
  • This will launch your terminal.

    Most of the rest of the interactions are in the terminal. If needed, the Xcode command line tools will popup an installation window. Once complete, return to the terminal to continue.

  • To accept the default options (shown in [ ]), just press Enter.

    For some sections, you may need to type in your password. If you are not an administrator on your computer, this installation may fail. Make sure you have permissions for the folder you choose for AFNI! The sudo prompt will time out after awhile, so this is not an unattended install.

  • This script does not install fink. Nor does it download the class data.

../../_images/apple_brain_color_flipped.png

The icon is a work in progress. If you have some design skills, please send me alternatives.

Prepare for Bootcamp

Copy+paste the following:

curl -O https://afni.nimh.nih.gov/pub/dist/edu/data/CD.tgz
tar xvzf CD.tgz
cd CD
tcsh s2.cp.files . ~
cd ..

Purpose: In order, these commands: get the tarred+zipped directory that contains the class data (and is hence named “CD”), downloading it to the current location in the terminal; untar/unzip it (=opens it up); go into the newly opened directory; execute a script to copy the files to $HOME/CD/; and finally exit the directory.

At this point, if there have been no errors, you can delete/remove the tarred/zipped package, using “rm CD.tgz”. If you are really confident, you can also deleted the CD tree in the present location (but leaving it in $HOME/CD/).

Note

If using Linux terminal commands is new to you, then do look over the handy Unix documentation/tutorial and practice a few of the basic commands on your own system (e.g., ls, cd, less, etc.). It will greatly enhance your bootcamp experience– we promise!

Evaluate setup/system (important!)

  1. Copy+paste the following, and read the displayed “Please Fix” section at the end of the output (try the suggestions there!):

    afni_system_check.py -check_all
    

    … and, for extra help, copy+paste this:

    afni_system_check.py -check_all > out.afni_system_check.txt
    

    and email the file “out.afni_system_check.txt” to your local AFNI Guru for advice.

  2. Open up the AFNI and SUMA GUIs, juuuust to make sure all is well:

    afni
    suma
    

    Report any crashes!

  3. If the “system check” gives any errors, please:

Niceify terminal (optional, but goood)

To improve your life when using the terminal, copy+paste these:

echo 'set filec'    >> ~/.cshrc
echo 'set autolist' >> ~/.cshrc
echo 'set nobeep'   >> ~/.cshrc

echo 'alias ls ls -G'    >> ~/.cshrc
echo 'alias ll ls -lG'   >> ~/.cshrc
echo 'alias ls="ls -G"'  >> ~/.bashrc
echo 'alias ll="ls -lG"' >> ~/.bashrc

Purpose: The first commands set up tab autocompletion for tcsh (which should already be enabled for bash users by default). The second set of commands make aliases so that different types of files (“normal” files, zipped files, executables, et al.) and directories are shown using different colors and boldness. It makes it much easier to navigate on a terminal, IMHO.

Keep up-to-date (remember!)

  1. To update your AFNI any time in the future, just run:

    @update.afni.binaries -d
    

    That’s it!!

    Purpose: This will automatically download the correct, latest AFNI version to your computer, replacing your old binaries. It will also update the apearch help information. Update often!

  2. Check your AFNI version by typing:

    afni -ver
    

    Purpose: Report this useful info, whenever asking a question on the Message Board!

Note

The record of all changes (new options, new programs, bug fixes, et al.) in AFNI programs is maintained for all to see in the online AFNI History.

Footnotes

[1]Guns N’ Roses
[2]Steve Miller Band
[3]Tears for Fears