|
| 1 | +While I hope this never happens again, there have been occasions where a |
| 2 | +version of GSAS-II has a bug that prevents the program from starting. |
| 3 | +If this version is installed, it is then not possible to access the |
| 4 | +Help/Update menu command to obtain the different version of |
| 5 | +GSAS-II. The same thing can also happen if you make changes to the |
| 6 | +files yourself and introduce an error. Also, if you make changes to |
| 7 | +the GSAS-II Python (.py) files, you can no longer obtain updates. |
| 8 | + |
| 9 | +A script is provided that can be used to reset any locally made |
| 10 | +changes and then install the lastest version of GSAS-II. If you have |
| 11 | +made changes that you wish to retain, you should make a copy of them |
| 12 | +either using a utility to place a copy elsewhere, or you can use the |
| 13 | +git stash, branch or commit commands. The commands below will |
| 14 | +overwrite your changes with the latest GSAS-II version. |
| 15 | + |
| 16 | +On windows |
| 17 | +---------------- |
| 18 | + |
| 19 | +At present, two windows .BAT files are created in the directory where |
| 20 | +GSAS-II is installed, one named `Reset2FreshGSASII.bat` the other |
| 21 | +`start_G2_bootstrap.bat`. Thus, if GSAS-II is installed in directory |
| 22 | +`C:\Users\toby\gsas2full` the files will be named |
| 23 | +`C:\Users\toby\gsas2full\Reset2FreshGSASII.bat` and |
| 24 | +`C:\Users\toby\gsas2full\start_G2_bootstrap.bat`. |
| 25 | +Either will restore the GSAS-II files, but the |
| 26 | +`Reset2FreshGSASII` file, will ask you to confirm before acting. The |
| 27 | +files can run by locating them in the Windows File Explorer and |
| 28 | +double-clicking on it or by typing the file name into the cmd.exe |
| 29 | +window. |
| 30 | + |
| 31 | +On MacOS and Linux |
| 32 | +------------------------ |
| 33 | + |
| 34 | +At the time this is being written, an error prevents the script from |
| 35 | +running, but this can be corrected by editing the `reset-gsasII.sh` |
| 36 | +file manually (see below). Note that this file is placed in the `bin` directory |
| 37 | +immediately below the GSAS-II installation directory. Thus, if |
| 38 | +GSAS-II is installed at location `/Users/toby/G2/gsas2full` then the |
| 39 | +file will be named `/Users/toby/G2/gsas2full/bin/reset-gsasII.sh`. (It |
| 40 | +will appear in the path if conda is initialized.) Depending on the OS, |
| 41 | +it may be possible to locate and run this file in a system-supplied |
| 42 | +file browser, or type the file name into a terminal window. |
| 43 | + |
| 44 | +The error in the script is that the second line is incorrect. If the |
| 45 | +lines appear as:: |
| 46 | + |
| 47 | + # Commands to run GSAS-II load/update process |
| 48 | + source /bin/activate base |
| 49 | + /Users/toby/G2/gsas2full/bin/python /Users/toby/G2/gsas2full/gitstrap.py --reset |
| 50 | + |
| 51 | +The second line should be changed as follows:: |
| 52 | + |
| 53 | + # Commands to run GSAS-II load/update process |
| 54 | + source /Users/toby/G2/gsas2full/bin/activate base |
| 55 | + /Users/toby/G2/gsas2full/bin/python /Users/toby/G2/gsas2full/gitstrap.py --reset |
0 commit comments