root/vidalia/trunk/INSTALL

Revision 2645, 7.2 kB (checked in by edmanm, 3 months ago)

r426@thebe: edmanm | 2008-06-02 18:36:31 -0400
Build with miniupnpc support by default. The checkbox still defaults to
disabled.

  • Property svn:eol-style set to native
Line 
1
2         Instruction for Building and Installing Vidalia from Source
3
4
5Before building and running Vidalia, you will need to have the following
6packages installed:
7
8  * Qt >= 4.2           http://trolltech.com/downloads/opensource
9  * Tor >= 0.1.2.18     https://www.torproject.org/download.html
10  * CMake >= 2.4.0      http://www.cmake.org/HTML/Download.html
11
12
13Linux/BSD/Unix
14--------------
15  1. To configure and compile Vidalia, you can run:
16
17                           cmake . && make
18 
19     [optional] CMake also supports out-of-source builds, so compiled and
20     generated files are kept separate from the source tree. For example, you
21     can create a build directory as follows:
22
23                        mkdir build && cd build
24
25     Instead of the 'cmake .' command listed above, you would configure and
26     compile Vidalia by running:
27
28                           cmake .. && make
29
30  2. When the previous command finishes, Vidalia's binary will be
31     placed in the src/vidalia/ directory.
32 
33  3. Optionally, you can run `make install` to install Vidalia into
34     your /usr/local/bin/ directory.
35
36
37Mac OS X
38--------
39CMake on Mac OS X gives you the option of compiling Vidalia from the command
40line using standard Unix Makefiles, or generating an Xcode project if you
41prefer building from an IDE.
42
43  1. To build Vidalia from the command line, you can run:
44
45                           cmake . && make
46
47     Alternatively, you can have CMake generate an Xcode project for Vidalia
48     by running:
49
50                           cmake -G Xcode .
51
52  2. If you built from the command line, Vidalia's binary will be in an
53     application bundle located at src/vidalia/Vidalia.app. You can copy
54     Vidalia.app to your Applications folder, if you prefer.
55
56     If you're building from a CMake-generated Xcode project, you can simply
57     click "Build & Go" in Xcode to build and run Vidalia. Or, you can run
58     'xcodebuild' if you prefer building from the command line.
59
60
61Windows with MinGW
62-------------------
63  1. Make sure the following directories are in your PATH environment
64  variable:
65     
66      * CMake (e.g., "C:\Program Files\CMake 2.4\bin")
67      * MinGW (e.g., "C:\MinGW\bin")
68      * Qt    (e.g., "C:\Qt\4.3.2\bin")
69
70  2. Configure Vidalia and generate Makefiles by running:
71   
72                        cmake -G "MinGW Makefiles" .
73   
74
75  3. Compile Vidalia by running:
76                         
77                            mingw32-make
78
79
80If CMake fails to find your Qt installation, you can explicitly tell CMake
81where to find Qt by running:
82
83          cmake -DQT_QMAKE_EXECUTABLE="C:\Qt\4.3.2\bin\qmake.exe" .
84
85You would replace "C:\Qt\4.3.2\bin" in the previous command with the actual
86path to your Qt installation's qmake.exe binary.
87
88
89Windows with Visual Studio
90--------------------------
91Starting with Qt 4.3.2, the open source editions of Qt/Win include support for
92Visual Studio. Previously, Visual Studio support was limited to commercial
93editions of Qt unless you patched Qt's source.
94
95To build Vidalia under Visual Studio, you will first need to obtain Qt's
96source code and compile it with Visual Studio support. The following
97directions show how to compile Qt with Visual Studio 2005 support, but a
98similar process can be followed for other versions of VS.
99
100  1. Download and install Visual C++ 2005 Express
101 
102       http://www.microsoft.com/express/2005/download/default.aspx
103
104  2. Download and install the Windows Platform SDK and configure Visual C++ with
105     the location of the Platform SDK's executable, include, and library
106     directories.
107
108       http://msdn2.microsoft.com/en-us/express/aa700755.aspx
109
110     It is important to also install the "Microsoft Web Workshop (IE) SDK", even
111     though that seems irrelevant.
112
113  3. Download the Qt/Windows open source edition source code and extract it to a
114     directory with no spaces (e.g., C:\Qt\4.3.3).
115
116       http://trolltech.com/developer/downloads/qt/windows
117
118  4. Edit the Visual Studio  2005 command prompt environment variables to
119     include the platform SDK files, by opening
120
121       C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
122
123     and adding
124
125       C:\Program Files\Microsoft Platform SDK for Windows Servers 2003 R2\Include
126
127     to the INCLUDE variable and
128
129       C:\Program Files\Microsoft Platform SDK for Windows Servers 2003 R2\Lib
130
131     to the LIB variable. Modify the path to the platform SDK files as
132     appropriate, depending on where you installed Visual Studio and the
133     Platform SDK in Steps 1 and 2.
134
135  5. Open the Visual Studio 2005 Command Prompt and 'cd' to the location of your
136     extracted Qt source code (e.g., C:\Qt\4.3.3).
137
138  6. Configure Qt with support for your version of Visual Studio. For example,
139     to configure Qt with support for Visual Studio 2005, you would run:
140
141       configure.exe -debug-and-release -static -fast -platform win32-msvc2005
142
143     See Qt's README file for more available platform options.
144
145  7. Compile Qt by running: 
146     
147                                    nmake.exe
148 
149     (NOTE: This step will take several hours and lots of hard drive space.)
150 
151Once you have Qt compiled with Visual Studio support, you can use CMake to
152generate a Visual Studio project file by running
153
154                          cmake -G "Visual Studio 8 2005" .
155
156or whatever your particular version of Visual Studio happens to be.
157'cmake --help' lists other available generators.
158
159
160Windows with NMake
161-------------------
162To compile Vidalia from the command line using NMake, you will first need to
163follow the steps under the 'Windows with Visual Studio' section for compiling
164Qt with Visual Studio support.
165
166If you want to build Vidalia from the command line, you can have CMake generate
167NMake makefiles by running:
168
169                     cmake -G "NMake Makefiles" .
170
171You can then compile Vidalia from the command line by simply running:
172
173                               nmake
174
175
176Available Configuration Options
177-------------------------------
178
179You can customize your Vidalia build by supplying arguments and values to the
180`cmake` commands above. Each of the configuration options can be specified on
181the command line and follows the format "-D <var>:<type>=<value>
182
183  -DUSE_QSSLSOCKET=0                      Disable building Vidalia with SSL
184                                          support.
185
186  -DUSE_MINIUPNPC=0                       Disable UPnP support in Vidalia.
187
188  -DOSX_FAT_BINARY=1                      Build Vidalia as a Universal binary.
189
190  -DQT_QMAKE_EXECUTABLE=/path/to/qmake    Specifies the location of Qt's
191                                          'qmake' binary.
192
193  -DOPENSSL_LIBRARY_DIR=/path/to/openssl  Specifies the location of OpenSSL's
194                                          libraries.
195
196  -DCMAKE_INSTALL_PREFIX=/usr/local       Specifies the install prefix used
197                                          for `make install`.
198
199
200For example, to configure CMake to look for Qt in "/usr/local/Qt-4.3.2/bin",
201you would run:
202
203      cmake -DQT_QMAKE_EXECUTABLE=/usr/local/Qt-4.3.2/bin/qmake .
204
205Don't forget the dot at the end!
206
207CMake also supports other generators besides Makefiles on certain platforms. See
208'cmake --help' or 'man cmake' (on non-Windows platforms) for more information
209about supported generators and configuration options.
210
Note: See TracBrowser for help on using the browser.