82 | | Once the proxy information is entered, `bootstrap.py` is run to update GSAS-II. This will fail with an error message (see example in [#InstallerOutput output shown below] if a network connection is not present, but the installation will still continue. Some additional processing |
83 | | |
84 | | additional processing is done, including creation of an AppleScript to launch GSAS-II. Apple security in Big Sur (MacOS 11.0) will not allow the file. The only way that I (Brian) know to change that is to edit it in the Script Editor. This is implemented in the installation process, but the first time this is done, MacOS asks for permission to run this (as shown immediately below). Note that OK must be pressed within 2 minutes or the request times out (should this happen, in Script Editor, select the GSAS-II window and then in the File menu, select Save). |
85 | | |
86 | | |
87 | | [[Image(n2.png, 300)]] |
88 | | |
89 | | |
90 | | |
91 | | |
92 | | |
93 | | |
94 | | |
95 | | |
96 | | |
97 | | |
98 | | |
99 | | |
100 | | |
101 | | |
102 | | |
103 | | |
104 | | |
105 | | |
106 | | |
107 | | |
108 | | |
109 | | |
110 | | |
111 | | |
112 | | |
113 | | |
114 | | |
115 | | |
116 | | |
117 | | |
118 | | |
119 | | |
120 | | |
121 | | |
122 | | |
123 | | |
124 | | |
125 | | |
126 | | |
127 | | === Step 3: === |
128 | | |
129 | | The installation procedure creates an app to help launch GSAS-II and places that app in the GSAS-II folder. It also opens a Finder window, showing that app (labeled as GSAS-II), as below. This app will not run if moved to another location, but it can be dragged to the toolbar, as is shown below. It may not appear with the GSAS-II icon, as shown in the figure (the reason for this is not yet understood.) |
130 | | |
131 | | Confirm that GSAS-II can run from this app by double-clicking on it. The first time this is done, you will likely be asked to confirm this app should have access to the Terminal app with this message: |
132 | | |
133 | | [[Image(permissons.png, 250)]] |
| 83 | Once the proxy information is entered, `bootstrap.py` is run to update GSAS-II. An error message (see example in [#InstallerOutput output shown below] if a network connection is not present or proxy information is needed, but the installation will still continue. If the computer is connected to the internet later it will be possible to run updates from inside the GSAS-II help menu. Likewise proxy information can be supplied within GSAS-II and then updates will also be possible, see [#BrowserDownload below]. |
| 84 | |
| 85 | |
| 86 | After this step, `bootstrap.py` is run again, but this time the processing is done to speed up application startup and to create a !AppleScript to launch GSAS-II (`GSAS-II.app`). Apple security rules introduced in Big Sur (MacOS 11.0) block running `GSAS-II.app`. The only way that I (Brian) have found to change that is to edit the file it in the Script Editor. This is implemented in the installation process, but the first time this is done, MacOS asks for permission to run this (as shown immediately below). |
| 87 | |
| 88 | [[Image(n2.png, 400)]] |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | Note that OK must be pressed within 2 minutes or the request times out. (Should that happen, in Script Editor, select the GSAS-II window and then in the File menu, select Save). |
| 107 | |
| 108 | |
| 109 | At this point, the installation process ends, where the terminal window appears as immediately |
| 110 | below and a finder window opened with the newly created GSAS-II application selected. |
| 111 | |
| 112 | |
| 113 | |
| 114 | [[Image(n3.png, 700)]] |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | === Step 4 === |
| 149 | |
| 150 | |
| 151 | **//App permissions//**: Note that again Apple security rules restrict the use of the new app. The first time it is used by double-clicking on the app, you will be asked to grant permission for it to create a terminal, as shown below (depending on the MacOS version). |
| 152 | |
| 153 | [[Image(permissons.png, 250)]] [[Image(n-permissons.png, 250)]] |
| 154 | |
137 | | |
138 | | |
139 | | |
140 | | |
141 | | |
142 | | |
143 | | |
144 | | |
145 | | |
146 | | === Step 4: (drag to dock, optional) === |
147 | | |
148 | | The GSAS-II app created by the installation procedure can be dragged to the dock to make launching GSAS-II simple. Note the app will not run if moved to another location, such as the desktop. See the next step on how to create a desktop icon. |
149 | | |
| 158 | For reasons I do not understand, sometimes the installer does not succeed is setting permissions and this message is displayed: |
| 159 | |
| 160 | [[Image(n-app-edit.png, 250)]] |
| 161 | |
| 162 | When this occurs, press the Edit button, which opens the app in the Script Editor. Use the File/Save command in the Script Editor and then close the window (quitting the Script Editor is a good idea). Then |
| 163 | repeat this step and the initial message allowing you to grant permission for GSAS-II to access Terminal should be displayed. |
| 164 | |
| 165 | |
| 166 | === Step 5 (Optional) === |
| 167 | |
| 168 | **//Drag to Dock//**: if desired, the GSAS-II app created before can be dragged to the Dock to make launching GSAS-II simple, as diagrammed below. |
174 | | |
175 | | |
176 | | === Step 5: (Desktop icon, optional) === |
177 | | |
178 | | If you would like place the GSAS-II app in another location (for example your computer's desktop) to make it convenient to start GSAS-II, you need to make an alias. This alias file can be moved. Press control and click on the GSAS-II app (or use right-click with a 2 or 3 button mouse) and a menu of options is shown. Click on "Make Alias" and a new file, "GSAS-II alias" is created in that folder. |
| 193 | === Step 6 (Optional) === |
| 194 | |
| 195 | **//Create Alias//**: Note that while the GSAS-II.app file can be dragged to the dock, it cannot be moved or renamed. Should you wish to have a shortcut to run GSAS-II in another location (such as on your desktop) or wish to use another name, you need to make an alias to it. To create an alias, hold down the control button and click on the GSAS-II app (or use right-click with a 2 or 3 button mouse), this causes a menu of options to be shown, as seen below: |
227 | | [=#InstallError] |
228 | | == Update Error Message == |
229 | | |
230 | | After Python and packages are installed, the ```GSASII/bootstrap.py``` file is invoked. This tests that the |
231 | | GSAS-II binaries files work, creates shortcuts and updates the GSAS-II files using program svn (subversion) from the APS server ```https://subversion.xray.aps.anl.gov/pyGSAS```. The svn update |
232 | | requires a working internet connection. If the svn program is not able to update properly then this error message is shown: |
233 | | |
234 | | [[Image(err.png, 400)]] |
235 | | |
236 | | |
237 | | If the computer does not have an internet connection, this error is expected and can be ignored. If the computer is later connected to the internet, you are recommended to use the !Help/Update command to obtain the latest version of GSAS-II and continue updating periodically. |
238 | | |
239 | | If the computer does have a working internet connection, it is likely that the update failed due to your network requiring an internet proxy (discussed in the next section). |
240 | | |
241 | | Note the message for recreating the error: |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | === Shortcuts === |
| 281 | |
| 282 | Note that it is also possible to start GSAS-II with terminal commands such as these: |
| 283 | |
246 | | If GSAS-II is installed, but the installation process is unable to update, create an app, etc., it may be worthwhile to run this command again by copying the information from your error message into a Terminal.app window (the flag such as --noinstall may be omitted.) This will provide better warning and error messages than above. |
| 289 | Where `<condapath>` is the location where GSAS-II was installed (`~/g2full` unless something else was selected). The installer places these commands in file `<condapath>/start_GSASII.sh` |
| 290 | |
| 291 | Likewise, it is sometimes useful to rerun the bootstrap.py process. This can be done with terminal commands: |
| 292 | |
| 293 | {{{ |
| 294 | source <condapath>/bin/activate |
| 295 | python <condapath>/GSASII/bootstrap.py |
| 296 | }}} |
| 297 | |
| 298 | The installer places these commands in file `<condapath>/start_G2_bootstrap.sh`. |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | = Seeking help = |
| 304 | |
| 305 | There must be better ways to control application permissions in MacOS than what is done here, but I have not been able to determine how to control this either from !AppleScripts or from command line programs. I would very much welcome information on better ways to do this. Please contact brian.toby at ANL.gov if you can offer some knowledge. |
| 306 | |
| 307 | |
| 308 | = Older installers = |
| 309 | |
| 310 | See [MacSingleStepInstaller these older instructions] for infomation on older distributions. They may be needed for systems with older versions of MacOS. Note that these installers do require an internet connection to complete the installation. |
| 380 | [=#Prompted] |
| 381 | = Prompted Installation = |
| 382 | |
| 383 | If the installer is is run without |
| 384 | |
| 385 | |
| 386 | [[Image(0.png, 600)]] |
| 387 | |
| 388 | |
| 389 | Answer prompts from the install script. |
| 390 | |
| 391 | 1. Press enter to start the procedure |
| 392 | |
| 393 | |
| 394 | 2. Press space several times to page through the copyright notice. For convenience the full text [#AnacondaLicense from this screen] and the [#G2license GSAS-II license] are shown below. |
| 395 | |
| 396 | [[Image(4.jpg, 400)]] |
| 397 | |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | 3. Type "```yes```" to accept the copyright information and start the installation. |
| 417 | |
| 418 | [[Image(5.jpg, 400)]] |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | 4. Enter a location for where the files should be installed, if the default is not what you prefer. The default will usually be OK, in which case you can simply press enter. Installation has not been tested where paths contain spaces or special characters, so it is a good idea to install GSAS-II in an alternate location if the default has spaces or Unicode characters. Note that GSAS-II cannot be moved once installed. If you need it to move it please reinstall and delete the old copy. |
| 437 | |
| 438 | Make a note of where you have installed GSAS-II; this will be needed if you have problems with the software. |
| 439 | |
| 440 | [[Image(6.jpg, 400)]] |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | 5. Pressing enter to accept the default installation location or providing a installation location will trigger installation of the software with a series of messages. If the installation progresses normally, the final messages will appear as below: |
| 461 | |
| 462 | [[Image(7.jpg, 400)]] |
| 463 | |
| 464 | If error or warning messages are seen, it is suggested that you save a screen image or use cut and paste to save the text in the window to a file. The most common [#InstallError error message is discussed below]. |
| 465 | |
| 466 | 6. It is recommended that you type "no" for the question about initializing gsas2full using conda init as it is not needed to run GSAS-II. If you say "yes" or use the default, then the version of Python installed by GSAS-II becomes the default version, which usually will not cause problems either. The installation completes with these messages (which can be ignored): |
| 467 | |
| 468 | [[Image(8.jpg, 400)]] |
| 469 | |
443 | | [=#Prompted] |
444 | | == Prompted Installation == |
445 | | |
446 | | [[Image(0.png, 600)]] |
447 | | |
448 | | |
449 | | Answer prompts from the install script. |
450 | | |
451 | | 1. Press enter to start the procedure |
452 | | |
453 | | |
454 | | 2. Press space several times to page through the copyright notice. For convenience the full text [#AnacondaLicense from this screen] and the [#G2license GSAS-II license] are shown below. |
455 | | |
456 | | [[Image(4.jpg, 400)]] |
457 | | |
458 | | |
459 | | |
460 | | |
461 | | |
462 | | |
463 | | |
464 | | |
465 | | |
466 | | |
467 | | |
468 | | |
469 | | |
470 | | |
471 | | |
472 | | |
473 | | |
474 | | |
475 | | |
476 | | 3. Type "```yes```" to accept the copyright information and start the installation. |
477 | | |
478 | | [[Image(5.jpg, 400)]] |
479 | | |
480 | | |
481 | | |
482 | | |
483 | | |
484 | | |
485 | | |
486 | | |
487 | | |
488 | | |
489 | | |
490 | | |
491 | | |
492 | | |
493 | | |
494 | | |
495 | | |
496 | | 4. Enter a location for where the files should be installed, if the default is not what you prefer. The default will usually be OK, in which case you can simply press enter. Installation has not been tested where paths contain spaces or special characters, so it is a good idea to install GSAS-II in an alternate location if the default has spaces or Unicode characters. Note that GSAS-II cannot be moved once installed. If you need it to move it please reinstall and delete the old copy. |
497 | | |
498 | | Make a note of where you have installed GSAS-II; this will be needed if you have problems with the software. |
499 | | |
500 | | [[Image(6.jpg, 400)]] |
501 | | |
502 | | |
503 | | |
504 | | |
505 | | |
506 | | |
507 | | |
508 | | |
509 | | |
510 | | |
511 | | |
512 | | |
513 | | |
514 | | |
515 | | |
516 | | |
517 | | |
518 | | |
519 | | |
520 | | 5. Pressing enter to accept the default installation location or providing a installation location will trigger installation of the software with a series of messages. If the installation progresses normally, the final messages will appear as below: |
521 | | |
522 | | [[Image(7.jpg, 400)]] |
523 | | |
524 | | If error or warning messages are seen, it is suggested that you save a screen image or use cut and paste to save the text in the window to a file. The most common [#InstallError error message is discussed below]. |
525 | | |
526 | | 6. It is recommended that you type "no" for the question about initializing gsas2full using conda init as it is not needed to run GSAS-II. If you say "yes" or use the default, then the version of Python installed by GSAS-II becomes the default version, which usually will not cause problems either. The installation completes with these messages (which can be ignored): |
527 | | |
528 | | [[Image(8.jpg, 400)]] |
529 | | |
530 | | |
531 | | == Older installers == |
532 | | |
533 | | See [MacSingleStepInstaller these older instructions] for infomation on older distributions. They may be needed for systems with older versions of MacOS. Note that these installers do require an internet connection to complete the installation. |
| 590 | |