-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
291 lines (184 loc) · 9.46 KB
/
INSTALL
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
Instructions for Building and Installing Vidalia from Source
Before building and running Vidalia, you will need to have the following
packages installed:
* Qt >= 4.3 http://qt.nokia.com/downloads
* Tor >= 0.2.0.34 https://www.torproject.org/download.html
* CMake >= 2.4.0 http://www.cmake.org/HTML/Download.html
Qt5
---
To configure and compile Vidalia against Qt5 use additional cmake argument:
-DUSE_QT5=ON
To specify the location of Qt5SDK (if needed) use variable CMAKE_PREFIX_PATH.
Note that Qt5 shared library directory (DLL/SO) should be in PATH environment variable.
The rest of build process is the same as for Qt4.
Example for running CMake at Windows targeting Visual Studio makefiles:
set PATH=C:\Qt\msvc2015_5.6.0\bin;%PATH%
cmake -G "NMake Makefiles" -DUSE_QT5=ON -DCMAKE_PREFIX_PATH="C:\Qt\msvc2015_5.6.0" ..
Linux/BSD/Unix
--------------
1. To configure and compile Vidalia, you can run the following sequence of
commands:
mkdir build && cd build
cmake ..
make
2. When the previous command finishes, Vidalia's binary will be
placed in the build/src/vidalia/ directory.
3. Optionally, you can run `make install` to install Vidalia into
your /usr/local/bin/ directory.
Mac OS X
--------
CMake on Mac OS X gives you the option of compiling Vidalia from the command
line using standard Unix Makefiles, or generating an Xcode project if you
prefer building from an IDE.
1. To build Vidalia from the command line, you can run:
mkdir build && cd build
cmake ..
make
Alternatively, you can have CMake generate an Xcode project for Vidalia
by running:
mkdir xcode && cd xcode
cmake -G Xcode ..
2. If you built from the command line, Vidalia's binary will be in an
application bundle located at build/src/vidalia/Vidalia.app. You can copy
Vidalia.app to your Applications folder, if you prefer.
If you're building from a CMake-generated Xcode project, you can simply
click "Build & Go" in Xcode to build and run Vidalia. Or, you can run
'xcodebuild' if you prefer building from the command line.
Windows with MinGW
-------------------
1. Make sure the following directories are in your PATH environment
variable:
* CMake (e.g., "C:\Program Files\CMake 2.4\bin")
* MinGW (e.g., "C:\MinGW\bin")
* Qt (e.g., "C:\Qt\4.3.2\bin")
2. Configure Vidalia and generate Makefiles by running:
mkdir build && cd build
cmake -G "MinGW Makefiles" ..
There should be no spaces in the path to your build directory. Otherwise,
Vidalia will fail to build.
3. Compile Vidalia by running:
mingw32-make
If CMake fails to find your Qt installation, you can explicitly tell CMake
where to find Qt as in the following example:
cmake -DQT_QMAKE_EXECUTABLE="C:\Qt\4.3.2\bin\qmake.exe" ..
You would replace "C:\Qt\4.3.2\bin" in the previous command with the actual
path to your Qt installation's qmake.exe binary.
If you are trying to build Vidalia for Windows 2000 and earlier, you should
download Windows SDK, copy wspiapi.h header to MinGW include directory and
build vidalia running:
cmake -DWIN2K ..
Note: the header as it is in the SDK needs a "_inline" to be replaced to
"__inline" for it to build properly.
Windows with Visual Studio
--------------------------
Starting with Qt 4.3.2, the open source editions of Qt/Win include support for
Visual Studio. Previously, Visual Studio support was limited to commercial
editions of Qt unless you patched Qt's source.
To build Vidalia under Visual Studio, you will first need to obtain Qt's
source code and compile it with Visual Studio support. The following
directions show how to compile Qt with Visual Studio 2005 support, but a
similar process can be followed for other versions of VS.
1. Download and install Visual C++ 2005 Express
http://www.microsoft.com/express/2005/download/default.aspx
2. Download and install the Windows Platform SDK and configure Visual C++ with
the location of the Platform SDK's executable, include, and library
directories.
http://msdn2.microsoft.com/en-us/express/aa700755.aspx
It is important to also install the "Microsoft Web Workshop (IE) SDK", even
though that seems irrelevant.
3. Download the Qt/Windows open source edition source code and extract it to a
directory with no spaces (e.g., C:\Qt\4.3.3).
http://qt.nokia.com/downloads/windows-cpp
4. Edit the Visual Studio 2005 command prompt environment variables to
include the platform SDK files, by opening
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
and adding
C:\Program Files\Microsoft Platform SDK for Windows Servers 2003 R2\Include
to the INCLUDE variable and
C:\Program Files\Microsoft Platform SDK for Windows Servers 2003 R2\Lib
to the LIB variable. Modify the path to the platform SDK files as
appropriate, depending on where you installed Visual Studio and the
Platform SDK in Steps 1 and 2.
5. Open the Visual Studio 2005 Command Prompt and 'cd' to the location of
your extracted Qt source code (e.g., C:\Qt\4.3.3).
6. Configure Qt with support for your version of Visual Studio. For example,
to configure Qt with support for Visual Studio 2005, you would run:
configure.exe -debug-and-release -static -fast -platform win32-msvc2005
See Qt's README file for more available platform options.
7. Compile Qt by running:
nmake.exe
(NOTE: This step will take several hours and lots of hard drive space.)
Once you have Qt compiled with Visual Studio support, you can use CMake to
generate a Visual Studio project file by running
mkdir build && cd build
cmake -G "Visual Studio 8 2005" ..
or whatever your particular version of Visual Studio happens to be.
'cmake --help' lists other available generators.
Windows with NMake
-------------------
To compile Vidalia from the command line using NMake, you will first need to
follow the steps under the 'Windows with Visual Studio' section for compiling
Qt with Visual Studio support.
If you want to build Vidalia from the command line, you can have CMake
generate NMake makefiles by running:
mkdir build && cd build
cmake -G "NMake Makefiles" ..
You can then compile Vidalia from the command line by simply running:
nmake
Available Configuration Options
-------------------------------
You can customize your Vidalia build by supplying arguments and values to the
`cmake` commands above. Each of the configuration options can be specified on
the command line and follows the format "-D <var>:<type>=<value>
-DUSE_MINIUPNPC=0
Disable UPnP support in Vidalia.
-DOSX_FAT_BINARY=1
Build Vidalia as a Universal binary.
-DOSX_TIGER_COMPAT=1
Build Vidalia compatible with OS X Tiger (10.4).
-DOSX_FORCE_32BIT=1
Forces a 32-bit build. This is useful on platforms that default to 64-bit
(e.g. Snow Leopard), but only have 32-bit versions of the Qt libraries
available.
-DQT_QMAKE_EXECUTABLE=/path/to/qmake
Specifies the location of Qt's 'qmake' binary.
-DCMAKE_INSTALL_PREFIX=/usr/local
Specifies the install prefix used for `make install`.
-DCMAKE_BUILD_TYPE=<buildtype>
Available build types include: "release", "debug", "minsizerel"
-DUSE_MARBLE=1
Replace the flat map with a 3-D sphere using the Marble libraries.
-DWIX_BINARY_DIR=C:\Path\To\WiX\
Specifies the location of your WiX executables, such as candle.exe and
light.exe (optional, Windows-only).
-DWIN2K
Builds Vidalia using the inlines defined in wspiapi.h header for Windows
2000 and earlier support.
For example, to configure CMake to look for Qt in "/usr/local/Qt-4.3.2/bin",
you would run:
cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Qt-4.3.2/bin/qmake ..
Don't forget the dot(s) at the end!
CMake also supports other generators besides Makefiles on certain platforms.
See 'cmake --help' or 'man cmake' (on non-Windows platforms) for more
information about supported generators and configuration options.
Additional Build Targets
-------------------------
Vidalia contains a number of additional CMake build targets to assist in
building code documentation and platform-specific packages. The targets are:
'dist' Creates a Vidalia source code tarball.
'dist-osx' Creates a Vidalia-only Mac OS X .dmg.
'dist-osx-bundle' Creates a Vidalia bundle .dmg. See
pkg/osx/build-bundle.txt for additional
information on the CMake options necessary to create
a proper OS X bundle.
'dist-osx-split-bundle' Creates a "split" Mac OS X bundle. See
pkg/osx/build-bundle.txt for additional
information on the CMake options necessary to create
a proper OS X bundle.
'dist-win32' Creates a Windows .msi package. You will also
need to define -DWIX_BINARY_DIR=<path-to-WiX>
in order to use this build target.
'doxygen' Creates the Doxygen-generated code
documentation for Vidalia's source. You must
have Doxygen installed for this target to
function.