Skip to content

Commit

Permalink
Add partial Qt build instructions for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole André Vadla Ravnås committed Sep 9, 2014
1 parent a010292 commit 1a28573
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
/agent.js
/node_modules
/vendor.js
/tools/dist
/tools/openssl-*
/tools/qt5
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,42 @@ carefully injecting logging and other side-effecty code.

- Open `cryptoshark.pro` with Qt Creator, select the `Release` configuration
and hit `Run`.

### Building QT on Windows

#### Prerequisites

* MS Visual Studio 2013
* Windows SDK 8.1
* Git
* Perl
* Python
* nasm

Review all the paths in `tools\env.bat` to make sure everything matches your
system.

#### Building OpenSSL

- Enter the environment by running `tools\env.bat`.

- Download the latest openssl tarball and extract it in `tools\`.

- Change to that directory and run: `..\01-build-openssl.bat`.

#### Building Qt

- Enter the environment by running `tools\env.bat`.

- Get the qt5 repo: `git clone git://gitorious.org/qt/qt5.git qt5`

- Switch to the 5.4 branch:

```
cd qt5
git checkout 5.4
```

- Get the source code: `perl init-repository --no-webkit`

- Change to `qt5\qtbase` and run: `..\..\02-build-qt.bat`
6 changes: 6 additions & 0 deletions tools/01-build-openssl.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
perl -pi.bak -e "s,/Ox /O2 /Ob2,/Os /GL,g" util\pl\VC-32.pl
perl -pi.bak -e "s,/subsystem:console /opt:ref,/subsystem:console /ltcg /opt:ref,g" util\pl\VC-32.pl
perl Configure VC-WIN32 --prefix=%CRYPTOSHARK_PREFIX%
call ms\do_nasm
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
5 changes: 5 additions & 0 deletions tools/02-build-qt.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
perl -pi.bak -e "s,-O2 -MD,-Os -MT,g" mkspecs\win32-msvc2013\qmake.conf
set QMAKESPEC=
configure -opensource -confirm-license -release -static -ltcg -nomake examples -nomake tests -no-style-fusion -opengl dynamic -qt-zlib -qt-libpng -qt-libjpeg -openssl-linked -I %CRYPTOSHARK_PREFIX%\include -L %CRYPTOSHARK_PREFIX%\lib OPENSSL_LIBS="-lssleay32 -llibeay32 -ladvapi32 -lcrypt32 -lgdi32 -luser32" -no-icu -no-dbus
bin\qmake.exe qtbase.pro
nmake
16 changes: 16 additions & 0 deletions tools/env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@echo off

set CRYPTOSHARK_PREFIX=%~dp0dist

set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\
set VCINSTALLDIR=%VSINSTALLDIR%VC\
set SDKINSTALLDIR=C:\Program Files (x86)\Windows Kits\8.1\

set PATH=C:\Program Files\Python27;C:\Program Files\Perl\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nasm;%SDKINSTALLDIR%bin\x86;%VCINSTALLDIR%bin;%VSINSTALLDIR%Common7\IDE;%PATH%
set INCLUDE=%SDKINSTALLDIR%Include\um;%SDKINSTALLDIR%Include\shared;%VCINSTALLDIR%include
set LIB=%SDKINSTALLDIR%Lib\winv6.3\um\x86;%VCINSTALLDIR%lib

set QMAKESPEC=win32-msvc2013

cd %~dp0
cmd

0 comments on commit 1a28573

Please sign in to comment.