blob: f5ed717bccb253d50c6b83c7f5bbc460b62c97fe [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
Peter Åstrand956a6362012-08-09 07:33:08 +000012-- FLTK 1.3.0 snapshot
13 * Must be patched to get full functionality
14 * See "Building FLTK" below.
15
DRC69854b42011-05-13 09:31:24 +000016-- If building TLS support:
17 * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
18
DRCce355e32011-06-24 04:58:01 +000019-- If building native language support (NLS):
20 * Gnu gettext 0.14.4 or later
21 * See "Building Native Language Support" below.
22
DRC667df922011-06-23 10:11:22 +000023-- libjpeg-turbo SDK
DRCce355e32011-06-24 04:58:01 +000024 * If your system does not include libjpeg-turbo, then you can download the
25 SDK from http://sourceforge.net/projects/libjpeg-turbo/files/
DRC240a5ff2011-07-06 07:28:30 +000026 * See "Building High-Performance JPEG Support" below.
DRC667df922011-06-23 10:11:22 +000027
28
29=========================
30Build Requirements (Unix)
31=========================
32
33-- Non-Mac platforms:
34 * X11 development kit
35
DRC2c0ea902010-04-16 07:33:41 +000036-- If building Xvnc:
DRC667df922011-06-23 10:11:22 +000037 * autoconf 2.57 or later
38 * automake 1.7 or later
39 * libtool 1.4 or later
40 * OpenSSL v0.9.7 or later
DRC2c0ea902010-04-16 07:33:41 +000041 * Python v2.3 or later
42 * zlib v1.2 or later
DRC2c0ea902010-04-16 07:33:41 +000043
DRC69854b42011-05-13 09:31:24 +000044 * pkgconfig 0.20 or later
45 If you are using an older RPM-based system which does not meet this
46 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
47 build pkgconfig 0.20 from the Fedora 5 source RPM:
48 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
49
DRC69854b42011-05-13 09:31:24 +000050 * gettext 0.14.4 or later
51 If you are using an older RPM-based system which does not meet this
52 minimum requirement (such as Red Hat Enterprise Linux 4), then you can
53 build gettext 0.14.5 from the Fedora 5 source RPM:
54 http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
55 NOTE: gcj and libgcj are required when building the above source RPM.
DRC2b0b1942011-02-09 03:10:44 +000056
DRC2c0ea902010-04-16 07:33:41 +000057
DRC667df922011-06-23 10:11:22 +000058============================
59Build Requirements (Windows)
60============================
DRC180c0162010-10-27 07:20:27 +000061
DRCccc09692011-11-08 06:57:58 +000062-- MinGW or MinGW-w64
DRC180c0162010-10-27 07:20:27 +000063
DRC180c0162010-10-27 07:20:27 +000064-- Inno Setup (needed to build the TigerVNC installer)
65 Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
66 You also need the Inno Setup Preprocessor, which is available in the
67 Inno Setup QuickStart Pack.
68
69 Add the directory containing iscc.exe (for instance,
70 C:\Program Files\Inno Setup 5) to the system or user PATH environment
71 variable prior to building TigerVNC.
72
DRC667df922011-06-23 10:11:22 +000073
DRC15b6e052011-10-06 01:20:52 +000074=========================
75Build Requirements (Java)
76=========================
77
78-- Sun/Oracle JDK v5 or later or OpenJDK
79
80-- See "Building Java Support" below.
81
82
Peter Åstrand956a6362012-08-09 07:33:08 +000083=============
84Building FLTK
85=============
86
87Currently, TigerVNC requires functionality that is not yet included in the
88upstream version of FLTK. Thus, it will be necessary to build FLTK from
89source. To do this:
90
911. Check out FLTK 1.3.0r9619 using Subversion:
92$ svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3 -r 9619 fltk-1.3.0r9619
93
942. For full functionality, apply these patches:
95
96Support horizontal mouse wheel
97http://www.fltk.org/str.php?L2644
98
99Incorrect resize handling
100http://fltk.org/str.php?L2859
101
102Export dead key information from FLTK to the apps
103http://www.fltk.org/str.php?L2599
104
105Notify applications of changes to the clipboard
106http://www.fltk.org/str.php?L2636
107
108Ability to convert a Fl_Pixmap to a Fl_RGB_Image
109http://www.fltk.org/str.php?L2659
110
111Support for custom cursors
112http://www.fltk.org/str.php?L2660
113
114Improve modality interaction with WM
115http://www.fltk.org/str.php?L2802
116
117Window icons
118http://www.fltk.org/str.php?L2816
119
120Multihead
121http://fltk.org/str.php?L2860
122
123
1243. Use CMake to build FLTK using the same procedures described below for
125 building TigerVNC. The recipes in the "Build Recipes" section also apply.
126
1274. (optional) Use 'make install' to install FLTK into a directory of your
128 choosing.
129
1305. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
131 location of the fluid executable that was built in Step 3 or installed in
132 Step 4. This gives CMake a hint as to where to find the FLTK library.
1336. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
134 the location of the FLTK source directory.
135
136
DRC180c0162010-10-27 07:20:27 +0000137==================
138Out-of-Tree Builds
139==================
140
141Binary objects, libraries, and executables are generated in the same directory
142from which cmake was executed (the "binary directory"), and this directory need
143not necessarily be the same as the TigerVNC source directory. You can create
144multiple independent binary directories, in which different versions of
145TigerVNC can be built from the same source tree using different compilers or
146settings. In the sections below, {build_directory} refers to the binary
147directory, whereas {source_directory} refers to the TigerVNC source directory.
148For in-tree builds, these directories are the same.
149
150
151=================
152Building TigerVNC
153=================
154
155
DRC62f3a662011-08-24 00:03:31 +0000156Building the TigerVNC Viewer on Unix/Mac Systems
157------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000158
159The following procedure will build the TigerVNC Viewer on Linux and Unix
160systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
161"Build Recipes" for specific build instructions for building a 32-bit version
162of TigerVNC on 64-bit systems.
163
164 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000165 cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
DRC667df922011-06-23 10:11:22 +0000166 make
167
DRC62f3a662011-08-24 00:03:31 +0000168
169Building the TigerVNC Server on Modern Unix/Linux Systems
170---------------------------------------------------------
171
DRC667df922011-06-23 10:11:22 +0000172Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
173containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
174the X11 shared libraries provided with the system. The procedure for this is
DRC62f3a662011-08-24 00:03:31 +0000175system-specific, since it requires specifying such things as font directories,
176but the general outline is as follows (this procedure assumes that the viewer
177has already been built, per above.)
178
179 > cd {build_directory}
180
181 If performing an out-of-tree build:
182 > mkdir unix
183 > cp -R {source_directory}/unix/xserver unix/
184
185 > cp -R {xorg_source}/* unix/xserver/
186 (NOTE: {xorg_source} is the directory containing the Xorg source for the
187 machine on which you are building TigerVNC. The most recent versions of
188 Red Hat/CentOS/Fedora, for instance, provide an RPM called
189 "xorg-x11-server-source", which installs the Xorg source under
190 /usr/share/xorg-x11-server-source.)
191
192 > cd unix/xserver/
193 > patch -p1 < {source_directory}/unix/xserver{version}.patch
194 (where {version} matches the X server version you are building, such as
195 "17" for version 1.7.x.)
196 > autoreconf -fiv
197
Peter Åstrand01b24332011-10-31 08:14:40 +0000198 > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
DRC62f3a662011-08-24 00:03:31 +0000199 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
200 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
201 --disable-config-dbus --disable-config-hal --disable-config-udev \
202 --disable-dri2 --enable-install-libxf86config --enable-glx \
203 --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
204 --with-fontdir=/usr/share/X11/fonts \
205 --with-xkb-path=/usr/share/X11/xkb \
206 --with-xkb-output=/var/lib/xkb \
DRC0bb7e132011-08-24 00:26:54 +0000207 --with-xkb-bin-directory=/usr/bin \
DRC62f3a662011-08-24 00:03:31 +0000208 --with-serverconfig-path=/usr/lib[64]/xorg \
209 --with-dri-driver-path=/usr/lib[64]/dri \
210 {additional configure options}
211 (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
212 6 and recent Fedora releases. You should customize it for your particular
213 system. In particular, it will be necessary to customize the font, XKB,
214 and DRI directories.)
215
216 > make TIGERVNC_SRCDIR={source_directory}
217
218
219Building the TigerVNC Server on Legacy Unix/Linux Systems
220---------------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000221
222Those using systems with older versions of Xorg must build a "legacy-friendly"
223version of the TigerVNC Server. This is accomplished by downloading and
224building the more recent Xorg modules in a local directory and then building
225Xvnc such that it links against the local build of these libraries, not the X11
226libraries installed on the system. The "build-xorg" script in the TigerVNC
227source distribution (located under unix/) automates this process.
228
229The following procedure will build both the TigerVNC Viewer and a
230"legacy-friendly" version of the TigerVNC Server:
231
232 cd {build_directory}
233 sh {source_directory}/unix/build-xorg init
234 sh {source_directory}/unix/build-xorg build [additional CMake flags]
235
236build-xorg generates a version of Xvnc that has no external dependencies on the
237X11 shared libraries or any other distribution-specific shared libraries. This
238version of Xvnc should be transportable across multiple O/S distributions.
239build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
240systems. It probably will not work on older systems. It has not been tested
241on non-Linux systems (yet).
242
243build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
244once the X11 modules and other dependencies have been built for the first time.
245This is convenient for testing changes that just apply to the TigerVNC source
246code. To accomplish this, run:
247
248 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
249
250For instance,
251
252 sh {source_directory}/unix/build-xorg rebuild clean
253
254will clean both the Xvnc and vncviewer builds without destroying any of the
255build configuration or module dependencies.
256
257
DRCe4e604f2011-10-01 17:54:36 +0000258Building the Windows TigerVNC Viewer with MinGW
259-----------------------------------------------
DRC180c0162010-10-27 07:20:27 +0000260
DRCccc09692011-11-08 06:57:58 +0000261If building the Windows version of TigerVNC on a Windows build system, use
262the following procedure.
263
DRC180c0162010-10-27 07:20:27 +0000264 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000265 cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000266 make
267
DRCccc09692011-11-08 06:57:58 +0000268If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section
269below.
DRC180c0162010-10-27 07:20:27 +0000270
271
272Debug Build
273-----------
274
DRCccc09692011-11-08 06:57:58 +0000275Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line.
DRC180c0162010-10-27 07:20:27 +0000276
277
DRCe4e604f2011-10-01 17:54:36 +0000278Self-Contained GCC Build
279------------------------
DRC8290dd62011-02-10 22:54:36 +0000280
DRCe4e604f2011-10-01 17:54:36 +0000281If TigerVNC is built using GCC (including MinGW), then it may depend on the
282libgcc or libstdc++ dynamic libraries. To eliminate this dependency, add
DRC8290dd62011-02-10 22:54:36 +0000283
DRCe4e604f2011-10-01 17:54:36 +0000284 -DBUILD_STATIC=1
DRC8290dd62011-02-10 22:54:36 +0000285
Adam Tkacf586b842011-04-27 11:20:18 +0000286to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000287
288
DRCce355e32011-06-24 04:58:01 +0000289======================================
DRC240a5ff2011-07-06 07:28:30 +0000290Building High-Performance JPEG Support
291======================================
292
293In order to achieve its high levels of performance, TigerVNC relies on
294libjpeg-turbo (http://www.libjpeg-turbo.org), a derivative of libjpeg which
295uses SIMD instructions to accelerate baseline JPEG compression and
296decompression. If you are building TigerVNC on an operating system that
297includes libjpeg-turbo as a system library (for instance, Fedora 14 and later),
298then the TigerVNC build system should detect the system version of
299libjpeg-turbo automatically and link against it. However, this produces a
300version of TigerVNC that depends on the libjpeg-turbo dynamic libraries, and
301thus the TigerVNC binaries are not portable.
302
303To build a fully portable, cross-compatible version of TigerVNC with
304high-performance JPEG support, it is necessary to link against the
DRCccc09692011-11-08 06:57:58 +0000305libjpeg-turbo static library. This is also necessary when building the
306Windows or OS X versions of TigerVNC. To link against the libjpeg-turbo static
307library, first install the libjpeg-turbo SDK, which is available from
DRC240a5ff2011-07-06 07:28:30 +0000308https://sourceforge.net/projects/libjpeg-turbo/files/. Next, use the
309JPEG_INCLUDE_DIR and JPEG_LIBRARY CMake variables to specify the location of
310libjpeg-turbo. For example, adding
311
312 -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include \
313 -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib/libjpeg.a
314
315to the CMake command line will link TigerVNC against a static version of
316libjpeg-turbo installed under /opt/TigerVNC (which is the normal install
317location for the libjpeg-turbo SDK on Unix and Linux platforms.) Replace "lib"
318with "lib32" or "lib64" to use the 32-bit or 64-bit version of the library on
31964-bit Linux platforms.
320
DRCccc09692011-11-08 06:57:58 +0000321When building on Windows systems, adding
DRC240a5ff2011-07-06 07:28:30 +0000322
323 -DJPEG_INCLUDE_DIR=/c/libjpeg-turbo-gcc[64]/include \
324 -DJPEG_LIBRARY=/c/libjpeg-turbo-gcc[64]/lib/libjpeg.a
325
326to the CMake command line will link TigerVNC against the static version of
327libjpeg-turbo provided by the libjpeg-turbo SDK for GCC (MinGW.)
328
329CMake will report:
330
331 Performing Test FOUND_LIBJPEG_TURBO - Success
332
333if it successfully finds libjpeg-turbo.
334
335
DRC15b6e052011-10-06 01:20:52 +0000336=====================
337Building Java Support
338=====================
339
340TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on
341any platform that has a Java Runtime Environment (JRE) installed. The Java
342viewer works similarly to the native viewer, but with lower performance.
343
344To build the Java TigerVNC Viewer, add
345
346 -DBUILD_JAVA=1
347
348to the CMake or build-xorg command line. The build system will attempt to find
349an installed Java Development Kit (JDK) and determine the appropriate paths for
350the Java compiler (javac) and the JAR creation utility (jar). You can override
351these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake
352variables. You can also override the default flags that are passed to javac
353by setting the JAVACFLAGS CMake variable. The build system will look for
354keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These
355tools are needed to sign the JAR file, which is necessary to enable certain
356functionality (such as clipboard transfers) when the Java viewer is used as an
357applet.
358
359If the Java viewer is built along with the Windows TigerVNC Server (WinVNC),
360then the build system will embed the Java viewer into WinVNC4.exe so that it
361will automatically be served up using WinVNC's built-in HTTP server.
362Similarly, if the Java viewer is built along with the Unix TigerVNC Server
363(Xvnc), then the build system will include the Java viewer in the server
364tarball.
365
366
DRC240a5ff2011-07-06 07:28:30 +0000367======================================
DRCce355e32011-06-24 04:58:01 +0000368Building Native Language Support (NLS)
369======================================
370
DRCccc09692011-11-08 06:57:58 +0000371NLS requires gettext, which is supplied with most Linux distributions and
372with MinGW for Windows and which can easily be built from source on OS X and
373other Unix variants.
DRCce355e32011-06-24 04:58:01 +0000374
375You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
376specify the locations of libiconv and libintl, respectively. For instance,
377adding
378
379 -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
380
381to the CMake command line would link TigerVNC against a static version of
382libintl located under /opt/gettext. Adding
383
384 -DICONV_INCLUDE_DIR=/mingw/include \
385 -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
386 -DGETTEXT_INCLUDE_DIR=/mingw/include \
387 -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
388
389to the CMake command line would link TigerVNC against the static versions of
390libiconv and libintl included in the MinGW Developer Toolkit.
391
392
393===============================================
394Building Transport Layer Security (TLS) support
395===============================================
DRC8290dd62011-02-10 22:54:36 +0000396
Adam Tkac445d4ed2011-04-27 11:04:01 +0000397VeNCrypt (the TigerVNC security and authentication extensions) can be built
398with TLS support, which provides built-in encryption for VNC sessions. This
DRCce355e32011-06-24 04:58:01 +0000399requires GnuTLS, which is readily available in many Linux distributions but not
400as readily available in binary form on other types of systems. This section
DRC667df922011-06-23 10:11:22 +0000401describes the issues associated with building a version of TigerVNC with TLS
402support and how to work around those issues.
Adam Tkacf586b842011-04-27 11:20:18 +0000403
DRC667df922011-06-23 10:11:22 +0000404
405Unix/Mac
406--------
407
408In general, if you are building on a Unix-ish platform that has the GnuTLS
409libraries and include files installed in the standard system locations, then
410the TigerVNC build system should detect the system version of GnuTLS
411automatically and link against it. However, this produces a version of
412TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
413binaries are not portable.
414
DRCce355e32011-06-24 04:58:01 +0000415To build a fully portable, cross-compatible version of TigerVNC with TLS
DRC667df922011-06-23 10:11:22 +0000416support, it is necessary to link against the GnuTLS static library (as well
417as the static libraries of its dependencies.) If you are lucky enough, then
418your O/S distribution may include pre-packaged versions of these static
419libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
420libtasn1, and libgpg-error from source.
421
422You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRCce355e32011-06-24 04:58:01 +0000423build TigerVNC against a custom build of GnuTLS that is installed in a
424non-system directory. For instance, adding
DRC667df922011-06-23 10:11:22 +0000425
426 -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
427 -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
428 -DUSE_INCLUDED_ZLIB=1
429
430to the CMake or 'build-xorg build' command line will cause TigerVNC to be
431statically linked against a custom installation of GnuTLS that resides under
DRCce355e32011-06-24 04:58:01 +0000432/opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
DRC667df922011-06-23 10:11:22 +0000433satisfy that dependency using TigerVNC's in-tree version of zlib, which
434prevents TigerVNC from depending on the libz dynamic library.
435
436
437MinGW
438-----
DRC8290dd62011-02-10 22:54:36 +0000439
440An installer containing the GnuTLS header files, as well as static and dynamic
Adam Tkacf586b842011-04-27 11:20:18 +0000441link libraries for 32-bit MinGW, can be downloaded from the following site:
DRC8290dd62011-02-10 22:54:36 +0000442
443http://josefsson.org/gnutls4win/
444
Adam Tkacf586b842011-04-27 11:20:18 +0000445As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
446that portions of the code assume an LP64 data model (Windows uses LLP64.)
447Thus, it is not possible at this time to produce a Win64 version of TigerVNC
448with TLS support.
DRC8290dd62011-02-10 22:54:36 +0000449
Adam Tkacf586b842011-04-27 11:20:18 +0000450Whether you use the above installer or build GnuTLS from source, make sure that
451you install the libraries and headers into a pathname that doesn't contain
452spaces (the installer will try to install under c:\Program Files unless you
453tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
454resource compiler will barf when you try to build TigerVNC.
455
456You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
DRC8290dd62011-02-10 22:54:36 +0000457specify the directory under which you installed GnuTLS. For instance, adding
458
459 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
Adam Tkacf586b842011-04-27 11:20:18 +0000460 -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
461
462to the CMake command line when using MinGW will cause TigerVNC to be linked
463against GnuTLS DLLs that are installed under c:\gnutls.
464
465Adding
466
467 -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
DRC8290dd62011-02-10 22:54:36 +0000468 -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
469
Adam Tkacf586b842011-04-27 11:20:18 +0000470to the CMake command line will cause TigerVNC to be statically linked against
471GnuTLS libraries that are installed under c:\gnutls.
472
DRC8290dd62011-02-10 22:54:36 +0000473
DRC180c0162010-10-27 07:20:27 +0000474===================
475Installing TigerVNC
476===================
477
478You can use the build system to install TigerVNC into a directory of your
DRC667df922011-06-23 10:11:22 +0000479choosing. To do this, add:
DRC180c0162010-10-27 07:20:27 +0000480
481 -DCMAKE_INSTALL_PREFIX={install_directory}
482
DRCccc09692011-11-08 06:57:58 +0000483to the CMake command line. Then, you can run 'make install' to build and
484install it.
DRC180c0162010-10-27 07:20:27 +0000485
486If you don't specify CMAKE_INSTALL_PREFIX, then the default is
DRC667df922011-06-23 10:11:22 +0000487c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
DRC180c0162010-10-27 07:20:27 +0000488
489
DRC667df922011-06-23 10:11:22 +0000490=========================
491Creating Release Packages
492=========================
493
494The following commands can be used to create various types of release packages:
495
496
497Unix
498----
499
DRC667df922011-06-23 10:11:22 +0000500make tarball
501
502 Create a binary tarball containing the TigerVNC Viewer
503
504make servertarball
505
506 Create a binary tarball containing both the TigerVNC Server and Viewer
507
508make dmg
509
DRCaab38302011-06-25 20:24:02 +0000510 Create Macintosh disk image file that contains an application bundle of the
511 TigerVNC Viewer
DRC667df922011-06-23 10:11:22 +0000512
DRCaab38302011-06-25 20:24:02 +0000513make udmg
DRC667df922011-06-23 10:11:22 +0000514
515 On 64-bit OS X systems, this creates a version of the Macintosh package and
516 disk image which contains universal i386/x86-64 binaries. You should first
517 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
518 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
519 build system will look for the 32-bit build under {source_directory}/osxx86
DRCaab38302011-06-25 20:24:02 +0000520 by default, but you can override this by setting the OSX_X86_BUILD CMake
521 variable to the directory containing your configured 32-bit build. Either
522 the 64-bit or 32-bit build can be configured to be backward compatible by
523 using the instructions in the "Build Recipes" section.
DRC667df922011-06-23 10:11:22 +0000524
525
526Windows
527-------
528
DRCccc09692011-11-08 06:57:58 +0000529make installer
DRC667df922011-06-23 10:11:22 +0000530
DRCccc09692011-11-08 06:57:58 +0000531 Create a Windows installer using Inno Setup. The installer package
532 (TigerVNC[64].exe) will be located under {build_directory}.
DRC667df922011-06-23 10:11:22 +0000533
534
535=============
536Build Recipes
537=============
538
539
54032-bit Build on 64-bit Linux/Unix (including OS X)
541--------------------------------------------------
542
DRCdc4f3542011-08-24 00:30:49 +0000543Set the following environment variables before building TigerVNC.
DRC667df922011-06-23 10:11:22 +0000544
545 CFLAGS='-O3 -m32'
546 CXXFLAGS='-O3 -m32'
547 LDFLAGS=-m32
548
DRCdc4f3542011-08-24 00:30:49 +0000549If you are building the TigerVNC Server on a modern Unix/Linux system, then
550you will also need to pass the appropriate --host argument when configuring the
551X server source (for instance, --host=i686-pc-linux-gnu).
552
DRC667df922011-06-23 10:11:22 +0000553
55464-bit Backward-Compatible Build on 64-bit OS X
555-----------------------------------------------
556
557Add
558
559 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
560 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
561
562to the CMake command line. The OS X 10.5 SDK must be installed.
563
564
56532-bit Backward-Compatible Build on 64-bit OS X
566-----------------------------------------------
567
568Set the following environment variables:
569
570 CC=gcc-4.0
571 CXX=g++-4.0
572 CFLAGS='-O3 -m32'
573 CXXFLAGS='-O3 -m32'
574 LDFLAGS=-m32
575
576and add
577
578 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
579 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
580
581to the CMake command line. The OS X 10.4 SDK must be installed.
DRC180c0162010-10-27 07:20:27 +0000582
583
58464-bit MinGW Build on Cygwin
585----------------------------
586
587 cd {build_directory}
588 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
589 RC=/usr/bin/x86_64-w64-mingw32-windres \
590 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
591 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
592 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
593 make
594
595This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
596other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
597packages (and their dependencies) must be installed.
598
599
60032-bit MinGW Build on Cygwin
601----------------------------
602
603 cd {build_directory}
604 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
605 RC=/usr/bin/i686-w64-mingw32-windres \
606 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
607 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
608 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
609 make
610
611This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
612other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
613packages (and their dependencies) must be installed.
614
615
616MinGW-w64 Build on Windows
617--------------------------
618
619This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
620(which is faster than the Cygwin version):
621
622 cd {build_directory}
623 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
624 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
625 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
626 cmake -G "MSYS Makefiles" \
627 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
628 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
629 {source_directory}
630 make
631
632
633MinGW Build on Linux
634--------------------
635
636 cd {build_directory}
637 CC={mingw_binary_path}/i386-mingw32-gcc \
638 CXX={mingw_binary_path}/i386-mingw32-g++ \
639 RC={mingw_binary_path}/i386-mingw32-windres \
640 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
641 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
642 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
643 {source_directory}
644 make