Build (Win)
From Emergent
- Getting the source
- Installing from packages
- Building from packages (recommended!)
- OSX
- Fedora
- Ubuntu
- Ubuntu (64 bit)
- Gentoo (unsupported)
Issues
Unresolved issues or quirks of these instructions:
- MinGW is NOT supported or working at this time (instructions below represent the extent to which things were documented)
- when configing Coin/SoQt doxy4win.pl is missing (this is probably fine, since the definitive documentation is online anyway)
Common Windows Instructions
Prerequisites
The following versions have been tested:
- Visual Studio.NET 2003 (use "msvc7" as the build option below)
- Visual C++ Express 2008 (VC++ 9) (use "msvc9" as the build option)
- 2005 versions have not been tested, but will probably work as "msvc9"
Subversion
- install subversion from the binary installer
- Open a console window (cmd or unix shell) and then follow the instructions in the article on Subversion for checking out the code
MSVC/Qt-commercial or Qt Open Source
Environment Variables
These are listed first because some steps require them to be set -- set each variable as soon as you have installed the appropriate component.
Notes:
- you must replace with your version of msvc:(7, or 9)
- you must use YOUR paths, not the example paths
User
EMERGENTDIR [path to your emergent] Path (add: %EMERGENTDIR%\build\msvc7\bin
System
NOTE: you must explicitly set the VCINSTALLDIR because it is only defined in the MSVC shell cmd.
COINDIR=C:\Coin-2.5.0 INCLUDE: add: %COINDIR%\include;%GSLDIR%\include%ODEDIR%\include;%QTDIR%\include GSLDIR=C:\gsl LIB: add: %COINDIR%\lib;%GSLDIR%\lib;%ODEDIR%\lib;%QTDIR%\lib ODEDIR=C:\ode-0.8 Path: add %QTDIR%\bin QMAKESPEC=win32-msvc.net QTDIR=C:\Qt\4.3.2 VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
Qt
Commercial
- download the Qt commercial or academic version
- run the installer
- when the installer is finished, run the demos and doc to verify it is correct
- install VS QT integration
Open Source (Qt 4.3.2 or greater)
- download the Qt Open Source zip file
- unzip the file to C:\
- make sure QMAKESPEC has been set, or set it now, and build
- open a Visual Studio console window (NOT a cmd window)
cd \qt-win-opensource-src-4.3.2 set QMAKESPEC=win32-msvc.net configure nmake nmake install
This should install to:
C:\Qt\4.3.2
- this can take several hours
- confirm you can run the demos
- note: leave the src folder there, so you can browse the source later
Coin3d
- download the Coin3d package for VS 2003 (or your version)
- download the bin and the source
- note: for VS 9 (2008) the versions for VS 8 should still work
- unzip these to (suggested) a root folder, ex:
C:\Coin-2.5.0
MSVC 2008 (and possibly others)
You will need to rebuild the .dll's so they have manifests
- open the build/msvcXxxx (your version) .sln file
- build the Debug then Release versions
SoQt
- download the Coin3d package for VS 2003 (or your version, vc8 for vc9)
- open the build/msvcXxxx (your version) .sln file
- if using vc9 for vc8, will prompt to convert .sln, say yes
- build the Debug then Release versions
The outputs of these go into the proper folders in Coin, so you don't have to explicitly add any of the SoQt subfolders to your paths anywhere.
ODE
It is easiest to install it in the root of C:
- get ode-win32-0.8.zip
- get ode-src-0.8.zip
- unzip both into C:
- open the build\vs2005 (or whichever) folder to the ode.sln
- open the solution, and convert if necessary
- build the DebugDll and ReleaseDll versions
GSL
[unfortunately, the source of the original Windows conversion is lost, and I haven't found it again. I have found an alternative port of the latest version 1.10 that works.]
NOTE: this package only creates static libs, which means they will be linked into Emergent
- copy the zip contents to ex. C:\gsl
- open the gsl.sln 2003 solution, and convert it (there should be no errors)
- build the Debug and Release versions
simage
TBD
GCC/MinGW/Qt-opensource
General Notes
The MinGW/MSYS subsystem (like cygwin) is fairly permissive as regards file names. However, I have discovered cases where the DOS form simply didn't work, ex. building SoQt. So I've split the environment configuration stuff into Win and MSYS parts. I put the configuration instructions first, even though you may not know the paths until later, mostly because some steps require the config earlier than later -- if you accept defaults and make sensible translations (ex Qt/4.2.3 into your exact version, etc.) then you should be fine.
MSYS File System
The MSYS file system is a virtual system created bin/../ from the runtime, ie. in the MSYS root (C:/msys/1.0 on my system). It then grafts in all the DOS root drives as small letters, etc. /c /d etc. It also does something very confusing, but seemingly harmless, of grafting a virtual /usr as the / folder, so you get this:
> cd /usr > pwd > / >
I didn't encounter any issues with accepting the default build folders, i.e. usually /usr/local -- so don't worry about this aliasing.
Required packages and prerequisites
Coin source SoQt source Qt\MinGW edition
Environment
MSYS
Add the following to /etc/profile (maybe make a backup copy)
# CCNLAB\Emergent additions export QTDIR=/c/Qt/4.2.3 if [ -f $HOME/.bashrc ]; then . $HOME/.bashrc fi
Then make a .bashrc file in your home folder -- Windows doesn't let you make this from the shell, so you have to do it on a cmd line (ex touch .bashrc)
export EMERGENTDIR= [your path, in MSYS form]
Windows
Vars NOT to set
- QTDIR -- this caused problems, since the MSYS form neeeded to be in its filesystem pathing -- Qt does not set this by default -- I would suggest adding this to a cmd autoexec script if you need it in a DOS context
Vars to set
(note: MSYS seems to already translate the Windows paths into msys paths in the environment)
You will need to make sure the following environment variables are set (Control Panel/System/Advanced/Environment Variables)
[S] System variable [U] User variable
[S] Path -- add the Qt bin folder to the end (in Windows format)
Qt/MinGW
- download the Qt/MinGW version for Windows
- run the installer
- if you haven't installed MinGW, select the option to download it; use the default install folder; don't bother downloading the source
Note that ifyou run it after having manually installed MinGW, it may complain about the version of winapi32.h being incompatible -- continue (hopefully this is ok!)
- test the installation by running assistant and the demo programs (make sure the OpenGL stuff is working!)
MinGW
As Winston Churchill famously said, "MinGW is the worst GNU/Posix system for Windows, except for all the others." (by which he meant to include: Cygwin, and MS's own "Unix Services" thingy (which is atrocious, because it has virtually no gnu tools, is very non-standard, and requires a whack of downloads and patching to turn into something a Linux or Mac user would recognize as Unix [end tirade])
MinGW
- download the MinGW installer
- run the installer, choose Current
- for type of install, choose Full (you can deselect Ada, Java, and Objective C)
you will probably want to install the gdb after
- download the mingw/gdb .exe installer
- run the installer, accepting the default location
MSYS
- download the MSYS installer
- run MSYS installer -- it should find your MinGW installation
Coin/SoQt
Notes:
- in MSYS, /usr is an alias for / -- just live with this!
- for both Coin and SoQt don't forget the --disable-msvc otherwise the configure may pop up a scary looking dialog saying something like "msvcwrapper is missing" -- this is actually expected, say yes continue if it happens (the switch may be important if MSVC is installed, to make sure it doesn't use that, instead of gcc)
Coin
- Open the MSYS console
- following the instructions below
> cd / > mkdir src > cd src > cp [location of Coin tar file] . > tar -xzvf [Coin tar file] > cd [Coin folder] > ./configure --disable-msvc > make install
SoQt
- Open the MSYS console
- following the instructions below
> cd /src > cp [location of SoQt tar file] . > tar -xzvf [SoQt tar file] > cd [SoQt folder] > CPPFLAGS="-DCOIN_DLL" ./configure --disable-msvc > make install
zlib
- the source zip file is in the emergent distribution
- mingw doesn't have unzip (grr...) but you can use Windows Explorer to browse into the file, and copy it into a zip123 folder in /src
> cd /src/zip123 > ./configure > make install
GSL
These instructions use the Win package on sourceforge. I tried building from sources, but make install failed (and I didn't try to figure out why.)
get the binary from: http://gnuwin32.sourceforge.net/packages/gsl.htm
After a bit of experimenting, I concluded that the smoothest way to do this is to install this right into your MSYS installation (NOT into the installer's default).
- run the gsl-1.8.exe installer
- install into your MSYS local: C:\msys\1.0\local
Note that you should not need the gsl source install, just the binary/developer one.
