Project

General

Profile

Build Quassel on Windows » History » Version 32

Version 31 (romibi, 09/11/2015 04:45 PM) → Version 32/35 (romibi, 06/23/2016 12:36 AM)

h1. Building Quassel on Windows

{{toc}}

h2. Software Requirements

* Windows
* "Visual Studio 2015":https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Express 2013 (at least Update 1?)":http://www.microsoft.com/en-US/download/details.aspx?id=44914
* "DirectX SDK":http://go.microsoft.com/fwlink/?LinkID=71193&clcid=0x409
* "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
* "OpenSSL":http://www.slproweb.com/products/Win32OpenSSL.html (Tested with: Win64 OpenSSL v1.0.2d)
* "Git for Windows":https://git-for-windows.github.io/ (>= 1.6.0.2)
* "CMake":https://cmake.org/download/ "CMake":http://www.cmake.org/cmake/resources/software.html (>= 2.6.2)
* "Qt OpenSource SRC or Qt Installer":http://www.qt.io/download-open-source/#section-2 (Tested with Installer: Qt 5.6.0 5.5.0 for Windows 64-bit)
* "PostgreSQL":http://www.enterprisedb.com/products/pgdownload.do#windows (Optional for PostgreSQL-Support)
* "SlikSvn":http://www.sliksvn.com/en/download (Optional for Crypt-Support)

h2. Installation

h3. Step 1: Install (and Update if necessary) Visual Studio 2015 Express 2013

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

These will be needed for OpenSSL.
(Comment: Still this old version?)

h3. Step 3: Install Platform SDK

h3. Step 4: Install DirectX SDK

If there's an S1023 error "see this link":https://support.microsoft.com/en-us/kb/2728613
It says to uninstall Visual C++ 2010 x64 Redistributable, install DirectX SDK and reinstall Redistributable...
(Comment: Should this step be done earlier?)

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

*Note: The correct paths can vary! Check your folders to find the correct ones! The Variables I had during a successful build are noted "somewhere here":http://pastebin.com/UjQtBNmL*

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-Win32\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-Win32\lib\VC\static</pre>

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

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

h3. Step 9: (Optional Install PostgreSQL and Update the environment variables, tutorial not tested with Quassel 0.12)

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

Follow the instructions below or just install via installer and go to Step 11.

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

Now open the Visual Studio 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 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32 -l crypt32</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 OPENSSL_LIBS="-lssleay32MD -llibeay32MD" -l gdi32 -l crypt32</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

*Note: The correct paths can vary! Check your folders to find the correct ones! The Variables I had during a successful build are noted "somewhere here":http://pastebin.com/UjQtBNmL*

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

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

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

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

Or if you used the Qt-Installer the folders are somewhere around C:\Qt\Qt5.6.1\5.6\msvc2015_64\ or similiar



h3. Step 12:(Optional for Crypt-Support, tutorial not tested with Quassel 0.12)

h4. Step 12.1 Install SlikSvn

h4. Step 12.2 Add SlikSvn to environment variables
* Path
<pre>;C:\Programme\SlikSvn\bin\</pre>

h4. Step 12.3 Build QCA
<pre>cd C:\dev
mkdir qca-build
cd qca-build
svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca/
mkdir qca2-build
cd qca2-build
cmake -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=C:\dev\qca -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..\qca
nmake
nmake install</pre>

h4. Step 12.4 Add QCA to environment variables

* Path
<pre>;C:\dev\qca\bin</pre>

* LIB:
<pre>;C:\dev\qca\lib</pre>

* INCLUDE:
<pre>;C:\dev\qca\include</pre>

h3. Step 13: Compile Quassel

Open a new Visual Studio command line and go to the "C:\dev" directory again (or create it). Use git to download the Quassel source code.
<pre>git clone https://github.com/quassel/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:

With Visual Studio:
* Shared: Shared, without link preview (command not tested):
<pre>cmake -G"Visual Studio 14 12 Win64" C:\dev\quassel -DSTATIC=OFF -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DWITH_PHONON=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_WEBKIT=OFF -DLINK_EXTRA=crypt32 -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DBus=ON</pre>
* Shared, with link preview, client only:
<pre>cmake -G"Visual Studio 12 Win64" C:\dev\quassel -DSTATIC=OFF -DWANT_CORE=OFF -DWANT_QTCLIENT=ON -DWANT_MONO=OFF -DDCMAKE_DISABLE_FIND_PACKAGE_Phonon4Qt5=ON -DCMAKE_BUILD_TYPE=Release
-DWITH_WEBKIT=ON -DLINK_EXTRA=crypt32 -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DBus=ON</pre>
then open "QuasselIRC.sln"
click on project "quasselclient", "quasselcore" or "quassel"
Build->Configuration-Manager-> Switch from "Debug" to "Release"
Build->Build quasselclient/quasselcore/quassel
I just copied the src\Release\quasselclient.exe to an existing official build but this link should help which files are needed in the Program folder: http://wiki.qt.io/Deploy_an_Application_on_Windows
additionally there should be an libeay32.dll and an ssleay32.dll from OpenSSL next to the exe

Or with nmake:
* Static: (old command?)
<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>
* Shared: (old command?)
<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>
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

* [[DLL Requirement]]
* "German tutorial by Datafreak":http://www.datafreak.eu/2008/11/build-qt-and-quassel-under-windows/
* "Notes: Building Quassel-Client 0.12.2 with link preview by romibi":http://pastebin.com/UjQtBNmL