blob: 3048647e7599dd5872d9b90c4e7da309b9c7f0ad [file] [log] [blame]
DRC2c0ea902010-04-16 07:33:41 +00001*******************************************************************************
DRC180c0162010-10-27 07:20:27 +00002** Building on Unix Platforms (including Cygwin)
DRC2c0ea902010-04-16 07:33:41 +00003*******************************************************************************
4
5
6==================
7Build Requirements
8==================
9
10-- autoconf 2.57 or later
DRC2c0ea902010-04-16 07:33:41 +000011-- automake 1.7 or later
DRC2c0ea902010-04-16 07:33:41 +000012-- libtool 1.4 or later
13
14-- NASM
Adam Tkacf4155d52011-04-27 11:28:56 +000015 * 0.98, or 2.01 or later is required for a 32-bit build
16 * NASM 2.00 or later is required for a 64-bit build
DRCef5e17f2010-09-30 18:53:42 +000017 * NASM 2.07 or later is required for a 64-bit build on OS X. This can be
DRC896a96c2010-07-08 07:12:09 +000018 obtained from MacPorts (http://www.macports.org/).
DRC2c0ea902010-04-16 07:33:41 +000019
Adam Tkacf4155d52011-04-27 11:28:56 +000020 The binary RPMs released by the NASM project do not work on older Linux
21 systems, such as Red Hat Enterprise Linux 4. On such systems, you can
22 easily build and install NASM from a source RPM by downloading one of the
23 SRPMs from
24
25 http://www.nasm.us/pub/nasm/releasebuilds
26
27 and executing the following as root:
DRC2c0ea902010-04-16 07:33:41 +000028
29 ARCH=`uname -m`
Adam Tkacf4155d52011-04-27 11:28:56 +000030 rpmbuild --rebuild nasm-{version}.src.rpm
31 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
DRC2c0ea902010-04-16 07:33:41 +000032
Adam Tkacf4155d52011-04-27 11:28:56 +000033 NOTE: the NASM build will fail if texinfo is not installed.
DRC2c0ea902010-04-16 07:33:41 +000034
35-- GCC v4.1 or later recommended for best performance
36
37-- X11 development kit
38
39-- If building Xvnc:
40 * Python v2.3 or later
41 * zlib v1.2 or later
42 * OpenSSL v0.9.7 or later
43
Adam Tkacf586b842011-04-27 11:20:18 +000044-- If building TLS support:
DRC2b0b1942011-02-09 03:10:44 +000045 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
46
DRC2c0ea902010-04-16 07:33:41 +000047
DRC180c0162010-10-27 07:20:27 +000048==================
49Out-of-Tree Builds
50==================
51
52Binary objects, libraries, and executables are generated in the same directory
53from which configure was executed (the "binary directory"), and this directory
54need not necessarily be the same as the TigerVNC source directory. You can
55create multiple independent binary directories, in which different versions of
56TigerVNC can be built from the same source tree using different compilers or
57settings. In the sections below, {build_directory} refers to the binary
58directory, whereas {source_directory} refers to the TigerVNC source directory.
59For in-tree builds, these directories are the same.
60
61
DRC2c0ea902010-04-16 07:33:41 +000062=================
63Building TigerVNC
64=================
65
DRC5f578a52011-02-10 23:15:16 +000066The following procedure will build the TigerVNC Viewer on Linux and Unix
DRC2c0ea902010-04-16 07:33:41 +000067systems. On 64-bit systems, this may build a 32-bit version of TigerVNC,
DRC2b0b1942011-02-09 03:10:44 +000068depending on the default autotools configuration for your system. See below
69for specific build instructions for 64-bit systems.
DRC2c0ea902010-04-16 07:33:41 +000070
DRC180c0162010-10-27 07:20:27 +000071 cd {source_directory}
DRC2c0ea902010-04-16 07:33:41 +000072 autoreconf -fiv
DRC180c0162010-10-27 07:20:27 +000073 cd {build_directory}
74 sh {source_directory}/configure [additional configure flags]
DRC2c0ea902010-04-16 07:33:41 +000075 make
76
DRC180c0162010-10-27 07:20:27 +000077NOTE: Running autoreconf in the source directory is only necessary if building
78TigerVNC from the SVN repository.
DRC2c0ea902010-04-16 07:33:41 +000079
DRC5f578a52011-02-10 23:15:16 +000080Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems, such
DRC2c0ea902010-04-16 07:33:41 +000081as Fedora, Xvnc is typically built to use the X11 shared libraries provided
82with the system. This requires a system with Xorg 7.4 or later, however.
83Systems with older versions of Xorg must build a "legacy-friendly" version of
DRC5f578a52011-02-10 23:15:16 +000084the TigerVNC Server. This is accomplished by downloading and building the
DRC2c0ea902010-04-16 07:33:41 +000085more recent Xorg modules in a local directory and then building Xvnc such that
86it links against the local build of these libraries, not the X11 libraries
87installed on the system. The "build-xorg" script in the TigerVNC source
DRC5f578a52011-02-10 23:15:16 +000088distribution (located under unix/) automates this process.
DRC2c0ea902010-04-16 07:33:41 +000089
DRC5f578a52011-02-10 23:15:16 +000090The following procedure will build both the TigerVNC Viewer and a
91"legacy-friendly" version of the TigerVNC Server:
DRC2c0ea902010-04-16 07:33:41 +000092
DRC180c0162010-10-27 07:20:27 +000093 cd {build_directory}
94 sh {source_directory}/unix/build-xorg init -version 7.4
95 sh {source_directory}/unix/build-xorg build -version 7.4 [-static] [additional configure flags]
DRC2c0ea902010-04-16 07:33:41 +000096
97Passing an argument of "-static" to the build command line will generate a
98version of Xvnc that has no external dependencies on the X11 shared libraries
99or any other distribution-specific shared libraries. This version of Xvnc
100should be transportable across multiple O/S distributions. The legacy-friendly
DRC180c0162010-10-27 07:20:27 +0000101build should work on Red Hat Enterprise 4, its contemporaries, and later
DRC2c0ea902010-04-16 07:33:41 +0000102systems. It probably will not work on older systems. It has not been tested
103on non-Linux systems (yet).
104
DRC5f578a52011-02-10 23:15:16 +0000105build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
DRC2c0ea902010-04-16 07:33:41 +0000106once the X11 modules and other dependencies have been built the first time.
107This is convenient for testing changes that just apply to the TigerVNC source
108code. To accomplish this, run:
109
DRC180c0162010-10-27 07:20:27 +0000110 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
DRC2c0ea902010-04-16 07:33:41 +0000111
112For instance,
113
DRC180c0162010-10-27 07:20:27 +0000114 sh {source_directory}/unix/build-xorg rebuild clean
DRC2c0ea902010-04-16 07:33:41 +0000115
116will clean both the Xvnc and vncviewer builds without destroying any of the
117build configuration or module dependencies.
118
119
Adam Tkacf586b842011-04-27 11:20:18 +0000120====================
121Building TLS support
122====================
DRC8290dd62011-02-10 22:54:36 +0000123
Adam Tkac445d4ed2011-04-27 11:04:01 +0000124VeNCrypt (the TigerVNC security and authentication extensions) can be built
125with TLS support, which provides built-in encryption for VNC sessions. This
DRC8290dd62011-02-10 22:54:36 +0000126requires GnuTLS, which is not pre-installed on all platforms. In general, if
127you are building on a Unix-ish platform that has the GnuTLS libraries and
128include files installed in the standard system locations, then the TigerVNC
129build system should detect the system version of GnuTLS automatically and link
130against it. However, this produces a version of TigerVNC that depends on the
131GnuTLS dynamic libraries, and thus the TigerVNC binaries are not portable.
132
133To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt
134support, it is necessary to link against the GnuTLS static library (as well
135as the static libraries of its dependencies.) If you are lucky enough, your
136O/S distribution may include pre-packaged versions of these static libraries.
137Otherwise, it will probably be necessary to build GnuTLS, libgcrypt, libtasn1,
138and libgpg-error from source.
139
140You can manipulate the GNUTLS_CFLAGS and GNUTLS_LDFLAGS configure variables to
141accommodate a custom build of GnuTLS that is installed in a non-system
142directory. For instance, adding
143
144 GNUTLS_CFLAGS=-I/opt/gnutls/include \
145 GNUTLS_LDFLAGS='/opt/gnutls/lib/libgnutls.a /opt/gnutls/lib/libgcrypt.a \
146 /opt/gnutls/lib/libgpg-error.a /opt/gnutls/lib/libtasn1.a' \
147 --with-included-zlib
148
149to the configure or 'build-xorg build' command line will cause TigerVNC to be
150statically linked against a custom installation of GnuTLS that resides under
151/opt/gnutls. GnuTLS depends on zlib, so specifying --with-included-zlib will
152satisfy that dependency using TigerVNC's in-tree version of zlib, which
153prevents TigerVNC from depending on the libz dynamic library.
154
155
DRC2b0b1942011-02-09 03:10:44 +0000156==================
157Unix Build Recipes
158==================
DRC2c0ea902010-04-16 07:33:41 +0000159
160
16132-bit Build on 64-bit Linux
162----------------------------
163
164Add
165
DRC896a96c2010-07-08 07:12:09 +0000166 --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
DRC2c0ea902010-04-16 07:33:41 +0000167
DRC180c0162010-10-27 07:20:27 +0000168to the configure or build command lines.
DRC2c0ea902010-04-16 07:33:41 +0000169
170
DRCef5e17f2010-09-30 18:53:42 +000017164-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000172---------------------------
173
174Add
175
DRC896a96c2010-07-08 07:12:09 +0000176 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm
DRC2c0ea902010-04-16 07:33:41 +0000177
178to the configure command line. NASM 2.07 or later from MacPorts must be
179installed.
180
181
DRCef5e17f2010-09-30 18:53:42 +000018232-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000183---------------------------
184
185Add
186
187 CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
188
189to the configure command line.
190
191
DRCef5e17f2010-09-30 18:53:42 +000019264-bit Backward-Compatible Build on 64-bit OS X
DRC896a96c2010-07-08 07:12:09 +0000193-----------------------------------------------
194
195Add
196
197 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
198 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
199 -mmacosx-version-min=10.5 -O3' \
200 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
201 -mmacosx-version-min=10.5 -O3' \
202 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
203 -mmacosx-version-min=10.5'
204
205to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from
206MacPorts, must be installed.
207
208
DRCef5e17f2010-09-30 18:53:42 +000020932-bit Backward-Compatible Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000210-----------------------------------------------
211
212Add
213
214 CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
215 -mmacosx-version-min=10.4 -O3 -m32' \
216 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
217 -mmacosx-version-min=10.4 -O3 -m32' \
218 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
219 -mmacosx-version-min=10.4 -m32'
220
221to the configure command line. The OS X 10.4 SDK must be installed.
222
223
DRC2e0b9652010-10-01 09:31:44 +0000224
DRC2c0ea902010-04-16 07:33:41 +0000225*******************************************************************************
DRC180c0162010-10-27 07:20:27 +0000226** Building on Windows (Visual C++ or MinGW)
227*******************************************************************************
228
229
230==================
231Build Requirements
232==================
233
234-- CMake (http://www.cmake.org) v2.6 or later
235
236-- Microsoft Visual C++ 2005 or later
237
238 If you don't already have Visual C++, then the easiest way to get it is by
239 installing the Windows SDK:
240
241 http://msdn.microsoft.com/en-us/windows/bb980924.aspx
242
243 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
244 everything necessary to build TigerVNC.
245
246 * For 32-bit builds, you can also use Microsoft Visual C++ Express
247 Edition. Visual C++ Express Edition is a free download.
248 * If you intend to build TigerVNC from the command line, then add the
249 appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
250 environment variables. This is generally accomplished by executing
251 vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
252 vcvars64.bat are part of Visual C++ and are located in the same directory
253 as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
254 optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
255 environment.
256
257... OR ...
258
259-- MinGW
260
261 GCC v4.1 or later recommended for best performance
262
263-- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for
264 a 64-bit build)
265
266-- Inno Setup (needed to build the TigerVNC installer)
267 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
268 You also need the Inno Setup Preprocessor, which is available in the
269 Inno Setup QuickStart Pack.
270
271 Add the directory containing iscc.exe (for instance,
272 C:\Program Files\Inno Setup 5) to the system or user PATH environment
273 variable prior to building TigerVNC.
274
Adam Tkacf586b842011-04-27 11:20:18 +0000275-- If building TLS support:
DRC2b0b1942011-02-09 03:10:44 +0000276 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
277
DRC180c0162010-10-27 07:20:27 +0000278
279==================
280Out-of-Tree Builds
281==================
282
283Binary objects, libraries, and executables are generated in the same directory
284from which cmake was executed (the "binary directory"), and this directory need
285not necessarily be the same as the TigerVNC source directory. You can create
286multiple independent binary directories, in which different versions of
287TigerVNC can be built from the same source tree using different compilers or
288settings. In the sections below, {build_directory} refers to the binary
289directory, whereas {source_directory} refers to the TigerVNC source directory.
290For in-tree builds, these directories are the same.
291
292
293=================
294Building TigerVNC
295=================
296
297
298Visual C++ (Command Line)
299-------------------------
300
301 cd {build_directory}
302 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
303 nmake
304
305This will build either a 32-bit or a 64-bit version of TigerVNC, depending
306on which version of cl.exe is in the PATH.
307
308
309Visual C++ (IDE)
310----------------
311
312Choose the appropriate CMake generator option for your version of Visual Studio
313(run "cmake" with no arguments for a list of available generators.) For
314instance:
315
316 cd {build_directory}
317 cmake -G "Visual Studio 9 2008" {source_directory}
318
319You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
320configurations in that project ("Debug", "Release", etc.) to generate a full
321build of TigerVNC.
322
323
324MinGW
325-----
326
327 cd {build_directory}
328 cmake -G "MSYS Makefiles" {source_directory}
329 make
330
331This will generate only vncviewer. Currently, Visual C++ must be used to build
332WinVNC.
333
334
335Debug Build
336-----------
337
Adam Tkacf586b842011-04-27 11:20:18 +0000338Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Or, if building with
DRC180c0162010-10-27 07:20:27 +0000339NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
340NMake.)
341
342
DRC8290dd62011-02-10 22:54:36 +0000343Self-Contained MinGW Build
344--------------------------
345
346If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL.
347To eliminate this dependency, add
348
349 -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc
350
Adam Tkacf586b842011-04-27 11:20:18 +0000351to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000352
353
Adam Tkacf586b842011-04-27 11:20:18 +0000354====================
355Building TLS support
356====================
DRC8290dd62011-02-10 22:54:36 +0000357
Adam Tkac445d4ed2011-04-27 11:04:01 +0000358VeNCrypt (the TigerVNC security and authentication extensions) can be built
359with TLS support, which provides built-in encryption for VNC sessions. This
Adam Tkacf586b842011-04-27 11:20:18 +0000360requires GnuTLS, which is not Microsoft-friendly. This section describes the
361issues associated with building a Windows version of TigerVNC with TLS support
362and how to work around those issues.
363
364Building with MinGW
365-------------------
DRC8290dd62011-02-10 22:54:36 +0000366
367An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000368link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000369
370http://josefsson.org/gnutls4win/
371
Adam Tkacf586b842011-04-27 11:20:18 +0000372As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
373that portions of the code assume an LP64 data model (Windows uses LLP64.)
374Thus, it is not possible at this time to produce a Win64 version of TigerVNC
375with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000376
Adam Tkacf586b842011-04-27 11:20:18 +0000377Whether you use the above installer or build GnuTLS from source, make sure that
378you install the libraries and headers into a pathname that doesn't contain
379spaces (the installer will try to install under c:\Program Files unless you
380tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
381resource compiler will barf when you try to build TigerVNC.
382
383You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000384specify the directory under which you installed GnuTLS. For instance, adding
385
386 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000387 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
388
389to the CMake command line when using MinGW will cause TigerVNC to be linked
390against GnuTLS DLLs that are installed under c:\gnutls.
391
392Adding
393
394 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000395 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
396
Adam Tkacf586b842011-04-27 11:20:18 +0000397to the CMake command line will cause TigerVNC to be statically linked against
398GnuTLS libraries that are installed under c:\gnutls.
399
400Note that the use of MinGW means that only the TigerVNC viewer can be built,
401not the server.
402
403Visual C++
404----------
405
406There is generally no sane way to build GnuTLS and its dependencies using
407Visual C++. Thus, it is necessary to either build the libraries with MinGW (or
408download 32-bit versions of these from the link above), generate Visual C++
409import libraries from the DLLs, then link TigerVNC against the Visual C++
410import libraries.
411
412In the instructions below, {gnutls_path} indicates the path under which GnuTLS
413is installed (Example: c:\Program Files\GnuTLS-2.10.1).
414
415To generate Visual C++ import libraries:
416
417cd {gnutls_path}\lib
418lib /def:..\bin\libgnutls-{version}.def /out:libgnutls.lib
419
420Now, you can add the following arguments to the CMake command line:
421
422 -DGNUTLS_INCLUDE_DIR={gnutls_path}\include \
423 -DGNUTLS_LIBRARY={gnutls_path}\lib\libgnutls.lib
424
425to build TigerVNC against the GnuTLS DLLs installed under {gnutls_path}.
DRC8290dd62011-02-10 22:54:36 +0000426
427
DRC180c0162010-10-27 07:20:27 +0000428===================
429Installing TigerVNC
430===================
431
432You can use the build system to install TigerVNC into a directory of your
433choosing (as opposed to creating an installer.) To do this, add:
434
435 -DCMAKE_INSTALL_PREFIX={install_directory}
436
Adam Tkacf586b842011-04-27 11:20:18 +0000437to the CMake command line.
DRC180c0162010-10-27 07:20:27 +0000438
439For example,
440
441 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \
442 -DCMAKE_INSTALL_PREFIX=c:\TigerVNC {source_directory}
443 nmake install
444
445If you don't specify CMAKE_INSTALL_PREFIX, then the default is
446c:\Program Files\TigerVNC.
447
448
DRC2b0b1942011-02-09 03:10:44 +0000449=====================
450Windows Build Recipes
451=====================
DRC180c0162010-10-27 07:20:27 +0000452
453
45464-bit MinGW Build on Cygwin
455----------------------------
456
457 cd {build_directory}
458 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
459 RC=/usr/bin/x86_64-w64-mingw32-windres \
460 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
461 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
462 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
463 make
464
465This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
466other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
467packages (and their dependencies) must be installed.
468
469
47032-bit MinGW Build on Cygwin
471----------------------------
472
473 cd {build_directory}
474 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
475 RC=/usr/bin/i686-w64-mingw32-windres \
476 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
477 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
478 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
479 make
480
481This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
482other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
483packages (and their dependencies) must be installed.
484
485
486MinGW-w64 Build on Windows
487--------------------------
488
489This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
490(which is faster than the Cygwin version):
491
492 cd {build_directory}
493 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
494 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
495 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
496 cmake -G "MSYS Makefiles" \
497 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
498 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
499 {source_directory}
500 make
501
502
503MinGW Build on Linux
504--------------------
505
506 cd {build_directory}
507 CC={mingw_binary_path}/i386-mingw32-gcc \
508 CXX={mingw_binary_path}/i386-mingw32-g++ \
509 RC={mingw_binary_path}/i386-mingw32-windres \
510 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
511 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
512 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
513 {source_directory}
514 make
515
516
517*******************************************************************************
DRC2c0ea902010-04-16 07:33:41 +0000518** Creating Release Packages
519*******************************************************************************
520
521The following commands can be used to create various types of release packages:
522
DRC180c0162010-10-27 07:20:27 +0000523
524Unix
525----
526
DRC61b630a2011-02-09 10:45:09 +0000527make tarball
528
529 Create a binary tarball containing the TigerVNC Viewer
530
531make servertarball
532
533 Create a binary tarball containing both the TigerVNC Server and Viewer
534
DRC2c0ea902010-04-16 07:33:41 +0000535make dmg
536
537 Create Macintosh package/disk image. This requires the PackageMaker
538 application, which must be installed in /Developer/Applications/Utilities.
539
DRC2b0b1942011-02-09 03:10:44 +0000540make udmg [BUILDDIR32={32-bit build directory}]
DRC2c0ea902010-04-16 07:33:41 +0000541
DRC2b0b1942011-02-09 03:10:44 +0000542 On 64-bit OS X systems, this creates a version of the Macintosh package and
543 disk image which contains universal i386/x86-64 binaries. You should first
544 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
545 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
546 build system will look for the 32-bit build under {source_directory}/osxx86
547 by default, but you can override this by setting the BUILDDIR32 variable on
548 the make command line as shown above. Either the 64-bit or 32-bit build can
549 be configured to be backward-compatible by using the instructions in the
550 "Unix Build Recipes" section.
DRC180c0162010-10-27 07:20:27 +0000551
552
553Windows
554-------
555
556If using NMake:
557
558 cd {build_directory}
559 nmake installer
560
561If using MinGW:
562
563 cd {build_directory}
564 make installer
565
566If using the Visual Studio IDE, build the "installer" project.
567
568The installer package (TigerVNC[64].exe) will be located under
569{build_directory}. If building using the Visual Studio IDE, then the installer
570package will be located in a subdirectory with the same name as the
571configuration you built (such as {build_directory}\Debug\ or
572{build_directory}\Release\).
Adam Tkacf586b842011-04-27 11:20:18 +0000573
574NOTE: If TigerVNC is built with TLS support, then the build system will
575attempt to package the GnuTLS DLLs into the Windows installer. It looks for
576these DLLs in a directory called "bin" one level up from GNUTLS_INCLUDE_DIR.