Project

General

Profile

Build Quassel on Windows » History » Version 21

Version 20 (Datafreak, 02/25/2010 09:35 PM) → Version 21/35 (Datafreak, 03/16/2010 04:55 PM)

h1. Building Quassel on Windows

{{toc}}

h2. Software Requirements

* Windows
* "Visual C++ 2008 Express":http://www.microsoft.com/germany/express/download/webdownload.aspx
* "Visual C++ 2008 Redistributables":http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
* "Platform SDK":http://go.microsoft.com/fwlink/?LinkID=150217&clcid=0x409
* "DirectX SDK":http://go.microsoft.com/fwlink/?LinkID=71193&clcid=0x409
* "OpenSSL":http://www.slproweb.com/products/Win32OpenSSL.html
* "msysgit":http://code.google.com/p/msysgit/downloads/list (>= 1.6.0.2)
* "CMake":http://www.cmake.org/cmake/resources/software.html
* "Qt for Open Source C++ development on Windows":http://qt.nokia.com/downloads Windows":http://trolltech.com/downloads/opensource/appdev/windows-cpp *(not MinGW)* (>= 4.5.3)
* "PostgreSQL":http://www.enterprisedb.com/products/pgdownload.do#windows (Optional for PostgreSQL-Support)

h2. Installation

h3. Step 1: Install Visual C++ 2008 Express

h3. Step 2: Install Visual C++ 2008 Redistributables.

These will be needed for OpenSSL.

h3. Step 3: Install Platform SDK

h3. Step 4: Install DirectX SDK

h3. Step 5: Install OpenSSL

The first error message can be ignored as the Redistributables were installed.

h3. Step 6: Install Git

h3. Step 7: Install CMake

h3. Step 8: Update the environment variables

Go to the system settings (Start => Control Panel => System), go to the "Advanced" tab and click on Environment Variables.

First you'll have to edit the "Path" variable. Append the following to the current value:
<pre>;C:\Programme\Microsoft SDKs\Windows\v7.0\Bin;C:\Program Files\Git\bin;C:\OpenSSL\bin</pre>

Next, create the following new system variables:

* LIB:
<pre>C:\Programme\Microsoft SDKs\Windows\v7.0\Lib;C:\Programme\Microsoft DirectX SDK (February 2010)\Lib;C:\OpenSSL\lib\VC\static</pre>

* INCLUDE:
<pre>C:\Programme\Microsoft SDKs\Windows\v7.0\Include;C:\Programme\Microsoft DirectX SDK (February 2010)\Include;C:\OpenSSL\include</pre>

* QMAKESPEC:
<pre>win32-msvc2008</pre>

h3. Step 9: (Optional Install PostgreSQL and Update the environment variables)

Install PostgreSQL and edit the "Path","LIB" and "INCLUDE" variable. Append the following to the current value:
* Path
<pre>;C:\Programme\PostgreSQL\8.4\bin</pre>

* LIB:
<pre>;C:\Programme\PostgreSQL\8.4\lib</pre>

* INCLUDE:
<pre>;C:\Programme\PostgreSQL\8.4\include</pre>

h3. Step 10: Compile and Install Qt

Create a directory (e.g. C:\dev\) and unpack Qt.

Now open the Visual Studio 2008 command line.

And cd to the directory containing Qt. Now you can configure the Qt installation with the following command:
* Static without PostgreSQL-Support:
<pre>configure.exe -platform win32-msvc2008 -static -release -qt-sql-sqlite -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -openssl-linked -confirm-license -opensource -no-phonon -no-dbus -webkit -nomake demos -nomake examples -prefix C:\dev\qt-everywhere-opensource-src-4.6.2 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32</pre>
* Shared with PostgreSQL-Support:
<pre>configure.exe -platform win32-msvc2008 -shared -release -qt-sql-sqlite -qt-sql-psql -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -openssl-linked -confirm-license -opensource -phonon -phonon-backend -nomake demos -nomake examples -prefix C:\dev\qt-everywhere-opensource-src-4.6.2 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32</pre>

Then you can compiled Qt with these commands:
<pre>
nmake
</pre>

You can close the prompt after this.

h3. Step 11: Update the environment variables again

After installing Qt, you will have to append the following:

* Path
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.2\bin</pre>

* LIB:
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.2\lib</pre>

* INCLUDE:
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.2\include</pre>

h3. Step 12: Compile Quassel

Open a new Visual Studio 2008 command line and go to the "C:\dev" directory again. Use git to download the Quassel source code.
<pre>git clone git://git.quassel-irc.org/quassel.git</pre>

This will create a new directory "quassel" containing the source. When you want to update Quassel later, you just have to go to this directory (C:\dev\quassel) and do a "git pull" to update the source code.

Next, create a new directory in "C:\dev" in which Quassel will be built. In our case, we will simply call it "build". Change to this directory and enter the following command to configure Quassel:
<pre>cmake -G"NMake Makefiles" C:\dev\quassel -DSTATIC=1 -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DWITH_PHONON=OFF -DCMAKE_BUILD_TYPE=Release</pre>

And after that:
<pre>nmake</pre>

This will build Quasselcore, Quasselclient and Quasselmonolithic which can be found in the "C:\dev\build" directory.

h2. Related links

* "German tutorial by Datafreak":http://www.datafreak.eu/2008/11/build-qt-and-quassel-under-windows/