Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

BUILDING.txt 24KB

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