source: trunk/doc/osx.html @ 835

Last change on this file since 835 was 835, checked in by toby, 11 years ago

# on 2005/02/09 21:48:52, toby did:
cleanup

  • Property rcs:author set to toby
  • Property rcs:date set to 2005/02/09 21:48:52
  • Property rcs:lines set to +3 -3
  • Property rcs:rev set to 1.6
  • Property rcs:state set to Exp
  • Property svn:keywords set to Author Date Revision Id
File size: 13.6 KB
Line 
1<HTML>
2<HEAD>
3   <TITLE>Mac OS X Installation Notes for EXPGUI</TITLE>
4   <meta name="keywords" content="crystallography, Rietveld, diffraction,
5   GSAS, EXPGUI, Mac, OS X">
6</HEAD>
7<style>
8A:link {text-decoration:none}
9A:vlink {text-decoration:none}
10</style>
11
12<BODY BGCOLOR="#FFFFFF"
13      topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" 
14      text="#000000" link="#0033ff" vlink="#0033ff" alink="#0033ff">
15
16<?
17   include("/var/www/include/navigation.inc");
18   include("/var/www/include/utility.inc");
19?>
20<blockquote><font face="arial, helvetica, sans-serif">
21
22<TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT>
23<TR><TH><A  Href="expgui.html">EXPGUI home</A> 
24</TH></TR></TABLE><BR CLEAR=ALL>
25<CENTER><H1>
26<HR noshade width="75%" size="2" align="center">
27Installing GSAS/EXPGUI under Mac OS X
28<HR noshade width="75%" size="2" align="center">
29</H1></CENTER>
30
31
32This page contains information on installing and running GSAS & EXPGUI
33on Macintosh OS X computers. The software has been built using OS X 10.2.8
34and has been installed successfully on 10.2 and 10.3 machines.
35
36<h2>Installation</H2>
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.
43
44<OL>
45<P><LI>Install X11
46<DL><DL><I>
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>
50<P>
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.
54<P>
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.
62<P>
63X11 for 10.3 can also be downloaded
64from Apple
65(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
66http://www.apple.com/macosx/features/x11/download/"
67>http://www.apple.com/macosx/features/x11/download/</A>).
68<P>
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!
84</DL></DL>
85
86<P><LI>Download the GSAS & EXPGUI programs as a Mac disk image.
87<DL><DL>
88<I>Download this file from the NIST website:</I>
89<BR>
90<a href="ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsasexpgui.dmg">
91ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsasexpgui.dmg</a> (~13 Mb)
92<BR>
93<I>This file can also be downloaded from the CCP14 mirrors:</I>
94[(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
95http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
96>UK</a>),   
97(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
98http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
99>Canada</a>),
100(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
101http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
102>US</a>) or
103(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
104http://ccp14.minerals.csiro.au/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsasexpgui.dmg"
105>Australia</a>)].
106<P>
107
108Mount this file by double-clicking on it. This should create a new volume in
109your top-level ("Computer") called "GSASvol"; clicking on this device will open
110a finder window with a single folder ("gsas") present.
111(<I>Note that some browsers will automatically perform this step for
112you.</I>)
113<P>
114
115<I>While you can run GSAS & EXPGUI from this location, you are strongly
116suggested to instead copy the entire package to your computer by dragging the
117gsas folder icon to another finder window, or by clicking on it and using
118Copy and Paste.</I>
119</DL></DL>
120
121<LI>Install a "shortcut" to launch EXPGUI
122<DL><DL>
123<IMG SRC="expgui_osx.jpg" ALT="EXPGUI AppleScript icon" ALIGN="RIGHT">
124The OS X version of GSAS & EXPGUI has an EXPGUI AppleScript application
125named <tt>expgui.app</tt> in the gsas folder with the icon shown
126to the right. This AppleScript will start X11,
127if needed and then lauch EXPGUI. (If you have ideas for improving the script,
128the code can be found in file expgui_applescript.txt.)
129The EXPGUI AppleScript can be used in three ways:
130<UL>
131<P><LI>Double-clicking on the icon will launch EXPGUI so that it starts
132with the "file open" window in your home directory. This
133window can then be used to navigate to
134access/create experiments in other folders.
135<P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon
136will cause the experiment files to be opened. If more than one file is dropped,
137each file will open in a separate EXPGUI session.
138<P><LI>Dropping one or more folders onto the EXPGUI icon will cause EXPGUI to be
139started with the "file open" window in that folder.
140</UL>
141<P>
142If you will use GSAS a fair amount, you will likely
143find it convenient to drag the EXPGUI icon to the dock
144for easy access.
145<P>
146Note, that this <B><U>EXPGUI app will not
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
153the desktop or to the Application folder.
154</DL></DL>
155
156<LI>For Unix power users: Make a command line shortcut (optional)
157<DL><DL>
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> 
168<PRE>
169          ~/Applications/gsas/ncnrpack-osx  ~/Applications/gsas/expgui/expgui
170</PRE>
171</DL></DL>
172
173</OL>
174
175<HR noshade><HR noshade>
176<h4>EXPGUI Enhancements specific to the Mac</H4>
177
178EXPGUI will automatically designate the EXPGUI AppleScript
179as the "open with" application for every GSAS experiment (.EXP) 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.
185<P>
186If for some reason you would prefer this not be done
187(I would be interested to hear why) -- deselect the
188"Assign app to .EXP files" checkbox in the Options menu.
189
190<HR noshade><HR noshade>
191<h4>Mac ideosyncracies</H4>
192<P>
193Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated
194until they are brought to the top of the screen by clicking on them
195(given focus). This is most noticible for PGPLOT
196graphics (in POWPLOT, RAWPLOT,...).
197When you type graphics commands in a terminal window, the plot does not
198appear to change. However, click on the PGPLOT's window bar and the plot will
199update.
200
201<HR noshade><HR noshade>
202<h4>The Tcl/Tk Starkit</H4>
203<P>
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>expgui.app</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.
217<HR noshade><HR noshade>
218
219<h4>Problems</H4>
220If you cannot get EXPGUI or the GSAS graphics programs to work,
221you may have a setup problem with X-windows (X11).
222One common reason for this is that X11 must be restarted any time
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.
227
228If exiting and restarting X11 does not address your problem,
229the following paragraphs
230may help you diagnose problems.
231<OL><LI>
232One possible problem is the definition for the X11 display (shell
233environment variable DISPLAY).
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.
237<P>
238A quick test for X11 problems is to type xclock at the shell prompt:
239
240<PRE>
241     bash-2.05a$ xclock
242</PRE>
243If you get a clock display -- great, X windows is working!
244<P>
245If you get the following error message
246the DISPLAY variable is not set:
247<PRE>
248     bash-2.05a$ xclock
249     Error: Can't open display:
250</PRE>
251
252If on the other hand, you get this error message, there is a
253security problem with X windows:
254<PRE>
255     bash-2.05a$ xclock
256     Error: Can't open display: localhost:0.0
257</PRE>
258This will most likely be solved by exiting and restarting X11 (see above).
259<P>
260You can set the DISPLAY variable in bash/zsh, etc. using:
261<PRE>
262     bash-2.05a$ export DISPLAY=localhost:0.0
263</PRE>
264
265or in csh/tcsh, etc. using:
266
267<PRE>
268     [d120234:~] toby% setenv DISPLAY localhost:0.0
269</PRE>
270(For info on how to do this automatically, see step 2 in
271<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
272http://www.chemistry.ucsc.edu/~wgscott/xtal/page1.html"
273>http://www.chemistry.ucsc.edu/~wgscott/xtal/page1.html</A>).
274<P><LI>
275A second possible problem relates to the installation of 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 expgui.app 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
281following commands:
282<PRE>
283     [d120234:~] toby% wish
284     % package require BLT
285     2.4
286     % pack [blt::graph .g]
287     % exit
288</PRE>
289When you type "wish" and press Enter, a new small blank window should appear.
290when you type the 2nd line, "package require BLT," there will be no change in
291the blank window, but the computer should respond "2.4". After the
292"pack [blt::graph .g]" command is entered, a set of x- and y-axes should appear
293in this window. The window should disappear after "exit" is typed.
294</OL>
295<P>
296<HR>
297<P>
298  The EXPGUI icon, the original version of the EXPGUI AppleScript
299  and help with this documentation was provided by
300  Francois Farges -- many thanks!
301<P>Thanks to Paul Kienzle of the
302<a href="http://www.ncnr.nist.gov/dave/">
303NCNR DAVE project</A> for providing the "all in one file" (starkit)
304version of Tcl/Tk for OS X.
305
306<P>GSAS is Copyright, 1984-2000, by
307the Regents of the University of California.
308The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36)
309by the Los Alamos National Laboratory, which is operated by the University
310of California for the U.S. Department of Energy. The U.S. Government is
311licensed to use, reproduce, and distribute this software. Permission is
312granted to the public to copy and use this software without charge, provided
313that this notice and any statement of authorship are reproduced on all
314copies. Neither the Government nor the University makes any warranty, express
315or implied, or assumes any liability or responsibility for the use of this
316software.
317
318<P>The author of EXPGUI is a U.S. Government employee which means that
319EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write
320new sections and make them available to the rest of the world.
321
322<p>Neither the U.S. Government nor any author makes any warranty,
323expressed or implied, or assumes any liability or responsibility
324for the use of this information or the software described
325here. Brand names cited herein are used for
326identification purposes and do not constitute an endorsement by NIST.
327</blockquote>
328<hr>
329<P><font size=-1><a href="mailto:crystal@nist.gov">Questions/Problems: crystal@nist.gov</a>
330<br>
331$Revision: 835 $ $Date: 2009-12-04 23:12:51 +0000 (Fri, 04 Dec 2009) $
332</BODY>
333</HTML>
Note: See TracBrowser for help on using the repository browser.