wiki:InstallWindows
Last modified 6 months ago Last modified on 09/06/2012 01:32:28 PM

Installing GSAS & EXPGUI on Windows

There are three ways provided here to install GSAS & EXPGUI. The first two are preferred since they download directly from a subversion repository. In this method the distribution files do not need to change when the program is updated. Instead, the latest version of the programs are downloaded from a server when the program is installed (an internet connection is obviously required). Subsequently, if there are updates to GSAS or EXPGUI, an update can be made where only the modified or added files are ugraded. This update step can be done using the File/Update?... menu option in EXPGUI or by executing the bootstrap.bat file in the GSAS directory. However, these methods require ~double the space needed by GSAS & EXPGUI. For users who need to install GSAS & EXPGUI on systems where an internet connection to the server is not possible or where space usage (~50 Mb) is critical, a .zip file is also provided with all files, but this requires that upgrades be performed by downloading the entire .zip file each time an upgrade will be installed and this distribution will not be updated as frequently.


Option 1: Install self-upgrading GSAS & EXPGUI from a zip file

This install option works for all Windows systems, except for at a few locations where a proxy server may be blocking access to our svn (subversion) server. See the discussion on proxies for more on configuring that.

Since, the packaging program used for Option 2 getting a bit old and fails with a runtime error on some computers, an alternate process is available to install in the same fashion. (I am seeking a volunteer to repackage GSAS and EXPGUI with a more modern installer, please contact brian.toby@….) So, an alternate process is available to install the same mechanism, but starting from a .zip repository. However, this method requires more steps. Directions below are for Windows XP and might need to be slightly different on other versions of Windows. This process requires that the files from the zip package must be loaded into an empty directory. If you opt to keep an old GSAS/EXPGUI version, create a new folder for this install (or rename the older version). This process will fail if used in the location where the package has already been loaded.

  1. Download file http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsas+expgui_svn.zip
  2. Open the file in the windows file browser, you should see six files and a folder.
  3. Create a directory where these files should go. I recommend C:\GSAS, but any drive can be used.
  4. Drag (Copy) the contents of the zip file to the new GSAS directory.
  5. Run the BOOTSTRAP.BAT file in the GSAS directory to download the GSAS & EXPGUI files from the server. Note, this file can safely be rerun if a problem occurs in the download. In fact, whenever it is run, it will check the files on your computer against those on the repository and will download any updates.
  6. (optional) Run the MAKEREGISTRY.BAT file to make registry entries that change the icon associated with .EXP files and to link GSAS applications to these files. By default, a double-click on a .EXP file will start EXPGUI, but this can be changed by editing the batch file (see comments inside).
  7. (optional) Make a desktop shortcut to run EXPGUI (see How to Create a Shortcut below).
    1. Use command c:\gsas\exe\ncnrpack.exe c:\gsas\expgui\expgui (modify path from c:\gsas, as needed
    2. Use name EXPGUI
    3. Use as icon the expgui.ico file in c:\gsas (or wherever)
  8. (optional) Make a desktop shortcut to run PC-GSAS (see How to Create a Shortcut below).
    1. Use command c:\gsas\exe\pc-gsas.exe (modify path from c:\gsas, as needed
    2. Use name PC-GSAS
    3. Use as icon the gsas.ico file in c:\gsas (or wherever)
  9. (optional) Add shortcut(s) to Start Menu.
    1. Right-click on Start Menu, select open from list of choices
    2. Left-click on Programs folder
    3. Right-click on a blank section of folder and select new->folder to create place for shortcuts, name the new folder GSAS or GSAS+EXPGUI, etc.
    4. Copy the shortcut(s) created above from the desktop to the new folder in Start Menu\Programs

Note that if you do not create shortcuts using the above steps, the batch files StartEXPGUI.bat and StartPC-GSAS.bat can be used to start EXPGUI and GSAS respectively. These files cannot be moved from the GSAS directory, but shortcuts to these files can be made and those shortcuts can be moved and can have their starting directory changed.

How to create a shortcut

  1. On a blank part of the Windows desktop, click the right mouse button and then select NEW and then shortcut and click with the left mouse button. Find the file to be run. If the command has two or more parts (such as c:\gsas\exe\ncnrpack.exe c:\gsas\expgui\expgui, you will need to edit this, see below.

(modify previous paths, if you have located the files in different places)

  1. click on NEXT with the left mouse button.
  2. Enter name (for example EXPGUI)
  3. click on FINISH with the left mouse button.
  4. Right-click on the newly created shortcut, from the menu select Properties
  5. Change the icon for the shortcut using the "Change Icon..." button to select an icon file (for example expgui.ico)
  6. If the command has two or more parts (such as c:\gsas\exe\ncnrpack.exe c:\gsas\expgui\expgui) edit the information in the Target box. Use quotes (") around file names that contain spaces.
  7. (optional) Change the default starting directory by changing the contents of the "Start in" box.
  8. Click on FINISH with the left mouse button.

Option 2: Install self-upgrading GSAS & EXPGUI with self-installer

This option is easier than the above, but it does not work on all computers. It appears that the self-installer does not even run on at least some 64-bit versions of Windows. On other computers, depending on how security is set up, you may get a 'Access denied writing HKEY-LOCAL_MACHINE...' error, unless run from an admin account, particularly in Windows-7. If errors occur please try using Option 1, above.

If you have a previous version of GSAS & EXPGUI installed, this will not update that version. You can either delete that version or keep it, but note that shortcuts to the older version will likely be overwritten and the registry keys (for right-click options) certainly will be replaced. If you opt to keep the old version, load this version in a new location (or rename the older version). This process will fail if used in the location where the package has already been loaded.

  1. download and run http://11bm.xray.aps.anl.gov/downloads/gsas/svnload/gsas+expgui_svn.exe (this may require more than one step depending on your browser, OS and security settings.)
  2. Run through the installer pages, selecting options as needed. Most defaults options are good choices, though some people might prefer to install shortcuts in their Start menu and might prefer no desktop shortcuts.

Note: I am trying to get information on what does not work when one loads GSAS into a directory path that contains spaces (such as C:\Documents & Settings\username\gsas). Please send them to mailto:toby@…

  1. After you press the Install button on the last page of the installer, the bootstrap.bat file is started in a cmd.exe window.
  2. In the cmd.exe window, the names of files will stream by as they are loaded (see cmdout.png attachment for what the window will look like at the end). Press Enter in this window and then click on Finish in the "Setup Complete" window. Installation is now complete. GSAS & EXPGUI can now be run.

Note this distribution is for Windows-XP or later. Windows-2000 might work; Windows-95, -98 & -ME are not supported. Also, this distribution does not include an option to uninstall the software. This was removed since it seemed to cause security conflicts for some non-sysadmin users. If you want to uninstall the software you can delete the folder and shortcuts. A few registry items will remain, but they cause no effect and are a lot of work to remove. On some windows systems, for reasons unknown, the gsas+expgui_svn.exe program crashes with a runtime error. If this happens for you, see the next step.


Option 3: Install non-updating GSAS & EXPGUI from a zip file

If the above two options will not work for you, then this should. The resulting installation is not-self updating, and may not reflect the latest releases, which is why this is the last choice.

If you need to download a single file that will be used to install GSAS & EXPGUI onto a computer where a connection cannot be made to the subversion server, a smaller all-in-one download is available. Directions below are for Windows XP and might need to be slightly different on other versions of Windows. This process can be used to overwrite an older GSAS/EXPGUI install.

  1. Download file http://11bm.xray.aps.anl.gov/downloads/gsas/windows/gsas+expgui_win.zip
    1. Note that the subversion version number for this distribution can be determined by noting the latest number gsas+expgui_win_Vxxxx.zip in directory http://11bm.xray.aps.anl.gov/downloads/gsas/windows/
  2. Open the file in the windows file browser, you should see a gsas folder.
  3. Drag that folder to where you want to install GSAS & EXPGUI. Any drive on your computer is fine, but you may encounter problems if you use your desktop or My Documents folder. I recommend C:\GSAS, but any drive can be used.
  4. (optional) Run the MAKEREGISTRY.BAT file to make registry entries that change the icon associated with .EXP files and to link GSAS applications to these files. By default, a double-click on a .EXP file will start EXPGUI, but this can be changed by editing the batch file (see comments inside).
  5. (optional) Make a desktop shortcut to run EXPGUI (see How to Create a Shortcut above).
    1. Use command c:\gsas\exe\ncnrpack.exe c:\gsas\expgui\expgui (modify path from c:\gsas, as needed
    2. Use name EXPGUI
    3. Use as icon the expgui.ico file in c:\gsas (or wherever)
  6. (optional) Make a desktop shortcut to run PC-GSAS (see How to Create a Shortcut above).
    1. Use command c:\gsas\exe\pc-gsas.exe (modify path from c:\gsas, as needed
    2. Use name PC-GSAS
    3. Use as icon the gsas.ico file in c:\gsas (or wherever)
  7. (optional) Add shortcut(s) to Start Menu.
    1. Right-click on Start Menu, select open from list of choices
    2. Left-click on Programs folder
    3. Right-click on a blank section of folder and select new->folder to create place for shortcuts, name the new folder GSAS or GSAS+EXPGUI, etc.
    4. Copy the shortcut(s) created above from the desktop to the new folder in Start Menu\Programs

Upgrades

If one of the first two options is used to install GSAS and EXPGUI, the software can download and install later upgrades from a menu or by running a batch file: From EXPGUI one can press the "Upgrade GSAS/EXPGUI" menu button in the File menu. The response to this will be a window that says if there are updates to download or that the programs are "up-to-date". If there are updates, you have the option of installing them and restarting EXPGUI. This menu item will not be present if the non-updating method was used to install GSAS & EXPGUI.

If you do not use EXPGUI, you can update by opening the C:\GSAS folder and clicking on the bootstrap.bat file or click on Start, then Run... and then type/browse to c:\gsas\bootstrap.bat (replace c:\GSAS with the installation location you used.) See bootstrap_upgrade.png attachment for what this looks like. This file is not present when GSAS & EXPGUI are installed using the non-updating method.

One other option for upgrades is to use the free Tortoise SVN package (http://tortoisesvn.net/), which I recommend highly to windows users. Note that if you make any modifications to any files distributed as part of GSAS or EXPGUI, these files may not be fully upgraded, should these changes conflict with changes made in the distribution files. If you are in the practice of modifying the programs, you should learn to use Tortoise SVN to do your upgrades.

If you install using Option 3, to upgrade you must download and install a newer gsas+expgui_win.zip file.

Attachments