How to build
=====================

The instructions should help you build the Installer Framework from scratch.


Get the sources
---------------------

Use Git to check out the Qt Installer Framework sources that are hosted at:

http://qt.gitorious.org/installer-framework


Build Qt
---------------------

To build an installer, it is advised to use a statically linked Qt. For maximum
portability we recommend the latest version of the Qt 4.x series. See the Qt
documentation for the prerequisites and steps to build Qt from sources.

### Windows

Adjust the qmake.conf to have a real stand alone working installer:

- add 'embed_manifest_dll embed_manifest_exe' to CONFIG line
- replace -MD, -MDd with -MT, -MTD in the CFLAGS lines

'git diff' should show you something like:

--- a/mkspecs/win32-msvc20XX/qmake.conf
+++ b/mkspecs/win32-msvc20XX/qmake.conf

 MAKEFILE_GENERATOR      = MSVC.NET
 TEMPLATE                = app
-CONFIG                  += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
+CONFIG                  += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
 QT                      += core gui
 DEFINES                 += UNICODE WIN32 QT_LARGEFILE_SUPPORT
 QMAKE_COMPILER_DEFINES  += _MSC_VER=1400 WIN32
 QMAKE_YACCFLAGS         = -d
 QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t-
 QMAKE_CFLAGS_WARN_ON    = -W3
 QMAKE_CFLAGS_WARN_OFF   = -W0
-QMAKE_CFLAGS_RELEASE    = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG      = -Zi -MDd
+QMAKE_CFLAGS_RELEASE    = -O2 -MT
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
+QMAKE_CFLAGS_DEBUG      = -Zi -MTd
 QMAKE_CFLAGS_YACC       =
 QMAKE_CFLAGS_LTCG       = -GL

Recommended configure options for Microsoft Windows:

configure.exe -opensource -release -static -no-multimedia -no-declarative -no-phonon -no-dbus -no-opengl -no-qt3support -no-webkit -no-xmlpatterns -nomake examples -nomake demos

### Linux & Mac OS X

Recommended configure options for Linux and Mac OS X:

configure -opensource -release -static -qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -no-phonon -no-dbus -no-opengl -no-qt3support -no-webkit -no-xmlpatterns -no-svg -nomake examples -nomake demos


Build the Framework
---------------------

Run 'qmake && make' (or 'mingw32-make', 'nmake' ...) to build the Qt Installer
Framework. The documentation can be generated by 'make docs'.
