Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (77 sloc) 3.39 KB
OSSBuild-mingw
--------------
OSSBuild-mingw provides a build system based on jhbuild to build open source software using Mingw/Msys for Windows. It extends jhbuild, wrapping several of its commands and providing new ones that are specific to this build system. It also provides a default configuration and a set of modules that is ready to use both on Windows and Linux
Prerequisites
-------------
On Windows:
* Git: http://code.google.com/p/msysgit/
* Python (2.7): http://www.python.org/download/windows/
* setuptools: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe#md5=57e1e64f6b7c7f1d2eddfc9746bbaf20
* PyGtk (all-in-one installer): http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.0.win32-py2.7.msi
* MinGW-get (install all packages): http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/
We recommend using Console 2.00 instead of the default MinGW's terminal emulator. To install it, run:
$ mingw-get install msys-console
$ console-config
On Linux:
* git
* python
* python-setuptools
* libtool
* autoconf
* automake
* cmake
* glib2-devel (glib-genmarshal)
* bison
* yasm
* flex
* Install Python27 with wine: $wine msiexec /i /path/to/installer/python2.7.msi
Install ossbuild
---------------
1. Checkout sources:
Create a directory to work in.
$ git clone git://github.com/ossbuild/ossbuild-main.git
$ cd ossbuild-main
$ git submodule init
$ git submodule update
2. Install
as root, systemwide:
$ python setup.py install
or as user:
$ python setup.py install --prefix ~/prefix
3 Bootstrap (install the default toolchain and extra headers like the DirectX ones)
$ ossbuild setup
$ ossbuild update_moduleset
Configuring ossbuild
--------------------
OSSBuild has two configuration files, ~/.ossbuild/ossbuildrc and ~/.ossbuild/ossbuildenv.
1. ossbuildrc
Configration file for the build system similar to the jhbuild one.
You can use this file to override the default values (set in /path/to/repo/ossbuild/defaults.ossbuild)
The installation step will create one for you changing the path of the modulesets directory:
modulesets_dir = '/home/user/git/ossbuild/modulesets'
2. ossbuilenv
Configuration file used to override environment variables. This file is loaded before the defaults one,
allowing setting the environment variables HOST and TOOLCHAIN_PREFIX, which are used to use a custom toolchain.
Using ossbuild
--------------
Since ossbuild uses jhbuild, you can use most of the jhbuild commands (see http://developer.gnome.org/jhbuild/unstable/)
1. List modules
$ ossbuild list -a
2. Update modules list
$ ossbuild update_moduleset
3. Build
$ ossbuild build gstreamer
Building for W64
----------------
Builds for 64bits are not supported yet, but you can still try using the
W64 toolchain provided by mingw-w64 and send us patches :)
You only need to change the default toolchain as explained in the next section
Changing the default toolchain
------------------------------
We strongly reccomend using the default toolchain, installed with the 'setup'
command. If you still want to use a different toolchain, you should edit the
environment file (~/.ossbuild/ossbuildenv) and change the host triplet
and the toolchain prefix. On Fedora 15, to use the system's cross-compiler you
can use:
os.environ['HOST'] = 'i686-pc-mingw32'
os.environ['TOOLCHAIN_PREFIX'] = '/usr'