McStas 1.12b installation instructions for OS X 10.3/10.4/10.5/10.6, (Intel and PPC)

_______________________________________________________________________________

MANUAL INSTALLATION:

To successfully install McStas and support tools, please go through these steps:


1) Install X11 and Xcode tools from your Mac OS X 10.3/10.4/10.5/10.6 cdrom(s) or dvd
(X11 is installed by default with 10.5 Leopard and 10.6 Snow Leopard)

2) Depending on your processor architecture and OS version, install perl-Tk using either
 a) Applications/Tk-804.028_501.tar.gz (Intel, OS X 10.4/10.5/10.6)
 b) Applications/Tk-804.027_ppc.tar.gz (PPC, OS X 10.4/10.5)
 c) Applications/Tk-804.027_ppc_10.3.tar.gz (PPC, OS X 10.3) 
 
 2.1) Drag the relevant Tk to your Desktop and double-click to unpack (a folder named Tk-... should appear on 
      your Desktop. Requires StuffIt Expander.)
 2.2) Go in the folder Tk-... and double-click the MacInstall.command item
      (A terminal will appear executing commands. Give your password when 
      prompted.)


3) Install PGPLOT + PDL available in the Applications/SciKarl-*.dmg images.
   CAREFUL! Select the dmg corresponding to your processor type!

3b) !! OS X 10.3 ONLY!! 
If your Mac OS X is version 10.3, start Terminal.app and execute the following commands:

cd /Library/Perl
sudo cp -rp 5.8.6/* 5.8.1/


4) Install FreeWRL from the Applications/FreeWRL...dmg image.


5) Finally install McStas itself by:
   
 5.1) Drag the mcstas-*tgz file from the Applications/ folder to your Desktop and doubleclick it
       (a folder named mcstas-something should appear on your Desktop)
 5.2) Go to the mcstas-* folder and double-click the MacInstall.command item


6) (In principle, this step should only be needed on Mac OS X 10.4 Tiger and Mac OS X 10.3 Panther)
   Go to the Terminal again and issue the command 'echo $SHELL'. Depending on the 
   result either:
   
   bash) add the string below to the file .profile in your home dir:
         export PATH=$PATH:/usr/local/bin:/usr/X11R6/bin

   tcsh) add the string below to the file .tcshrc in your home dir:
         setenv PATH $PATH:/usr/local/bin:/usr/X11R6/bin

That's it!

To start the McStas gui:

Either double-click the McStas icon on your desktop, or:

Mac OS X 10.3/10.4: - Start a Terminal and issue the command 'open-x11 mcgui'
Mac OS X 10.5/10.6: - Start a Terminal and issue the command 'mcgui'


7) Optional - Integration with Matlab for visualisation:
   
   On some Mac OS systems, McStas does not automatically detect your Matlab installation.
   To  enable Matlab integration, please:

   a) Determine the location of your matlab script within /Applications, should look something like
      /Applications/MATLAB 2009b.app/bin/matlab

   b) Edit your /usr/local/lib/mcstas/tools/perl/mcstas_config.perl replacing

           MATLAB => 'no',

	   with
	   
	   MATLAB => '/Applications/MATLAB\ 2009b.app/bin/matlab',


	   (Remember to quote spaces by adding a \ in front)

