summaryrefslogtreecommitdiffstats
blob: c411d62572977f1dab1db4e30a05a3a9c519b1ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Prerequisites
------------
- Microsoft Visual C++ Express Edition
- Windows SDK
- Python (2.5 <= version < 3)
- OpenSSL
  * OpenSSL is optional - without it the Windows platform crypto will be used
  * Download and extract the Windows binary version of OpenSSL from
    http://www.slproweb.com/products/Win32OpenSSL.html
- Qt Open Source Edition (optional; not needed for Swiften)

Building Qt for Microsoft Visual C++
------------------------------------
- These steps are optional - the pre-packaged Qt is fine
- From the 'Visual C++' 'Programs' group, launch the Visual C++ command prompt
- Go to the dir where you installed Qt
- Configure Qt:
    configure
- Build Qt:
    nmake

Building Swift
--------------
- From the 'Visual C++' 'Programs' group, launch the Visual C++ command prompt
- Go to the Swift source dir
- Create a file 'config.py' with the following contents, reflecting your local
  setup:
		openssl = "path\to\openssl" #optional
		qt = "path\to\qt"
- Run 'scons'
- To build only a subdir, add the path as a target to scons. E.g., for Swift:
		scons Swift

Running tests
-------------
- Run
		scons test=unit
	for running the unit tests, or
		scons test=all
	for running all tests.

Packaging Swift
---------------
For packaging use:
- Microsoft Visual C++ Express 2008 or Microsoft VS 2013 Express 
- No OpenSSL
- WiX
- Download the C++ redistributable package from Microsoft and put it at C:\Program Files (x86)\Common Files\Merge Modules\
- config.py should contain:
		qt = "c:\\qt\\4.7.4"
		vcredist = "C:\\Program Files (x86)\\Common Files\\Merge Modules\\vcredist_x86.exe"
		debug = 1
		optimize = 1
		wix_bindir = "c:\\program files\\Windows Installer XML v3.5\\bin"
- run 
		scons dist=1

Notes
-----
- The settings debug = 1 and optimize = 1 are strictly required if you use 
  a precompiled Qt release from the Qt Project; otherwise you will get linker 
  errors
- On 64-bit Windows it's "Program Files (x86)" instead of "Program Files" in the
  paths
- Currently only 32-bit builds of the Swift client are supported