DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 1 | ******************************************************************************* |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 2 | ** Building on Unix Platforms (including Cygwin) |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 3 | ******************************************************************************* |
| 4 | |
| 5 | |
| 6 | ================== |
| 7 | Build Requirements |
| 8 | ================== |
| 9 | |
| 10 | -- autoconf 2.57 or later |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 11 | -- automake 1.7 or later |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 12 | -- libtool 1.4 or later |
| 13 | |
| 14 | -- NASM |
| 15 | * 0.98 or later is required for a 32-bit build |
| 16 | * NASM 2.05 or later is required for a 64-bit build |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 17 | * NASM 2.07 or later is required for a 64-bit build on OS X. This can be |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 18 | obtained from MacPorts (http://www.macports.org/). |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 19 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 20 | The NASM 2.05 RPMs do not work on older Linux systems, such as Red Hat |
| 21 | Enterprise Linux 4. On such systems, you can easily build and install NASM |
| 22 | 2.05 from the source RPM by executing the following as root: |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 23 | |
| 24 | ARCH=`uname -m` |
| 25 | wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm |
| 26 | rpmbuild --rebuild nasm-2.05.01-1.src.rpm |
| 27 | rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm |
| 28 | |
| 29 | NOTE: NASM build will fail if texinfo is not installed. |
| 30 | |
| 31 | -- GCC v4.1 or later recommended for best performance |
| 32 | |
| 33 | -- X11 development kit |
| 34 | |
| 35 | -- If building Xvnc: |
| 36 | * Python v2.3 or later |
| 37 | * zlib v1.2 or later |
| 38 | * OpenSSL v0.9.7 or later |
| 39 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 40 | -- If building VeNCrypt support: |
| 41 | * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error) |
| 42 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 43 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 44 | ================== |
| 45 | Out-of-Tree Builds |
| 46 | ================== |
| 47 | |
| 48 | Binary objects, libraries, and executables are generated in the same directory |
| 49 | from which configure was executed (the "binary directory"), and this directory |
| 50 | need not necessarily be the same as the TigerVNC source directory. You can |
| 51 | create multiple independent binary directories, in which different versions of |
| 52 | TigerVNC can be built from the same source tree using different compilers or |
| 53 | settings. In the sections below, {build_directory} refers to the binary |
| 54 | directory, whereas {source_directory} refers to the TigerVNC source directory. |
| 55 | For in-tree builds, these directories are the same. |
| 56 | |
| 57 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 58 | ================= |
| 59 | Building TigerVNC |
| 60 | ================= |
| 61 | |
| 62 | The following procedure will build the TigerVNC viewer on Linux and Unix |
| 63 | systems. On 64-bit systems, this may build a 32-bit version of TigerVNC, |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 64 | depending on the default autotools configuration for your system. See below |
| 65 | for specific build instructions for 64-bit systems. |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 66 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 67 | cd {source_directory} |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 68 | autoreconf -fiv |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 69 | cd {build_directory} |
| 70 | sh {source_directory}/configure [additional configure flags] |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 71 | make |
| 72 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 73 | NOTE: Running autoreconf in the source directory is only necessary if building |
| 74 | TigerVNC from the SVN repository. |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 75 | |
| 76 | Building the TigerVNC server (Xvnc) is a bit trickier. On newer systems, such |
| 77 | as Fedora, Xvnc is typically built to use the X11 shared libraries provided |
| 78 | with the system. This requires a system with Xorg 7.4 or later, however. |
| 79 | Systems with older versions of Xorg must build a "legacy-friendly" version of |
| 80 | the TigerVNC server. This is accomplished by downloading and building the |
| 81 | more recent Xorg modules in a local directory and then building Xvnc such that |
| 82 | it links against the local build of these libraries, not the X11 libraries |
| 83 | installed on the system. The "build-xorg" script in the TigerVNC source |
| 84 | distribution automates this process. |
| 85 | |
| 86 | The following procedure will build both the TigerVNC viewer and a |
| 87 | "legacy-friendly" version of the TigerVNC server: |
| 88 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 89 | cd {build_directory} |
| 90 | sh {source_directory}/unix/build-xorg init -version 7.4 |
| 91 | sh {source_directory}/unix/build-xorg build -version 7.4 [-static] [additional configure flags] |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 92 | |
| 93 | Passing an argument of "-static" to the build command line will generate a |
| 94 | version of Xvnc that has no external dependencies on the X11 shared libraries |
| 95 | or any other distribution-specific shared libraries. This version of Xvnc |
| 96 | should be transportable across multiple O/S distributions. The legacy-friendly |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 97 | build should work on Red Hat Enterprise 4, its contemporaries, and later |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 98 | systems. It probably will not work on older systems. It has not been tested |
| 99 | on non-Linux systems (yet). |
| 100 | |
| 101 | build-xorg can also be used to rebuild just the TigerVNC server and viewer, |
| 102 | once the X11 modules and other dependencies have been built the first time. |
| 103 | This is convenient for testing changes that just apply to the TigerVNC source |
| 104 | code. To accomplish this, run: |
| 105 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 106 | sh {source_directory}/unix/build-xorg rebuild [additional make flags] |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 107 | |
| 108 | For instance, |
| 109 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 110 | sh {source_directory}/unix/build-xorg rebuild clean |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 111 | |
| 112 | will clean both the Xvnc and vncviewer builds without destroying any of the |
| 113 | build configuration or module dependencies. |
| 114 | |
| 115 | |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame^] | 116 | ========================= |
| 117 | Building VeNCrypt support |
| 118 | ========================= |
| 119 | |
| 120 | Building VeNCrypt (the TigerVNC security and authentication extensions) |
| 121 | requires GnuTLS, which is not pre-installed on all platforms. In general, if |
| 122 | you are building on a Unix-ish platform that has the GnuTLS libraries and |
| 123 | include files installed in the standard system locations, then the TigerVNC |
| 124 | build system should detect the system version of GnuTLS automatically and link |
| 125 | against it. However, this produces a version of TigerVNC that depends on the |
| 126 | GnuTLS dynamic libraries, and thus the TigerVNC binaries are not portable. |
| 127 | |
| 128 | To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt |
| 129 | support, it is necessary to link against the GnuTLS static library (as well |
| 130 | as the static libraries of its dependencies.) If you are lucky enough, your |
| 131 | O/S distribution may include pre-packaged versions of these static libraries. |
| 132 | Otherwise, it will probably be necessary to build GnuTLS, libgcrypt, libtasn1, |
| 133 | and libgpg-error from source. |
| 134 | |
| 135 | You can manipulate the GNUTLS_CFLAGS and GNUTLS_LDFLAGS configure variables to |
| 136 | accommodate a custom build of GnuTLS that is installed in a non-system |
| 137 | directory. For instance, adding |
| 138 | |
| 139 | GNUTLS_CFLAGS=-I/opt/gnutls/include \ |
| 140 | GNUTLS_LDFLAGS='/opt/gnutls/lib/libgnutls.a /opt/gnutls/lib/libgcrypt.a \ |
| 141 | /opt/gnutls/lib/libgpg-error.a /opt/gnutls/lib/libtasn1.a' \ |
| 142 | --with-included-zlib |
| 143 | |
| 144 | to the configure or 'build-xorg build' command line will cause TigerVNC to be |
| 145 | statically linked against a custom installation of GnuTLS that resides under |
| 146 | /opt/gnutls. GnuTLS depends on zlib, so specifying --with-included-zlib will |
| 147 | satisfy that dependency using TigerVNC's in-tree version of zlib, which |
| 148 | prevents TigerVNC from depending on the libz dynamic library. |
| 149 | |
| 150 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 151 | ================== |
| 152 | Unix Build Recipes |
| 153 | ================== |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 154 | |
| 155 | |
| 156 | 32-bit Build on 64-bit Linux |
| 157 | ---------------------------- |
| 158 | |
| 159 | Add |
| 160 | |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 161 | --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 162 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 163 | to the configure or build command lines. |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 164 | |
| 165 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 166 | 64-bit Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 167 | --------------------------- |
| 168 | |
| 169 | Add |
| 170 | |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 171 | --host x86_64-apple-darwin NASM=/opt/local/bin/nasm |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 172 | |
| 173 | to the configure command line. NASM 2.07 or later from MacPorts must be |
| 174 | installed. |
| 175 | |
| 176 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 177 | 32-bit Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 178 | --------------------------- |
| 179 | |
| 180 | Add |
| 181 | |
| 182 | CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 |
| 183 | |
| 184 | to the configure command line. |
| 185 | |
| 186 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 187 | 64-bit Backward-Compatible Build on 64-bit OS X |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 188 | ----------------------------------------------- |
| 189 | |
| 190 | Add |
| 191 | |
| 192 | --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \ |
| 193 | CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 194 | -mmacosx-version-min=10.5 -O3' \ |
| 195 | CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 196 | -mmacosx-version-min=10.5 -O3' \ |
| 197 | LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 198 | -mmacosx-version-min=10.5' |
| 199 | |
| 200 | to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from |
| 201 | MacPorts, must be installed. |
| 202 | |
| 203 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 204 | 32-bit Backward-Compatible Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 205 | ----------------------------------------------- |
| 206 | |
| 207 | Add |
| 208 | |
| 209 | CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 210 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 211 | CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 212 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 213 | LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 214 | -mmacosx-version-min=10.4 -m32' |
| 215 | |
| 216 | to the configure command line. The OS X 10.4 SDK must be installed. |
| 217 | |
| 218 | |
DRC | 2e0b965 | 2010-10-01 09:31:44 +0000 | [diff] [blame] | 219 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 220 | ******************************************************************************* |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 221 | ** Building on Windows (Visual C++ or MinGW) |
| 222 | ******************************************************************************* |
| 223 | |
| 224 | |
| 225 | ================== |
| 226 | Build Requirements |
| 227 | ================== |
| 228 | |
| 229 | -- CMake (http://www.cmake.org) v2.6 or later |
| 230 | |
| 231 | -- Microsoft Visual C++ 2005 or later |
| 232 | |
| 233 | If you don't already have Visual C++, then the easiest way to get it is by |
| 234 | installing the Windows SDK: |
| 235 | |
| 236 | http://msdn.microsoft.com/en-us/windows/bb980924.aspx |
| 237 | |
| 238 | The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and |
| 239 | everything necessary to build TigerVNC. |
| 240 | |
| 241 | * For 32-bit builds, you can also use Microsoft Visual C++ Express |
| 242 | Edition. Visual C++ Express Edition is a free download. |
| 243 | * If you intend to build TigerVNC from the command line, then add the |
| 244 | appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH |
| 245 | environment variables. This is generally accomplished by executing |
| 246 | vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and |
| 247 | vcvars64.bat are part of Visual C++ and are located in the same directory |
| 248 | as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass |
| 249 | optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build |
| 250 | environment. |
| 251 | |
| 252 | ... OR ... |
| 253 | |
| 254 | -- MinGW |
| 255 | |
| 256 | GCC v4.1 or later recommended for best performance |
| 257 | |
| 258 | -- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for |
| 259 | a 64-bit build) |
| 260 | |
| 261 | -- Inno Setup (needed to build the TigerVNC installer) |
| 262 | Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php. |
| 263 | You also need the Inno Setup Preprocessor, which is available in the |
| 264 | Inno Setup QuickStart Pack. |
| 265 | |
| 266 | Add the directory containing iscc.exe (for instance, |
| 267 | C:\Program Files\Inno Setup 5) to the system or user PATH environment |
| 268 | variable prior to building TigerVNC. |
| 269 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 270 | -- If building VeNCrypt support: |
| 271 | * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error) |
| 272 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 273 | |
| 274 | ================== |
| 275 | Out-of-Tree Builds |
| 276 | ================== |
| 277 | |
| 278 | Binary objects, libraries, and executables are generated in the same directory |
| 279 | from which cmake was executed (the "binary directory"), and this directory need |
| 280 | not necessarily be the same as the TigerVNC source directory. You can create |
| 281 | multiple independent binary directories, in which different versions of |
| 282 | TigerVNC can be built from the same source tree using different compilers or |
| 283 | settings. In the sections below, {build_directory} refers to the binary |
| 284 | directory, whereas {source_directory} refers to the TigerVNC source directory. |
| 285 | For in-tree builds, these directories are the same. |
| 286 | |
| 287 | |
| 288 | ================= |
| 289 | Building TigerVNC |
| 290 | ================= |
| 291 | |
| 292 | |
| 293 | Visual C++ (Command Line) |
| 294 | ------------------------- |
| 295 | |
| 296 | cd {build_directory} |
| 297 | cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory} |
| 298 | nmake |
| 299 | |
| 300 | This will build either a 32-bit or a 64-bit version of TigerVNC, depending |
| 301 | on which version of cl.exe is in the PATH. |
| 302 | |
| 303 | |
| 304 | Visual C++ (IDE) |
| 305 | ---------------- |
| 306 | |
| 307 | Choose the appropriate CMake generator option for your version of Visual Studio |
| 308 | (run "cmake" with no arguments for a list of available generators.) For |
| 309 | instance: |
| 310 | |
| 311 | cd {build_directory} |
| 312 | cmake -G "Visual Studio 9 2008" {source_directory} |
| 313 | |
| 314 | You can then open ALL_BUILD.vcproj in Visual Studio and build one of the |
| 315 | configurations in that project ("Debug", "Release", etc.) to generate a full |
| 316 | build of TigerVNC. |
| 317 | |
| 318 | |
| 319 | MinGW |
| 320 | ----- |
| 321 | |
| 322 | cd {build_directory} |
| 323 | cmake -G "MSYS Makefiles" {source_directory} |
| 324 | make |
| 325 | |
| 326 | This will generate only vncviewer. Currently, Visual C++ must be used to build |
| 327 | WinVNC. |
| 328 | |
| 329 | |
| 330 | Debug Build |
| 331 | ----------- |
| 332 | |
| 333 | Add "-DCMAKE_BUILD_TYPE=Debug" to the cmake command line. Or, if building with |
| 334 | NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with |
| 335 | NMake.) |
| 336 | |
| 337 | |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame^] | 338 | Self-Contained MinGW Build |
| 339 | -------------------------- |
| 340 | |
| 341 | If TigerVNC is built using MinGW, then it may depend on the MinGW libgcc DLL. |
| 342 | To eliminate this dependency, add |
| 343 | |
| 344 | -DCMAKE_C_FLAGS=-static-libgcc -DCMAKE_CXX_FLAGS=-static-libgcc |
| 345 | |
| 346 | to the cmake command line. |
| 347 | |
| 348 | |
| 349 | ========================= |
| 350 | Building VeNCrypt support |
| 351 | ========================= |
| 352 | |
| 353 | Building VeNCrypt (the TigerVNC security and authentication extensions) |
| 354 | requires GnuTLS, which is not Microsoft-friendly. There is generally no |
| 355 | sane way to build GnuTLS and its dependencies using Visual C++. Those with |
| 356 | a lot of time on their hands can build the GnuTLS DLLs using MinGW (or download |
| 357 | 32-bit versions of these from the link below), generate Visual C++ import |
| 358 | libraries from the DLLs, then link TigerVNC against the Visual C++ import |
| 359 | libraries. However, this creates a version of TigerVNC that depends on |
| 360 | the GnuTLS DLLs. The TigerVNC packaging system currently is not designed to |
| 361 | handle DLL dependencies, so really the only way to build and package a |
| 362 | self-contained, VeNCrypt-enabled version of TigerVNC for Windows is to use |
| 363 | MinGW and the static GnuTLS libraries. The use of MinGW means that only the |
| 364 | viewer can be built, not the server. |
| 365 | |
| 366 | An installer containing the GnuTLS header files, as well as static and dynamic |
| 367 | link libraries for 32-bit MinGW, is available from the following site: |
| 368 | |
| 369 | http://josefsson.org/gnutls4win/ |
| 370 | |
| 371 | Whether you choose to use the above installer or build GnuTLS from source, |
| 372 | make sure that you install the libraries and headers into a pathname that |
| 373 | doesn't contain spaces (the installer will try to install under |
| 374 | c:\Program Files unless you tell it otherwise.) If the GnuTLS include path |
| 375 | contains spaces, then the MinGW resource compiler will barf. |
| 376 | |
| 377 | You can manipulate the GNUTLS_INCLUDE_DIR and GNUTLS_LIBRARY cmake variables to |
| 378 | specify the directory under which you installed GnuTLS. For instance, adding |
| 379 | |
| 380 | -DGNUTLS_INCLUDE_DIR=/c/gnutls/include \ |
| 381 | -DGNUTLS_LIBRARY='/c/gnutls/lib/libgnutls.a;/c/gnutls/lib/libgcrypt.a;/c/gnutls/lib/libtasn1.a;/c/gnutls/lib/libgpg-error.a' |
| 382 | |
| 383 | to the cmake command line when using MinGW will cause TigerVNC to be statically |
| 384 | linked against an installation of GnuTLS that resides under c:\gnutls. |
| 385 | |
| 386 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 387 | =================== |
| 388 | Installing TigerVNC |
| 389 | =================== |
| 390 | |
| 391 | You can use the build system to install TigerVNC into a directory of your |
| 392 | choosing (as opposed to creating an installer.) To do this, add: |
| 393 | |
| 394 | -DCMAKE_INSTALL_PREFIX={install_directory} |
| 395 | |
| 396 | to the cmake command line. |
| 397 | |
| 398 | For example, |
| 399 | |
| 400 | cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \ |
| 401 | -DCMAKE_INSTALL_PREFIX=c:\TigerVNC {source_directory} |
| 402 | nmake install |
| 403 | |
| 404 | If you don't specify CMAKE_INSTALL_PREFIX, then the default is |
| 405 | c:\Program Files\TigerVNC. |
| 406 | |
| 407 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 408 | ===================== |
| 409 | Windows Build Recipes |
| 410 | ===================== |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 411 | |
| 412 | |
| 413 | 64-bit MinGW Build on Cygwin |
| 414 | ---------------------------- |
| 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 | |
| 424 | This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 425 | other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++ |
| 426 | packages (and their dependencies) must be installed. |
| 427 | |
| 428 | |
| 429 | 32-bit MinGW Build on Cygwin |
| 430 | ---------------------------- |
| 431 | |
| 432 | cd {build_directory} |
| 433 | CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \ |
| 434 | RC=/usr/bin/i686-w64-mingw32-windres \ |
| 435 | cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ |
| 436 | -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \ |
| 437 | -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory} |
| 438 | make |
| 439 | |
| 440 | This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 441 | other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++ |
| 442 | packages (and their dependencies) must be installed. |
| 443 | |
| 444 | |
| 445 | MinGW-w64 Build on Windows |
| 446 | -------------------------- |
| 447 | |
| 448 | This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain |
| 449 | (which is faster than the Cygwin version): |
| 450 | |
| 451 | cd {build_directory} |
| 452 | CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \ |
| 453 | CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \ |
| 454 | RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \ |
| 455 | cmake -G "MSYS Makefiles" \ |
| 456 | -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \ |
| 457 | -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \ |
| 458 | {source_directory} |
| 459 | make |
| 460 | |
| 461 | |
| 462 | MinGW Build on Linux |
| 463 | -------------------- |
| 464 | |
| 465 | cd {build_directory} |
| 466 | CC={mingw_binary_path}/i386-mingw32-gcc \ |
| 467 | CXX={mingw_binary_path}/i386-mingw32-g++ \ |
| 468 | RC={mingw_binary_path}/i386-mingw32-windres \ |
| 469 | cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ |
| 470 | -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \ |
| 471 | -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \ |
| 472 | {source_directory} |
| 473 | make |
| 474 | |
| 475 | |
| 476 | ******************************************************************************* |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 477 | ** Creating Release Packages |
| 478 | ******************************************************************************* |
| 479 | |
| 480 | The following commands can be used to create various types of release packages: |
| 481 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 482 | |
| 483 | Unix |
| 484 | ---- |
| 485 | |
DRC | 61b630a | 2011-02-09 10:45:09 +0000 | [diff] [blame] | 486 | make tarball |
| 487 | |
| 488 | Create a binary tarball containing the TigerVNC Viewer |
| 489 | |
| 490 | make servertarball |
| 491 | |
| 492 | Create a binary tarball containing both the TigerVNC Server and Viewer |
| 493 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 494 | make dmg |
| 495 | |
| 496 | Create Macintosh package/disk image. This requires the PackageMaker |
| 497 | application, which must be installed in /Developer/Applications/Utilities. |
| 498 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 499 | make udmg [BUILDDIR32={32-bit build directory}] |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 500 | |
DRC | 2b0b194 | 2011-02-09 03:10:44 +0000 | [diff] [blame] | 501 | On 64-bit OS X systems, this creates a version of the Macintosh package and |
| 502 | disk image which contains universal i386/x86-64 binaries. You should first |
| 503 | configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit |
| 504 | out-of-tree build, then run 'make udmg' from the 64-bit build directory. The |
| 505 | build system will look for the 32-bit build under {source_directory}/osxx86 |
| 506 | by default, but you can override this by setting the BUILDDIR32 variable on |
| 507 | the make command line as shown above. Either the 64-bit or 32-bit build can |
| 508 | be configured to be backward-compatible by using the instructions in the |
| 509 | "Unix Build Recipes" section. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 510 | |
| 511 | |
| 512 | Windows |
| 513 | ------- |
| 514 | |
| 515 | If using NMake: |
| 516 | |
| 517 | cd {build_directory} |
| 518 | nmake installer |
| 519 | |
| 520 | If using MinGW: |
| 521 | |
| 522 | cd {build_directory} |
| 523 | make installer |
| 524 | |
| 525 | If using the Visual Studio IDE, build the "installer" project. |
| 526 | |
| 527 | The installer package (TigerVNC[64].exe) will be located under |
| 528 | {build_directory}. If building using the Visual Studio IDE, then the installer |
| 529 | package will be located in a subdirectory with the same name as the |
| 530 | configuration you built (such as {build_directory}\Debug\ or |
| 531 | {build_directory}\Release\). |