wiki:InstallOSX
Last modified 2 years ago Last modified on 12/19/17 13:57:30

Installing GSAS & EXPGUI on Mac OS X

Recent Notes (Dec. 2017):

EXPGUI does start on my Mac (Sierra, 10.12.6) but this requires installing the latest release of XQuartz (from https://www.xquartz.org/) everytime that OS X is updated. Also, the easiest way to install subversion (svn) in the most recent releases of OS X is to simply type svn and press Enter in a terminal window. This triggers the Mac to ask you if you want to install it (note that you do not need the entire XCode distribution, which takes a while to download).

There are two ways provided here to install GSAS & EXPGUI. The first is preferred since is downloads directly from a subversion repository. In this method, the distribution files do not need to change when the program is updated. Instead, the latest version of the programs are downloaded from a server when the program is installed (an internet connection is obviously required). Subsequently, if there are updates to GSAS or EXPGUI, an update can be made where only the modified or added files are upgraded. This update step can be done using the File/Update... menu option in EXPGUI or by executing the bootstrap.py file in the GSAS directory. However, these methods require ~double the space needed by GSAS & EXPGUI. For users who need to install GSAS & EXPGUI on systems where an Internet connection to the server is not possible or where space usage is critical, an alternate download file is also provided containing all GSAS & EXPGUI files, but this requires that upgrades be performed by downloading and installing the all GSAS & EXPGUI files from a future distributions when they are created.

Note for Users of 10.4 (Tiger)

Users of 10.4 will need to install the subversion (svn) package, if using the self-updating release. This can be done with Fink or MacPorts. Note that all that is needed is the svn client, should you have a choice in package size. Note this needs to be installed in a place where Python and EXPGUI can find it. If you have svn and python can't find it for bootstrap.py, edit that file or modify your path. If EXPGUI can't find it, set EXPGUI(pathlist) to hold the path to svn (see customization).

Note for Users of 10.8 (Mountain Lion)

Users of 10.8 will need to install subversion (svn) package, if using the self-updating release and X11. For X11, see http://xquartz.macosforge.org/landing/. For subversion, there are a few choices. One is to install Apple's Xcode development environment and then configure it to use the Command Line Tools option (see http://superuser.com/questions/455214/where-is-svn-on-os-x-mountain-lion), or install a 3rd party SVN package, (or build from source code, see http://subversion.apache.org/download/). Xcode can be downloaded from the Apple Developer's web site (https://developer.apple.com/) or can possibly be found on the OS X install DVD. A free 3rd party version of Subversion from WANdisco is here: http://www.wandisco.com/get/?f=subversion-binaries/1.7/Subversion-1.7.7_10.8.x.pkg. Note that subversion needs to be installed in a place where Python and EXPGUI can find it. If you have svn and Python can't find it for bootstrap.py, edit that file or modify your path. If EXPGUI can't find it, set EXPGUI(pathlist) to set the path to svn (see customization section).

Note for Users of 10.9 (Mavericks)

Users of 10.9 will need to install XQuartz and the preferably the subversion (svn) package. I have heard that XQuartz is in the App Store, or see above. For svn this is probably the best choice: http://www.wandisco.com/subversion/download/thankyou/?f=subversion-binaries/1.8/Subversion-Client-1.8.5_10.9.x.pkg.

Note that subversion needs to be installed in a place where Python and EXPGUI can find it. If you have svn and Python can't find it for bootstrap.py, edit that file or modify your path. If EXPGUI can't find it, set EXPGUI(pathlist) to set the path to svn (see customization section).

There are problems reported with the .app file distributed in the .dmg file in 10.9, but as of version [1239] a Python script is distributed that can make a slightly updated EXPGUI.app file. Click on file makeMacApp.py in the gsas/expgui folder to build a new .app file.

How to install self-updating GSAS & EXPGUI

The software installation is done using a program called subversion (svn) which is called from a installation script that is run using the Python interpreter. I believe that python can be found on OS X in the default installation from 10.4 on. Subversion comes preloaded on Leopard (10.5) and Snow Leopard systems (10.6). Users of 10.4 and 10.8 will need to install subversion, see the note above. This install option works for most people, except that at a few locations a proxy server may blocking access to Argonne's svn (subversion) server. See the discussion on proxies for more on configuring that.

Here is the procedure needed to load GSAS & EXPGUI:

  • Run the bootstrap.py file in python. This works for me by simply clicking on the file in a finder window. If that does not work, open a terminal window, and then type python followed by a space. Then drag the bootstrap.py file from the finder window into the terminal window. This will give you a command line like this:

python /.../bootstrap.py

where /.../ is the full path where you installed these files; press Enter to run the command. (Alternately you can cd to this location and type python bootstrap.py without the path). Note that this script can safely be rerun if a problem occurs in the download. In fact, whenever it is run, it will check the files on your computer against those on the repository and will download any updates. Depending on what software you have installed, you may be able to click on bootstrap.py to launch it in a terminal window.

  • Recommended: drag the expgui (expgui.app) AppleScript to the dock. (If using 10.4 on a Intel machine, you will likely have better luck with the expgui10.4 script. Rename this to expgui. On the PPC distribution, the 10.4 version is already the default version.) These scripts were updated on April 15, 2010. If you have older versions, you are recommended to replace them with versions from the above file. EXPGUI is started by clicking on the this expgui app, or by dragging .EXP files or directories onto the expgui app. On occasion, nothing happens when I click on the icon. Closing or restarting X11 seems to fix this problem.

Alternate approach for download:

  • If you are running an older version of OS X (10.6 or earlier) you may want to use these files instead:

Intel: http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsassvn_i86.dmg
PPC: http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsassvn_ppc.dmg

  • If the file does not automatically open in finder showing a volume containing a single gsas folder, click on the downloaded gsassvn .dmg file.
  • Drag the gsas folder to where you want it on your computer. I recommend you place this in an area where you have write access without running as admin (you don't login as an admin, routinely -- right?!). If you place this folder in /Applications or any other central location, use an admin account for the next step, as well as to run EXPGUI to perform upgrades.
  • Click on the gsas folder in the location where you have copied it. You should see three files: bootstrap.py (the installation script); expgui (an AppleScript for running EXPGUI, OS X 10.5 & 10.6); expgui10.4 (an AppleScript for running EXPGUI, OS X 10.4)

Upgrades

In EXPGUI, one can press the "Upgrade GSAS/EXPGUI" menu button in the File menu. The response to this will be a window that says if there are updates to download or that the programs are "up-to-date". If there are updates, you have the option of installing them and restarting EXPGUI.

Alternately, or if you do not use EXPGUI, you can update by clicking on the bootstrap.py in the gsas folder.

Note that if you make any modifications to any files distributed as part of GSAS or EXPGUI, these files may not be upgraded, should the changes be in the same regions as upgrades made by Bob or myself. If you are in the practice of modifying the programs, you should learn to use svn and do your upgrades by hand.

How to install non-updating GSAS & EXPGUI

Users without network access on their Mac, or running 10.4 who do not want to install subversion can use this method to install GSAS & EXPGUI. If this is used, the software cannot fetch the latest upgrades from the server. This will get you a much older version of EXPGUI, since the files below are updated quite infrequently.

  • Download distribution file

Intel: http://11bm.xray.aps.anl.gov/downloads/gsas/macOSX/gsas+expgui_osxi86.dmg
PPC: http://11bm.xray.aps.anl.gov/downloads/gsas/macOSX/gsas+expgui_osxppc.dmg

Note that the subversion version number for this distribution can be determined by noting the latest number gsas+expgui_osc???_Vxxxx.dmg in directory http://11bm.xray.aps.anl.gov/downloads/gsas/macOSX/

  • If the file does not automatically open in finder showing a volume containing a single gsas folder, click on the downloaded gsassvn .dmg file.
  • Drag the gsas folder to where you want it on your computer. I recommend you place this in an area where you have write access without running as admin (you don't login as an admin, routinely -- right?!). If you place this folder in /Applications or any other central location, you will need to use an admin account for the next step, as well as later to perform upgrades.
  • recommended: drag the expgui (expgui.app) AppleScript to the dock. (If using 10.4 on a Intel machine, you will likely have better luck with the expgui10.4 script. Rename this to expgui. On the PPC distribution, the 10.4 version is already the default version.) These scripts were updated on April 15, 2010. If you have older versions, you are recommended to replace them with versions from the above file. EXPGUI is started by clicking on the this expgui app, or by dragging .EXP files or directories onto the expgui app. On occasion, nothing happens when I click on the icon. Closing or restarting X11 seems to fix this problem.

Note that it is possible to update manually by downloading the latest version of EXPGUI using https://subversion.xray.aps.anl.gov/trac/EXPGUI/changeset/HEAD/trunk?old_path=%2F&format=zip and then manually move these files into the expgui directory.

EXPGUI AppleScript

The AppleScript to start EXPGUI must be located in the main directory where GSAS is installed. You can drag it to the dock from there, but do not move the file, since the script locates the files it needs to run relative to its location. EXPGUI is started by clicking on the expgui icon, or by dragging .EXP files or directories onto the expgui icon. On occasion, nothing happens when I click on the icon. Closing or restarting X11 seems to fix this problem. If you have problems with this, please see the page on EXPGUI AppleScripts.