blob: 85b434ecea5c5ba8e50ea4b1c6c214a155c1a94b [file] [log] [blame]
DRC2c0ea902010-04-16 07:33:41 +00001*******************************************************************************
DRC667df922011-06-23 10:11:22 +00002** Building TigerVNC
DRC2c0ea902010-04-16 07:33:41 +00003*******************************************************************************
4
5
DRC667df922011-06-23 10:11:22 +00006================================
7Build Requirements (All Systems)
8================================
DRC2c0ea902010-04-16 07:33:41 +00009
DRC667df922011-06-23 10:11:22 +000010-- CMake (http://www.cmake.org) v2.8 or later
11
DRC69854b42011-05-13 09:31:24 +000012-- If building TLS support:
13 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
14
DRCce355e32011-06-24 04:58:01 +000015-- If building native language support (NLS):
16 * Gnu gettext 0.14.4 or later
17 * See "Building Native Language Support" below.
18
DRC667df922011-06-23 10:11:22 +000019-- libjpeg-turbo SDK
DRCce355e32011-06-24 04:58:01 +000020 * If your system does not include libjpeg-turbo, then you can download the
21 SDK from http://sourceforge.net/projects/libjpeg-turbo/files/
DRC240a5ff2011-07-06 07:28:30 +000022 * See "Building High-Performance JPEG Support" below.
DRC667df922011-06-23 10:11:22 +000023
24
25=========================
26Build Requirements (Unix)
27=========================
28
29-- Non-Mac platforms:
30 * X11 development kit
31
DRC2c0ea902010-04-16 07:33:41 +000032-- If building Xvnc:
DRC667df922011-06-23 10:11:22 +000033 * autoconf 2.57 or later
34 * automake 1.7 or later
35 * libtool 1.4 or later
36 * OpenSSL v0.9.7 or later
DRC2c0ea902010-04-16 07:33:41 +000037 * Python v2.3 or later
38 * zlib v1.2 or later
DRC2c0ea902010-04-16 07:33:41 +000039
DRC69854b42011-05-13 09:31:24 +000040 * pkgconfig 0.20 or later
41 If you are using an older RPM-based system which does not meet this
42 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
43 build pkgconfig 0.20 from the Fedora 5 source RPM:
44 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
45
DRC69854b42011-05-13 09:31:24 +000046 * gettext 0.14.4 or later
47 If you are using an older RPM-based system which does not meet this
48 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
49 build gettext 0.14.5 from the Fedora 5 source RPM:
50 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
51 NOTE: gcj and libgcj are required when building the above source RPM.
DRC2b0b1942011-02-09 03:10:44 +000052
DRC2c0ea902010-04-16 07:33:41 +000053
DRC667df922011-06-23 10:11:22 +000054============================
55Build Requirements (Windows)
56============================
DRC180c0162010-10-27 07:20:27 +000057
DRCccc09692011-11-08 06:57:58 +000058-- MinGW or MinGW-w64
DRC180c0162010-10-27 07:20:27 +000059
DRC180c0162010-10-27 07:20:27 +000060-- Inno Setup (needed to build the TigerVNC installer)
61 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
62 You also need the Inno Setup Preprocessor, which is available in the
63 Inno Setup QuickStart Pack.
64
65 Add the directory containing iscc.exe (for instance,
66 C:\Program Files\Inno Setup 5) to the system or user PATH environment
67 variable prior to building TigerVNC.
68
DRC667df922011-06-23 10:11:22 +000069
DRC15b6e052011-10-06 01:20:52 +000070=========================
71Build Requirements (Java)
72=========================
73
74-- Sun/Oracle JDK v5 or later or OpenJDK
75
76-- See "Building Java Support" below.
77
78
DRC180c0162010-10-27 07:20:27 +000079==================
80Out-of-Tree Builds
81==================
82
83Binary objects, libraries, and executables are generated in the same directory
84from which cmake was executed (the "binary directory"), and this directory need
85not necessarily be the same as the TigerVNC source directory. You can create
86multiple independent binary directories, in which different versions of
87TigerVNC can be built from the same source tree using different compilers or
88settings. In the sections below, {build_directory} refers to the binary
89directory, whereas {source_directory} refers to the TigerVNC source directory.
90For in-tree builds, these directories are the same.
91
92
93=================
94Building TigerVNC
95=================
96
97
DRC62f3a662011-08-24 00:03:31 +000098Building the TigerVNC Viewer on Unix/Mac Systems
99------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000100
101The following procedure will build the TigerVNC Viewer on Linux and Unix
102systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
103"Build Recipes" for specific build instructions for building a 32-bit version
104of TigerVNC on 64-bit systems.
105
106 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000107 cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
DRC667df922011-06-23 10:11:22 +0000108 make
109
DRC62f3a662011-08-24 00:03:31 +0000110
111Building the TigerVNC Server on Modern Unix/Linux Systems
112---------------------------------------------------------
113
DRC667df922011-06-23 10:11:22 +0000114Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
115containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
116the X11 shared libraries provided with the system. The procedure for this is
DRC62f3a662011-08-24 00:03:31 +0000117system-specific, since it requires specifying such things as font directories,
118but the general outline is as follows (this procedure assumes that the viewer
119has already been built, per above.)
120
121 > cd {build_directory}
122
123 If performing an out-of-tree build:
124 > mkdir unix
125 > cp -R {source_directory}/unix/xserver unix/
126
127 > cp -R {xorg_source}/* unix/xserver/
128 (NOTE: {xorg_source} is the directory containing the Xorg source for the
129 machine on which you are building TigerVNC. The most recent versions of
130 Red Hat/CentOS/Fedora, for instance, provide an RPM called
131 "xorg-x11-server-source", which installs the Xorg source under
132 /usr/share/xorg-x11-server-source.)
133
134 > cd unix/xserver/
135 > patch -p1 < {source_directory}/unix/xserver{version}.patch
136 (where {version} matches the X server version you are building, such as
137 "17" for version 1.7.x.)
138 > autoreconf -fiv
139
Peter Åstrand01b24332011-10-31 08:14:40 +0000140 > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
DRC62f3a662011-08-24 00:03:31 +0000141 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
142 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
143 --disable-config-dbus --disable-config-hal --disable-config-udev \
144 --disable-dri2 --enable-install-libxf86config --enable-glx \
145 --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
146 --with-fontdir=/usr/share/X11/fonts \
147 --with-xkb-path=/usr/share/X11/xkb \
148 --with-xkb-output=/var/lib/xkb \
DRC0bb7e132011-08-24 00:26:54 +0000149 --with-xkb-bin-directory=/usr/bin \
DRC62f3a662011-08-24 00:03:31 +0000150 --with-serverconfig-path=/usr/lib[64]/xorg \
151 --with-dri-driver-path=/usr/lib[64]/dri \
152 {additional configure options}
153 (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
154 6 and recent Fedora releases. You should customize it for your particular
155 system. In particular, it will be necessary to customize the font, XKB,
156 and DRI directories.)
157
158 > make TIGERVNC_SRCDIR={source_directory}
159
160
161Building the TigerVNC Server on Legacy Unix/Linux Systems
162---------------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000163
164Those using systems with older versions of Xorg must build a "legacy-friendly"
165version of the TigerVNC Server. This is accomplished by downloading and
166building the more recent Xorg modules in a local directory and then building
167Xvnc such that it links against the local build of these libraries, not the X11
168libraries installed on the system. The "build-xorg" script in the TigerVNC
169source distribution (located under unix/) automates this process.
170
171The following procedure will build both the TigerVNC Viewer and a
172"legacy-friendly" version of the TigerVNC Server:
173
174 cd {build_directory}
175 sh {source_directory}/unix/build-xorg init
176 sh {source_directory}/unix/build-xorg build [additional CMake flags]
177
178build-xorg generates a version of Xvnc that has no external dependencies on the
179X11 shared libraries or any other distribution-specific shared libraries. This
180version of Xvnc should be transportable across multiple O/S distributions.
181build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
182systems. It probably will not work on older systems. It has not been tested
183on non-Linux systems (yet).
184
185build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
186once the X11 modules and other dependencies have been built for the first time.
187This is convenient for testing changes that just apply to the TigerVNC source
188code. To accomplish this, run:
189
190 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
191
192For instance,
193
194 sh {source_directory}/unix/build-xorg rebuild clean
195
196will clean both the Xvnc and vncviewer builds without destroying any of the
197build configuration or module dependencies.
198
199
DRCe4e604f2011-10-01 17:54:36 +0000200Building the Windows TigerVNC Viewer with MinGW
201-----------------------------------------------
DRC180c0162010-10-27 07:20:27 +0000202
DRCccc09692011-11-08 06:57:58 +0000203If building the Windows version of TigerVNC on a Windows build system, use
204the following procedure.
205
DRC180c0162010-10-27 07:20:27 +0000206 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000207 cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000208 make
209
DRCccc09692011-11-08 06:57:58 +0000210If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section
211below.
DRC180c0162010-10-27 07:20:27 +0000212
213
214Debug Build
215-----------
216
DRCccc09692011-11-08 06:57:58 +0000217Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line.
DRC180c0162010-10-27 07:20:27 +0000218
219
DRCe4e604f2011-10-01 17:54:36 +0000220Self-Contained GCC Build
221------------------------
DRC8290dd62011-02-10 22:54:36 +0000222
DRCe4e604f2011-10-01 17:54:36 +0000223If TigerVNC is built using GCC (including MinGW), then it may depend on the
224libgcc or libstdc++ dynamic libraries. To eliminate this dependency, add
DRC8290dd62011-02-10 22:54:36 +0000225
DRCe4e604f2011-10-01 17:54:36 +0000226 -DBUILD_STATIC=1
DRC8290dd62011-02-10 22:54:36 +0000227
Adam Tkacf586b842011-04-27 11:20:18 +0000228to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000229
230
DRCce355e32011-06-24 04:58:01 +0000231======================================
DRC240a5ff2011-07-06 07:28:30 +0000232Building High-Performance JPEG Support
233======================================
234
235In order to achieve its high levels of performance, TigerVNC relies on
236libjpeg-turbo (http://www.libjpeg-turbo.org), a derivative of libjpeg which
237uses SIMD instructions to accelerate baseline JPEG compression and
238decompression. If you are building TigerVNC on an operating system that
239includes libjpeg-turbo as a system library (for instance, Fedora 14 and later),
240then the TigerVNC build system should detect the system version of
241libjpeg-turbo automatically and link against it. However, this produces a
242version of TigerVNC that depends on the libjpeg-turbo dynamic libraries, and
243thus the TigerVNC binaries are not portable.
244
245To build a fully portable, cross-compatible version of TigerVNC with
246high-performance JPEG support, it is necessary to link against the
DRCccc09692011-11-08 06:57:58 +0000247libjpeg-turbo static library. This is also necessary when building the
248Windows or OS X versions of TigerVNC. To link against the libjpeg-turbo static
249library, first install the libjpeg-turbo SDK, which is available from
DRC240a5ff2011-07-06 07:28:30 +0000250https://sourceforge.net/projects/libjpeg-turbo/files/. Next, use the
251JPEG_INCLUDE_DIR and JPEG_LIBRARY CMake variables to specify the location of
252libjpeg-turbo. For example, adding
253
254 -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include \
255 -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib/libjpeg.a
256
257to the CMake command line will link TigerVNC against a static version of
258libjpeg-turbo installed under /opt/TigerVNC (which is the normal install
259location for the libjpeg-turbo SDK on Unix and Linux platforms.) Replace "lib"
260with "lib32" or "lib64" to use the 32-bit or 64-bit version of the library on
26164-bit Linux platforms.
262
DRCccc09692011-11-08 06:57:58 +0000263When building on Windows systems, adding
DRC240a5ff2011-07-06 07:28:30 +0000264
265 -DJPEG_INCLUDE_DIR=/c/libjpeg-turbo-gcc[64]/include \
266 -DJPEG_LIBRARY=/c/libjpeg-turbo-gcc[64]/lib/libjpeg.a
267
268to the CMake command line will link TigerVNC against the static version of
269libjpeg-turbo provided by the libjpeg-turbo SDK for GCC (MinGW.)
270
271CMake will report:
272
273 Performing Test FOUND_LIBJPEG_TURBO - Success
274
275if it successfully finds libjpeg-turbo.
276
277
DRC15b6e052011-10-06 01:20:52 +0000278=====================
279Building Java Support
280=====================
281
282TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on
283any platform that has a Java Runtime Environment (JRE) installed. The Java
284viewer works similarly to the native viewer, but with lower performance.
285
286To build the Java TigerVNC Viewer, add
287
288 -DBUILD_JAVA=1
289
290to the CMake or build-xorg command line. The build system will attempt to find
291an installed Java Development Kit (JDK) and determine the appropriate paths for
292the Java compiler (javac) and the JAR creation utility (jar). You can override
293these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake
294variables. You can also override the default flags that are passed to javac
295by setting the JAVACFLAGS CMake variable. The build system will look for
296keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These
297tools are needed to sign the JAR file, which is necessary to enable certain
298functionality (such as clipboard transfers) when the Java viewer is used as an
299applet.
300
301If the Java viewer is built along with the Windows TigerVNC Server (WinVNC),
302then the build system will embed the Java viewer into WinVNC4.exe so that it
303will automatically be served up using WinVNC's built-in HTTP server.
304Similarly, if the Java viewer is built along with the Unix TigerVNC Server
305(Xvnc), then the build system will include the Java viewer in the server
306tarball.
307
308
DRC240a5ff2011-07-06 07:28:30 +0000309======================================
DRCce355e32011-06-24 04:58:01 +0000310Building Native Language Support (NLS)
311======================================
312
DRCccc09692011-11-08 06:57:58 +0000313NLS requires gettext, which is supplied with most Linux distributions and
314with MinGW for Windows and which can easily be built from source on OS X and
315other Unix variants.
DRCce355e32011-06-24 04:58:01 +0000316
317You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
318specify the locations of libiconv and libintl, respectively. For instance,
319adding
320
321 -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
322
323to the CMake command line would link TigerVNC against a static version of
324libintl located under /opt/gettext. Adding
325
326 -DICONV_INCLUDE_DIR=/mingw/include \
327 -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
328 -DGETTEXT_INCLUDE_DIR=/mingw/include \
329 -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
330
331to the CMake command line would link TigerVNC against the static versions of
332libiconv and libintl included in the MinGW Developer Toolkit.
333
334
335===============================================
336Building Transport Layer Security (TLS) support
337===============================================
DRC8290dd62011-02-10 22:54:36 +0000338
Adam Tkac445d4ed2011-04-27 11:04:01 +0000339VeNCrypt (the TigerVNC security and authentication extensions) can be built
340with TLS support, which provides built-in encryption for VNC sessions. This
DRCce355e32011-06-24 04:58:01 +0000341requires GnuTLS, which is readily available in many Linux distributions but not
342as readily available in binary form on other types of systems. This section
DRC667df922011-06-23 10:11:22 +0000343describes the issues associated with building a version of TigerVNC with TLS
344support and how to work around those issues.
Adam Tkacf586b842011-04-27 11:20:18 +0000345
DRC667df922011-06-23 10:11:22 +0000346
347Unix/Mac
348--------
349
350In general, if you are building on a Unix-ish platform that has the GnuTLS
351libraries and include files installed in the standard system locations, then
352the TigerVNC build system should detect the system version of GnuTLS
353automatically and link against it. However, this produces a version of
354TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
355binaries are not portable.
356
DRCce355e32011-06-24 04:58:01 +0000357To build a fully portable, cross-compatible version of TigerVNC with TLS
DRC667df922011-06-23 10:11:22 +0000358support, it is necessary to link against the GnuTLS static library (as well
359as the static libraries of its dependencies.) If you are lucky enough, then
360your O/S distribution may include pre-packaged versions of these static
361libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
362libtasn1, and libgpg-error from source.
363
364You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRCce355e32011-06-24 04:58:01 +0000365build TigerVNC against a custom build of GnuTLS that is installed in a
366non-system directory. For instance, adding
DRC667df922011-06-23 10:11:22 +0000367
368 -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
369 -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
370 -DUSE_INCLUDED_ZLIB=1
371
372to the CMake or 'build-xorg build' command line will cause TigerVNC to be
373statically linked against a custom installation of GnuTLS that resides under
DRCce355e32011-06-24 04:58:01 +0000374/opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
DRC667df922011-06-23 10:11:22 +0000375satisfy that dependency using TigerVNC's in-tree version of zlib, which
376prevents TigerVNC from depending on the libz dynamic library.
377
378
379MinGW
380-----
DRC8290dd62011-02-10 22:54:36 +0000381
382An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000383link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000384
385http://josefsson.org/gnutls4win/
386
Adam Tkacf586b842011-04-27 11:20:18 +0000387As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
388that portions of the code assume an LP64 data model (Windows uses LLP64.)
389Thus, it is not possible at this time to produce a Win64 version of TigerVNC
390with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000391
Adam Tkacf586b842011-04-27 11:20:18 +0000392Whether you use the above installer or build GnuTLS from source, make sure that
393you install the libraries and headers into a pathname that doesn't contain
394spaces (the installer will try to install under c:\Program Files unless you
395tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
396resource compiler will barf when you try to build TigerVNC.
397
398You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000399specify the directory under which you installed GnuTLS. For instance, adding
400
401 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000402 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
403
404to the CMake command line when using MinGW will cause TigerVNC to be linked
405against GnuTLS DLLs that are installed under c:\gnutls.
406
407Adding
408
409 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000410 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
411
Adam Tkacf586b842011-04-27 11:20:18 +0000412to the CMake command line will cause TigerVNC to be statically linked against
413GnuTLS libraries that are installed under c:\gnutls.
414
DRC8290dd62011-02-10 22:54:36 +0000415
DRC180c0162010-10-27 07:20:27 +0000416===================
417Installing TigerVNC
418===================
419
420You can use the build system to install TigerVNC into a directory of your
DRC667df922011-06-23 10:11:22 +0000421choosing. To do this, add:
DRC180c0162010-10-27 07:20:27 +0000422
423 -DCMAKE_INSTALL_PREFIX={install_directory}
424
DRCccc09692011-11-08 06:57:58 +0000425to the CMake command line. Then, you can run 'make install' to build and
426install it.
DRC180c0162010-10-27 07:20:27 +0000427
428If you don't specify CMAKE_INSTALL_PREFIX, then the default is
DRC667df922011-06-23 10:11:22 +0000429c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
DRC180c0162010-10-27 07:20:27 +0000430
431
DRC667df922011-06-23 10:11:22 +0000432=========================
433Creating Release Packages
434=========================
435
436The following commands can be used to create various types of release packages:
437
438
439Unix
440----
441
DRC667df922011-06-23 10:11:22 +0000442make tarball
443
444 Create a binary tarball containing the TigerVNC Viewer
445
446make servertarball
447
448 Create a binary tarball containing both the TigerVNC Server and Viewer
449
450make dmg
451
DRCaab38302011-06-25 20:24:02 +0000452 Create Macintosh disk image file that contains an application bundle of the
453 TigerVNC Viewer
DRC667df922011-06-23 10:11:22 +0000454
DRCaab38302011-06-25 20:24:02 +0000455make udmg
DRC667df922011-06-23 10:11:22 +0000456
457 On 64-bit OS X systems, this creates a version of the Macintosh package and
458 disk image which contains universal i386/x86-64 binaries. You should first
459 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
460 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
461 build system will look for the 32-bit build under {source_directory}/osxx86
DRCaab38302011-06-25 20:24:02 +0000462 by default, but you can override this by setting the OSX_X86_BUILD CMake
463 variable to the directory containing your configured 32-bit build. Either
464 the 64-bit or 32-bit build can be configured to be backward compatible by
465 using the instructions in the "Build Recipes" section.
DRC667df922011-06-23 10:11:22 +0000466
467
468Windows
469-------
470
DRCccc09692011-11-08 06:57:58 +0000471make installer
DRC667df922011-06-23 10:11:22 +0000472
DRCccc09692011-11-08 06:57:58 +0000473 Create a Windows installer using Inno Setup. The installer package
474 (TigerVNC[64].exe) will be located under {build_directory}.
DRC667df922011-06-23 10:11:22 +0000475
476
477=============
478Build Recipes
479=============
480
481
48232-bit Build on 64-bit Linux/Unix (including OS X)
483--------------------------------------------------
484
DRCdc4f3542011-08-24 00:30:49 +0000485Set the following environment variables before building TigerVNC.
DRC667df922011-06-23 10:11:22 +0000486
487 CFLAGS='-O3 -m32'
488 CXXFLAGS='-O3 -m32'
489 LDFLAGS=-m32
490
DRCdc4f3542011-08-24 00:30:49 +0000491If you are building the TigerVNC Server on a modern Unix/Linux system, then
492you will also need to pass the appropriate --host argument when configuring the
493X server source (for instance, --host=i686-pc-linux-gnu).
494
DRC667df922011-06-23 10:11:22 +0000495
49664-bit Backward-Compatible Build on 64-bit OS X
497-----------------------------------------------
498
499Add
500
501 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
502 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
503
504to the CMake command line. The OS X 10.5 SDK must be installed.
505
506
50732-bit Backward-Compatible Build on 64-bit OS X
508-----------------------------------------------
509
510Set the following environment variables:
511
512 CC=gcc-4.0
513 CXX=g++-4.0
514 CFLAGS='-O3 -m32'
515 CXXFLAGS='-O3 -m32'
516 LDFLAGS=-m32
517
518and add
519
520 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
521 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
522
523to the CMake command line. The OS X 10.4 SDK must be installed.
DRC180c0162010-10-27 07:20:27 +0000524
525
52664-bit MinGW Build on Cygwin
527----------------------------
528
529 cd {build_directory}
530 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
531 RC=/usr/bin/x86_64-w64-mingw32-windres \
532 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
533 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
534 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
535 make
536
537This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
538other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
539packages (and their dependencies) must be installed.
540
541
54232-bit MinGW Build on Cygwin
543----------------------------
544
545 cd {build_directory}
546 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
547 RC=/usr/bin/i686-w64-mingw32-windres \
548 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
549 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
550 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
551 make
552
553This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
554other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
555packages (and their dependencies) must be installed.
556
557
558MinGW-w64 Build on Windows
559--------------------------
560
561This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
562(which is faster than the Cygwin version):
563
564 cd {build_directory}
565 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
566 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
567 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
568 cmake -G "MSYS Makefiles" \
569 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
570 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
571 {source_directory}
572 make
573
574
575MinGW Build on Linux
576--------------------
577
578 cd {build_directory}
579 CC={mingw_binary_path}/i386-mingw32-gcc \
580 CXX={mingw_binary_path}/i386-mingw32-g++ \
581 RC={mingw_binary_path}/i386-mingw32-windres \
582 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
583 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
584 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
585 {source_directory}
586 make