Swarm and MinGW
(Difference between revisions)
SFRailsback (Talk | contribs) (→Installing MinGW and Swarm in Windows) |
SFRailsback (Talk | contribs) (→Installing MinGW and Swarm in Windows) |
||
| Line 24: | Line 24: | ||
*Download and execute the setup program | *Download and execute the setup program | ||
*Options: Add Obj-C compiler, MSYS (which is the terminal window environment for compiling), developer toolkit (OR: just check all boxes) | *Options: Add Obj-C compiler, MSYS (which is the terminal window environment for compiling), developer toolkit (OR: just check all boxes) | ||
| − | |||
| − | |||
When you start MinGW32, you are in your "home" directory, which typically (in Windows XP) is: | When you start MinGW32, you are in your "home" directory, which typically (in Windows XP) is: | ||
| Line 37: | Line 35: | ||
*edit /mingw/msys/1.0/msys.bat | *edit /mingw/msys/1.0/msys.bat | ||
**change the line "if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe" to "if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe" | **change the line "if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe" to "if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe" | ||
| + | |||
| + | *Add Swarm by copying the Swarm binaries to C:\Swarm | ||
| + | *Set SWARMHOME and put Swarm libraries in path. | ||
= Building Swarm = | = Building Swarm = | ||
Revision as of 11:48, 14 July 2011
Contents |
Overview
This documentation provides information on how to use Swarm on Windows with MinGW compilers. The following topics will be covered:
- How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
- How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
- How to use MinGW to compile the Swarm library, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of the library.
What is MinGW?
MinGW is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the Cygwin project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
Currently Swarm can only be used in the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows but cannot have the sometimes considerable speed advantage of 64-bit execution, which is available with the gcc compiler in 64-bit Linux.
Using Swarm Models
Building Swarm Models
Installing MinGW and Swarm in Windows
- Downloads page: http://sourceforge.net/projects/mingw/files/
- Download and execute the setup program
- Options: Add Obj-C compiler, MSYS (which is the terminal window environment for compiling), developer toolkit (OR: just check all boxes)
When you start MinGW32, you are in your "home" directory, which typically (in Windows XP) is: C:\MinGW\msys\1.0\home\(your user name) You can get to the root directory via the command "cd c:/"
INSTALL MINTTY- A MORE FUNCTIONAL TERMINAL WINDOW
- mingw-get install mintty (installs)
- mintty (from BASH; starts new terminal)
- edit /mingw/msys/1.0/msys.bat
- change the line "if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe" to "if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe"
- Add Swarm by copying the Swarm binaries to C:\Swarm
- Set SWARMHOME and put Swarm libraries in path.
Building Swarm
Required Source Code
- ZLib
- LibFFI
- LibPNG
- XPM-NoX
- Tcl
- Tk
- BLT
- HDF5 (Optional)
- Swarm
Required Tools
- MinGW
- GPerf
- Emacs
Software
ZLib
Homepage: http://www.zlib.net
Version Used: 1.2.5
License: ZLib/PNG License
LibFFI
Homepage: http://sourceware.org/libffi
Version Used: 3.0.9
License: MIT License
LibPNG
Homepage: http://www.libpng.org/pub/png/libpng.html
Version Used: 1.5.2
License: ZLib/PNG License
XPM-NoX
Homepage: unknown
Download Area: https://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32
Version Used: 4.2.0
License: MIT License
Tcl
Homepage: http://www.tcl.tk
Version Used: 8.4.19
License: Tcl License (Similar to MIT)
Tk
Homepage: http://www.tcl.tk
Version Used: 8.4.19
License: Tcl License (Similar to MIT)
BLT
Homepage: http://blt.sourceforge.net
Version Used: 2.4z
License: BSD License
HDF5
Homepage: http://www.hdfgroup.org/HDF5
Version Used: 1.8.7
License: BSD License with SZip restrictions
Swarm
Homepage: http://www.swarm.org
Version Used: 2.4.1
License: GPL
Tools
MinGW
Homepage: http://www.mingw.org
Version Used: 20110530
License: GPL
RapidEE
Homepage: http://www.rapidee.com
Version Used: 5.0
License: Freeware
Emacs
Homepage: http://www.gnu.org/software/emacs
Version Used: 23.3
License: GPL
GPerf
Homepage: http://www.gnu.org/software/gperf/
Version Used: 3.0.1
License: GPL
Depends
Homepage: http://www.dependencywalker.com/
Version Used: 2.2
License: Freeware
![[Main Page]](/stylesheets/images/wiki.png)