blob: 41f493e9b3ebb9b195438fbff4f55c1a3be0446d [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 Åstrande7370bd2013-01-22 08:11:05 +000012-- FLTK 1.3.2
Pierre Ossmanc656bac2012-08-17 08:10:27 +000013 * Must be a patched snapshot to get full functionality
Peter Åstrand956a6362012-08-09 07:33:08 +000014 * See "Building FLTK" below.
15
DRC69854b42011-05-13 09:31:24 +000016-- If building TLS support:
Pierre Ossmanec3dfe62014-10-17 10:36:58 +020017 * GnuTLS
Brian P. Hinz34d2b4d2014-11-14 00:25:12 -050018 * See "Building TLS Support" below.
DRC69854b42011-05-13 09:31:24 +000019
DRCce355e32011-06-24 04:58:01 +000020-- If building native language support (NLS):
21 * Gnu gettext 0.14.4 or later
22 * See "Building Native Language Support" below.
23
Pierre Ossman3e4281b2014-10-17 10:40:07 +020024-- libjpeg-turbo
25 * "Normal" libjpegv6 is also supported, although it is not
26 recommended as it is much slower.
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
Pierre Ossman1d36ed82014-08-22 14:41:03 +020087TigerVNC requires FLTK 1.3.2 (or later). Although it will build and work
88with plain 1.3.2, to get full functionality and the best behaviour you
Pierre Ossmanc656bac2012-08-17 08:10:27 +000089need to build a patched version:
Peter Åstrand956a6362012-08-09 07:33:08 +000090
Peter Åstrande7370bd2013-01-22 08:11:05 +0000911. Check out FLTK 1.3.2 using Subversion:
92$ svn co http://svn.easysw.com/public/fltk/fltk/tags/release-1.3.2 fltk-1.3.2
Peter Åstrand956a6362012-08-09 07:33:08 +000093
Pierre Ossman2f11bd92014-08-22 14:43:33 +0200942. For full functionality, apply patches. All patches can be found in
95 the contrib/fltk/ directory. There are also some general fixes to
96 FLTK that can be found in the contrib/fltk/fixes/ directory that
97 might be useful.
Brian Hinz1ff04d12013-11-28 16:26:08 +000098
Peter Åstrand956a6362012-08-09 07:33:08 +0000993. Use CMake to build FLTK using the same procedures described below for
100 building TigerVNC. The recipes in the "Build Recipes" section also apply.
Peter Åstrandfc3e86e2013-01-07 09:59:00 +0000101 If you want optimized code, make sure to build with
102 -DCMAKE_BUILD_TYPE=Release.
Peter Åstrand956a6362012-08-09 07:33:08 +0000103
1044. (optional) Use 'make install' to install FLTK into a directory of your
105 choosing.
106
1075. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
108 location of the fluid executable that was built in Step 3 or installed in
109 Step 4. This gives CMake a hint as to where to find the FLTK library.
Pierre Ossmanbbb0c612012-08-17 08:05:59 +0000110
Peter Åstrand956a6362012-08-09 07:33:08 +00001116. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
112 the location of the FLTK source directory.
113
114
DRC180c0162010-10-27 07:20:27 +0000115==================
116Out-of-Tree Builds
117==================
118
119Binary objects, libraries, and executables are generated in the same directory
120from which cmake was executed (the "binary directory"), and this directory need
121not necessarily be the same as the TigerVNC source directory. You can create
122multiple independent binary directories, in which different versions of
123TigerVNC can be built from the same source tree using different compilers or
124settings. In the sections below, {build_directory} refers to the binary
125directory, whereas {source_directory} refers to the TigerVNC source directory.
126For in-tree builds, these directories are the same.
127
128
129=================
130Building TigerVNC
131=================
132
133
DRC62f3a662011-08-24 00:03:31 +0000134Building the TigerVNC Viewer on Unix/Mac Systems
135------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000136
137The following procedure will build the TigerVNC Viewer on Linux and Unix
138systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
139"Build Recipes" for specific build instructions for building a 32-bit version
140of TigerVNC on 64-bit systems.
141
142 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000143 cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
DRC667df922011-06-23 10:11:22 +0000144 make
145
DRC62f3a662011-08-24 00:03:31 +0000146
147Building the TigerVNC Server on Modern Unix/Linux Systems
148---------------------------------------------------------
149
DRC667df922011-06-23 10:11:22 +0000150Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
151containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
152the X11 shared libraries provided with the system. The procedure for this is
DRC62f3a662011-08-24 00:03:31 +0000153system-specific, since it requires specifying such things as font directories,
154but the general outline is as follows (this procedure assumes that the viewer
155has already been built, per above.)
156
157 > cd {build_directory}
158
159 If performing an out-of-tree build:
160 > mkdir unix
161 > cp -R {source_directory}/unix/xserver unix/
162
163 > cp -R {xorg_source}/* unix/xserver/
164 (NOTE: {xorg_source} is the directory containing the Xorg source for the
165 machine on which you are building TigerVNC. The most recent versions of
166 Red Hat/CentOS/Fedora, for instance, provide an RPM called
167 "xorg-x11-server-source", which installs the Xorg source under
168 /usr/share/xorg-x11-server-source.)
169
170 > cd unix/xserver/
171 > patch -p1 < {source_directory}/unix/xserver{version}.patch
172 (where {version} matches the X server version you are building, such as
173 "17" for version 1.7.x.)
174 > autoreconf -fiv
175
Peter Åstrand01b24332011-10-31 08:14:40 +0000176 > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
DRC62f3a662011-08-24 00:03:31 +0000177 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
178 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
179 --disable-config-dbus --disable-config-hal --disable-config-udev \
180 --disable-dri2 --enable-install-libxf86config --enable-glx \
181 --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
182 --with-fontdir=/usr/share/X11/fonts \
183 --with-xkb-path=/usr/share/X11/xkb \
184 --with-xkb-output=/var/lib/xkb \
DRC0bb7e132011-08-24 00:26:54 +0000185 --with-xkb-bin-directory=/usr/bin \
DRC62f3a662011-08-24 00:03:31 +0000186 --with-serverconfig-path=/usr/lib[64]/xorg \
187 --with-dri-driver-path=/usr/lib[64]/dri \
188 {additional configure options}
189 (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
190 6 and recent Fedora releases. You should customize it for your particular
191 system. In particular, it will be necessary to customize the font, XKB,
192 and DRI directories.)
193
194 > make TIGERVNC_SRCDIR={source_directory}
195
196
197Building the TigerVNC Server on Legacy Unix/Linux Systems
198---------------------------------------------------------
DRC667df922011-06-23 10:11:22 +0000199
200Those using systems with older versions of Xorg must build a "legacy-friendly"
201version of the TigerVNC Server. This is accomplished by downloading and
202building the more recent Xorg modules in a local directory and then building
203Xvnc such that it links against the local build of these libraries, not the X11
204libraries installed on the system. The "build-xorg" script in the TigerVNC
205source distribution (located under unix/) automates this process.
206
207The following procedure will build both the TigerVNC Viewer and a
208"legacy-friendly" version of the TigerVNC Server:
209
210 cd {build_directory}
211 sh {source_directory}/unix/build-xorg init
212 sh {source_directory}/unix/build-xorg build [additional CMake flags]
213
214build-xorg generates a version of Xvnc that has no external dependencies on the
215X11 shared libraries or any other distribution-specific shared libraries. This
216version of Xvnc should be transportable across multiple O/S distributions.
217build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
218systems. It probably will not work on older systems. It has not been tested
219on non-Linux systems (yet).
220
221build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
222once the X11 modules and other dependencies have been built for the first time.
223This is convenient for testing changes that just apply to the TigerVNC source
224code. To accomplish this, run:
225
226 sh {source_directory}/unix/build-xorg rebuild [additional make flags]
227
228For instance,
229
230 sh {source_directory}/unix/build-xorg rebuild clean
231
232will clean both the Xvnc and vncviewer builds without destroying any of the
233build configuration or module dependencies.
234
235
DRCe4e604f2011-10-01 17:54:36 +0000236Building the Windows TigerVNC Viewer with MinGW
237-----------------------------------------------
DRC180c0162010-10-27 07:20:27 +0000238
DRCccc09692011-11-08 06:57:58 +0000239If building the Windows version of TigerVNC on a Windows build system, use
240the following procedure.
241
DRC180c0162010-10-27 07:20:27 +0000242 cd {build_directory}
DRC240a5ff2011-07-06 07:28:30 +0000243 cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
DRC180c0162010-10-27 07:20:27 +0000244 make
245
DRCccc09692011-11-08 06:57:58 +0000246If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section
247below.
DRC180c0162010-10-27 07:20:27 +0000248
249
250Debug Build
251-----------
252
DRCccc09692011-11-08 06:57:58 +0000253Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line.
DRC180c0162010-10-27 07:20:27 +0000254
255
Pierre Ossmanf95272d2014-10-17 13:59:35 +0200256Portable (semi-static) Build
257----------------------------
DRC8290dd62011-02-10 22:54:36 +0000258
Pierre Ossmanf95272d2014-10-17 13:59:35 +0200259TigerVNC can under favourble circumstances be built in a way that allows
260the resulting binaries to run on any system without having to also install
261all the dynamic libraries it depends on. Enable this mode by adding:
DRC8290dd62011-02-10 22:54:36 +0000262
DRCe4e604f2011-10-01 17:54:36 +0000263 -DBUILD_STATIC=1
DRC8290dd62011-02-10 22:54:36 +0000264
Adam Tkacf586b842011-04-27 11:20:18 +0000265to the CMake command line.
DRC8290dd62011-02-10 22:54:36 +0000266
Pierre Ossmanf95272d2014-10-17 13:59:35 +0200267Note that the method used to achieve this is very fragile and it may be
268necessary to tweak cmake/StaticBuild.cmake to make things work on your
269specific system.
270
DRC8290dd62011-02-10 22:54:36 +0000271
DRC15b6e052011-10-06 01:20:52 +0000272=====================
273Building Java Support
274=====================
275
276TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on
277any platform that has a Java Runtime Environment (JRE) installed. The Java
278viewer works similarly to the native viewer, but with lower performance.
279
280To build the Java TigerVNC Viewer, add
281
282 -DBUILD_JAVA=1
283
284to the CMake or build-xorg command line. The build system will attempt to find
285an installed Java Development Kit (JDK) and determine the appropriate paths for
286the Java compiler (javac) and the JAR creation utility (jar). You can override
287these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake
288variables. You can also override the default flags that are passed to javac
289by setting the JAVACFLAGS CMake variable. The build system will look for
290keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These
291tools are needed to sign the JAR file, which is necessary to enable certain
292functionality (such as clipboard transfers) when the Java viewer is used as an
293applet.
294
295If the Java viewer is built along with the Windows TigerVNC Server (WinVNC),
296then the build system will embed the Java viewer into WinVNC4.exe so that it
297will automatically be served up using WinVNC's built-in HTTP server.
298Similarly, if the Java viewer is built along with the Unix TigerVNC Server
299(Xvnc), then the build system will include the Java viewer in the server
300tarball.
301
Brian Hinzf88b3ad2013-12-02 02:53:10 +0000302By default, a self-signed certificate will be generated and used to sign the
303jar file. By specifying the following command line arguments to the CMake
304command line, an alternate certificate may be used for signing.
305
306 -DJAVA_KEYSTORE=${keystore_location_or_url}
307 -DJAVA_KEYSTORE_TYPE=${keystore_type} (Default: "jks")
308 -DJAVA_KEY_ALIAS=${keytore_key_alias}
309 -DJAVA_STOREPASS=${keystore_password}
310 -DJAVA_KEYPASS=${keystore_entry_password}
311 -DJAVA_TSA_URL=${url_of_timestamping_authority}
312
313The values of the JAVA_STOREPASS and JAVA_KEYPASS arguments may optionally be
314read from file or environment variables by prefixing the value with ":env "
315or ":file " (see the jarsigner documentation for more info):
316
317 export StorePass=tigervnc
318 export KeyPass=tigervnc
319 cmake \
320 ...
321 -DJAVA_STOREPASS=":env StorePass"
322 -DJAVA_KEYPASS=":env KeyPass"
323
DRC15b6e052011-10-06 01:20:52 +0000324
DRC240a5ff2011-07-06 07:28:30 +0000325======================================
Brian P. Hinz34d2b4d2014-11-14 00:25:12 -0500326Building TLS Support
327======================================
328
329TLS requires GnuTLS, which is supplied with most Linux distributions and
330with MinGW for Windows and can be built from source on OS X and other
331Unix variants. However, GnuTLS versions > 2.12.x && < 3.3.x should be
332avoided because of potential incompatibilities during initial handshaking.
333
334You can override the GNUTLS_LIBRARY and GNUTLS_INCLUDE_DIR CMake variables
335to specify the locations of libgnutls and any dependencies. For instance,
336adding
337
338 -DGNUTLS_INCLUDE_DIR=/usr/local/include \
Brian P. Hinz94433e82014-11-18 07:39:35 -0500339 -DGNUTLS_LIBRARY=/usr/local/lib/libgnutls.a
Brian P. Hinz34d2b4d2014-11-14 00:25:12 -0500340
341to the CMake command line would link TigerVNC against a static version of
342libgnutls located under /usr/local.
343
344
345======================================
DRCce355e32011-06-24 04:58:01 +0000346Building Native Language Support (NLS)
347======================================
348
DRCccc09692011-11-08 06:57:58 +0000349NLS requires gettext, which is supplied with most Linux distributions and
350with MinGW for Windows and which can easily be built from source on OS X and
351other Unix variants.
DRCce355e32011-06-24 04:58:01 +0000352
353You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
354specify the locations of libiconv and libintl, respectively. For instance,
355adding
356
357 -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
358
359to the CMake command line would link TigerVNC against a static version of
360libintl located under /opt/gettext. Adding
361
362 -DICONV_INCLUDE_DIR=/mingw/include \
363 -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
364 -DGETTEXT_INCLUDE_DIR=/mingw/include \
365 -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
366
367to the CMake command line would link TigerVNC against the static versions of
368libiconv and libintl included in the MinGW Developer Toolkit.
369
370
DRC180c0162010-10-27 07:20:27 +0000371===================
372Installing TigerVNC
373===================
374
375You can use the build system to install TigerVNC into a directory of your
DRC667df922011-06-23 10:11:22 +0000376choosing. To do this, add:
DRC180c0162010-10-27 07:20:27 +0000377
378 -DCMAKE_INSTALL_PREFIX={install_directory}
379
DRCccc09692011-11-08 06:57:58 +0000380to the CMake command line. Then, you can run 'make install' to build and
381install it.
DRC180c0162010-10-27 07:20:27 +0000382
383If you don't specify CMAKE_INSTALL_PREFIX, then the default is
DRC667df922011-06-23 10:11:22 +0000384c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
DRC180c0162010-10-27 07:20:27 +0000385
386
DRC667df922011-06-23 10:11:22 +0000387=========================
388Creating Release Packages
389=========================
390
391The following commands can be used to create various types of release packages:
392
393
394Unix
395----
396
DRC667df922011-06-23 10:11:22 +0000397make tarball
398
399 Create a binary tarball containing the TigerVNC Viewer
400
401make servertarball
402
403 Create a binary tarball containing both the TigerVNC Server and Viewer
404
405make dmg
406
DRCaab38302011-06-25 20:24:02 +0000407 Create Macintosh disk image file that contains an application bundle of the
408 TigerVNC Viewer
DRC667df922011-06-23 10:11:22 +0000409
DRCaab38302011-06-25 20:24:02 +0000410make udmg
DRC667df922011-06-23 10:11:22 +0000411
412 On 64-bit OS X systems, this creates a version of the Macintosh package and
413 disk image which contains universal i386/x86-64 binaries. You should first
414 configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
415 out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
416 build system will look for the 32-bit build under {source_directory}/osxx86
DRCaab38302011-06-25 20:24:02 +0000417 by default, but you can override this by setting the OSX_X86_BUILD CMake
418 variable to the directory containing your configured 32-bit build. Either
419 the 64-bit or 32-bit build can be configured to be backward compatible by
420 using the instructions in the "Build Recipes" section.
DRC667df922011-06-23 10:11:22 +0000421
422
423Windows
424-------
425
DRCccc09692011-11-08 06:57:58 +0000426make installer
DRC667df922011-06-23 10:11:22 +0000427
DRCccc09692011-11-08 06:57:58 +0000428 Create a Windows installer using Inno Setup. The installer package
429 (TigerVNC[64].exe) will be located under {build_directory}.
DRC667df922011-06-23 10:11:22 +0000430
431
432=============
433Build Recipes
434=============
435
436
43732-bit Build on 64-bit Linux/Unix (including OS X)
438--------------------------------------------------
439
DRCdc4f3542011-08-24 00:30:49 +0000440Set the following environment variables before building TigerVNC.
DRC667df922011-06-23 10:11:22 +0000441
442 CFLAGS='-O3 -m32'
443 CXXFLAGS='-O3 -m32'
444 LDFLAGS=-m32
445
DRCdc4f3542011-08-24 00:30:49 +0000446If you are building the TigerVNC Server on a modern Unix/Linux system, then
447you will also need to pass the appropriate --host argument when configuring the
448X server source (for instance, --host=i686-pc-linux-gnu).
449
DRC667df922011-06-23 10:11:22 +0000450
45164-bit Backward-Compatible Build on 64-bit OS X
452-----------------------------------------------
453
454Add
455
456 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
457 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
458
459to the CMake command line. The OS X 10.5 SDK must be installed.
460
461
46232-bit Backward-Compatible Build on 64-bit OS X
463-----------------------------------------------
464
465Set the following environment variables:
466
467 CC=gcc-4.0
468 CXX=g++-4.0
469 CFLAGS='-O3 -m32'
470 CXXFLAGS='-O3 -m32'
471 LDFLAGS=-m32
472
473and add
474
475 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
476 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
477
478to the CMake command line. The OS X 10.4 SDK must be installed.
DRC180c0162010-10-27 07:20:27 +0000479
480
48164-bit MinGW Build on Cygwin
482----------------------------
483
484 cd {build_directory}
485 CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
486 RC=/usr/bin/x86_64-w64-mingw32-windres \
487 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
488 -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
489 -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
490 make
491
492This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
493other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
494packages (and their dependencies) must be installed.
495
496
49732-bit MinGW Build on Cygwin
498----------------------------
499
500 cd {build_directory}
501 CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
502 RC=/usr/bin/i686-w64-mingw32-windres \
503 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
504 -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
505 -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
506 make
507
508This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
509other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
510packages (and their dependencies) must be installed.
511
512
513MinGW-w64 Build on Windows
514--------------------------
515
516This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
517(which is faster than the Cygwin version):
518
519 cd {build_directory}
520 CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
521 CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
522 RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
523 cmake -G "MSYS Makefiles" \
524 -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
525 -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
526 {source_directory}
527 make
528
529
530MinGW Build on Linux
531--------------------
532
533 cd {build_directory}
534 CC={mingw_binary_path}/i386-mingw32-gcc \
535 CXX={mingw_binary_path}/i386-mingw32-g++ \
536 RC={mingw_binary_path}/i386-mingw32-windres \
537 cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
538 -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
539 -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
540 {source_directory}
541 make
Brian Hinz1ff04d12013-11-28 16:26:08 +0000542
543
544===============================
545Distribution-Specific Packaging
546===============================
547
548
549RPM Packages for RHEL / CentOS
550------------------------------
551
552The RPM spec files and patches used to create the nightly builds
553and releases can be found in the "contrib/rpm/el{5,6}" directories
554of the TigerVNC subversion trunk. All external source tarballs
555must be fetched manually and placed into the 'SOURCES' directory
556under the rpmbuild root. Additonally, the following macros need
557to be defined:
558
559 EL6:
560 %debug_package %{nil}
561
562 EL5:
563 %dist .el5
564 %_smp_mflags -j3
565 %debug_package %{nil}
566 %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
567
568
569Debian packages for Ubuntu 12.04LTS
570-----------------------------------
571The debian folder used to create the nightly builds and releases
572can be found in the "contrib/deb/ubuntu-precise" directory of the
573TigerVNC subversion trunk.