DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 1 | ******************************************************************************* |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 2 | ** Building TigerVNC |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 3 | ******************************************************************************* |
| 4 | |
| 5 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 6 | ================================ |
| 7 | Build Requirements (All Systems) |
| 8 | ================================ |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 9 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 10 | -- CMake (http://www.cmake.org) v2.8 or later |
| 11 | |
| 12 | -- FLTK 1.3.0 |
| 13 | * Must be patched using fltk/extensions.patch to get full functionality |
| 14 | * See "Building FLTK" below. |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 15 | |
DRC | 69854b4 | 2011-05-13 09:31:24 +0000 | [diff] [blame] | 16 | -- If building TLS support: |
| 17 | * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error) |
| 18 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 19 | -- libjpeg-turbo SDK |
| 20 | * If your system does not include libjpeg-turbo, you can download the SDK |
| 21 | from http://sourceforge.net/projects/libjpeg-turbo/files/ |
| 22 | |
| 23 | |
| 24 | ========================= |
| 25 | Build Requirements (Unix) |
| 26 | ========================= |
| 27 | |
| 28 | -- Non-Mac platforms: |
| 29 | * X11 development kit |
| 30 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 31 | -- If building Xvnc: |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 32 | * autoconf 2.57 or later |
| 33 | * automake 1.7 or later |
| 34 | * libtool 1.4 or later |
| 35 | * OpenSSL v0.9.7 or later |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 36 | * Python v2.3 or later |
| 37 | * zlib v1.2 or later |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 38 | |
DRC | 69854b4 | 2011-05-13 09:31:24 +0000 | [diff] [blame] | 39 | * pkgconfig 0.20 or later |
| 40 | If you are using an older RPM-based system which does not meet this |
| 41 | minimum requirement (such as Red Hat Enterprise Linux 4), then you can |
| 42 | build pkgconfig 0.20 from the Fedora 5 source RPM: |
| 43 | http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/pkgconfig-0.20-2.2.1.src.rpm |
| 44 | |
DRC | 69854b4 | 2011-05-13 09:31:24 +0000 | [diff] [blame] | 45 | * gettext 0.14.4 or later |
| 46 | If you are using an older RPM-based system which does not meet this |
| 47 | minimum requirement (such as Red Hat Enterprise Linux 4), then you can |
| 48 | build gettext 0.14.5 from the Fedora 5 source RPM: |
| 49 | http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/source/SRPMS/gettext-0.14.5-3.src.rpm |
| 50 | NOTE: gcj and libgcj are required when building the above source RPM. |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 51 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 52 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 53 | ============================ |
| 54 | Build Requirements (Windows) |
| 55 | ============================ |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 56 | |
| 57 | -- Microsoft Visual C++ 2005 or later |
| 58 | |
| 59 | If you don't already have Visual C++, then the easiest way to get it is by |
| 60 | installing the Windows SDK: |
| 61 | |
| 62 | http://msdn.microsoft.com/en-us/windows/bb980924.aspx |
| 63 | |
| 64 | The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and |
| 65 | everything necessary to build TigerVNC. |
| 66 | |
| 67 | * For 32-bit builds, you can also use Microsoft Visual C++ Express |
| 68 | Edition. Visual C++ Express Edition is a free download. |
| 69 | * If you intend to build TigerVNC from the command line, then add the |
| 70 | appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH |
| 71 | environment variables. This is generally accomplished by executing |
| 72 | vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and |
| 73 | vcvars64.bat are part of Visual C++ and are located in the same directory |
| 74 | as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass |
| 75 | optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build |
| 76 | environment. |
| 77 | |
| 78 | ... OR ... |
| 79 | |
| 80 | -- MinGW |
| 81 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 82 | -- Inno Setup (needed to build the TigerVNC installer) |
| 83 | Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php. |
| 84 | You also need the Inno Setup Preprocessor, which is available in the |
| 85 | Inno Setup QuickStart Pack. |
| 86 | |
| 87 | Add the directory containing iscc.exe (for instance, |
| 88 | C:\Program Files\Inno Setup 5) to the system or user PATH environment |
| 89 | variable prior to building TigerVNC. |
| 90 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 91 | |
| 92 | ============= |
| 93 | Building FLTK |
| 94 | ============= |
| 95 | |
| 96 | Currently, TigerVNC requires functionality that is not yet included in the |
| 97 | upstream version of FLTK. Thus, it will be necessary to build FLTK from |
| 98 | source. To do this: |
| 99 | |
| 100 | 1. Download the FLTK 1.3.0 source tarball from http://www.fltk.org/ |
| 101 | 2. Extract the source tarball |
| 102 | 3. cd fltk-1.3.0 |
| 103 | 4. patch -p1 < {tigervnc_source_directory}/fltk/extensions.patch |
| 104 | 5. 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 | 6. (optional) Use 'make install' to install FLTK into a directory of your |
| 107 | choosing. |
| 108 | 7. When building TigerVNC, set the FLTK_FLUID_EXECUTABLE CMake variable to the |
| 109 | location of the fluid executable that was built in Step 5 or installed in |
| 110 | Step 6. This gives CMake a hint as to where to find the FLTK library. |
| 111 | 8. If you did not install FLTK, then set the FLTK_INCLUDE_DIR CMake variable to |
| 112 | the location of the FLTK source directory. |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 113 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 114 | |
| 115 | ================== |
| 116 | Out-of-Tree Builds |
| 117 | ================== |
| 118 | |
| 119 | Binary objects, libraries, and executables are generated in the same directory |
| 120 | from which cmake was executed (the "binary directory"), and this directory need |
| 121 | not necessarily be the same as the TigerVNC source directory. You can create |
| 122 | multiple independent binary directories, in which different versions of |
| 123 | TigerVNC can be built from the same source tree using different compilers or |
| 124 | settings. In the sections below, {build_directory} refers to the binary |
| 125 | directory, whereas {source_directory} refers to the TigerVNC source directory. |
| 126 | For in-tree builds, these directories are the same. |
| 127 | |
| 128 | |
| 129 | ================= |
| 130 | Building TigerVNC |
| 131 | ================= |
| 132 | |
| 133 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 134 | Unix/Mac |
| 135 | -------- |
| 136 | |
| 137 | The following procedure will build the TigerVNC Viewer on Linux and Unix |
| 138 | systems. 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 |
| 140 | of TigerVNC on 64-bit systems. |
| 141 | |
| 142 | cd {build_directory} |
| 143 | cmake -G "Unix Makefiles" {source_directory} [additional CMake flags] |
| 144 | make |
| 145 | |
| 146 | Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems |
| 147 | containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use |
| 148 | the X11 shared libraries provided with the system. The procedure for this is |
| 149 | very system-specific, since it requires specifying such things as font and X |
| 150 | resource directories. Thus, it cannot be described in terms general enough for |
| 151 | this document. |
| 152 | |
| 153 | Those using systems with older versions of Xorg must build a "legacy-friendly" |
| 154 | version of the TigerVNC Server. This is accomplished by downloading and |
| 155 | building the more recent Xorg modules in a local directory and then building |
| 156 | Xvnc such that it links against the local build of these libraries, not the X11 |
| 157 | libraries installed on the system. The "build-xorg" script in the TigerVNC |
| 158 | source distribution (located under unix/) automates this process. |
| 159 | |
| 160 | The following procedure will build both the TigerVNC Viewer and a |
| 161 | "legacy-friendly" version of the TigerVNC Server: |
| 162 | |
| 163 | cd {build_directory} |
| 164 | sh {source_directory}/unix/build-xorg init |
| 165 | sh {source_directory}/unix/build-xorg build [additional CMake flags] |
| 166 | |
| 167 | build-xorg generates a version of Xvnc that has no external dependencies on the |
| 168 | X11 shared libraries or any other distribution-specific shared libraries. This |
| 169 | version of Xvnc should be transportable across multiple O/S distributions. |
| 170 | build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later |
| 171 | systems. It probably will not work on older systems. It has not been tested |
| 172 | on non-Linux systems (yet). |
| 173 | |
| 174 | build-xorg can also be used to rebuild just the TigerVNC Server and Viewer, |
| 175 | once the X11 modules and other dependencies have been built for the first time. |
| 176 | This is convenient for testing changes that just apply to the TigerVNC source |
| 177 | code. To accomplish this, run: |
| 178 | |
| 179 | sh {source_directory}/unix/build-xorg rebuild [additional make flags] |
| 180 | |
| 181 | For instance, |
| 182 | |
| 183 | sh {source_directory}/unix/build-xorg rebuild clean |
| 184 | |
| 185 | will clean both the Xvnc and vncviewer builds without destroying any of the |
| 186 | build configuration or module dependencies. |
| 187 | |
| 188 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 189 | Visual C++ (Command Line) |
| 190 | ------------------------- |
| 191 | |
| 192 | cd {build_directory} |
| 193 | cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory} |
| 194 | nmake |
| 195 | |
| 196 | This will build either a 32-bit or a 64-bit version of TigerVNC, depending |
| 197 | on which version of cl.exe is in the PATH. |
| 198 | |
| 199 | |
| 200 | Visual C++ (IDE) |
| 201 | ---------------- |
| 202 | |
| 203 | Choose the appropriate CMake generator option for your version of Visual Studio |
| 204 | (run "cmake" with no arguments for a list of available generators.) For |
| 205 | instance: |
| 206 | |
| 207 | cd {build_directory} |
| 208 | cmake -G "Visual Studio 9 2008" {source_directory} |
| 209 | |
| 210 | You can then open ALL_BUILD.vcproj in Visual Studio and build one of the |
| 211 | configurations in that project ("Debug", "Release", etc.) to generate a full |
| 212 | build of TigerVNC. |
| 213 | |
| 214 | |
| 215 | MinGW |
| 216 | ----- |
| 217 | |
| 218 | cd {build_directory} |
| 219 | cmake -G "MSYS Makefiles" {source_directory} |
| 220 | make |
| 221 | |
| 222 | This will generate only vncviewer. Currently, Visual C++ must be used to build |
| 223 | WinVNC. |
| 224 | |
| 225 | |
| 226 | Debug Build |
| 227 | ----------- |
| 228 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 229 | Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Or, if building with |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 230 | NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with |
| 231 | NMake.) |
| 232 | |
| 233 | |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 234 | Self-Contained MinGW Build |
| 235 | -------------------------- |
| 236 | |
| 237 | If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL. |
| 238 | To eliminate this dependency, add |
| 239 | |
| 240 | -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc |
| 241 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 242 | to the CMake command line. |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 243 | |
| 244 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 245 | ==================== |
| 246 | Building TLS support |
| 247 | ==================== |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 248 | |
Adam Tkac | 445d4ed | 2011-04-27 11:04:01 +0000 | [diff] [blame] | 249 | VeNCrypt (the TigerVNC security and authentication extensions) can be built |
| 250 | with TLS support, which provides built-in encryption for VNC sessions. This |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 251 | requires GnuTLS, which is not pre-installed on all platforms. This section |
| 252 | describes the issues associated with building a version of TigerVNC with TLS |
| 253 | support and how to work around those issues. |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 254 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 255 | |
| 256 | Unix/Mac |
| 257 | -------- |
| 258 | |
| 259 | In general, if you are building on a Unix-ish platform that has the GnuTLS |
| 260 | libraries and include files installed in the standard system locations, then |
| 261 | the TigerVNC build system should detect the system version of GnuTLS |
| 262 | automatically and link against it. However, this produces a version of |
| 263 | TigerVNC that depends on the GnuTLS dynamic libraries, and thus the TigerVNC |
| 264 | binaries are not portable. |
| 265 | |
| 266 | To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt |
| 267 | support, it is necessary to link against the GnuTLS static library (as well |
| 268 | as the static libraries of its dependencies.) If you are lucky enough, then |
| 269 | your O/S distribution may include pre-packaged versions of these static |
| 270 | libraries. Otherwise, it will be necessary to build GnuTLS, libgcrypt, |
| 271 | libtasn1, and libgpg-error from source. |
| 272 | |
| 273 | You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to |
| 274 | accommodate a custom build of GnuTLS that is installed in a non-system |
| 275 | directory. For instance, adding |
| 276 | |
| 277 | -DGNUTLS_INCLUDE_DIR=/opt/gnutls/include \ |
| 278 | -DGNUTLS_LIBRARY='/opt/gnutls/lib/libgnutls.a;/opt/gnutls/lib/libgcrypt.a;/opt/gnutls/lib/libgpg-error.a;/opt/gnutls/lib/libtasn1.a' \ |
| 279 | -DUSE_INCLUDED_ZLIB=1 |
| 280 | |
| 281 | to the CMake or 'build-xorg build' command line will cause TigerVNC to be |
| 282 | statically linked against a custom installation of GnuTLS that resides under |
| 283 | /opt/gnutls. GnuTLS depends on zlib, so specifying --with-included-zlib will |
| 284 | satisfy that dependency using TigerVNC's in-tree version of zlib, which |
| 285 | prevents TigerVNC from depending on the libz dynamic library. |
| 286 | |
| 287 | |
| 288 | MinGW |
| 289 | ----- |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 290 | |
| 291 | An installer containing the GnuTLS header files, as well as static and dynamic |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 292 | link libraries for 32-bit MinGW, can be downloaded from the following site: |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 293 | |
| 294 | http://josefsson.org/gnutls4win/ |
| 295 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 296 | As of this writing, GnuTLS cannot be built cleanly with MinGW64 due to the fact |
| 297 | that portions of the code assume an LP64 data model (Windows uses LLP64.) |
| 298 | Thus, it is not possible at this time to produce a Win64 version of TigerVNC |
| 299 | with TLS support. |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 300 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 301 | Whether you use the above installer or build GnuTLS from source, make sure that |
| 302 | you install the libraries and headers into a pathname that doesn't contain |
| 303 | spaces (the installer will try to install under c:\Program Files unless you |
| 304 | tell it otherwise.) If the GnuTLS include path contains spaces, then the MinGW |
| 305 | resource compiler will barf when you try to build TigerVNC. |
| 306 | |
| 307 | You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY CMake variables to |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 308 | specify the directory under which you installed GnuTLS. For instance, adding |
| 309 | |
| 310 | -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \ |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 311 | -DGNUTLS_LIBRARY=/c/gnutls/lib/libgnutls.dll.a |
| 312 | |
| 313 | to the CMake command line when using MinGW will cause TigerVNC to be linked |
| 314 | against GnuTLS DLLs that are installed under c:\gnutls. |
| 315 | |
| 316 | Adding |
| 317 | |
| 318 | -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \ |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 319 | -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a' |
| 320 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 321 | to the CMake command line will cause TigerVNC to be statically linked against |
| 322 | GnuTLS libraries that are installed under c:\gnutls. |
| 323 | |
| 324 | Note that the use of MinGW means that only the TigerVNC viewer can be built, |
| 325 | not the server. |
| 326 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 327 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 328 | Visual C++ |
| 329 | ---------- |
| 330 | |
| 331 | There is generally no sane way to build GnuTLS and its dependencies using |
| 332 | Visual C++. Thus, it is necessary to either build the libraries with MinGW (or |
| 333 | download 32-bit versions of these from the link above), generate Visual C++ |
| 334 | import libraries from the DLLs, then link TigerVNC against the Visual C++ |
| 335 | import libraries. |
| 336 | |
| 337 | In the instructions below, {gnutls_path} indicates the path under which GnuTLS |
| 338 | is installed (Example: c:\Program Files\GnuTLS-2.10.1). |
| 339 | |
| 340 | To generate Visual C++ import libraries: |
| 341 | |
| 342 | cd {gnutls_path}\lib |
| 343 | lib /def:..\bin\libgnutls-{version}.def /out:libgnutls.lib |
| 344 | |
| 345 | Now, you can add the following arguments to the CMake command line: |
| 346 | |
| 347 | -DGNUTLS_INCLUDE_DIR={gnutls_path}\include \ |
| 348 | -DGNUTLS_LIBRARY={gnutls_path}\lib\libgnutls.lib |
| 349 | |
| 350 | to build TigerVNC against the GnuTLS DLLs installed under {gnutls_path}. |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 351 | |
| 352 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 353 | =================== |
| 354 | Installing TigerVNC |
| 355 | =================== |
| 356 | |
| 357 | You can use the build system to install TigerVNC into a directory of your |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 358 | choosing. To do this, add: |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 359 | |
| 360 | -DCMAKE_INSTALL_PREFIX={install_directory} |
| 361 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 362 | to the CMake command line. Then, after building TigerVNC, you can run |
| 363 | 'make install' or 'nmake install' (or build the "install" target in the Visual |
| 364 | Studio IDE) to install it. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 365 | |
| 366 | If you don't specify CMAKE_INSTALL_PREFIX, then the default is |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 367 | c:\Program Files\TigerVNC on Windows and /usr/local on Unix. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 368 | |
| 369 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame^] | 370 | ========================= |
| 371 | Creating Release Packages |
| 372 | ========================= |
| 373 | |
| 374 | The following commands can be used to create various types of release packages: |
| 375 | |
| 376 | |
| 377 | Unix |
| 378 | ---- |
| 379 | |
| 380 | (TODO: implement these in CMake. OS X viewer also needs to be packaged into |
| 381 | an app instead of a package, since it can run stand-alone now.) |
| 382 | |
| 383 | make tarball |
| 384 | |
| 385 | Create a binary tarball containing the TigerVNC Viewer |
| 386 | |
| 387 | make servertarball |
| 388 | |
| 389 | Create a binary tarball containing both the TigerVNC Server and Viewer |
| 390 | |
| 391 | make dmg |
| 392 | |
| 393 | Create Macintosh package/disk image. This requires the PackageMaker |
| 394 | application, which must be installed in /Developer/Applications/Utilities. |
| 395 | |
| 396 | make udmg [BUILDDIR32={32-bit build directory}] |
| 397 | |
| 398 | On 64-bit OS X systems, this creates a version of the Macintosh package and |
| 399 | disk image which contains universal i386/x86-64 binaries. You should first |
| 400 | configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit |
| 401 | out-of-tree build, then run 'make udmg' from the 64-bit build directory. The |
| 402 | build system will look for the 32-bit build under {source_directory}/osxx86 |
| 403 | by default, but you can override this by setting the BUILDDIR32 variable on |
| 404 | the make command line as shown above. Either the 64-bit or 32-bit build can |
| 405 | be configured to be backward-compatible by using the instructions in the |
| 406 | "Unix Build Recipes" section. |
| 407 | |
| 408 | |
| 409 | Windows |
| 410 | ------- |
| 411 | |
| 412 | If using NMake: |
| 413 | |
| 414 | cd {build_directory} |
| 415 | nmake installer |
| 416 | |
| 417 | If using MinGW: |
| 418 | |
| 419 | cd {build_directory} |
| 420 | make installer |
| 421 | |
| 422 | If using the Visual Studio IDE, build the "installer" project. |
| 423 | |
| 424 | The installer package (TigerVNC[64].exe) will be located under |
| 425 | {build_directory}. If building using the Visual Studio IDE, then the installer |
| 426 | package will be located in a subdirectory with the same name as the |
| 427 | configuration you built (such as {build_directory}\Debug\ or |
| 428 | {build_directory}\Release\). |
| 429 | |
| 430 | NOTE: If TigerVNC is built with TLS support, then the build system will |
| 431 | attempt to package the GnuTLS DLLs into the Windows installer. It looks for |
| 432 | these DLLs in a directory called "bin" one level up from GNUTLS_INCLUDE_DIR. |
| 433 | |
| 434 | |
| 435 | ============= |
| 436 | Build Recipes |
| 437 | ============= |
| 438 | |
| 439 | |
| 440 | 32-bit Build on 64-bit Linux/Unix (including OS X) |
| 441 | -------------------------------------------------- |
| 442 | |
| 443 | Set the following environment variables before running CMake or |
| 444 | 'build-xorg build': |
| 445 | |
| 446 | CFLAGS='-O3 -m32' |
| 447 | CXXFLAGS='-O3 -m32' |
| 448 | LDFLAGS=-m32 |
| 449 | |
| 450 | |
| 451 | 64-bit Backward-Compatible Build on 64-bit OS X |
| 452 | ----------------------------------------------- |
| 453 | |
| 454 | Add |
| 455 | |
| 456 | -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \ |
| 457 | -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 |
| 458 | |
| 459 | to the CMake command line. The OS X 10.5 SDK must be installed. |
| 460 | |
| 461 | |
| 462 | 32-bit Backward-Compatible Build on 64-bit OS X |
| 463 | ----------------------------------------------- |
| 464 | |
| 465 | Set 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 | |
| 473 | and add |
| 474 | |
| 475 | -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \ |
| 476 | -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 |
| 477 | |
| 478 | to the CMake command line. The OS X 10.4 SDK must be installed. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 479 | |
| 480 | |
| 481 | 64-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 | |
| 492 | This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 493 | other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++ |
| 494 | packages (and their dependencies) must be installed. |
| 495 | |
| 496 | |
| 497 | 32-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 | |
| 508 | This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 509 | other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++ |
| 510 | packages (and their dependencies) must be installed. |
| 511 | |
| 512 | |
| 513 | MinGW-w64 Build on Windows |
| 514 | -------------------------- |
| 515 | |
| 516 | This 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 | |
| 530 | MinGW 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 |