source: trunk/doc/osx.html @ 794

Last change on this file since 794 was 773, checked in by toby, 12 years ago

# on 2004/01/30 00:47:28, toby did:
revise to match new version

  • Property rcs:author set to toby
  • Property rcs:date set to 2004/01/30 00:47:28
  • Property rcs:lines set to +206 -158
  • Property rcs:rev set to 1.3
  • Property rcs:state set to Exp
  • Property svn:keywords set to Author Date Revision Id
File size: 13.9 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.6
34and has been installed successfully on 10.2 and 10.3 machines.
35
36<h2>Installation</H2>
37The following summarizes the steps needed to load prerequisite software
38as well as the GSAS/EXPGUI distribution.
39I presume that most Mac users will probably have already installed X11 and
40FINK on their computers. I have very limited experience with this, so please
41do not contact me for help with steps 1-3. However,
42most OS X books can provide more details beyond what is given here.
43
44<OL>
45<P><LI>Install X11
46<DL><DL><I>
47This can be done from your OS (Jaguar or Panther) CD-ROM or can be
48downloaded from
49<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
50http://www.apple.com/macosx/features/x11/download/"
51>http://www.apple.com/macosx/features/x11/download/
52</A>. </I>
53</DL></DL>
54
55<P><LI>Install FINK
56<DL><DL><I>
57To do this, you will need to install the Development Tools,
58which are distributed with OS X as well as the FINK package,
59which can be downloaded from
60<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
61http://fink.sourceforge.net/"
62>http://fink.sourceforge.net/
63</A>. Download the package and then double-click on it.
64</I>
65</DL></DL>
66
67
68<P><LI>Download and install required packages.
69<DL><DL><I>
70GSAS requires the "Portable Network Graphics" (libpng3) library.
71EXPGUI requires the X11 (not Aqua) version of Tcl/Tk package; 
72installation of the BLT add-on for Tcl/Tk is needed for plotting
73from EXPGUI (for example, <A Href="liveplot.html">LIVEPLOT</A>).
74There are many ways to install this software.
75One way is to type in <a href="#FinkAptGet">Fink (apt-get) commands, as
76described below.</a>
77A more "Mac-appropriate" approach is to avoid use of the command line
78completely and with a user-friendly front-end,
79<a href="#FinkCommander">FinkCommander, also described below.</a></I>
80</DL></DL>
81
82<P><LI>Download the GSAS & EXPGUI programs as a Mac disk image.
83<DL><DL>
84<I>Download this file from the NIST website:</I>
85<BR>
86<a href="ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsaskit.dmg">
87ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsaskit.dmg</a> (~7 Mb)
88<BR>
89<I>These files can also be downloaded from the CCP14 mirrors:</I>
90[(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
91http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg"
92>UK</a>),   
93(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
94http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg"
95>Canada</a>),
96(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?
97url=http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg"
98>US</a>) or
99(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=
100http://ccp14.minerals.csiro.au/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg"
101>Australia</a>)].
102<P>
103
104<I>What happens when you download this file depends on your method for
105downloading. Some browsers will automatically perform the next step for
106you:</I>
107<P>
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<P>
112<I>While you can run GSAS & EXPGUI from this location, you are strongly
113suggested to instead copy the entire package to your computer by dragging the
114gsas folder icon to another finder window, or by clicking on it and using
115Copy and Paste.</I>
116<P>
117At this point you are able to run EXPGUI using the full command name
118from inside an X11 window -- by typing a command such as this:
119<PRE>
120     /MyApps/gsas/expgui/expgui
121</PRE>
122or
123<PRE>
124     /sw/bin/wish /MyApps/gsas/expgui/expgui
125</PRE>
126
127
128but this gets old fast -- see the following section for a better way.
129</DL></DL>
130
131<LI>Install a "shortcut" to launch EXPGUI
132<DL><DL>
133<I>The following
134instructions describe ways that the EXPGUI program can be integrated
135into the Mac environment.
136</I><P>
137<IMG SRC="expgui_osx.jpg" ALT="EXPGUI AppleScript icon" ALIGN="RIGHT">
138The OSX version of GSAS & EXPGUI has an EXPGUI AppleScript application
139in the "gsas" folder with the icon shown
140to the right. This AppleScript will start X11,
141if needed and then lauch EXPGUI. (If you have ideas for improving the script,
142the code can be found in file expgui_applescript.txt.)
143The EXPGUI AppleScript can be used in three ways:
144<UL>
145<P><LI>Double-clicking on the icon will launch EXPGUI so that it starts
146with the "file open" window in your home directory. This
147window can then be used to navigate to
148access/create experiments in other folders.
149<P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon
150will cause the experiment files to be opened. If more than one file is dropped,
151each file will open in a separate EXPGUI session.
152<P><LI>Dropping one or more folders onto the EXPGUI icon will cause EXPGUI to be
153started with the "file open" window in that folder.
154</UL>
155<P>
156You may find it convenient to drag the EXPGUI icon to the dock,
157for easy access.
158Note, that this <B><U>EXPGUI app will not
159work correctly if copied or moved to another folder</U></B> -- instead
160create an alias (for example using the Finder Command-L key). An alias
161can be moved where desired -- for example, to
162the desktop or to the Application folder.
163</DL></DL>
164
165<LI>Make a command-line "shortcut" to run EXPGUI
166<DL><DL>
167<I>
168If you are a "Unix enthusiast," you might be interested in setting up
169command line short-cuts to the gsas script and the EXPGUI program; however,
170my presumption is that most people buy Mac's to avoid using the command line.
171Those people who wish to define a command line short-cut should
172see section 2.2 in the
173<A Href="expgui_Unix_readme.html">Unix installation notes</A>.
174</I>
175</DL></DL>
176
177</OL>
178
179<HR noshade><HR noshade>
180<h4>EXPGUI Enhancements specific to the Mac</H4>
181
182EXPGUI will automatically designate the EXPGUI AppleScript
183as the "open with" application for every GSAS experiment (.EXP) file
184that is read or written by EXPGUI, provided that the Development Tools program
185Rez is found in /Developer/Tools.
186At the same, EXPGUI will also designate an icon for the .EXP file.
187After this is done, EXPGUI can be invoked by simply double-clicking on
188a GSAS experiment file.
189<P>
190If for some reason you would prefer this not be done
191(I would be interested to hear why) -- deselect the
192"Assign app to .EXP files" checkbox in the Options menu.
193
194<HR noshade><HR noshade>
195<h4>Mac ideosyncracies</H4>
196<P>
197Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated
198until they are brought to the top of the screen by clicking on them
199(given focus). This is most noticible for PGPLOT
200graphics (in POWPLOT, RAWPLOT,...).
201When you type graphics commands in a terminal window, the plot does not
202appear to change. However, click on the PGPLOT's window bar and the plot will
203update.
204
205<HR noshade><HR noshade>
206<a name="FinkAptGet"></a><h4>Installing software from the command line</H4>
207With FINK installed, it is possible to download and install binary
208versions of the required programs by entering the following command
209in a terminal or xterm window:</I>
210<PRE>
211     sudo apt-get install tcltk blt libpng3-shlibs
212</PRE>
213
214<HR noshade><HR noshade>
215
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.
234
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>
267
268<HR noshade><HR noshade>
269
270<h4>Problems</H4>
271If you cannot get EXPGUI or the GSAS graphics programs to work,
272you may have a setup problem with X-windows (X11).
273One common reason for this is that X11 must be restarted any time
274your computer's IP address changes. This can happen when you connect your
275Mac to a network directly or with a modem. Your IP address can change even
276while your computer is wired into a network.
277
278If exiting and restarting X11 does not address your problem,
279the following paragraphs
280may help you diagnose problems.
281<OL><LI>
282One possible problem is the definition for the X11 display (shell
283environment variable DISPLAY).
284On my machine, this variable is set correctly in an X11 xterm window, but
285is not set by default within an Aqua terminal window.
286<P>
287A quick test for this is to type xclock at the shell prompt:
288
289<PRE>
290     bash-2.05a$ xclock
291</PRE>
292If you get a clock display -- great. If you get the following error message
293the DISPLAY variable is not set:
294<PRE>
295     bash-2.05a$ xclock
296     Error: Can't open display:
297</PRE>
298
299If on the other hand, you get this error message, there is a problem
300with Xwindows:
301<PRE>
302     bash-2.05a$ xclock
303     Error: Can't open display: localhost:0.0
304</PRE>
305
306You can set the DISPLAY variable in bash/zsh, etc. using:
307<PRE>
308     bash-2.05a$ export DISPLAY=localhost:0.0
309</PRE>
310
311or in csh/tcsh, etc. using:
312
313<PRE>
314     [d120234:~] toby% setenv DISPLAY localhost:0.0
315</PRE>
316<P><LI>
317A second possible problem relates to the installation of the
318Tcl/Tk and BLT packages.
319You can test if Tcl/Tk and the BLT package are installed correctly using the
320following commands:
321<PRE>
322     [d120234:~] toby% wish
323     % package require BLT
324     2.4
325     % pack [blt::graph .g]
326     % exit
327</PRE>
328When you type "wish" and press Enter, a new small blank window should appear.
329when you type the 2nd line, "package require BLT," there will be no change in
330the blank window, but the computer should respond "2.4". After the
331"pack [blt::graph .g]" command is entered, a set of x- and y-axes should appear
332in this window. The window should disappear after "exit" is typed.
333</OL>
334<P>
335<HR>
336<P>
337  The EXPGUI icon, the original version of the EXPGUI AppleScript
338  and help with this documentation was provided by
339  Francois Farges -- many thanks!
340
341<P>GSAS is Copyright, 1984-2000, by
342the Regents of the University of California.
343The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36)
344by the Los Alamos National Laboratory, which is operated by the University
345of California for the U.S. Department of Energy. The U.S. Government is
346licensed to use, reproduce, and distribute this software. Permission is
347granted to the public to copy and use this software without charge, provided
348that this notice and any statement of authorship are reproduced on all
349copies. Neither the Government nor the University makes any warranty, express
350or implied, or assumes any liability or responsibility for the use of this
351software.
352
353<P>The author of EXPGUI is a U.S. Government employee which means that
354EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write
355new sections and make them available to the rest of the world.
356
357<p>Neither the U.S. Government nor any author makes any warranty,
358expressed or implied, or assumes any liability or responsibility
359for the use of this information or the software described
360here. Brand names cited herein are used for
361identification purposes and do not constitute an endorsement by NIST.
362</blockquote>
363<hr>
364<P><font size=-1><a href="mailto:crystal@nist.gov">Questions/Problems: crystal@nist.gov</a>
365<br>
366$Revision: 773 $ $Date: 2009-12-04 23:11:47 +0000 (Fri, 04 Dec 2009) $
367</BODY>
368</HTML>
Note: See TracBrowser for help on using the repository browser.