blob: 8bb18f224033d7cad246fb96110e9dd6301ead62 [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
DRC2c0ea902010-04-16 07:33:41 +000010-- NASM
Adam Tkacf4155d52011-04-27 11:28:56 +000011 * 0.98, or 2.01 or later is required for a 32-bit build
12 * NASM 2.00 or later is required for a 64-bit build
DRCef5e17f2010-09-30 18:53:42 +000013 * NASM 2.07 or later is required for a 64-bit build on OS X. This can be
DRC896a96c2010-07-08 07:12:09 +000014 obtained from MacPorts (http://www.macports.org/).
DRC2c0ea902010-04-16 07:33:41 +000015
Adam Tkacf4155d52011-04-27 11:28:56 +000016 The binary RPMs released by the NASM project do not work on older Linux
17 systems, such as Red Hat Enterprise Linux 4. On such systems, you can
18 easily build and install NASM from a source RPM by downloading one of the
19 SRPMs from
20
21 http://www.nasm.us/pub/nasm/releasebuilds
22
23 and executing the following as root:
DRC2c0ea902010-04-16 07:33:41 +000024
25 ARCH=`uname -m`
Adam Tkacf4155d52011-04-27 11:28:56 +000026 rpmbuild --rebuild nasm-{version}.src.rpm
27 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
DRC2c0ea902010-04-16 07:33:41 +000028
Adam Tkacf4155d52011-04-27 11:28:56 +000029 NOTE: the NASM build will fail if texinfo is not installed.
DRC2c0ea902010-04-16 07:33:41 +000030
31-- GCC v4.1 or later recommended for best performance
32
33-- X11 development kit
34
DRC69854b42011-05-13 09:31:24 +000035-- If building TLS support:
36 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
37
DRC2c0ea902010-04-16 07:33:41 +000038-- If building Xvnc:
39 * Python v2.3 or later
40 * zlib v1.2 or later
41 * OpenSSL v0.9.7 or later
42
DRC69854b42011-05-13 09:31:24 +000043 * pkgconfig 0.20 or later
44 If you are using an older RPM-based system which does not meet this
45 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
46 build pkgconfig 0.20 from the Fedora 5 source RPM:
47 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
48
49-- If building Xvnc or building TigerVNC from the subversion repository:
50 * autoconf 2.57 or later
51 * automake 1.7 or later
52 * libtool 1.4 or later
53
54 * gettext 0.14.4 or later
55 If you are using an older RPM-based system which does not meet this
56 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
57 build gettext 0.14.5 from the Fedora 5 source RPM:
58 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
59 NOTE: gcj and libgcj are required when building the above source RPM.
DRC2b0b1942011-02-09 03:10:44 +000060
DRC2c0ea902010-04-16 07:33:41 +000061
DRC180c0162010-10-27 07:20:27 +000062==================
63Out-of-Tree Builds
64==================
65
66Binary objects, libraries, and executables are generated in the same directory
67from which configure was executed (the "binary directory"), and this directory
68need not necessarily be the same as the TigerVNC source directory. You can
69create multiple independent binary directories, in which different versions of
70TigerVNC can be built from the same source tree using different compilers or
71settings. In the sections below, {build_directory} refers to the binary
72directory, whereas {source_directory} refers to the TigerVNC source directory.
73For in-tree builds, these directories are the same.
74
75
DRC2c0ea902010-04-16 07:33:41 +000076=================
77Building TigerVNC
78=================
79
DRC5f578a52011-02-10 23:15:16 +000080The following procedure will build the TigerVNC Viewer on Linux and Unix
DRC2c0ea902010-04-16 07:33:41 +000081systems. On 64-bit systems, this may build a 32-bit version of TigerVNC,
DRC2b0b1942011-02-09 03:10:44 +000082depending on the default autotools configuration for your system. See below
83for specific build instructions for 64-bit systems.
DRC2c0ea902010-04-16 07:33:41 +000084
DRC180c0162010-10-27 07:20:27 +000085 cd {source_directory}
DRC2c0ea902010-04-16 07:33:41 +000086 autoreconf -fiv
DRC180c0162010-10-27 07:20:27 +000087 cd {build_directory}
88 sh {source_directory}/configure [additional configure flags]
DRC2c0ea902010-04-16 07:33:41 +000089 make
90
DRC180c0162010-10-27 07:20:27 +000091NOTE: Running autoreconf in the source directory is only necessary if building
92TigerVNC from the SVN repository.
DRC2c0ea902010-04-16 07:33:41 +000093
DRC5f578a52011-02-10 23:15:16 +000094Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems, such
DRC2c0ea902010-04-16 07:33:41 +000095as Fedora, Xvnc is typically built to use the X11 shared libraries provided
96with the system. This requires a system with Xorg 7.4 or later, however.
97Systems with older versions of Xorg must build a "legacy-friendly" version of
DRC5f578a52011-02-10 23:15:16 +000098the TigerVNC Server. This is accomplished by downloading and building the
DRC2c0ea902010-04-16 07:33:41 +000099more recent Xorg modules in a local directory and then building Xvnc such that
100it links against the local build of these libraries, not the X11 libraries
101installed on the system. The "build-xorg" script in the TigerVNC source
DRC5f578a52011-02-10 23:15:16 +0000102distribution (located under unix/) automates this process.
DRC2c0ea902010-04-16 07:33:41 +0000103
DRC5f578a52011-02-10 23:15:16 +0000104The following procedure will build both the TigerVNC Viewer and a
105"legacy-friendly" version of the TigerVNC Server:
DRC2c0ea902010-04-16 07:33:41 +0000106
DRC180c0162010-10-27 07:20:27 +0000107 cd {build_directory}
108 sh {source_directory}/unix/build-xorg init -version 7.4
109 sh {source_directory}/unix/build-xorg build -version 7.4 [-static] [additional configure flags]
DRC2c0ea902010-04-16 07:33:41 +0000110
111Passing an argument of "-static" to the build command line will generate a
112version of Xvnc that has no external dependencies on the X11 shared libraries
113or any other distribution-specific shared libraries. This version of Xvnc
114should be transportable across multiple O/S distributions. The legacy-friendly
DRC180c0162010-10-27 07:20:27 +0000115build should work on Red Hat Enterprise 4, its contemporaries, and later
DRC2c0ea902010-04-16 07:33:41 +0000116systems. It probably will not work on older systems. It has not been tested
117on non-Linux systems (yet).
118
DRC5f578a52011-02-10 23:15:16 +0000119build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
DRC2c0ea902010-04-16 07:33:41 +0000120once the X11 modules and other dependencies have been built the first time.
121This is convenient for testing changes that just apply to the TigerVNC source
122code. To accomplish this, run:
123
DRC180c0162010-10-27 07:20:27 +0000124 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
DRC2c0ea902010-04-16 07:33:41 +0000125
126For instance,
127
DRC180c0162010-10-27 07:20:27 +0000128 sh {source_directory}/unix/build-xorg rebuild clean
DRC2c0ea902010-04-16 07:33:41 +0000129
130will clean both the Xvnc and vncviewer builds without destroying any of the
131build configuration or module dependencies.
132
133
Adam Tkacf586b842011-04-27 11:20:18 +0000134====================
135Building TLS support
136====================
DRC8290dd62011-02-10 22:54:36 +0000137
Adam Tkac445d4ed2011-04-27 11:04:01 +0000138VeNCrypt (the TigerVNC security and authentication extensions) can be built
139with TLS support, which provides built-in encryption for VNC sessions. This
DRC8290dd62011-02-10 22:54:36 +0000140requires GnuTLS, which is not pre-installed on all platforms. In general, if
141you are building on a Unix-ish platform that has the GnuTLS libraries and
142include files installed in the standard system locations, then the TigerVNC
143build system should detect the system version of GnuTLS automatically and link
144against it. However, this produces a version of TigerVNC that depends on the
145GnuTLS dynamic libraries, and thus the TigerVNC binaries are not portable.
146
147To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt
148support, it is necessary to link against the GnuTLS static library (as well
149as the static libraries of its dependencies.) If you are lucky enough, your
150O/S distribution may include pre-packaged versions of these static libraries.
151Otherwise, it will probably be necessary to build GnuTLS, libgcrypt, libtasn1,
152and libgpg-error from source.
153
154You can manipulate the GNUTLS_CFLAGS and GNUTLS_LDFLAGS configure variables to
155accommodate a custom build of GnuTLS that is installed in a non-system
156directory. For instance, adding
157
158 GNUTLS_CFLAGS=-I/opt/gnutls/include \
159 GNUTLS_LDFLAGS='/opt/gnutls/lib/libgnutls.a /opt/gnutls/lib/libgcrypt.a \
160 /opt/gnutls/lib/libgpg-error.a /opt/gnutls/lib/libtasn1.a' \
161 --with-included-zlib
162
163to the configure or 'build-xorg build' command line will cause TigerVNC to be
164statically linked against a custom installation of GnuTLS that resides under
165/opt/gnutls. GnuTLS depends on zlib, so specifying --with-included-zlib will
166satisfy that dependency using TigerVNC's in-tree version of zlib, which
167prevents TigerVNC from depending on the libz dynamic library.
168
169
DRC2b0b1942011-02-09 03:10:44 +0000170==================
171Unix Build Recipes
172==================
DRC2c0ea902010-04-16 07:33:41 +0000173
174
17532-bit Build on 64-bit Linux
176----------------------------
177
178Add
179
DRC896a96c2010-07-08 07:12:09 +0000180 --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
DRC2c0ea902010-04-16 07:33:41 +0000181
DRC180c0162010-10-27 07:20:27 +0000182to the configure or build command lines.
DRC2c0ea902010-04-16 07:33:41 +0000183
184
DRCef5e17f2010-09-30 18:53:42 +000018564-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000186---------------------------
187
188Add
189
DRC896a96c2010-07-08 07:12:09 +0000190 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm
DRC2c0ea902010-04-16 07:33:41 +0000191
192to the configure command line. NASM 2.07 or later from MacPorts must be
193installed.
194
195
DRCef5e17f2010-09-30 18:53:42 +000019632-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000197---------------------------
198
199Add
200
201 CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
202
203to the configure command line.
204
205
DRCef5e17f2010-09-30 18:53:42 +000020664-bit Backward-Compatible Build on 64-bit OS X
DRC896a96c2010-07-08 07:12:09 +0000207-----------------------------------------------
208
209Add
210
211 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
212 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
213 -mmacosx-version-min=10.5 -O3' \
214 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
215 -mmacosx-version-min=10.5 -O3' \
216 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
217 -mmacosx-version-min=10.5'
218
219to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from
220MacPorts, must be installed.
221
222
DRCef5e17f2010-09-30 18:53:42 +000022332-bit Backward-Compatible Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000224-----------------------------------------------
225
226Add
227
228 CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
229 -mmacosx-version-min=10.4 -O3 -m32' \
230 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
231 -mmacosx-version-min=10.4 -O3 -m32' \
232 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
233 -mmacosx-version-min=10.4 -m32'
234
235to the configure command line. The OS X 10.4 SDK must be installed.
236
237
DRC2e0b9652010-10-01 09:31:44 +0000238
DRC2c0ea902010-04-16 07:33:41 +0000239*******************************************************************************
DRC180c0162010-10-27 07:20:27 +0000240** Building on Windows (Visual C++ or MinGW)
241*******************************************************************************
242
243
244==================
245Build Requirements
246==================
247
248-- CMake (http://www.cmake.org) v2.6 or later
249
250-- Microsoft Visual C++ 2005 or later
251
252 If you don't already have Visual C++, then the easiest way to get it is by
253 installing the Windows SDK:
254
255 http://msdn.microsoft.com/en-us/windows/bb980924.aspx
256
257 The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
258 everything necessary to build TigerVNC.
259
260 * For 32-bit builds, you can also use Microsoft Visual C++ Express
261 Edition. Visual C++ Express Edition is a free download.
262 * If you intend to build TigerVNC from the command line, then add the
263 appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
264 environment variables. This is generally accomplished by executing
265 vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
266 vcvars64.bat are part of Visual C++ and are located in the same directory
267 as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
268 optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
269 environment.
270
271... OR ...
272
273-- MinGW
274
275 GCC v4.1 or later recommended for best performance
276
277-- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for
278 a 64-bit build)
279
280-- Inno Setup (needed to build the TigerVNC installer)
281 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
282 You also need the Inno Setup Preprocessor, which is available in the
283 Inno Setup QuickStart Pack.
284
285 Add the directory containing iscc.exe (for instance,
286 C:\Program Files\Inno Setup 5) to the system or user PATH environment
287 variable prior to building TigerVNC.
288
Adam Tkacf586b842011-04-27 11:20:18 +0000289-- If building TLS support:
DRC2b0b1942011-02-09 03:10:44 +0000290 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
291
DRC180c0162010-10-27 07:20:27 +0000292
293==================
294Out-of-Tree Builds
295==================
296
297Binary objects, libraries, and executables are generated in the same directory
298from which cmake was executed (the "binary directory"), and this directory need
299not necessarily be the same as the TigerVNC source directory. You can create
300multiple independent binary directories, in which different versions of
301TigerVNC can be built from the same source tree using different compilers or
302settings. In the sections below, {build_directory} refers to the binary
303directory, whereas {source_directory} refers to the TigerVNC source directory.
304For in-tree builds, these directories are the same.
305
306
307=================
308Building TigerVNC
309=================
310
311
312Visual C++ (Command Line)
313-------------------------
314
315 cd {build_directory}
316 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
317 nmake
318
319This will build either a 32-bit or a 64-bit version of TigerVNC, depending
320on which version of cl.exe is in the PATH.
321
322
323Visual C++ (IDE)
324----------------
325
326Choose the appropriate CMake generator option for your version of Visual Studio
327(run "cmake" with no arguments for a list of available generators.) For
328instance:
329
330 cd {build_directory}
331 cmake -G "Visual Studio 9 2008" {source_directory}
332
333You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
334configurations in that project ("Debug", "Release", etc.) to generate a full
335build of TigerVNC.
336
337
338MinGW
339-----
340
341 cd {build_directory}
342 cmake -G "MSYS Makefiles" {source_directory}
343 make
344
345This will generate only vncviewer. Currently, Visual C++ must be used to build
346WinVNC.
347
348
349Debug Build
350-----------
351
Adam Tkacf586b842011-04-27 11:20:18 +0000352Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Or, if building with
DRC180c0162010-10-27 07:20:27 +0000353NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
354NMake.)
355
356
DRC8290dd62011-02-10 22:54:36 +0000357Self-Contained MinGW Build
358--------------------------
359
360If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL.
361To eliminate this dependency, add
362
363 -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc
364
Adam Tkacf586b842011-04-27 11:20:18 +0000365to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000366
367
Adam Tkacf586b842011-04-27 11:20:18 +0000368====================
369Building TLS support
370====================
DRC8290dd62011-02-10 22:54:36 +0000371
Adam Tkac445d4ed2011-04-27 11:04:01 +0000372VeNCrypt (the TigerVNC security and authentication extensions) can be built
373with TLS support, which provides built-in encryption for VNC sessions. This
Adam Tkacf586b842011-04-27 11:20:18 +0000374requires GnuTLS, which is not Microsoft-friendly. This section describes the
375issues associated with building a Windows version of TigerVNC with TLS support
376and how to work around those issues.
377
378Building with MinGW
379-------------------
DRC8290dd62011-02-10 22:54:36 +0000380
381An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000382link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000383
384http://josefsson.org/gnutls4win/
385
Adam Tkacf586b842011-04-27 11:20:18 +0000386As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
387that portions of the code assume an LP64 data model (Windows uses LLP64.)
388Thus, it is not possible at this time to produce a Win64 version of TigerVNC
389with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000390
Adam Tkacf586b842011-04-27 11:20:18 +0000391Whether you use the above installer or build GnuTLS from source, make sure that
392you install the libraries and headers into a pathname that doesn't contain
393spaces (the installer will try to install under c:\Program Files unless you
394tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
395resource compiler will barf when you try to build TigerVNC.
396
397You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000398specify the directory under which you installed GnuTLS. For instance, adding
399
400 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000401 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
402
403to the CMake command line when using MinGW will cause TigerVNC to be linked
404against GnuTLS DLLs that are installed under c:\gnutls.
405
406Adding
407
408 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000409 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
410
Adam Tkacf586b842011-04-27 11:20:18 +0000411to the CMake command line will cause TigerVNC to be statically linked against
412GnuTLS libraries that are installed under c:\gnutls.
413
414Note that the use of MinGW means that only the TigerVNC viewer can be built,
415not the server.
416
417Visual C++
418----------
419
420There is generally no sane way to build GnuTLS and its dependencies using
421Visual C++. Thus, it is necessary to either build the libraries with MinGW (or
422download 32-bit versions of these from the link above), generate Visual C++
423import libraries from the DLLs, then link TigerVNC against the Visual C++
424import libraries.
425
426In the instructions below, {gnutls_path} indicates the path under which GnuTLS
427is installed (Example: c:\Program Files\GnuTLS-2.10.1).
428
429To generate Visual C++ import libraries:
430
431cd {gnutls_path}\lib
432lib /def:..\bin\libgnutls-{version}.def /out:libgnutls.lib
433
434Now, you can add the following arguments to the CMake command line:
435
436 -DGNUTLS_INCLUDE_DIR={gnutls_path}\include \
437 -DGNUTLS_LIBRARY={gnutls_path}\lib\libgnutls.lib
438
439to build TigerVNC against the GnuTLS DLLs installed under {gnutls_path}.
DRC8290dd62011-02-10 22:54:36 +0000440
441
DRC180c0162010-10-27 07:20:27 +0000442===================
443Installing TigerVNC
444===================
445
446You can use the build system to install TigerVNC into a directory of your
447choosing (as opposed to creating an installer.) To do this, add:
448
449 -DCMAKE_INSTALL_PREFIX={install_directory}
450
Adam Tkacf586b842011-04-27 11:20:18 +0000451to the CMake command line.
DRC180c0162010-10-27 07:20:27 +0000452
453For example,
454
455 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \
456 -DCMAKE_INSTALL_PREFIX=c:\TigerVNC {source_directory}
457 nmake install
458
459If you don't specify CMAKE_INSTALL_PREFIX, then the default is
460c:\Program Files\TigerVNC.
461
462
DRC2b0b1942011-02-09 03:10:44 +0000463=====================
464Windows Build Recipes
465=====================
DRC180c0162010-10-27 07:20:27 +0000466
467
46864-bit MinGW Build on Cygwin
469----------------------------
470
471 cd {build_directory}
472 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
473 RC=/usr/bin/x86_64-w64-mingw32-windres \
474 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
475 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
476 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
477 make
478
479This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
480other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
481packages (and their dependencies) must be installed.
482
483
48432-bit MinGW Build on Cygwin
485----------------------------
486
487 cd {build_directory}
488 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
489 RC=/usr/bin/i686-w64-mingw32-windres \
490 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
491 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
492 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
493 make
494
495This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
496other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
497packages (and their dependencies) must be installed.
498
499
500MinGW-w64 Build on Windows
501--------------------------
502
503This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
504(which is faster than the Cygwin version):
505
506 cd {build_directory}
507 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
508 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
509 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
510 cmake -G "MSYS Makefiles" \
511 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
512 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
513 {source_directory}
514 make
515
516
517MinGW Build on Linux
518--------------------
519
520 cd {build_directory}
521 CC={mingw_binary_path}/i386-mingw32-gcc \
522 CXX={mingw_binary_path}/i386-mingw32-g++ \
523 RC={mingw_binary_path}/i386-mingw32-windres \
524 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
525 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
526 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
527 {source_directory}
528 make
529
530
531*******************************************************************************
DRC2c0ea902010-04-16 07:33:41 +0000532** Creating Release Packages
533*******************************************************************************
534
535The following commands can be used to create various types of release packages:
536
DRC180c0162010-10-27 07:20:27 +0000537
538Unix
539----
540
DRC61b630a2011-02-09 10:45:09 +0000541make tarball
542
543 Create a binary tarball containing the TigerVNC Viewer
544
545make servertarball
546
547 Create a binary tarball containing both the TigerVNC Server and Viewer
548
DRC2c0ea902010-04-16 07:33:41 +0000549make dmg
550
551 Create Macintosh package/disk image. This requires the PackageMaker
552 application, which must be installed in /Developer/Applications/Utilities.
553
DRC2b0b1942011-02-09 03:10:44 +0000554make udmg [BUILDDIR32={32-bit build directory}]
DRC2c0ea902010-04-16 07:33:41 +0000555
DRC2b0b1942011-02-09 03:10:44 +0000556 On 64-bit OS X systems, this creates a version of the Macintosh package and
557 disk image which contains universal i386/x86-64 binaries. You should first
558 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
559 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
560 build system will look for the 32-bit build under {source_directory}/osxx86
561 by default, but you can override this by setting the BUILDDIR32 variable on
562 the make command line as shown above. Either the 64-bit or 32-bit build can
563 be configured to be backward-compatible by using the instructions in the
564 "Unix Build Recipes" section.
DRC180c0162010-10-27 07:20:27 +0000565
566
567Windows
568-------
569
570If using NMake:
571
572 cd {build_directory}
573 nmake installer
574
575If using MinGW:
576
577 cd {build_directory}
578 make installer
579
580If using the Visual Studio IDE, build the "installer" project.
581
582The installer package (TigerVNC[64].exe) will be located under
583{build_directory}. If building using the Visual Studio IDE, then the installer
584package will be located in a subdirectory with the same name as the
585configuration you built (such as {build_directory}\Debug\ or
586{build_directory}\Release\).
Adam Tkacf586b842011-04-27 11:20:18 +0000587
588NOTE: If TigerVNC is built with TLS support, then the build system will
589attempt to package the GnuTLS DLLs into the Windows installer. It looks for
590these DLLs in a directory called "bin" one level up from GNUTLS_INCLUDE_DIR.