Skip to content
Maxime Lavigne (malavv) edited this page Aug 30, 2015 · 2 revisions

Introduction

In order to build Brewtarget, you need to have a version of QT's application framework which has been built specifically for your target. This can be done by downloading it or by building it yourself. This page will show you how to do the later.

Choice of a toolchain

You will need a build toolchain to build QT and eventually Brewtarget. The two usual choices are MinGW and Visual Studio.

Toolchain

MinGW
If you want to use the MinGW tool chain, I strongly suggest using the MinGW automated installer to get started. It seems to be the best way to get things working.

Visual Studio
You will need the MSVS command prompt that should be in Programs\MSVS\Tools

Getting the code

Download the SDK from Qt's downloads page. It usually installs to C:\Qt\<version>, so that's how we refer to it below.

Add

    C:\Qt\<version>\bin
    C:\Qt\<version>\qt\bin

to the environment variables.

Configure

Visual Studio

Run the MSVS command prompt (Programs->MSVS->Tools) and possibly vcvarsall.bat when you get there. Change directory to C:\Qt\<version>\qt.

Run the configure script with the following options: -platform win32-msvc2008 -debug-and-release -opensource -shared -no-qt3support -phonon -phonon-backend -webkit -arch windows -qt-style-windows -qt-style-windowsvista -qt-style-plastique -qt-style-cleanlooks

MinGW

Run the configure program like this: configure.exe -platform win32-g++ -debug -opensource -shared -no-qt3support -no-phonon -webkit -arch windows -qt-style-windows -qt-style-windowsvista -qt-style-plastique -qt-style-cleanlooks Note the use of the different platform and that you have to use the EXE, not the script.

Currently (qt 4.8.5), phonon is not supported for mingw on Windows. There are patches you can try, there are lots of guides you can find but I was never able to get it to work. As such, this cannot be used for release builds. Since we can't do it, the build is changed to be debug only. It goes faster. You can also disable building the tools and examples, which makes it go somewhat faster but not much.

Compile

Visual Studio

Run nmake and wait forever.

If the error "NMAKE: fatal error U1077" appears, try deleting these temporary files and running nmake again: \src\3rdparty\webkit\WebCore\tmp\moc\debug_shared\mocinclude.tmp \src\3rdparty\webkit\WebCore\tmp\moc\release_shared\mocinclude.tmp \src\script\tmp\moc\debug_shared\mocinclude.tmp \src\script\tmp\moc\release_shared\mocinclude.tmp

MinGW

Run mingw32-make and wait forever. Seriously. It took my system (vmware image with 2 processors and 4GB of RAM) something like 14 hours to finish the build.