Changeset 813

Dec 4, 2009 5:12:29 PM (11 years ago)

# on 2004/09/28 22:41:00, toby did:
major update; simply install

1 edited


  • trunk/doc/osx.html

    • Property rcs:date changed from 2004/01/30 00:47:28 to 2004/09/28 22:41:00
    • Property rcs:lines changed from +206 -158 to +126 -161
    • Property rcs:rev changed from 1.3 to 1.4
    r773 r813  
    3232This page contains information on installing and running GSAS & EXPGUI
    33 on Macintosh OS X computers. The software has been built using OS X 10.2.6
     33on Macintosh OS X computers. The software has been built using OS X 10.2.8
    3434and has been installed successfully on 10.2 and 10.3 machines.
    37 The following summarizes the steps needed to load prerequisite software
    38 as well as the GSAS/EXPGUI distribution.
    39 I presume that most Mac users will probably have already installed X11 and
    40 FINK on their computers. I have very limited experience with this, so please
    41 do not contact me for help with steps 1-3. However,
    42 most OS X books can provide more details beyond what is given here.
     37<IMG SRC="new.gif" HEIGHT=13 WIDTH=36 alt="New!">
     38Installation has been dramatically simplified. You may still want
     39to install the development environment (XCODE) and Fink, but these are no
     40longer required to install and run GSAS and EXPGUI. GSAS & EXPGUI now contains
     41a copy of the Tcl/Tk package (that includes BLT), so installation of this
     42package is also now optional.
    4545<P><LI>Install X11
    47 This can be done from your OS (Jaguar or Panther) CD-ROM or can be
    48 downloaded from
    49 <a href="
     47Before you can run the GSAS package (or, for that matter,
     48a large number of other Unix-derived graphics applications),
     49you need to load the X Windows system (X11) onto your computer. </I>
     51For 10.2 (Jaguar), this is a bit complex to explain,
     52so you will need to do some searching on the web, find a guru or
     53consult one of the many Mac OS X books that cover this subject.
     55For 10.3 (Panther), Apple bundles a version of X11 with the OS
     56and installing can be
     57very simple. It can be installed directly from CD-ROM #3 of the OS X
     58distribution CD disks. To install X11, insert CDROM #3, then click on the
     59Packages folder and within that folder, click on X11User.pkg. Read the
     60installation screens, click on the "next" button a few times, and
     61X11 is installed.
     63X11 for 10.3 can also be downloaded
     64from Apple
     65(<a href="
    51 >
    52 </A>. </I>
    53 </DL></DL>
    55 <P><LI>Install FINK
    56 <DL><DL><I>
    57 To do this, you will need to install the Development Tools,
    58 which are distributed with OS X as well as the FINK package,
    59 which can be downloaded from
    60 <a href="
    62 >
    63 </A>. Download the package and then double-click on it.
    64 </I>
    65 </DL></DL>
    68 <P><LI>Download and install required packages.
    69 <DL><DL><I>
    70 GSAS requires the "Portable Network Graphics" (libpng3) library.
    71 EXPGUI requires the X11 (not Aqua) version of Tcl/Tk package; 
    72 installation of the BLT add-on for Tcl/Tk is needed for plotting
    73 from EXPGUI (for example, <A Href="liveplot.html">LIVEPLOT</A>).
    74 There are many ways to install this software.
    75 One way is to type in <a href="#FinkAptGet">Fink (apt-get) commands, as
    76 described below.</a>
    77 A more "Mac-appropriate" approach is to avoid use of the command line
    78 completely and with a user-friendly front-end,
    79 <a href="#FinkCommander">FinkCommander, also described below.</a></I>
     69If you have a PowerBook that shipped with 10.3, you may have your
     70OS X distribution on two DVDs, so you don't have CDROM #3.
     71While Apple technical support does not appear to know this
     72(or at least they did not, when I called),
     73you can find the X11 package in a folder hidden on the DVD.
     74Use the finder Go/"Go to folder" (shift-command-G) menu item to open
     75hidden folder <tt>/Volumes/PowerBook Software/System</tt>
     76on the first Powerbook software DVD;
     77then double-click on the <tt>Installation</tt> folder
     78to open it and then open the <tt>Packages</tt> folder.
     79(Yes, you could have typed
     80<tt>/Volumes/PowerBook Software/System/Installation/Packages</tt>,
     81but why buy a Mac if you like to type long names?).
     82Finally, double-click on the X11User.pkg file and X11 is installed.
     83Just like that!
    8488<I>Download this file from the NIST website:</I>
    86 <a href="">
    87</a> (~7 Mb)
     90<a href="">
     91</a> (~13 Mb)
    8993<I>These files can also be downloaded from the CCP14 mirrors:</I>
    9094[(<a href="
    9397(<a href="
    96100(<a href="
    97 url="
    98102>US</a>) or
    99103(<a href="
    104 <I>What happens when you download this file depends on your method for
    105 downloading. Some browsers will automatically perform the next step for
    106 you:</I>
    107 <P>
    108108Mount this file by double-clicking on it. This should create a new volume in
    109109your top-level ("Computer") called "GSASvol"; clicking on this device will open
    110110a finder window with a single folder ("gsas") present.
    111 <P>
     111(<I>Note that some browsers will automatically perform this step for
    112115<I>While you can run GSAS & EXPGUI from this location, you are strongly
    113116suggested to instead copy the entire package to your computer by dragging the
    114117gsas folder icon to another finder window, or by clicking on it and using
    115118Copy and Paste.</I>
    116 <P>
    117 At this point you are able to run EXPGUI using the full command name
    118 from inside an X11 window -- by typing a command such as this:
    119 <PRE>
    120      /MyApps/gsas/expgui/expgui
    121 </PRE>
    122 or
    123 <PRE>
    124      /sw/bin/wish /MyApps/gsas/expgui/expgui
    125 </PRE>
    128 but this gets old fast -- see the following section for a better way.
    131121<LI>Install a "shortcut" to launch EXPGUI
    133 <I>The following
    134 instructions describe ways that the EXPGUI program can be integrated
    135 into the Mac environment.
    136 </I><P>
    137123<IMG SRC="expgui_osx.jpg" ALT="EXPGUI AppleScript icon" ALIGN="RIGHT">
    138 The OSX version of GSAS & EXPGUI has an EXPGUI AppleScript application
    139 in the "gsas" folder with the icon shown
     124The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application
     125named <tt></tt> in the gsas folder with the icon shown
    140126to the right. This AppleScript will start X11,
    141127if needed and then lauch EXPGUI. (If you have ideas for improving the script,
    156 You may find it convenient to drag the EXPGUI icon to the dock,
     142If you will use GSAS a fair amount, you will likely
     143find it convenient to drag the EXPGUI icon to the dock
    157144for easy access.
    158146Note, that this <B><U>EXPGUI app will not
    159 work correctly if copied or moved to another folder</U></B> -- instead
    160 create an alias (for example using the Finder Command-L key). An alias
    161 can be moved where desired -- for example, to
     147work correctly if copied or moved to another folder</U></B> it must be located
     148in the gsas folder along with all the other files and
     149subdirectories needed by GSAS & EXPGUI -- you can instead
     150create an alias (by highlighting the AppleScript icon in the Finder
     151and using the File/"Make alias" menu item or the Command-L shortcut). An alias
     152created in this fashion can be moved wherever desired -- for example, to
    162153the desktop or to the Application folder.
    165 <LI>Make a command-line "shortcut" to run EXPGUI
     156<LI>For Unix power users: Make a command line shortcut (optional)
    167 <I>
    168 If you are a "Unix enthusiast," you might be interested in setting up
    169 command line short-cuts to the gsas script and the EXPGUI program; however,
    170 my presumption is that most people buy Mac's to avoid using the command line.
    171 Those people who wish to define a command line short-cut should
    172 see section 2.2 in the
    173 <A Href="expgui_Unix_readme.html">Unix installation notes</A>.
    174 </I>
     158<I>People who have not become completely enlighted to the Mac may wish to
     159set up a way to type something (gasp!) in a terminal window that will allow
     160them to start EXPGUI. There are a number of ways this can be done,
     161(see section 2.2 in the
     162<A Href="expgui_Unix_readme.html">Unix installation notes</A>.)
     163Also, on the Mac it is possible to add applications to the X11 Applications
     164menu, by using the Applications/Customize menu option.
     165Note that the command used to start Tcl/Tk and EXPGUI will vary depending
     166on where you installed the package. I install the package in ~/Applications
     167so the command string to start EXPGUI using:</I>
     169          ~/Applications/gsas/ncnrpack-osx  ~/Applications/gsas/expgui/expgui
    182178EXPGUI will automatically designate the EXPGUI AppleScript
    183179as the "open with" application for every GSAS experiment (.EXP) file
    184 that is read or written by EXPGUI, provided that the Development Tools program
    185 Rez is found in /Developer/Tools.
    186 At the same, EXPGUI will also designate an icon for the .EXP file.
    187 After this is done, EXPGUI can be invoked by simply double-clicking on
    188 a GSAS experiment file.
     180that is read or written by EXPGUI. This is done with the
     181Development Tools program Rez, found in /Developer/Tools or in the gsas folder.
     182At the same time, EXPGUI will also set an icon for the .EXP file.
     183After this has been done, EXPGUI can be invoked by simply double-clicking on
     184a GSAS experiment file (.EXP file) icon.
    190186If for some reason you would prefer this not be done
    205201<HR noshade><HR noshade>
    206 <a name="FinkAptGet"></a><h4>Installing software from the command line</H4>
    207 With FINK installed, it is possible to download and install binary
    208 versions of the required programs by entering the following command
    209 in a terminal or xterm window:</I>
    210 <PRE>
    211      sudo apt-get install tcltk blt libpng3-shlibs
    212 </PRE>
    214 <HR noshade><HR noshade>
    216 <a name="FinkCommander"></a><h4>Installing software using FinkCommander</H4>
    217   <p><em>A second method, which is recommended for everyone other than UNIX
    218         gurus, is to use instead the &quot;FinkCommander&quot; application,
    219         which is provided in a separate directory
    220     (of the same name: see picture below). After installing the fink package
    221         (&quot;Fink... Installer.pkg&quot;),
    222      launch &quot;FinkCommander&quot;. &quot;FinkCommander&quot;
    223      which is a
    224      GUI interface for fink (that allows you to avoid having to
    225      remember these ugly-, long-, obsure and esoteric
    226      UNIX-styled commands)</em>
    227   <p>
    228     In &quot;FinkCommander&quot;, with your computer connected to the
    229     internet, simply use &quot;Update-all&quot;
    230     (in the &quot;Source&quot; menu)
    231     the first time you run &quot;FinkCommander&quot;,
    232     then be patient while Fink tabulates a list of the latest versions of
    233     all available OS X software packages.
    235   <p>Then, in the "binary" menu, select
    236       the &quot;blt&quot; package and ask to install it
    237       (from a binary distribution) using the "install" command,
    238       as shown in the picture below.
    239       Since FinkCommander will automatically load the packages required by
    240       blt (dependencies), this will also cause Tcl/Tk to be loaded or
    241       updated.
    242       <P>
    243       Repeat this step to install the &quot;libpng3&quot; library.
    244       <P>
    245   <table width="75%" border="1">
    246     <tr>
    247       <td width="55%">
    248       <a href="FinKComImage2.jpg" target="_blank">
    249       <img src="FinKComImage2.jpg" width="400" height="300" border="0">
    250       </a></td>
    251       <td width="45%"><p>The &quot;FinkCommander&quot; folder on
    252             the desktop (back window) and application (front window) showing
    253          the installation of the binary
    254             &quot;blt&quot; package.
    255         <p>(click to enlarge)</p></td>
    256     </tr>
    257   </table>
    258   <dt></dt>
    259   <p><em>Depending on which version of OS X you have, and the
    260          versions of the available binary distributions, it is possible that
    261          the above may not work. If this occurs,
    262           simply repeat the process, but this time use the install command
    263           from the source menu.
    264         The will achieve the same result, but will take much longer
    265         (say 15-45 minutes) as Fink will download and compile the source codes
    266         for the various packages.</em>
     202<h4>The Tcl/Tk Starkit</H4>
     204The GSAS-EXPGUI distribution now includes a single file version of the
     205entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called
     206BLT, that is used extensively within EXPGUI. The inclusion of this file
     207within the package simplifies installation considerably.
     208This single 3 Mb file,
     209<tt>gsas/ncnrpack_osx</tt>, contains many other Tcl/Tk packages (that are
     210not used within EXPGUI) and may be of value for use with other applications.
     211Note that the EXPGUI AppleScript will look for Tcl/Tk first as the
     212<tt>ncnrpack_osx</tt> file in the same folder as where the <tt></tt>
     213script is located. If this <tt>ncnrpack_osx</tt>
     214file is deleted, renamed or moved,
     215then the script will look for the standard Tcl/Tk program (<tt>wish</tt>) in the
     216<tt>/sw/bin</tt> directory.
    268217<HR noshade><HR noshade>
    272221you may have a setup problem with X-windows (X11).
    273222One common reason for this is that X11 must be restarted any time
    274 your computer's IP address changes. This can happen when you connect your
    275 Mac to a network directly or with a modem. Your IP address can change even
    276 while your computer is wired into a network.
     223your computer's hostname changes, which may be caused by starting/stopping
     224networking, dialing in for e-mail or even by a change in
     225IP address initiated by the network DHCP server, if you are hardwired into
     226a network.
    278228If exiting and restarting X11 does not address your problem,
    282232One possible problem is the definition for the X11 display (shell
    283233environment variable DISPLAY).
    284 On my machine, this variable is set correctly in an X11 xterm window, but
    285 is not set by default within an Aqua terminal window.
    286 <P>
    287 A quick test for this is to type xclock at the shell prompt:
     234On my machine, this variable seems to be set correctly in X11 xterm windows,
     235but is not set by default within an Aqua terminal window unless
     236you make changes to your shell startup.
     238A quick test for X11 problems is to type xclock at the shell prompt:
    290241     bash-2.05a$ xclock
    292 If you get a clock display -- great. If you get the following error message
     243If you get a clock display -- great, X windows is working!
     245If you get the following error message
    293246the DISPLAY variable is not set:
    299 If on the other hand, you get this error message, there is a problem
    300 with Xwindows:
     252If on the other hand, you get this error message, there is a
     253security problem with X windows:
    302255     bash-2.05a$ xclock
    303256     Error: Can't open display: localhost:0.0
     258This will most likely be solved by exiting and restarting X11 (see above).
    306260You can set the DISPLAY variable in bash/zsh, etc. using:
    314268     [d120234:~] toby% setenv DISPLAY localhost:0.0
     270(For info on how to do this automatically, see step 2 in
     271<a href="
    317275A second possible problem relates to the installation of the
    318 Tcl/Tk and BLT packages.
    319 You can test if Tcl/Tk and the BLT package are installed correctly using the
     276Tcl/Tk and BLT packages. This problem seems unlikely, now that
     277the Tcl/Tk package is included in the distribution, but if you have
     278removed the ncnrpack_osx file from the gsas folder, the AppleScript
     279will try to use wish installed in /sw/bin. If you are choosing to do this,
     280you can test if Tcl/Tk and the BLT package are installed correctly using the
    320281following commands:
    338299  and help with this documentation was provided by
    339300  Francois Farges -- many thanks!
     301<P>Thanks to Paul Kienzle of the
     302<a href="">
     303NCNR DAVE project</A> for providing the "all in one file" (starkit)
     304version of Tcl/Tk for OS X.
    341306<P>GSAS is Copyright, 1984-2000, by
Note: See TracChangeset for help on using the changeset viewer.