Skip to content

Installation on Windows

Joel Pitt edited this page Feb 6, 2014 · 1 revision

Note: this version of instructions is for a very old version of MDiG and Windows isn't currently supported. If you manage to follow the instructions for creating an MDiG distribution please let me know how it went, or even better update the instructions for others ;-)

Table of Contents

Install from scratch for non-developers

Install GRASS, MSYS, and MDiG modules

  1. These are all bundled together, as they are all interdependent. This package also includes a number of other open source libraries (see Creating MDiG distribution for Windows‎ for details).
  2. Download grass-msys-modules-v0.12.exe (~50MB)
  3. Run program and extract to c:\
    • Currently you have to extract to the root c because the start up scripts explicitly mention the location. In future this will be configurable, but if you really need to put it elsewhere, you'll have to edit the scripts "grass63.bat" and "grass63" in <install-location></install-location>/msys/local/bin/
  4. You now have a fully fledged GIS (GRASS) and miniature unix environment (MSYS)!

Install Python and extensions

  1. Download python-and-extensions-v0.12.exe (~30MB).
  2. Run python-and-extensions-v0.12.exe - extract to a temporary directory. Go to that directory.
  3. Install Python (run python-2.5.2.msi) to c:\python25
  4. Install Python packages. PIL-1.1.6.win32-py2.5, pywin32-210.win32-py2.5, lxml-1.3.2.win32-py2.5. Default install options should be fine, as they automatically detect the python directory. When installing pywin32, check the end result (if any), it may say it can't find mfc71.dll, in which case, this file (included with python-and-extensions-v0.12v.exe) needs to be copied to c:\windows\system32.

Install the MDiG Controller

  1. Download mdig-v0.12.exe (<1MB)
  2. Run mdig-v0.12.eve, extract to c:\ (or elsewhere) it will create a directory mdig, let us call the path to this directory $MDIGROOT in future discussion (so $MDIGROOT if installed to c:\ would equal c:\mdig).

Usage

  1. Run c:\msys\msys.bat - this puts you in a unix-like shell called MSys.
  2. In the msys shell, type grass63 and you should launch into grass. You'll need to create a location, or download an example location - How to create locations.
  3. Change to the $MDIGROOT directory (e.g. "cd c:\mdig"). Then run "mdig.py". Without any options, it will show [Main_Page#Usage|the]. If it runs, then python is correctly installed in the path. If it doesn't you need to add the python directory to the path manually. A quick google should tell you how.
  4. An example spread model is available here media: test.xml. To run it, run "mdig.py run -d test test.xml" - if it complains about anything, then please rerun with "mdig.py run -D test.xml" (-D outputs debugging information) and send the the error output to Joel.
  5. To get help for an individual action, you type "mdig.py <action></action> --help" and replace <action></action> by the action you are interested in.
  6. To display the output of the simulation as it's running, use the -m flag with the run action. This will pop up a new window that gets updated with the latest map after each time-step.