You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BUILDING.txt 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. *******************************************************************************
  2. ** Building TigerVNC
  3. *******************************************************************************
  4. ================================
  5. Build Requirements (All Systems)
  6. ================================
  7. -- CMake (http://www.cmake.org) v2.8 or later
  8. -- FLTK 1.3.2
  9. * Must be a patched snapshot to get full functionality
  10. * See "Building FLTK" below.
  11. -- If building TLS support:
  12. * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
  13. -- If building native language support (NLS):
  14. * Gnu gettext 0.14.4 or later
  15. * See "Building Native Language Support" below.
  16. -- libjpeg-turbo SDK
  17. * If your system does not include libjpeg-turbo, then you can download the
  18. SDK from http://sourceforge.net/projects/libjpeg-turbo/files/
  19. * See "Building High-Performance JPEG Support" below.
  20. =========================
  21. Build Requirements (Unix)
  22. =========================
  23. -- Non-Mac platforms:
  24. * X11 development kit
  25. -- If building Xvnc:
  26. * autoconf 2.57 or later
  27. * automake 1.7 or later
  28. * libtool 1.4 or later
  29. * OpenSSL v0.9.7 or later
  30. * Python v2.3 or later
  31. * zlib v1.2 or later
  32. * pkgconfig 0.20 or later
  33. If you are using an older RPM-based system which does not meet this
  34. minimum requirement (such as Red Hat Enterprise Linux 4), then you can
  35. build pkgconfig 0.20 from the Fedora 5 source RPM:
  36. http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm
  37. * gettext 0.14.4 or later
  38. If you are using an older RPM-based system which does not meet this
  39. minimum requirement (such as Red Hat Enterprise Linux 4), then you can
  40. build gettext 0.14.5 from the Fedora 5 source RPM:
  41. http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm
  42. NOTE: gcj and libgcj are required when building the above source RPM.
  43. ============================
  44. Build Requirements (Windows)
  45. ============================
  46. -- MinGW or MinGW-w64
  47. -- Inno Setup (needed to build the TigerVNC installer)
  48. Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php.
  49. You also need the Inno Setup Preprocessor, which is available in the
  50. Inno Setup QuickStart Pack.
  51. Add the directory containing iscc.exe (for instance,
  52. C:\Program Files\Inno Setup 5) to the system or user PATH environment
  53. variable prior to building TigerVNC.
  54. =========================
  55. Build Requirements (Java)
  56. =========================
  57. -- Sun/Oracle JDK v5 or later or OpenJDK
  58. -- See "Building Java Support" below.
  59. =============
  60. Building FLTK
  61. =============
  62. TigerVNC requires FLTK 1.3.0 (or later). Although it will build and work
  63. with plain 1.3.0, to get full functionality and the best behaviour you
  64. need to build a patched version:
  65. 1. Check out FLTK 1.3.2 using Subversion:
  66. $ svn co http://svn.easysw.com/public/fltk/fltk/tags/release-1.3.2 fltk-1.3.2
  67. 2. For full functionality, apply patches. Here's a shell script to do
  68. that:
  69. #!/bin/bash
  70. set -e
  71. apply_patch()
  72. {
  73. rm -f $2
  74. wget http://www.fltk.org/strfiles/$1/$2
  75. patch -p1 < $2
  76. }
  77. # Export dead key information from FLTK to the apps
  78. # http://www.fltk.org/str.php?L2599
  79. apply_patch 2599 fltk-1_v4.3.x-keyboard-x11.patch
  80. apply_patch 2599 fltk-1_v4.3.x-keyboard-win32.patch
  81. apply_patch 2599 fltk-1_v6.3.x-keyboard-osx.patch
  82. # Notify applications of changes to the clipboard
  83. # http://www.fltk.org/str.php?L2636
  84. apply_patch 2636 fltk-1.3.x-clipboard.patch
  85. apply_patch 2636 fltk-1_v6.3.x-clipboard-x11.patch
  86. apply_patch 2636 fltk-1_v3.3.x-clipboard-win32-fix.patch
  87. apply_patch 2636 fltk-1_v2.3.x-clipboard-win32.patch
  88. apply_patch 2636 fltk-1_v2.3.x-clipboard-osx.patch
  89. # Ability to convert a Fl_Pixmap to a Fl_RGB_Image
  90. # http://www.fltk.org/str.php?L2659
  91. apply_patch 2659 pixmap_v2.patch
  92. # Support for custom cursors
  93. # http://www.fltk.org/str.php?L2660
  94. apply_patch 2660 fltk-1_v5.3.x-cursor.patch
  95. # Improve modality interaction with WM
  96. # http://www.fltk.org/str.php?L2802
  97. apply_patch 2802 fltk-1_v2.3.0-modal.patch
  98. # Window icons
  99. # http://www.fltk.org/str.php?L2816
  100. apply_patch 2816 fltk-1_v3.3.0-icons.patch
  101. # Multihead
  102. # http://fltk.org/str.php?L2860
  103. apply_patch 2860 fltk-1.3.x-screen_num.patch
  104. apply_patch 2860 fltk-1_v3.3.x-multihead.patch
  105. ### END SCRIPT ###
  106. 3. Use CMake to build FLTK using the same procedures described below for
  107. building TigerVNC. The recipes in the "Build Recipes" section also apply.
  108. If you want optimized code, make sure to build with
  109. -DCMAKE_BUILD_TYPE=Release.
  110. 4. (optional) Use 'make install' to install FLTK into a directory of your
  111. choosing.
  112. 5. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the
  113. location of the fluid executable that was built in Step 3 or installed in
  114. Step 4. This gives CMake a hint as to where to find the FLTK library.
  115. 6. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to
  116. the location of the FLTK source directory.
  117. ==================
  118. Out-of-Tree Builds
  119. ==================
  120. Binary objects, libraries, and executables are generated in the same directory
  121. from which cmake was executed (the "binary directory"), and this directory need
  122. not necessarily be the same as the TigerVNC source directory. You can create
  123. multiple independent binary directories, in which different versions of
  124. TigerVNC can be built from the same source tree using different compilers or
  125. settings. In the sections below, {build_directory} refers to the binary
  126. directory, whereas {source_directory} refers to the TigerVNC source directory.
  127. For in-tree builds, these directories are the same.
  128. =================
  129. Building TigerVNC
  130. =================
  131. Building the TigerVNC Viewer on Unix/Mac Systems
  132. ------------------------------------------------
  133. The following procedure will build the TigerVNC Viewer on Linux and Unix
  134. systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See
  135. "Build Recipes" for specific build instructions for building a 32-bit version
  136. of TigerVNC on 64-bit systems.
  137. cd {build_directory}
  138. cmake -G "Unix Makefiles" [additional CMake flags] {source_directory}
  139. make
  140. Building the TigerVNC Server on Modern Unix/Linux Systems
  141. ---------------------------------------------------------
  142. Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems
  143. containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use
  144. the X11 shared libraries provided with the system. The procedure for this is
  145. system-specific, since it requires specifying such things as font directories,
  146. but the general outline is as follows (this procedure assumes that the viewer
  147. has already been built, per above.)
  148. > cd {build_directory}
  149. If performing an out-of-tree build:
  150. > mkdir unix
  151. > cp -R {source_directory}/unix/xserver unix/
  152. > cp -R {xorg_source}/* unix/xserver/
  153. (NOTE: {xorg_source} is the directory containing the Xorg source for the
  154. machine on which you are building TigerVNC. The most recent versions of
  155. Red Hat/CentOS/Fedora, for instance, provide an RPM called
  156. "xorg-x11-server-source", which installs the Xorg source under
  157. /usr/share/xorg-x11-server-source.)
  158. > cd unix/xserver/
  159. > patch -p1 < {source_directory}/unix/xserver{version}.patch
  160. (where {version} matches the X server version you are building, such as
  161. "17" for version 1.7.x.)
  162. > autoreconf -fiv
  163. > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
  164. --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
  165. --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
  166. --disable-config-dbus --disable-config-hal --disable-config-udev \
  167. --disable-dri2 --enable-install-libxf86config --enable-glx \
  168. --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
  169. --with-fontdir=/usr/share/X11/fonts \
  170. --with-xkb-path=/usr/share/X11/xkb \
  171. --with-xkb-output=/var/lib/xkb \
  172. --with-xkb-bin-directory=/usr/bin \
  173. --with-serverconfig-path=/usr/lib[64]/xorg \
  174. --with-dri-driver-path=/usr/lib[64]/dri \
  175. {additional configure options}
  176. (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
  177. 6 and recent Fedora releases. You should customize it for your particular
  178. system. In particular, it will be necessary to customize the font, XKB,
  179. and DRI directories.)
  180. > make TIGERVNC_SRCDIR={source_directory}
  181. Building the TigerVNC Server on Legacy Unix/Linux Systems
  182. ---------------------------------------------------------
  183. Those using systems with older versions of Xorg must build a "legacy-friendly"
  184. version of the TigerVNC Server. This is accomplished by downloading and
  185. building the more recent Xorg modules in a local directory and then building
  186. Xvnc such that it links against the local build of these libraries, not the X11
  187. libraries installed on the system. The "build-xorg" script in the TigerVNC
  188. source distribution (located under unix/) automates this process.
  189. The following procedure will build both the TigerVNC Viewer and a
  190. "legacy-friendly" version of the TigerVNC Server:
  191. cd {build_directory}
  192. sh {source_directory}/unix/build-xorg init
  193. sh {source_directory}/unix/build-xorg build [additional CMake flags]
  194. build-xorg generates a version of Xvnc that has no external dependencies on the
  195. X11 shared libraries or any other distribution-specific shared libraries. This
  196. version of Xvnc should be transportable across multiple O/S distributions.
  197. build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later
  198. systems. It probably will not work on older systems. It has not been tested
  199. on non-Linux systems (yet).
  200. build-xorg can also be used to rebuild just the TigerVNC Server and Viewer,
  201. once the X11 modules and other dependencies have been built for the first time.
  202. This is convenient for testing changes that just apply to the TigerVNC source
  203. code. To accomplish this, run:
  204. sh {source_directory}/unix/build-xorg rebuild [additional make flags]
  205. For instance,
  206. sh {source_directory}/unix/build-xorg rebuild clean
  207. will clean both the Xvnc and vncviewer builds without destroying any of the
  208. build configuration or module dependencies.
  209. Building the Windows TigerVNC Viewer with MinGW
  210. -----------------------------------------------
  211. If building the Windows version of TigerVNC on a Windows build system, use
  212. the following procedure.
  213. cd {build_directory}
  214. cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory}
  215. make
  216. If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section
  217. below.
  218. Debug Build
  219. -----------
  220. Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line.
  221. Self-Contained GCC Build
  222. ------------------------
  223. If TigerVNC is built using GCC (including MinGW), then it may depend on the
  224. libgcc or libstdc++ dynamic libraries. To eliminate this dependency, add
  225. -DBUILD_STATIC=1
  226. to the CMake command line.
  227. ======================================
  228. Building High-Performance JPEG Support
  229. ======================================
  230. In order to achieve its high levels of performance, TigerVNC relies on
  231. libjpeg-turbo (http://www.libjpeg-turbo.org), a derivative of libjpeg which
  232. uses SIMD instructions to accelerate baseline JPEG compression and
  233. decompression. If you are building TigerVNC on an operating system that
  234. includes libjpeg-turbo as a system library (for instance, Fedora 14 and later),
  235. then the TigerVNC build system should detect the system version of
  236. libjpeg-turbo automatically and link against it. However, this produces a
  237. version of TigerVNC that depends on the libjpeg-turbo dynamic libraries, and
  238. thus the TigerVNC binaries are not portable.
  239. To build a fully portable, cross-compatible version of TigerVNC with
  240. high-performance JPEG support, it is necessary to link against the
  241. libjpeg-turbo static library. This is also necessary when building the
  242. Windows or OS X versions of TigerVNC. To link against the libjpeg-turbo static
  243. library, first install the libjpeg-turbo SDK, which is available from
  244. https://sourceforge.net/projects/libjpeg-turbo/files/. Next, use the
  245. JPEG_INCLUDE_DIR and JPEG_LIBRARY CMake variables to specify the location of
  246. libjpeg-turbo. For example, adding
  247. -DJPEG_INCLUDE_DIR=/opt/libjpeg-turbo/include \
  248. -DJPEG_LIBRARY=/opt/libjpeg-turbo/lib/libjpeg.a
  249. to the CMake command line will link TigerVNC against a static version of
  250. libjpeg-turbo installed under /opt/TigerVNC (which is the normal install
  251. location for the libjpeg-turbo SDK on Unix and Linux platforms.) Replace "lib"
  252. with "lib32" or "lib64" to use the 32-bit or 64-bit version of the library on
  253. 64-bit Linux platforms.
  254. When building on Windows systems, adding
  255. -DJPEG_INCLUDE_DIR=/c/libjpeg-turbo-gcc[64]/include \
  256. -DJPEG_LIBRARY=/c/libjpeg-turbo-gcc[64]/lib/libjpeg.a
  257. to the CMake command line will link TigerVNC against the static version of
  258. libjpeg-turbo provided by the libjpeg-turbo SDK for GCC (MinGW.)
  259. CMake will report:
  260. Performing Test FOUND_LIBJPEG_TURBO - Success
  261. if it successfully finds libjpeg-turbo.
  262. =====================
  263. Building Java Support
  264. =====================
  265. TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on
  266. any platform that has a Java Runtime Environment (JRE) installed. The Java
  267. viewer works similarly to the native viewer, but with lower performance.
  268. To build the Java TigerVNC Viewer, add
  269. -DBUILD_JAVA=1
  270. to the CMake or build-xorg command line. The build system will attempt to find
  271. an installed Java Development Kit (JDK) and determine the appropriate paths for
  272. the Java compiler (javac) and the JAR creation utility (jar). You can override
  273. these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake
  274. variables. You can also override the default flags that are passed to javac
  275. by setting the JAVACFLAGS CMake variable. The build system will look for
  276. keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These
  277. tools are needed to sign the JAR file, which is necessary to enable certain
  278. functionality (such as clipboard transfers) when the Java viewer is used as an
  279. applet.
  280. If the Java viewer is built along with the Windows TigerVNC Server (WinVNC),
  281. then the build system will embed the Java viewer into WinVNC4.exe so that it
  282. will automatically be served up using WinVNC's built-in HTTP server.
  283. Similarly, if the Java viewer is built along with the Unix TigerVNC Server
  284. (Xvnc), then the build system will include the Java viewer in the server
  285. tarball.
  286. ======================================
  287. Building Native Language Support (NLS)
  288. ======================================
  289. NLS requires gettext, which is supplied with most Linux distributions and
  290. with MinGW for Windows and which can easily be built from source on OS X and
  291. other Unix variants.
  292. You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to
  293. specify the locations of libiconv and libintl, respectively. For instance,
  294. adding
  295. -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a
  296. to the CMake command line would link TigerVNC against a static version of
  297. libintl located under /opt/gettext. Adding
  298. -DICONV_INCLUDE_DIR=/mingw/include \
  299. -DICONV_LIBRARIES=/mingw/lib/libiconv.a \
  300. -DGETTEXT_INCLUDE_DIR=/mingw/include \
  301. -DLIBINTL_LIBRARY=/mingw/lib/libintl.a
  302. to the CMake command line would link TigerVNC against the static versions of
  303. libiconv and libintl included in the MinGW Developer Toolkit.
  304. ===============================================
  305. Building Transport Layer Security (TLS) support
  306. ===============================================
  307. VeNCrypt (the TigerVNC security and authentication extensions) can be built
  308. with TLS support, which provides built-in encryption for VNC sessions. This
  309. requires GnuTLS, which is readily available in many Linux distributions but not
  310. as readily available in binary form on other types of systems. This section
  311. describes the issues associated with building a version of TigerVNC with TLS
  312. support and how to work around those issues.
  313. Unix/Mac
  314. --------
  315. In general, if you are building on a Unix-ish platform that has the GnuTLS
  316. libraries and include files installed in the standard system locations, then
  317. the TigerVNC build system should detect the system version of GnuTLS
  318. automatically and link against it. However, this produces a version of
  319. TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC
  320. binaries are not portable.
  321. To build a fully portable, cross-compatible version of TigerVNC with TLS
  322. support, it is necessary to link against the GnuTLS static library (as well
  323. as the static libraries of its dependencies.) If you are lucky enough, then
  324. your O/S distribution may include pre-packaged versions of these static
  325. libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt,
  326. libtasn1, and libgpg-error from source.
  327. You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
  328. build TigerVNC against a custom build of GnuTLS that is installed in a
  329. non-system directory. For instance, adding
  330. -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \
  331. -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \
  332. -DUSE_INCLUDED_ZLIB=1
  333. to the CMake or 'build-xorg build' command line will cause TigerVNC to be
  334. statically linked against a custom installation of GnuTLS that resides under
  335. /opt/gnutls. GnuTLS depends on zlib, so specifying -DUSE_INCLUDED_ZLIB=1 will
  336. satisfy that dependency using TigerVNC's in-tree version of zlib, which
  337. prevents TigerVNC from depending on the libz dynamic library.
  338. MinGW
  339. -----
  340. An installer containing the GnuTLS header files, as well as static and dynamic
  341. link libraries for 32-bit MinGW, can be downloaded from the following site:
  342. http://josefsson.org/gnutls4win/
  343. As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact
  344. that portions of the code assume an LP64 data model (Windows uses LLP64.)
  345. Thus, it is not possible at this time to produce a Win64 version of TigerVNC
  346. with TLS support.
  347. Whether you use the above installer or build GnuTLS from source, make sure that
  348. you install the libraries and headers into a pathname that doesn't contain
  349. spaces (the installer will try to install under c:\Program Files unless you
  350. tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW
  351. resource compiler will barf when you try to build TigerVNC.
  352. You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to
  353. specify the directory under which you installed GnuTLS. For instance, adding
  354. -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
  355. -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a
  356. to the CMake command line when using MinGW will cause TigerVNC to be linked
  357. against GnuTLS DLLs that are installed under c:\gnutls.
  358. Adding
  359. -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \
  360. -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a'
  361. to the CMake command line will cause TigerVNC to be statically linked against
  362. GnuTLS libraries that are installed under c:\gnutls.
  363. ===================
  364. Installing TigerVNC
  365. ===================
  366. You can use the build system to install TigerVNC into a directory of your
  367. choosing. To do this, add:
  368. -DCMAKE_INSTALL_PREFIX={install_directory}
  369. to the CMake command line. Then, you can run 'make install' to build and
  370. install it.
  371. If you don't specify CMAKE_INSTALL_PREFIX, then the default is
  372. c:\Program Files\TigerVNC on Windows and /usr/local on Unix.
  373. =========================
  374. Creating Release Packages
  375. =========================
  376. The following commands can be used to create various types of release packages:
  377. Unix
  378. ----
  379. make tarball
  380. Create a binary tarball containing the TigerVNC Viewer
  381. make servertarball
  382. Create a binary tarball containing both the TigerVNC Server and Viewer
  383. make dmg
  384. Create Macintosh disk image file that contains an application bundle of the
  385. TigerVNC Viewer
  386. make udmg
  387. On 64-bit OS X systems, this creates a version of the Macintosh package and
  388. disk image which contains universal i386/x86-64 binaries. You should first
  389. configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
  390. out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
  391. build system will look for the 32-bit build under {source_directory}/osxx86
  392. by default, but you can override this by setting the OSX_X86_BUILD CMake
  393. variable to the directory containing your configured 32-bit build. Either
  394. the 64-bit or 32-bit build can be configured to be backward compatible by
  395. using the instructions in the "Build Recipes" section.
  396. Windows
  397. -------
  398. make installer
  399. Create a Windows installer using Inno Setup. The installer package
  400. (TigerVNC[64].exe) will be located under {build_directory}.
  401. =============
  402. Build Recipes
  403. =============
  404. 32-bit Build on 64-bit Linux/Unix (including OS X)
  405. --------------------------------------------------
  406. Set the following environment variables before building TigerVNC.
  407. CFLAGS='-O3 -m32'
  408. CXXFLAGS='-O3 -m32'
  409. LDFLAGS=-m32
  410. If you are building the TigerVNC Server on a modern Unix/Linux system, then
  411. you will also need to pass the appropriate --host argument when configuring the
  412. X server source (for instance, --host=i686-pc-linux-gnu).
  413. 64-bit Backward-Compatible Build on 64-bit OS X
  414. -----------------------------------------------
  415. Add
  416. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \
  417. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5
  418. to the CMake command line. The OS X 10.5 SDK must be installed.
  419. 32-bit Backward-Compatible Build on 64-bit OS X
  420. -----------------------------------------------
  421. Set the following environment variables:
  422. CC=gcc-4.0
  423. CXX=g++-4.0
  424. CFLAGS='-O3 -m32'
  425. CXXFLAGS='-O3 -m32'
  426. LDFLAGS=-m32
  427. and add
  428. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \
  429. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4
  430. to the CMake command line. The OS X 10.4 SDK must be installed.
  431. 64-bit MinGW Build on Cygwin
  432. ----------------------------
  433. cd {build_directory}
  434. CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \
  435. RC=/usr/bin/x86_64-w64-mingw32-windres \
  436. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  437. -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
  438. -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
  439. make
  440. This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or
  441. other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++
  442. packages (and their dependencies) must be installed.
  443. 32-bit MinGW Build on Cygwin
  444. ----------------------------
  445. cd {build_directory}
  446. CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \
  447. RC=/usr/bin/i686-w64-mingw32-windres \
  448. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  449. -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
  450. -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
  451. make
  452. This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or
  453. other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++
  454. packages (and their dependencies) must be installed.
  455. MinGW-w64 Build on Windows
  456. --------------------------
  457. This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain
  458. (which is faster than the Cygwin version):
  459. cd {build_directory}
  460. CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
  461. CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \
  462. RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \
  463. cmake -G "MSYS Makefiles" \
  464. -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
  465. -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
  466. {source_directory}
  467. make
  468. MinGW Build on Linux
  469. --------------------
  470. cd {build_directory}
  471. CC={mingw_binary_path}/i386-mingw32-gcc \
  472. CXX={mingw_binary_path}/i386-mingw32-g++ \
  473. RC={mingw_binary_path}/i386-mingw32-windres \
  474. cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
  475. -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
  476. -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
  477. {source_directory}
  478. make
  479. ===============================
  480. Distribution-Specific Packaging
  481. ===============================
  482. RPM Packages for RHEL / CentOS
  483. ------------------------------
  484. The RPM spec files and patches used to create the nightly builds
  485. and releases can be found in the "contrib/rpm/el{5,6}" directories
  486. of the TigerVNC subversion trunk. All external source tarballs
  487. must be fetched manually and placed into the 'SOURCES' directory
  488. under the rpmbuild root. Additonally, the following macros need
  489. to be defined:
  490. EL6:
  491. %debug_package %{nil}
  492. EL5:
  493. %dist .el5
  494. %_smp_mflags -j3
  495. %debug_package %{nil}
  496. %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
  497. Debian packages for Ubuntu 12.04LTS
  498. -----------------------------------
  499. The debian folder used to create the nightly builds and releases
  500. can be found in the "contrib/deb/ubuntu-precise" directory of the
  501. TigerVNC subversion trunk.