Difference between revisions of "Windows"

From Madagascar
Jump to navigation Jump to search
 
(48 intermediate revisions by 8 users not shown)
Line 1: Line 1:
Madagascar has been run on Microsoft Windows machines, but there are several dependencies.
+
<tt>Madagascar</tt> has been run on Microsoft Windows machines under various types of environments:
  
Madagascar runs under [http://cygwin.com Cygwin], which provides a Unix-like environment under Windows.
+
==Cygwin==
 +
 
 +
[[Image:cygwin-icon.gif|left|]] <tt>Madagascar</tt> can run under [http://cygwin.com Cygwin], which provides a Unix environment under Windows.
  
 
To obtain Cygwin, go to its web page, download and run the installer. This should create a Cygwin program, which when run, creates a POSIX shell window similar-looking to the Windows command window but which behaves in a more Unix-like way.
 
To obtain Cygwin, go to its web page, download and run the installer. This should create a Cygwin program, which when run, creates a POSIX shell window similar-looking to the Windows command window but which behaves in a more Unix-like way.
Line 7: Line 9:
 
'''NOTE''': If you are unfamiliar with Unix-like systems, a good place to start is Greg Wilson's [http://www.osl.iu.edu/~lums/swc/www/shell.html Software Carpentry] course.  
 
'''NOTE''': If you are unfamiliar with Unix-like systems, a good place to start is Greg Wilson's [http://www.osl.iu.edu/~lums/swc/www/shell.html Software Carpentry] course.  
  
[[Image:cygwin-icon.gif|right|]] You will need to install several additional Cygwin components before Madagascar can run. To get these, rerun the installer program (called '''Setup''' and represented by an icon with a black "C" shape enclosing a green arrow).  
+
You will need to install several additional Cygwin components before Madagascar can run. To get these, rerun the installer program (called '''Setup''' and represented by an icon with a black "C" shape enclosing a green arrow).  
  
 
# Start '''Setup''' program.  
 
# Start '''Setup''' program.  
# Keep clicking (defaults should work, but please choose a mirror on your own continent) until you see a collapsed list (boxed "+" signs) in a selection box.  
+
# Keep clicking (defaults should work, but you can choose a mirror on your own continent) until you see a collapsed list (boxed "+" signs) in a selection box.  
# Choose all of the following before downloading.
+
# Choose the following before downloading.
## '''Open the "Devel" section and select the following:'''
+
## Open the '''Devel''' section and select
* gcc
+
##* gcc-core
If you are developing for Madagascar, also choose
+
##* gcc-g++
* subversion
+
##* gcc-gfortran
## If you have a favorite unix editor, also choose it under '''"Editors"''' (novices may wish to work with Notepad for a while). Both <tt>vim</tt> and <tt>emacs</tt> are available.
+
##* make
## '''Open "Interpreters" and select'''
+
## If you want to use the development version of <tt>Madagascar</tt>, also choose one of the following:
* python
+
##* subversion
## '''Open "Libs" and select'''
+
##* git
* sunrpc
+
## Open the '''Libs''' section and select
# '''Next, click "Next>"'''
+
##* libtirpc-devel
Your download will proceed.
+
##* libXaw-devel
# When done, click '''"Finish"'''.
+
##* libX11-devel
 +
## If you have a favorite unix editor, choose it under '''Editors''' (novices may wish to work with Notepad for a while). Both <tt>vim</tt> and <tt>emacs</tt> are available.
 +
## Open '''Interpreters''' and select
 +
##* python
 +
## For X-window  display with <tt>oglpen</tt>, open '''X11''' and select
 +
##* libglut-devel
 +
##* libGLU-devel
 +
## If you intend to use LaTeX, open '''Publishing''' and select
 +
##* texlive
 +
##* texlive-collection-latexextra
 +
##* texlive-collection-fontutils
 +
## If you intend to use <tt>ppmpen</tt>, open '''Graphics''' and select
 +
##* libnetpbm-devel
 +
## If you intend to use <tt>tiffpen</tt>, open '''Libs''' and select
 +
##* libtiff-devel
 +
## If you intend to use <tt>gdpen</tt>, open '''Libs''' and select
 +
##* libgd-devel
 +
## For Xwin server installation, open '''X11''' and select
 +
##* xinit
 +
# Next, click '''Next>'''
 +
#: Your download will proceed.
 +
# When done, click '''Finish'''.
 +
 
 +
After performing this steps, proceed to a normal Madagascar [[Installation]].
 +
 
 +
For running X applications such as '''xtpen''', make sure to run '''startx''' first to open an X terminal window.
 +
 
 +
===Troubleshooting===
 +
 
 +
If you get errors "unable to remap...", note the following:
 +
 
 +
A proper work of a Cygwin installation may require running '''rebaseall''', a program that fixes library dependencies. You only need to run it once.
 +
# Quit all Cygwin processes
 +
# Start '''ash''' (<tt><cygroot>\bin\ash.exe</tt>)
 +
# Execute <tt>/usr/bin/rebaseall</tt>
  
You will need to ensure that X applications can be started from the cygwin command line. Type xterm and ensure that an X terminal appears.
+
===Screenshots===
  
If you use xming, it is necessary to ensure that the environment variable <tt>DISPLAY</tt> is set to :0 before trying to run xterm.
+
* Running Cygwin's '''setup''' program
  
Once you have verified that you can display xwindows from cygwin, you should be ready to do a normal Madagascar [[Installation]]
+
[[Image:setup.png|600px]]
  
'''To set environment variables'''
+
* Selecting packages
  
on a per-session basis, type:
+
[[Image:select.png|600px]]
  
export <variablename>=<variablevalue>, for example
+
* Running Cygwin's '''bash''' program
  
<pre>
+
[[Image:bash.png|600px]]
export DISPLAY=:0
 
</pre>
 
  
sets the value of DISPLAY to ":0" which is appropriate for xming.
+
* Testing <tt>Madagascar</tt> installation
  
To make this selection "sticky" (permanent until you change the file) change to your cygwin home by typing
+
[[Image:test.png|600px]]
  
<pre>
+
[[Image:welcome.png|600px]]
cd
+
===Matlab API===
</pre>
+
To use the Matlab API with Madagascar under Cygwin, make sure you have Mex installed, and create a symbolic link, i.e.:
 +
<bash>
 +
ln -s /location/of/mex.bat /usr/bin/mex
 +
</bash>
  
and edit the file ".bash_profile" putting the desired environment variables in there.
+
==Interix==
 +
[http://en.wikipedia.org/wiki/Interix Interix] is the name of the Unix environment for Windows provided by Microsoft through the following software packages:
 +
* [http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX Services For Unix] (SFU), available as a [http://www.microsoft.com/downloads/details.aspx?FamilyID=896c9688-601b-44f1-81a4-02878ff11778&DisplayLang=en free download] for the Windows NT family of operating systems up to and including Windows XP Professional ([http://www.reproducibility.org/rsflog/uploads/PS0001.jpg screenshot of m8r running on SFU] from an [http://www.reproducibility.org/rsflog/index.php?/archives/68-RSFMadagascar-on-Windows-using-SFU.html April 2006 entry on the m8r blog]). SFU availability was discontinued in 2009.
 +
* [http://technet.microsoft.com/en-us/library/cc779522.aspx Subsystem for UNIX-based Applications] (SUA), included with Windows Server 2003 R2 and Windows Vista.
  
'''NOTE''': Windows and subversion cannot handle the same paths. Be sure you install madagascar into a path where there is no whitespace in the directory names.
+
==SSH + X server==
 +
If you can count on a network connection to a full UNIX machine while you run Madagascar, you actually need to install under MS Windows just a SSH client and a X server, and just run the Madagascar installed on the UNIX machine. Cygwin provides both, but it is big and slow. Faster and more lightweight alternatives are:
 +
* [http://mobaxterm.mobatek.net/en/ MobaXterm], an enhanced terminal with an X server and a set of Unix commands (GNU/Cygwin) packaged in a single portable exe file;
 +
* [http://sourceforge.net/projects/xming/ Xming] as X server and [http://en.wikipedia.org/wiki/PuTTY PuTTY] as SSH client (remember to check the "Tunnel X11 connections" box when saving the session configuration).

Latest revision as of 08:48, 26 August 2018

Madagascar has been run on Microsoft Windows machines under various types of environments:

Cygwin

Cygwin-icon.gif

Madagascar can run under Cygwin, which provides a Unix environment under Windows.

To obtain Cygwin, go to its web page, download and run the installer. This should create a Cygwin program, which when run, creates a POSIX shell window similar-looking to the Windows command window but which behaves in a more Unix-like way.

NOTE: If you are unfamiliar with Unix-like systems, a good place to start is Greg Wilson's Software Carpentry course.

You will need to install several additional Cygwin components before Madagascar can run. To get these, rerun the installer program (called Setup and represented by an icon with a black "C" shape enclosing a green arrow).

  1. Start Setup program.
  2. Keep clicking (defaults should work, but you can choose a mirror on your own continent) until you see a collapsed list (boxed "+" signs) in a selection box.
  3. Choose the following before downloading.
    1. Open the Devel section and select
      • gcc-core
      • gcc-g++
      • gcc-gfortran
      • make
    2. If you want to use the development version of Madagascar, also choose one of the following:
      • subversion
      • git
    3. Open the Libs section and select
      • libtirpc-devel
      • libXaw-devel
      • libX11-devel
    4. If you have a favorite unix editor, choose it under Editors (novices may wish to work with Notepad for a while). Both vim and emacs are available.
    5. Open Interpreters and select
      • python
    6. For X-window display with oglpen, open X11 and select
      • libglut-devel
      • libGLU-devel
    7. If you intend to use LaTeX, open Publishing and select
      • texlive
      • texlive-collection-latexextra
      • texlive-collection-fontutils
    8. If you intend to use ppmpen, open Graphics and select
      • libnetpbm-devel
    9. If you intend to use tiffpen, open Libs and select
      • libtiff-devel
    10. If you intend to use gdpen, open Libs and select
      • libgd-devel
    11. For Xwin server installation, open X11 and select
      • xinit
  4. Next, click Next>
    Your download will proceed.
  5. When done, click Finish.

After performing this steps, proceed to a normal Madagascar Installation.

For running X applications such as xtpen, make sure to run startx first to open an X terminal window.

Troubleshooting

If you get errors "unable to remap...", note the following:

A proper work of a Cygwin installation may require running rebaseall, a program that fixes library dependencies. You only need to run it once.

  1. Quit all Cygwin processes
  2. Start ash (<cygroot>\bin\ash.exe)
  3. Execute /usr/bin/rebaseall

Screenshots

  • Running Cygwin's setup program

Setup.png

  • Selecting packages

Select.png

  • Running Cygwin's bash program

Bash.png

  • Testing Madagascar installation

Test.png

Welcome.png

Matlab API

To use the Matlab API with Madagascar under Cygwin, make sure you have Mex installed, and create a symbolic link, i.e.: <bash> ln -s /location/of/mex.bat /usr/bin/mex </bash>

Interix

Interix is the name of the Unix environment for Windows provided by Microsoft through the following software packages:

SSH + X server

If you can count on a network connection to a full UNIX machine while you run Madagascar, you actually need to install under MS Windows just a SSH client and a X server, and just run the Madagascar installed on the UNIX machine. Cygwin provides both, but it is big and slow. Faster and more lightweight alternatives are:

  • MobaXterm, an enhanced terminal with an X server and a set of Unix commands (GNU/Cygwin) packaged in a single portable exe file;
  • Xming as X server and PuTTY as SSH client (remember to check the "Tunnel X11 connections" box when saving the session configuration).