News

Archive

RSS Feed

Windows 10

    Great news, Windows users: Window 10 features a bash shell that can run linux software directly on Windows. This allows you to install MercuryDPM on Windows machines without the use of an emulator or a virtual machine. Here's how you can install MercuryDPM on Windows 10:

    Minimum Requirements (see below for installation instructions)

    • Compiler with c++11 features, e.g. gcc 4.8 or higher
    • svn (subversion) version 1.7 or higher
    • cmake version 2.8 or higher
    • doxygen (optional: used for creating the documentation while building your source code)
    • X11 server (optional, but recommended, as it is used for basic visualisation)
    • The latest version of Windows 10 (at least the anniversary update 2-8-2016); also use a 64 bit version of windows 10.

    Activate Bash for Windows 10

    1. Search for " Windows Update settings"

    2. Go to " For developers" and activate "Developer mode"
    3. Close the "Settings" app and open "Control Panel" -> "Programs" -> "Turn Windows features on or off
    4. Enable "Windows Subsystem for Linux (Beta)" and click OK (you will be prompted to reboot. Click "Restart now" to install Bash)

    5. Go to the "Windows Store" and download Ubuntu (this step might not be necessary for older Windows 10 versions)
    6. After reboot search for "bash" in the start menu and open the program
    7. The first time it will ask to accept the terms of service and will ask to create a username and password. If you're not familiar with the linux environment, this password is needed for most sudo (i.e., administrator) commands
    8. You now have bash and all linux commands available at your computer.
      To start in linux mode just open the "Bash on Ubuntu on Windows " program. (Your windows files are under /mnt/c)

    9. If you prefer to work from your windows files from start, it is also possible to enter from the CMD prompt by typing bash

    10. For visual programs an X11 server is needed. We recommend the Xming X server, available at https://sourceforge.net/projects/xming.
      Download that program and follow the default installation instructions
    11. Start up the Xming program from the start menu. There should be now a X logo in the notification bar at the bottom left corner of your screen. Mouseover to see the address of the X11 display. (default case 0.0)

    12. Head to the terminal (Step 8)
    13. Use the following commands to get several packages required for MercuryDPM (enter your password and type 'Y' to accept the installation).
      sudo apt-get update
      sudo apt-get install subversion
      sudo apt-get install cmake-qt-gui
      sudo apt-get install g++ gfortran
      sudo apt-get install python2.7
      sudo apt-get install build-essential
      sudo apt-get install libx11-dev libxt-dev libxres-dev libxtst-dev
      sudo apt-get install doxygen
    14. Tip: You can paste each command into the command window by right-clicking the title bar:

    15. For using the cmake graphical user interface as well as Xballs or other visual programs, connection with the X11 server has to be established:
      echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
      			

      Mind the capitals. If your address from step 10 is different from 0.0 change the number.

    16. By default, the Ubuntu shell creates a home directory in the AppData folder in your user directory. This folder is hidden and very hard to access in Windows. We therefore recommend you to use a folder within the Windows file system instead. To do so, create a new folder "c:\dev" on your c-drive, and make bash enter this folder at start-up.
      mkdir /mnt/c/dev
      cd /mnt/c/dev
      echo "cd /mnt/c/dev" >> ~/.bashrc
      		

      Add this folder to your Quick Access toolbar:

    17. Now we will install MercuryDPM. Create a directory called "MercuryDPM", at a location of your choice, by typing
      mkdir MercuryDPM
      			
    18. To get into the directory, type
      cd MercuryDPM/
      			
    19. Once in the folder MercuryDPM, download or check out the beta version of the DPM source by typing
      svn checkout https://svn.MercuryDPM.org/SourceCode/Beta MercurySource
      			

      Type 'p' during the process to permanently allow the svn to connect to the MercuryDPM server.
      The above command downloads the MercuryDPM source code into the folder named "MercurySource"

    20. In the current folder, i.e. MercuryDPM, create another directory called "MercuryBuild"
      mkdir MercuryBuild
      			
    21. Get into the folder "MercuryBuild" by typing
      cd MercuryBuild
      			
    22. Assuming cmake is successfully installed, goto directory "MercuryBuild" in order to create the executables from the source code. Do it by typing
      cmake-gui ../MercurySource/
      			
    23. A GUI pops up on your screen as in the picture shown below. Make sure option "Grouped" is selected and "Advanced" is selected

    24. After clicking on "Configure", the following window appears on your screen

      1. Select "Unix makefiles" under specify the generator for this code
      2. Choose "Use default native compilers"
      3. Click on "Done"
    25. Search for CMAKE_CXX_COMPILER in the CMAKE menu and change its value to " to /usr/bin/g++", then click "Configure" again

    26. Optional: for documentation tick the box MAKE_BUILD_DOCUMENTATION, in the picture as shown below, before you click on configure.

    27. Click on "Generate" to create the make files and directory structure in "MercuryBuild" that is needed to build executables from the source files.
      The building/installation progress is visible in the bottom panel of your cmake-gui window screen, as seen in the screenshot below.

      1. Any red line in the bottom panel, indicates that some package is missing or needs to be installed to have a successful "configure". In that case, click on the "Advanced" option to see exactly where the issue is or contact any of the MercuryDPM team of developers.
      2. Once configured for the first time, under the group named 'CMAKE' type 'Release' at 'CMAKE_BUILD_TYPE'. See the picture above.
    28. To check if successfully installed, go to your build directory "MercuryBuild" using the terminal and type
      make fullTest
      			

      This command builds all the source files in the directory "MercurySource" and creates the executables in the MercuryBuild directory. Then it runs several executables to test if MercuryDPM is installed correctly.

    29. If all the tests have passed, MercuryDPM is successfully installed on your machine.
    30. Please note: When using Xballs for make sure you have the Xming X11 server running (step 10) and are connected to the server (step 13) otherwise the visualisation will NOT work.

    MercuryDPM mailing list