wiki:InstallOSX

Installing CMPR on Mac OSX

CMPR can be loaded either in a self-updating install or as a static install. The self-updating version causes the latest version of CMPR to be installed from the Argonne subversion server and also allows future updates to be installed from within the CMPR program. The static install package is updated less frequently and requires that you download and reinstall the package file to update. I recommend you use one of the self-updating install methods, as this is easier all around. If you do not have easy internet access, or you work inside a highly secure computing environment, you may be find that access to the subversion server is blocked and that your only option is to petition the rulers of the network to open access to the server (they really should) or to use the static install. Note that self-updating install actually includes two versions of CMPR, a stable version that is considered to be relatively bug-free and a development version that is actively being improved -- you can select between these versions from the Help menu. From time-to-time the improvements in the development version are transferred over to the stable version. In the static install, only the stable version is provided.

Prerequisites

For CMPR to run on Mac OS X, you must have the X Windows system (X11) installed. While in earlier versions of OS X (<=10.7), this was distributed with the OS, now one must use the "external" XQuartz application, for 11.6 and later. Please be sure to install the latest version XQuartz (2.7.11 as of 10/2016). Note that versions before 2.7.8 did not always create the link from /usr/X11 or /opt/X11 to /usr/X11R6 that CMPR's Tcl/Tk? needs. Note that every time that you update OS X, you will likely need to reinstall XQuartz even if the same version, to recreate this link.

Downloading the self-upgrading version of CMPR is done using a program called subversion (svn). Subversion comes preloaded on Leopard (10.5) and Snow Leopard systems (10.6). Users of Tiger (10.4) will need to install subversion, (described elsewhere). Starting with OS X 10.7, svn can be installed semi-automatically: to do this open a Terminal window and type svn and then press enter. You will get a "command not found error", but a window will open asking if you want to install svn. You do not need to install all of Xcode, only the utilities -- when ask.

Installation of Fortran is not required except for users who prefer to compile programs for themselves. This is possible with CMPR, with the exception of the DICVOL06 program, where the source code is not distributed. See the general unix install page for information on compiling programs.

Self-Updating Install

Downloading the self-upgrading version of CMPR is done using a program called subversion (svn). You may need to install this, see above.

1. Installing self-upgrading CMPR from a distribution file (preferred)

In this method of distribution, a small number of Mac-specific files are downloaded and then the remaining CMPR files are installed using svn from a python script. As far as I am aware, all versions of OS X come with python pre-installed. Note there are two Mac CMPR distributions, one for older powerPC (G4, G5) machines and one for Intel machines.

  • Depending on how your browser is configured, the file may automatically mount or you may need to double-click on the file you downloaded. Either way, after a possible delay on slower computers, you should have a new "disk" show up in Finder named CMPRvol with contents a single folder named, CMPR.

Contents of CMPR .dmg distribution

  • You will need to drag this folder to a location on a hard disk where you have write access. I do not suggest putting it in the main Applications folder, as that will require you to login as a administrator to perform an upgrade. Personally, I create a Applications folder in my home directory and put CMPR there.
  • Click on this folder and you will see several files, click on the bootstrap.py file. This should cause the script to be executed in python. The output from the install is given elsewhere. If this fails because python is is not associated with the .py extension, an alternate is to: open a terminal window; use 'cd' to change to the appropriate directory; then type python bootstrap.py. 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.
  • Setup a shortcut to start CMPR: In the CMPR folder, there are four AppleScript files that are used to start CMPR (with a green and black CMPR icon). This script must reside in the CMPR folder, but it can be dragged to the Dock or an alias can be created (using Control-click to bring up a menu, or drag the file, while holding down option & command). If the CMPR app (actually named cmpr.app, though the app extension will be hidden. If the app does not work, you should try the version named for your OS X version (cmpr10.4, cmpr10.5 or cmpr10.6). More information on the AppleScripts is given elsewhere.
  • Eject the CMPRvol device and if desired, delete the downloaded .dmg file.

2. Installing CMPR from the subversion server with svn commands

  1. Figure out where you want to put CMPR, I'll assume ~/myApps/CMPR (in CMPR in MyApps in your home directory) for the example below.
  1. Use subversion to obtain the source code:

svn co https://subversion.xray.aps.anl.gov/CMPR/tags/stable ~/myApps/CMPR

  1. Load the source code into the exe area:

svn switch https://subversion.xray.aps.anl.gov/CMPR/exe/osx_i86 ~/myApps/CMPR/exe

or, for G5/G5 (PowerPC) Processors use instead:

svn switch https://subversion.xray.aps.anl.gov/CMPR/exe/osxG4 ~/myApps/CMPR/exe

  1. Load the development version into the cmprdev area

svn switch https://subversion.xray.aps.anl.gov/CMPR/trunk ~/myApps/CMPR/cmprdev

  1. Create an AppleScript to launch CMPR

Open the AppleScript Editor in the Utilities folder of the main Applications folder. (In 10.4 Applications/AppleScript/Script Editor). Paste the appropriate script from the Applescript pageinto the upper box. Press the compile button to check that you have done that correctly. Use the File/Save? As menu item to place the script into the directory where you have installed CMPR. Test by double-clicking on the newly saved file (Note that it will not run from inside the AppleScript Editor).

Static (non-updating) Install

Users without network access on their Mac, or who are running 10.4 and do not want to install subversion should use this method to install CMPR. If this is distribution is used, only the stable version is installed and the software cannot fetch the latest upgrades from the server.

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

  • If the file does not automatically open in finder showing a volume containing a single folder named CMPR, click on the downloaded cmpr_osx*_static.dmg file.
  • Drag the CMPR folder to where you want it on your computer. 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.
  • Setup a shortcut to start CMPR: In the CMPR folder, there are four AppleScript files that are used to start CMPR (with a green and black CMPR icon). This script must reside in the CMPR folder, but it can be dragged to the Dock or an alias can be created (using Control-click to bring up a menu, or drag the file, while holding down option & command). If the CMPR app (actually named cmpr.app, though the app extension will be hidden. If the app does not work, you should try the version named for your OS X version (cmpr10.4, cmpr10.5 or cmpr10.6). More information on the AppleScripts is given elsewhere.
  • Eject the CMPRvol device and if desired, delete the downloaded .dmg file.
Last modified 4 years ago Last modified on Dec 19, 2017 1:38:40 PM

Attachments (1)

Download all attachments as: .zip