Project

General

Profile

Build Quassel on Windows » History » Version 27

romibi, 09/11/2015 03:43 PM

1 7 sph
h1. Building Quassel on Windows
2 1 sph
3 3 sph
{{toc}}
4 3 sph
5 1 sph
h2. Software Requirements
6 1 sph
7 1 sph
* Windows
8 8 Datafreak
* "Visual C++ 2008 Express":http://www.microsoft.com/germany/express/download/webdownload.aspx
9 19 Datafreak
* "Visual C++ 2008 Redistributables":http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
10 19 Datafreak
* "Platform SDK":http://go.microsoft.com/fwlink/?LinkID=150217&clcid=0x409
11 19 Datafreak
* "DirectX SDK":http://go.microsoft.com/fwlink/?LinkID=71193&clcid=0x409
12 1 sph
* "OpenSSL":http://www.slproweb.com/products/Win32OpenSSL.html
13 1 sph
* "msysgit":http://code.google.com/p/msysgit/downloads/list (>= 1.6.0.2)
14 23 Datafreak
* "CMake":http://www.cmake.org/cmake/resources/software.html (>= 2.6.2)
15 23 Datafreak
* "Qt OpenSource SRC":http://qt.nokia.com/downloads (>= 4.6)
16 13 Datafreak
* "PostgreSQL":http://www.enterprisedb.com/products/pgdownload.do#windows (Optional for PostgreSQL-Support)
17 24 Datafreak
* "SlikSvn":http://www.sliksvn.com/en/download (Optional for Crypt-Support)
18 1 sph
19 1 sph
h2. Installation
20 1 sph
21 8 Datafreak
h3. Step 1: Install Visual C++ 2008 Express
22 1 sph
23 1 sph
24 6 sph
h3. Step 2: Install Visual C++ 2008 Redistributables. 
25 1 sph
26 1 sph
These will be needed for OpenSSL.
27 1 sph
28 1 sph
29 1 sph
h3. Step 3: Install Platform SDK
30 6 sph
31 11 Datafreak
h3. Step 4: Install DirectX SDK
32 1 sph
33 10 Datafreak
h3. Step 5: Install OpenSSL
34 5 sph
35 1 sph
The first error message can be ignored as the Redistributables were installed.
36 1 sph
37 10 Datafreak
h3. Step 6: Install Git
38 1 sph
39 1 sph
40 10 Datafreak
h3. Step 7: Install CMake
41 1 sph
42 1 sph
43 1 sph
h3. Step 8: Update the environment variables
44 10 Datafreak
45 1 sph
Go to the system settings (Start => Control Panel => System), go to the "Advanced" tab and click on Environment Variables.
46 1 sph
47 1 sph
First you'll have to edit the "Path" variable. Append the following to the current value:
48 23 Datafreak
<pre>;C:\Programme\Microsoft SDKs\Windows\v7.0\Bin;C:\Program Files\Git\bin;C:\OpenSSL-Win32\bin</pre>
49 1 sph
50 1 sph
Next, create the following new system variables:
51 1 sph
52 1 sph
* LIB: 
53 23 Datafreak
<pre>C:\Programme\Microsoft SDKs\Windows\v7.0\Lib;C:\Programme\Microsoft DirectX SDK (February 2010)\Lib;C:\OpenSSL-Win32\lib\VC\static</pre>
54 19 Datafreak
55 1 sph
* INCLUDE:
56 23 Datafreak
<pre>C:\Programme\Microsoft SDKs\Windows\v7.0\Include;C:\Programme\Microsoft DirectX SDK (February 2010)\Include;C:\OpenSSL-Win32\include</pre>
57 19 Datafreak
58 1 sph
* QMAKESPEC:
59 11 Datafreak
<pre>win32-msvc2008</pre>
60 1 sph
61 14 pennywise
h3. Step 9: (Optional Install PostgreSQL and Update the environment variables)
62 1 sph
63 12 Datafreak
Install PostgreSQL and edit the "Path","LIB" and "INCLUDE" variable. Append the following to the current value:
64 12 Datafreak
* Path
65 12 Datafreak
<pre>;C:\Programme\PostgreSQL\8.4\bin</pre>
66 12 Datafreak
67 12 Datafreak
* LIB: 
68 12 Datafreak
<pre>;C:\Programme\PostgreSQL\8.4\lib</pre>
69 1 sph
70 12 Datafreak
* INCLUDE:
71 1 sph
<pre>;C:\Programme\PostgreSQL\8.4\include</pre>
72 12 Datafreak
73 12 Datafreak
h3. Step 10: Compile and Install Qt
74 12 Datafreak
75 1 sph
Create a directory (e.g. C:\dev\) and unpack Qt.
76 11 Datafreak
77 1 sph
Now open the Visual Studio 2008 command line.
78 1 sph
79 1 sph
And cd to the directory containing Qt. Now you can configure the Qt installation with the following command:
80 1 sph
* Static without PostgreSQL-Support:
81 23 Datafreak
<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 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32 -l crypt32</pre>
82 12 Datafreak
* Shared with PostgreSQL-Support:
83 23 Datafreak
<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 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32 -l crypt32</pre>
84 15 Datafreak
85 1 sph
Then you can compiled Qt with these commands:
86 1 sph
<pre>
87 8 Datafreak
nmake
88 1 sph
</pre>
89 1 sph
90 1 sph
You can close the prompt after this.
91 1 sph
92 12 Datafreak
h3. Step 11: Update the environment variables again
93 1 sph
94 1 sph
After installing Qt, you will have to append the following:
95 1 sph
96 8 Datafreak
* Path
97 23 Datafreak
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.3\bin</pre>
98 1 sph
99 1 sph
* LIB: 
100 23 Datafreak
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.3\lib</pre>
101 1 sph
102 1 sph
* INCLUDE:
103 23 Datafreak
<pre>;C:\dev\qt-everywhere-opensource-src-4.6.3\include</pre>
104 1 sph
105 1 sph
106 24 Datafreak
h3. Step 12:(Optional for Crypt-Support)
107 24 Datafreak
108 24 Datafreak
h4. Step 12.1 Install SlikSvn
109 24 Datafreak
110 24 Datafreak
h4. Step 12.2 Add SlikSvn to environment variables
111 24 Datafreak
* Path 
112 24 Datafreak
<pre>;C:\Programme\SlikSvn\bin\</pre>
113 24 Datafreak
114 24 Datafreak
h4. Step 12.3 Build QCA
115 24 Datafreak
<pre>cd C:\dev
116 24 Datafreak
mkdir qca-build
117 24 Datafreak
cd qca-build
118 24 Datafreak
svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca/
119 24 Datafreak
mkdir qca2-build
120 24 Datafreak
cd qca2-build
121 24 Datafreak
cmake -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=C:\dev\qca -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..\qca
122 24 Datafreak
nmake
123 24 Datafreak
nmake install</pre>
124 24 Datafreak
125 24 Datafreak
h4. Step 12.4 Add QCA to environment variables
126 24 Datafreak
127 24 Datafreak
* Path
128 24 Datafreak
<pre>;C:\dev\qca\bin</pre>
129 24 Datafreak
130 24 Datafreak
* LIB: 
131 24 Datafreak
<pre>;C:\dev\qca\lib</pre>
132 24 Datafreak
133 24 Datafreak
* INCLUDE:
134 24 Datafreak
<pre>;C:\dev\qca\include</pre>
135 24 Datafreak
136 24 Datafreak
h3. Step 13: Compile Quassel
137 1 sph
138 1 sph
Open a new Visual Studio 2008 command line and go to the "C:\dev" directory again. Use git to download the Quassel source code.
139 26 johu
<pre>git clone git://gitorious.org/quassel/quassel.git</pre>
140 1 sph
141 1 sph
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.
142 1 sph
143 2 sph
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:
144 23 Datafreak
* Static: 
145 23 Datafreak
<pre>cmake -G"NMake Makefiles" C:\dev\quassel -DSTATIC=ON -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DWITH_PHONON=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_WEBKIT=OFF -DLINK_EXTRA=crypt32</pre>
146 23 Datafreak
* Shared:
147 23 Datafreak
<pre>cmake -G"NMake Makefiles" C:\dev\quassel -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DWITH_PHONON=ON -DWITH_WEBKIT=ON -DCMAKE_BUILD_TYPE=Release -DLINK_EXTRA=crypt32</pre>
148 22 JabLuszko
149 22 JabLuszko
And after that:
150 22 JabLuszko
<pre>nmake</pre>
151 22 JabLuszko
152 22 JabLuszko
This will build Quasselcore, Quasselclient and Quasselmonolithic which can be found in the "C:\dev\build" directory.
153 2 sph
154 2 sph
h2. Related links
155 2 sph
156 25 Datafreak
* [[DLL Requirement]]
157 2 sph
* "German tutorial by Datafreak":http://www.datafreak.eu/2008/11/build-qt-and-quassel-under-windows/
158 27 romibi
* "Notes: Building Quassel-Client 0.12.2 with link preview" by romibi: http://pastebin.com/UjQtBNmL