Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "Building OLA for Windows"

From wiki.openlighting.org

Jump to: navigation, search
Line 1: Line 1:
This describes how to get OLA compiled for windows, it's a work in progress so it's unlikely to work as is.
+
This describes how to get OLA compiled for windows, it's a work in progress so it's unlikely to work as is. This tutorial uses gcc as the compiler, other compilers have not been tested.
  
 
== Install Mingw, msys & build tools ==
 
== Install Mingw, msys & build tools ==
  
The instructions at http://www.mingw.org/wiki/MSYS are very helpful. There are similar instructions at http://www.cccp-project.net/wiki/index.php?title=Installing_MSYS-MinGW
+
Together MinGW & msys provide a unix-style shell environment & compiler suite for windows. Read the instructions at the [http://www.mingw.org/ MinGW] site for more info. MinGW now provides an installer to get most of the system up and running quickly. [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/ Download] the installer and make sure you select "C++ Compiler". "MSYS Basic System" & "MinGW Developer Toolkit" when prompted.
  
* Install mingw and msys
+
Once the installer has completed, open the msys shell (under Programs > MinGW) and install some additional packages:
  
* Download these packages
+
  $ mingw-get.exe install msys-automake msys-autoconf libtool
** autoconf [http://ftp.gnu.org/gnu/autoconf/]
 
** automake [http://ftp.gnu.org/gnu/automake/]
 
** libtool [http://ftp.gnu.org/gnu/libtool/]
 
 
 
* Launch the msys shell
 
 
 
* Unpack autoconf, automake and libtool to a directory of your choice.
 
 
 
* Install each of them with the following command:
 
 
 
  $ ./configure --prefix=/mingw && make && make install
 
 
 
* Update PKG_CONFIG_PATH
 
 
 
As all the libraries will be installed in /mingw, PKG_CONFIG_PATH must be set.
 
 
 
Open the file /etc/profile (C:\msys\1.0\etc\profile) with your favorite editor (make sure it uses LF line endings) and add:
 
 
 
PKG_CONFIG_PATH="/mingw/lib/pkgconfig"
 
 
 
You might also want to set CFLAGS. Safe options for MinGW are:
 
 
 
CFLAGS="-pipe -O2 -mms-bitfields -march=i686"
 
 
 
just before
 
 
 
export HOME LOGNAME MSYSTEM HISTFILE
 
 
 
and modify that line by adding the variables:
 
 
 
export HOME LOGNAME MSYSTEM HISTFILE CFLAGS PKG_CONFIG_PATH
 
 
 
Now restart MSYS. You should now be able to use MSYS without problems.
 
 
            
 
            
 
== Install Git ==
 
== Install Git ==
  
See http://code.google.com/p/msysgit/, be sure to select "unix style carriage returns" otherwise you'll get autoconf errors.
+
See http://code.google.com/p/msysgit/, be sure to select "checkout as is, commit unix style" otherwise you'll get autoconf errors.
  
 
== Install Dependencies ==
 
== Install Dependencies ==
Line 51: Line 18:
 
* http://www.ossp.org/pkg/lib/uuid/ , be sure to run configure with  ./configure --prefix=/mingw --includedir /mingw/include/ossp
 
* http://www.ossp.org/pkg/lib/uuid/ , be sure to run configure with  ./configure --prefix=/mingw --includedir /mingw/include/ossp
 
* http://sourceforge.net/projects/cppunit/files/ , download version  
 
* http://sourceforge.net/projects/cppunit/files/ , download version  
* http://code.google.com/p/google-ctemplate/ , you need at least 0.97, see http://code.google.com/p/google-ctemplate/issues/detail?id=48
 
  
 
== Build OLA ==
 
== Build OLA ==

Revision as of 09:15, 30 April 2011

This describes how to get OLA compiled for windows, it's a work in progress so it's unlikely to work as is. This tutorial uses gcc as the compiler, other compilers have not been tested.

Install Mingw, msys & build tools

Together MinGW & msys provide a unix-style shell environment & compiler suite for windows. Read the instructions at the MinGW site for more info. MinGW now provides an installer to get most of the system up and running quickly. Download the installer and make sure you select "C++ Compiler". "MSYS Basic System" & "MinGW Developer Toolkit" when prompted.

Once the installer has completed, open the msys shell (under Programs > MinGW) and install some additional packages:

$ mingw-get.exe install msys-automake msys-autoconf libtool
         

Install Git

See http://code.google.com/p/msysgit/, be sure to select "checkout as is, commit unix style" otherwise you'll get autoconf errors.

Install Dependencies

Build OLA

  • Do a git checkout of OLA
  • Run ./configure
 $ ./configure
  • Build
 $ make

Current TODO

  • Fix the Socket & SelectServer classes or replace them with whatever makes sense on windows
  • The USB Pro plugin needs a way to find devices, obviously /dev doesn't exist
  • The DMX USB requires libusb win32. Not sure what the status of this is

Problems