Changeset 773
- Timestamp:
- Dec 4, 2009 5:11:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/osx.html
- Property rcs:date changed from 2004/01/12 19:42:37 to 2004/01/30 00:47:28
- Property rcs:lines changed from +32 -20 to +206 -158
- Property rcs:rev changed from 1.2 to 1.3
r767 r773 30 30 31 31 32 Th ese are approximate directions for installing GSAS & EXPGUI on a33 Macintosh OS X machine. The software has been built using OS X 10.2.632 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 34 and has been installed successfully on 10.2 and 10.3 machines. 35 Note that most users will probably have already installed X11 and 36 FINK on their computers. Most OS X books can provide more information 37 on how to do this. 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. 38 43 39 44 <OL> … … 46 51 >http://www.apple.com/macosx/features/x11/download/ 47 52 </A>. </I> 48 (Please do not contact me for help with this -- I have never done it).49 53 </DL></DL> 50 54 51 55 <P><LI>Install FINK 52 56 <DL><DL><I> 53 This software can be downloaded from 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 54 60 <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= 55 61 http://fink.sourceforge.net/" 56 62 >http://fink.sourceforge.net/ 57 63 </A>. Download the package and then double-click on it. 58 </I> (Please do not contact me for help with this -- I have never done it).64 </I> 59 65 </DL></DL> 60 66 … … 62 68 <P><LI>Download and install required packages. 63 69 <DL><DL><I> 64 GSAS requires a the "Portable Network Graphics" (libpng3) library.65 EXPGUI requires the X11 (not Aqua) Tcl/Tk and BLT packages.66 There is more than one way to install them. For example, you can use the67 f ink command to compile and install packages from source code. The68 easier way is to simply download binary versions. With FINK installed 69 this is easy, use this command in a terminal or X11 xterm window:</I> 70 <PRE>71 sudo apt-get install tcltk blt libpng3-shlibs 72 </PRE> 73 (I am probably not the best person to provide help on this either.) 74 </DL></DL> 75 76 <P><LI>Download the GSAS & EXPGUI programs .77 <DL><DL> <I>78 Download this file from the NIST website: 79 < /I>80 <a href="ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsaskit. tar.gz">81 ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/osx_gsaskit. tar.gz</a> (~7 Mb)82 < I>83 These files can also be downloaded from the CCP14 mirrors</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> 84 90 [(<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= 85 http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit. tar.gz"91 http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg" 86 92 >UK</a>), 87 93 (<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= 88 http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit. tar.gz"94 http://ccp14.sims.nrc.ca/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg" 89 95 >Canada</a>), 90 96 (<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi? 91 url=http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit. tar.gz"97 url=http://ccp14.semo.edu/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg" 92 98 >US</a>) or 93 99 (<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= 94 http://ccp14.minerals.csiro.au/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit. tar.gz"100 http://ccp14.minerals.csiro.au/ccp/ccp14/ftp-mirror/briantoby/pub/cryst/gsas/osx_gsaskit.dmg" 95 101 >Australia</a>)]. 96 102 <P> 97 <I> 98 Note that if you have StuffIt installed, the compressed osx_gsaskit.tar.gz 99 may be expanded to osx_gsaskit.tar and the contents (folder gsas) 100 may be created automatically. 101 In this case you can simply move this folder to the desired 102 location.</I> 103 <P> 104 <I> 105 If you need to expand and extract the files from the tar.gz file "manually" 106 you can do this in a terminal or X11 xterm window. 107 Assuming that you downloaded the above file to your desktop and wish to install 108 the files in directory </I>/Users/[me]/Programs/gsas<I> 109 (where </I>[me]<I> is your username), you will use commands like this: 110 </I> 111 <PRE> 112 cd 113 mkdir -p Programs/gsas 114 cd Programs 115 tar xvzf ~/Desktop/osx_gsaskit.tar.gz 116 </PRE> 117 If you wish to retrieve the files from the expanded osx_gsaskit.tar file, 118 replace the last command with this: 119 <PRE> 120 tar xvf ~/Desktop/osx_gsaskit.tar 121 </PRE> 122 </DL></DL> 123 124 <LI>Make shortcuts to run EXPGUI 125 <DL><DL><I> 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> 126 117 At this point you are able to run EXPGUI using the full command name 127 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>. 128 174 </I> 129 <PRE> 130 /Users/[me]/Programs/gsas/expgui/expgui 131 </PRE> 132 <I> 133 but this gets old fast. Here are some different approaches that can be used 134 to make EXPGUI easier to run: 135 </I> 136 </DL></DL> 137 <UL> 138 <P><LI><B>Create alias commands</B> 139 <DL><DL> 140 <P><I>Do this by placing alias commands into your ~/.cshrc file:</I> 141 <PRE> 142 alias expgui /sw/bin/wish /Applications/gsas/expgui/expgui 143 alias gsas /Applications/gsas/gsas 144 </PRE> 145 (where /Applications is the location where you have installed GSAS.) 146 <I>The above applies to users of the csh & tcsh shells. (You can find what 147 shell you use by typing</I> 148 <PRE> echo $SHELL</PRE> 149 <I>If you use bash, etc., you will put the commands in 150 your ~/.profile file and the syntax is this:</I> 151 <PRE> 152 alias expgui='/sw/bin/wish /Applications/gsas/expgui/expgui' 153 alias gsas='/Applications/gsas/gsas' 154 </PRE> 155 <P> 156 <I>When this is done, restart X11 and from an X11 window you can type </I> 157 <PRE> gsas</PRE> or 158 <PRE> expgui</pre> 159 <I>Note that this will also work:</I> 160 <PRE> expgui EXPFILE.EXP</pre> 161 162 </DL></DL> 163 <a name="AppleScript"> 164 </a><P><LI><B>Create an AppleScript to run EXPGUI</B> 165 <DL><DL> 166 <IMG SRC="osx1.jpg" ALT="EXPGUI menu" ALIGN="RIGHT"> 167 When run in OS X, a special menu appears in the EXPGUI file menu, 168 "Create AppleScript," as shown to the right. When this is selected, 169 you are asked to select a default starting directory for EXPGUI (this 170 is for convenience; you can move to and work with .EXP files located 171 in any directory.) You also select a directory and file name to save 172 the script. Note that the default for this, ~/Library/Scripts/EXPGUI.scpt, 173 will place the script in your "Script Menu" (see 174 <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url= 175 http://www.apple.com/applescript/scriptmenu/"> 176 http://www.apple.com/applescript/scriptmenu</A>). 177 <BR CLEAR="ALL"> 178 </DL></DL> 179 180 <a name="CompileAppleScript"> 181 <P><LI><B>Create an Applet/Droplet to run EXPGUI</B> 182 <DL><DL> 183 If you double-click on the EXPGUI AppleScript, created above, you 184 will open it in the Script Editor, where you can convert it from 185 a "Compiled Script" to a "Application". This application can then be 186 used to start EXPGUI if doubled-clicked in a Finder window or on the desktop. 187 You can also drag experiment (.EXP) files onto the icon to launch EXPGUI on 188 those files (if you drag more than one .EXP file, an EXPGUI window is opened 189 for each file -- use with care if you are short on memory). 190 <P> 191 To create an application from within the Script Editor, use the 192 "File/Save As" menu option and be sure to select "Application" as the Format, 193 as is shown below. I suggest that you also select the 194 "Never Show Startup Screen" option, as is also shown below. 195 You can call the file anything, although EXPGUI makes a 196 certain amount of sense. You can put this file anywhere you choose, 197 but either placing it on the dock or desktop makes a lot of sense. 198 <P> 199 </DL></DL> 200 <IMG SRC="osx2.jpg" ALT="Script Editor save as options" ALIGN="TEXTTOP"> 201 <DL><DL> 202 <P> 203 To change the icon, you can to the following: 204 <UL> 205 <IMG SRC="expgui.jpg" ALIGN=RIGHT ALT="Sample 128x128 EXPGUI icon"> 206 <LI>copy into the clipboard whatever image you would like to use, 207 such as the image to the right, which can also be 208 found as file .../gsas/expgui.icns. (I am hoping 209 that someone with more talent can contribute something better.) 210 <LI>Control-click on the EXPGUI app file 211 <LI>Click on the tiny icon under the word "general" 212 <LI>Paste the picture from the clipboard (Edit/Paste or Apple-V) 213 <BR CLEAR="ALL"> 214 </UL> 215 </DL></DL> 216 217 218 <P> 219 <B>Open questions:</B> I am far from a Mac expert. Several problems 220 I would like to solve are: 221 <OL> 222 <LI>Is there a way to create an application, as opposed to a compiled script, 223 directly from an AppleScript, so I can do this for the user? 224 <LI>Can I associate an icon with an app/script from within an AppleScript 225 (so I can do it automatically)? 226 <LI>Are there other (better?) ways to integrate AppleScripts into 227 OS X for easy use. 175 </DL></DL> 176 228 177 </OL> 229 If you have any advice, please send it my way. 230 </OL> 231 232 <HR><HR> 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> 233 195 <h4>Mac ideosyncracies</H4> 234 196 <P> 235 Unlike the Windows & Unix ports, Mac windows may not be updated 236 until you click on them. This is seems to be the case for PGPLOT 237 windows (in POWPLOT, RAWPLOT,...) after the first plot. After typing the 238 command to update the graph, click on the window bar and the plot will 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 239 203 update. 240 <HR><HR> 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 241 270 <h4>Problems</H4> 242 271 If you cannot get EXPGUI or the GSAS graphics programs to work, 243 you may have a setup problem with X-windows (X11). As an example, when I start 244 a terminal window, there is no definition for the X11 display (this does 245 work correctly by starting an xterm session in X11). 246 A quick test is to type xclock at the prompt: 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: 247 288 248 289 <PRE> … … 273 314 [d120234:~] toby% setenv DISPLAY localhost:0.0 274 315 </PRE> 275 316 <P><LI> 317 A second possible problem relates to the installation of the 318 Tcl/Tk and BLT packages. 276 319 You can test if Tcl/Tk and the BLT package are installed correctly using the 277 320 following commands: … … 288 331 "pack [blt::graph .g]" command is entered, a set of x- and y-axes should appear 289 332 in this window. The window should disappear after "exit" is typed. 333 </OL> 290 334 <P> 291 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 292 341 <P>GSAS is Copyright, 1984-2000, by 293 342 the Regents of the University of California. … … 318 367 </BODY> 319 368 </HTML> 320
Note: See TracChangeset
for help on using the changeset viewer.