選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

BUILDING.txt 24KB

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