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> |
---|
8 | A:link {text-decoration:none} |
---|
9 | A: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"> |
---|
27 | Installing GSAS/EXPGUI under Mac OS X |
---|
28 | <HR noshade width="75%" size="2" align="center"> |
---|
29 | </H1></CENTER> |
---|
30 | |
---|
31 | |
---|
32 | This 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 |
---|
34 | and has been installed successfully on 10.2 and 10.3 machines. |
---|
35 | |
---|
36 | <h2>Installation</H2> |
---|
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. |
---|
43 | |
---|
44 | <OL> |
---|
45 | <P><LI>Install X11 |
---|
46 | <DL><DL><I> |
---|
47 | This can be done from your OS (Jaguar or Panther) CD-ROM or can be |
---|
48 | downloaded from |
---|
49 | <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= |
---|
50 | http://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> |
---|
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="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= |
---|
61 | http://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> |
---|
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> |
---|
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"> |
---|
87 | ftp://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= |
---|
91 | http://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= |
---|
94 | http://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? |
---|
97 | url=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= |
---|
100 | http://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 |
---|
105 | downloading. Some browsers will automatically perform the next step for |
---|
106 | you:</I> |
---|
107 | <P> |
---|
108 | Mount this file by double-clicking on it. This should create a new volume in |
---|
109 | your top-level ("Computer") called "GSASvol"; clicking on this device will open |
---|
110 | a finder window with a single folder ("gsas") present. |
---|
111 | <P> |
---|
112 | <I>While you can run GSAS & EXPGUI from this location, you are strongly |
---|
113 | suggested to instead copy the entire package to your computer by dragging the |
---|
114 | gsas folder icon to another finder window, or by clicking on it and using |
---|
115 | Copy 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> |
---|
126 | |
---|
127 | |
---|
128 | but 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 |
---|
134 | instructions describe ways that the EXPGUI program can be integrated |
---|
135 | into the Mac environment. |
---|
136 | </I><P> |
---|
137 | <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 |
---|
140 | to the right. This AppleScript will start X11, |
---|
141 | if needed and then lauch EXPGUI. (If you have ideas for improving the script, |
---|
142 | the code can be found in file expgui_applescript.txt.) |
---|
143 | The 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 |
---|
146 | with the "file open" window in your home directory. This |
---|
147 | window can then be used to navigate to |
---|
148 | access/create experiments in other folders. |
---|
149 | <P><LI>Dropping one or more GSAS Experiment (.EXP) files onto the EXPGUI icon |
---|
150 | will cause the experiment files to be opened. If more than one file is dropped, |
---|
151 | each 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 |
---|
153 | started with the "file open" window in that folder. |
---|
154 | </UL> |
---|
155 | <P> |
---|
156 | You may find it convenient to drag the EXPGUI icon to the dock, |
---|
157 | for easy access. |
---|
158 | Note, 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 |
---|
162 | the 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> |
---|
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> |
---|
175 | </DL></DL> |
---|
176 | |
---|
177 | </OL> |
---|
178 | |
---|
179 | <HR noshade><HR noshade> |
---|
180 | <h4>EXPGUI Enhancements specific to the Mac</H4> |
---|
181 | |
---|
182 | EXPGUI will automatically designate the EXPGUI AppleScript |
---|
183 | as 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. |
---|
189 | <P> |
---|
190 | If 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> |
---|
197 | Unlike in the Windows & Unix versions of GSAS, Mac windows may not be updated |
---|
198 | until they are brought to the top of the screen by clicking on them |
---|
199 | (given focus). This is most noticible for PGPLOT |
---|
200 | graphics (in POWPLOT, RAWPLOT,...). |
---|
201 | When you type graphics commands in a terminal window, the plot does not |
---|
202 | appear to change. However, click on the PGPLOT's window bar and the plot will |
---|
203 | update. |
---|
204 | |
---|
205 | <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> |
---|
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 "FinkCommander" application, |
---|
219 | which is provided in a separate directory |
---|
220 | (of the same name: see picture below). After installing the fink package |
---|
221 | ("Fink... Installer.pkg"), |
---|
222 | launch "FinkCommander". "FinkCommander" |
---|
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 "FinkCommander", with your computer connected to the |
---|
229 | internet, simply use "Update-all" |
---|
230 | (in the "Source" menu) |
---|
231 | the first time you run "FinkCommander", |
---|
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 "blt" 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 "libpng3" 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 "FinkCommander" folder on |
---|
252 | the desktop (back window) and application (front window) showing |
---|
253 | the installation of the binary |
---|
254 | "blt" 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> |
---|
271 | If you cannot get EXPGUI or the GSAS graphics programs to work, |
---|
272 | you may have a setup problem with X-windows (X11). |
---|
273 | One 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. |
---|
277 | |
---|
278 | If exiting and restarting X11 does not address your problem, |
---|
279 | the following paragraphs |
---|
280 | may help you diagnose problems. |
---|
281 | <OL><LI> |
---|
282 | One possible problem is the definition for the X11 display (shell |
---|
283 | environment 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: |
---|
288 | |
---|
289 | <PRE> |
---|
290 | bash-2.05a$ xclock |
---|
291 | </PRE> |
---|
292 | If you get a clock display -- great. If you get the following error message |
---|
293 | the DISPLAY variable is not set: |
---|
294 | <PRE> |
---|
295 | bash-2.05a$ xclock |
---|
296 | Error: Can't open display: |
---|
297 | </PRE> |
---|
298 | |
---|
299 | If on the other hand, you get this error message, there is a problem |
---|
300 | with Xwindows: |
---|
301 | <PRE> |
---|
302 | bash-2.05a$ xclock |
---|
303 | Error: Can't open display: localhost:0.0 |
---|
304 | </PRE> |
---|
305 | |
---|
306 | You can set the DISPLAY variable in bash/zsh, etc. using: |
---|
307 | <PRE> |
---|
308 | bash-2.05a$ export DISPLAY=localhost:0.0 |
---|
309 | </PRE> |
---|
310 | |
---|
311 | or in csh/tcsh, etc. using: |
---|
312 | |
---|
313 | <PRE> |
---|
314 | [d120234:~] toby% setenv DISPLAY localhost:0.0 |
---|
315 | </PRE> |
---|
316 | <P><LI> |
---|
317 | A 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 |
---|
320 | following commands: |
---|
321 | <PRE> |
---|
322 | [d120234:~] toby% wish |
---|
323 | % package require BLT |
---|
324 | 2.4 |
---|
325 | % pack [blt::graph .g] |
---|
326 | % exit |
---|
327 | </PRE> |
---|
328 | When you type "wish" and press Enter, a new small blank window should appear. |
---|
329 | when you type the 2nd line, "package require BLT," there will be no change in |
---|
330 | the 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 |
---|
332 | in 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 |
---|
342 | the Regents of the University of California. |
---|
343 | The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36) |
---|
344 | by the Los Alamos National Laboratory, which is operated by the University |
---|
345 | of California for the U.S. Department of Energy. The U.S. Government is |
---|
346 | licensed to use, reproduce, and distribute this software. Permission is |
---|
347 | granted to the public to copy and use this software without charge, provided |
---|
348 | that this notice and any statement of authorship are reproduced on all |
---|
349 | copies. Neither the Government nor the University makes any warranty, express |
---|
350 | or implied, or assumes any liability or responsibility for the use of this |
---|
351 | software. |
---|
352 | |
---|
353 | <P>The author of EXPGUI is a U.S. Government employee which means that |
---|
354 | EXPGUI is not subject to copyright. Have fun with it. Modify it. Please write |
---|
355 | new 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, |
---|
358 | expressed or implied, or assumes any liability or responsibility |
---|
359 | for the use of this information or the software described |
---|
360 | here. Brand names cited herein are used for |
---|
361 | identification 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> |
---|