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 | |
Pierre Ossman | cc8c6a2 | 2015-02-03 09:54:49 +0100 | [diff] [blame] | 12 | -- zlib |
| 13 | |
Pierre Ossman | 56610fb | 2015-01-27 16:28:15 +0100 | [diff] [blame] | 14 | -- FLTK 1.3.3 or later |
Peter Åstrand | 956a636 | 2012-08-09 07:33:08 +0000 | [diff] [blame] | 15 | |
DRC | 69854b4 | 2011-05-13 09:31:24 +0000 | [diff] [blame] | 16 | -- If building TLS support: |
Pierre Ossman | 88c24ed | 2015-01-29 13:12:22 +0100 | [diff] [blame] | 17 | * GnuTLS 3.x |
Brian P. Hinz | 34d2b4d | 2014-11-14 00:25:12 -0500 | [diff] [blame] | 18 | * See "Building TLS Support" below. |
DRC | 69854b4 | 2011-05-13 09:31:24 +0000 | [diff] [blame] | 19 | |
DRC | ce355e3 | 2011-06-24 04:58:01 +0000 | [diff] [blame] | 20 | -- If building native language support (NLS): |
| 21 | * Gnu gettext 0.14.4 or later |
| 22 | * See "Building Native Language Support" below. |
| 23 | |
Pierre Ossman | 3e4281b | 2014-10-17 10:40:07 +0200 | [diff] [blame] | 24 | -- libjpeg-turbo |
| 25 | * "Normal" libjpegv6 is also supported, although it is not |
| 26 | recommended as it is much slower. |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 27 | |
| 28 | |
| 29 | ========================= |
| 30 | Build Requirements (Unix) |
| 31 | ========================= |
| 32 | |
| 33 | -- Non-Mac platforms: |
| 34 | * X11 development kit |
| 35 | |
Pierre Ossman | 6330d14 | 2015-01-27 16:46:06 +0100 | [diff] [blame] | 36 | -- If building Xvnc/libvnc.so: |
| 37 | * Xorg server source code, 1.7 or never |
| 38 | * All build requirements Xorg imposes (see its documentation) |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 39 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 40 | ============================ |
| 41 | Build Requirements (Windows) |
| 42 | ============================ |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 43 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 44 | -- MinGW or MinGW-w64 |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 45 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 46 | -- Inno Setup (needed to build the TigerVNC installer) |
| 47 | Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php. |
| 48 | You also need the Inno Setup Preprocessor, which is available in the |
| 49 | Inno Setup QuickStart Pack. |
| 50 | |
| 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 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 55 | |
DRC | 15b6e05 | 2011-10-06 01:20:52 +0000 | [diff] [blame] | 56 | ========================= |
| 57 | Build Requirements (Java) |
| 58 | ========================= |
| 59 | |
Brian P. Hinz | bce950b | 2017-11-13 18:33:40 -0500 | [diff] [blame] | 60 | -- Sun/Oracle JDK 1.7 or later or OpenJDK 7 or later |
DRC | 15b6e05 | 2011-10-06 01:20:52 +0000 | [diff] [blame] | 61 | |
| 62 | -- See "Building Java Support" below. |
| 63 | |
| 64 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 65 | ================== |
| 66 | Out-of-Tree Builds |
| 67 | ================== |
| 68 | |
| 69 | Binary objects, libraries, and executables are generated in the same directory |
| 70 | from which cmake was executed (the "binary directory"), and this directory need |
| 71 | not necessarily be the same as the TigerVNC source directory. You can create |
| 72 | multiple independent binary directories, in which different versions of |
| 73 | TigerVNC can be built from the same source tree using different compilers or |
| 74 | settings. In the sections below, {build_directory} refers to the binary |
| 75 | directory, whereas {source_directory} refers to the TigerVNC source directory. |
| 76 | For in-tree builds, these directories are the same. |
| 77 | |
| 78 | |
| 79 | ================= |
| 80 | Building TigerVNC |
| 81 | ================= |
| 82 | |
| 83 | |
DRC | 62f3a66 | 2011-08-24 00:03:31 +0000 | [diff] [blame] | 84 | Building the TigerVNC Viewer on Unix/Mac Systems |
| 85 | ------------------------------------------------ |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 86 | |
| 87 | The following procedure will build the TigerVNC Viewer on Linux and Unix |
| 88 | systems. On 64-bit systems, this will build a 64-bit version of TigerVNC. See |
| 89 | "Build Recipes" for specific build instructions for building a 32-bit version |
| 90 | of TigerVNC on 64-bit systems. |
| 91 | |
| 92 | cd {build_directory} |
DRC | 240a5ff | 2011-07-06 07:28:30 +0000 | [diff] [blame] | 93 | cmake -G "Unix Makefiles" [additional CMake flags] {source_directory} |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 94 | make |
| 95 | |
DRC | 62f3a66 | 2011-08-24 00:03:31 +0000 | [diff] [blame] | 96 | |
| 97 | Building the TigerVNC Server on Modern Unix/Linux Systems |
| 98 | --------------------------------------------------------- |
| 99 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 100 | Building the TigerVNC Server (Xvnc) is a bit trickier. On newer systems |
| 101 | containing Xorg 7.4 or later (such as Fedora), Xvnc is typically built to use |
| 102 | the X11 shared libraries provided with the system. The procedure for this is |
DRC | 62f3a66 | 2011-08-24 00:03:31 +0000 | [diff] [blame] | 103 | system-specific, since it requires specifying such things as font directories, |
| 104 | but the general outline is as follows (this procedure assumes that the viewer |
| 105 | has already been built, per above.) |
| 106 | |
| 107 | > cd {build_directory} |
| 108 | |
| 109 | If performing an out-of-tree build: |
| 110 | > mkdir unix |
| 111 | > cp -R {source_directory}/unix/xserver unix/ |
| 112 | |
| 113 | > cp -R {xorg_source}/* unix/xserver/ |
| 114 | (NOTE: {xorg_source} is the directory containing the Xorg source for the |
| 115 | machine on which you are building TigerVNC. The most recent versions of |
| 116 | Red Hat/CentOS/Fedora, for instance, provide an RPM called |
| 117 | "xorg-x11-server-source", which installs the Xorg source under |
| 118 | /usr/share/xorg-x11-server-source.) |
| 119 | |
| 120 | > cd unix/xserver/ |
| 121 | > patch -p1 < {source_directory}/unix/xserver{version}.patch |
| 122 | (where {version} matches the X server version you are building, such as |
| 123 | "17" for version 1.7.x.) |
| 124 | > autoreconf -fiv |
| 125 | |
Peter Åstrand | 01b2433 | 2011-10-31 08:14:40 +0000 | [diff] [blame] | 126 | > ./configure --with-pic --without-dtrace --disable-static --disable-dri \ |
DRC | 62f3a66 | 2011-08-24 00:03:31 +0000 | [diff] [blame] | 127 | --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \ |
| 128 | --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ |
| 129 | --disable-config-dbus --disable-config-hal --disable-config-udev \ |
| 130 | --disable-dri2 --enable-install-libxf86config --enable-glx \ |
| 131 | --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ |
| 132 | --with-fontdir=/usr/share/X11/fonts \ |
| 133 | --with-xkb-path=/usr/share/X11/xkb \ |
| 134 | --with-xkb-output=/var/lib/xkb \ |
DRC | 0bb7e13 | 2011-08-24 00:26:54 +0000 | [diff] [blame] | 135 | --with-xkb-bin-directory=/usr/bin \ |
DRC | 62f3a66 | 2011-08-24 00:03:31 +0000 | [diff] [blame] | 136 | --with-serverconfig-path=/usr/lib[64]/xorg \ |
| 137 | --with-dri-driver-path=/usr/lib[64]/dri \ |
| 138 | {additional configure options} |
| 139 | (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS |
| 140 | 6 and recent Fedora releases. You should customize it for your particular |
| 141 | system. In particular, it will be necessary to customize the font, XKB, |
| 142 | and DRI directories.) |
| 143 | |
| 144 | > make TIGERVNC_SRCDIR={source_directory} |
| 145 | |
| 146 | |
| 147 | Building the TigerVNC Server on Legacy Unix/Linux Systems |
| 148 | --------------------------------------------------------- |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 149 | |
| 150 | Those using systems with older versions of Xorg must build a "legacy-friendly" |
| 151 | version of the TigerVNC Server. This is accomplished by downloading and |
| 152 | building the more recent Xorg modules in a local directory and then building |
| 153 | Xvnc such that it links against the local build of these libraries, not the X11 |
| 154 | libraries installed on the system. The "build-xorg" script in the TigerVNC |
Pierre Ossman | 04d288c | 2015-01-27 16:50:59 +0100 | [diff] [blame] | 155 | source distribution (located under contrib/xorg/) automates this process. |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 156 | |
| 157 | The following procedure will build both the TigerVNC Viewer and a |
| 158 | "legacy-friendly" version of the TigerVNC Server: |
| 159 | |
| 160 | cd {build_directory} |
Ben Hildred | 1dd3448 | 2018-09-28 14:49:45 -0600 | [diff] [blame] | 161 | bash {source_directory}/contrib/xorg/build-xorg init |
| 162 | bash {source_directory}/contrib/xorg/build-xorg build [additional CMake flags] |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 163 | |
| 164 | build-xorg generates a version of Xvnc that has no external dependencies on the |
| 165 | X11 shared libraries or any other distribution-specific shared libraries. This |
| 166 | version of Xvnc should be transportable across multiple O/S distributions. |
| 167 | build-xorg should work on Red Hat Enterprise 4, its contemporaries, and later |
| 168 | systems. It probably will not work on older systems. It has not been tested |
| 169 | on non-Linux systems (yet). |
| 170 | |
| 171 | build-xorg can also be used to rebuild just the TigerVNC Server and Viewer, |
| 172 | once the X11 modules and other dependencies have been built for the first time. |
| 173 | This is convenient for testing changes that just apply to the TigerVNC source |
| 174 | code. To accomplish this, run: |
| 175 | |
Pierre Ossman | 04d288c | 2015-01-27 16:50:59 +0100 | [diff] [blame] | 176 | sh {source_directory}/contrib/xorg/build-xorg rebuild [additional make flags] |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 177 | |
| 178 | For instance, |
| 179 | |
Pierre Ossman | 04d288c | 2015-01-27 16:50:59 +0100 | [diff] [blame] | 180 | sh {source_directory}/contrib/xorg/build-xorg rebuild clean |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 181 | |
| 182 | will clean both the Xvnc and vncviewer builds without destroying any of the |
| 183 | build configuration or module dependencies. |
| 184 | |
| 185 | |
DRC | e4e604f | 2011-10-01 17:54:36 +0000 | [diff] [blame] | 186 | Building the Windows TigerVNC Viewer with MinGW |
| 187 | ----------------------------------------------- |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 188 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 189 | If building the Windows version of TigerVNC on a Windows build system, use |
| 190 | the following procedure. |
| 191 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 192 | cd {build_directory} |
DRC | 240a5ff | 2011-07-06 07:28:30 +0000 | [diff] [blame] | 193 | cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory} |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 194 | make |
| 195 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 196 | If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section |
| 197 | below. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 198 | |
| 199 | |
| 200 | Debug Build |
| 201 | ----------- |
| 202 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 203 | Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 204 | |
| 205 | |
Pierre Ossman | f95272d | 2014-10-17 13:59:35 +0200 | [diff] [blame] | 206 | Portable (semi-static) Build |
| 207 | ---------------------------- |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 208 | |
Pierre Ossman | f95272d | 2014-10-17 13:59:35 +0200 | [diff] [blame] | 209 | TigerVNC can under favourble circumstances be built in a way that allows |
| 210 | the resulting binaries to run on any system without having to also install |
| 211 | all the dynamic libraries it depends on. Enable this mode by adding: |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 212 | |
DRC | e4e604f | 2011-10-01 17:54:36 +0000 | [diff] [blame] | 213 | -DBUILD_STATIC=1 |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 214 | |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 215 | to the CMake command line. |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 216 | |
Pierre Ossman | f95272d | 2014-10-17 13:59:35 +0200 | [diff] [blame] | 217 | Note that the method used to achieve this is very fragile and it may be |
| 218 | necessary to tweak cmake/StaticBuild.cmake to make things work on your |
| 219 | specific system. |
| 220 | |
DRC | 8290dd6 | 2011-02-10 22:54:36 +0000 | [diff] [blame] | 221 | |
DRC | 15b6e05 | 2011-10-06 01:20:52 +0000 | [diff] [blame] | 222 | ===================== |
| 223 | Building Java Support |
| 224 | ===================== |
| 225 | |
| 226 | TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on |
| 227 | any platform that has a Java Runtime Environment (JRE) installed. The Java |
| 228 | viewer works similarly to the native viewer, but with lower performance. |
| 229 | |
| 230 | To build the Java TigerVNC Viewer, add |
| 231 | |
| 232 | -DBUILD_JAVA=1 |
| 233 | |
| 234 | to the CMake or build-xorg command line. The build system will attempt to find |
| 235 | an installed Java Development Kit (JDK) and determine the appropriate paths for |
| 236 | the Java compiler (javac) and the JAR creation utility (jar). You can override |
| 237 | these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake |
| 238 | variables. You can also override the default flags that are passed to javac |
| 239 | by setting the JAVACFLAGS CMake variable. The build system will look for |
| 240 | keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These |
| 241 | tools are needed to sign the JAR file, which is necessary to enable certain |
| 242 | functionality (such as clipboard transfers) when the Java viewer is used as an |
| 243 | applet. |
| 244 | |
| 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 | |
Brian Hinz | f88b3ad | 2013-12-02 02:53:10 +0000 | [diff] [blame] | 252 | By default, a self-signed certificate will be generated and used to sign the |
| 253 | jar file. By specifying the following command line arguments to the CMake |
| 254 | command line, an alternate certificate may be used for signing. |
| 255 | |
| 256 | -DJAVA_KEYSTORE=${keystore_location_or_url} |
| 257 | -DJAVA_KEYSTORE_TYPE=${keystore_type} (Default: "jks") |
| 258 | -DJAVA_KEY_ALIAS=${keytore_key_alias} |
| 259 | -DJAVA_STOREPASS=${keystore_password} |
| 260 | -DJAVA_KEYPASS=${keystore_entry_password} |
| 261 | -DJAVA_TSA_URL=${url_of_timestamping_authority} |
| 262 | |
| 263 | The values of the JAVA_STOREPASS and JAVA_KEYPASS arguments may optionally be |
| 264 | read from file or environment variables by prefixing the value with ":env " |
| 265 | or ":file " (see the jarsigner documentation for more info): |
| 266 | |
| 267 | export StorePass=tigervnc |
| 268 | export KeyPass=tigervnc |
| 269 | cmake \ |
| 270 | ... |
| 271 | -DJAVA_STOREPASS=":env StorePass" |
| 272 | -DJAVA_KEYPASS=":env KeyPass" |
| 273 | |
DRC | 15b6e05 | 2011-10-06 01:20:52 +0000 | [diff] [blame] | 274 | |
DRC | 240a5ff | 2011-07-06 07:28:30 +0000 | [diff] [blame] | 275 | ====================================== |
Brian P. Hinz | 34d2b4d | 2014-11-14 00:25:12 -0500 | [diff] [blame] | 276 | Building TLS Support |
| 277 | ====================================== |
| 278 | |
| 279 | TLS requires GnuTLS, which is supplied with most Linux distributions and |
| 280 | with MinGW for Windows and can be built from source on OS X and other |
| 281 | Unix variants. However, GnuTLS versions > 2.12.x && < 3.3.x should be |
| 282 | avoided because of potential incompatibilities during initial handshaking. |
| 283 | |
| 284 | You can override the GNUTLS_LIBRARY and GNUTLS_INCLUDE_DIR CMake variables |
| 285 | to specify the locations of libgnutls and any dependencies. For instance, |
| 286 | adding |
| 287 | |
| 288 | -DGNUTLS_INCLUDE_DIR=/usr/local/include \ |
Brian P. Hinz | 94433e8 | 2014-11-18 07:39:35 -0500 | [diff] [blame] | 289 | -DGNUTLS_LIBRARY=/usr/local/lib/libgnutls.a |
Brian P. Hinz | 34d2b4d | 2014-11-14 00:25:12 -0500 | [diff] [blame] | 290 | |
| 291 | to the CMake command line would link TigerVNC against a static version of |
| 292 | libgnutls located under /usr/local. |
| 293 | |
| 294 | |
| 295 | ====================================== |
DRC | ce355e3 | 2011-06-24 04:58:01 +0000 | [diff] [blame] | 296 | Building Native Language Support (NLS) |
| 297 | ====================================== |
| 298 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 299 | NLS requires gettext, which is supplied with most Linux distributions and |
| 300 | with MinGW for Windows and which can easily be built from source on OS X and |
| 301 | other Unix variants. |
DRC | ce355e3 | 2011-06-24 04:58:01 +0000 | [diff] [blame] | 302 | |
| 303 | You can override the ICONV_LIBRARIES and LIBINTL_LIBRARY CMake variables to |
| 304 | specify the locations of libiconv and libintl, respectively. For instance, |
| 305 | adding |
| 306 | |
| 307 | -DLIBINTL_LIBRARY=/opt/gettext/lib/libintl.a |
| 308 | |
| 309 | to the CMake command line would link TigerVNC against a static version of |
| 310 | libintl located under /opt/gettext. Adding |
| 311 | |
| 312 | -DICONV_INCLUDE_DIR=/mingw/include \ |
| 313 | -DICONV_LIBRARIES=/mingw/lib/libiconv.a \ |
| 314 | -DGETTEXT_INCLUDE_DIR=/mingw/include \ |
| 315 | -DLIBINTL_LIBRARY=/mingw/lib/libintl.a |
| 316 | |
| 317 | to the CMake command line would link TigerVNC against the static versions of |
| 318 | libiconv and libintl included in the MinGW Developer Toolkit. |
| 319 | |
| 320 | |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 321 | =================== |
| 322 | Installing TigerVNC |
| 323 | =================== |
| 324 | |
| 325 | 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] | 326 | choosing. To do this, add: |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 327 | |
| 328 | -DCMAKE_INSTALL_PREFIX={install_directory} |
| 329 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 330 | to the CMake command line. Then, you can run 'make install' to build and |
| 331 | install it. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 332 | |
| 333 | If you don't specify CMAKE_INSTALL_PREFIX, then the default is |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 334 | c:\Program Files\TigerVNC on Windows and /usr/local on Unix. |
DRC | 180c016 | 2010-10-27 07:20:27 +0000 | [diff] [blame] | 335 | |
| 336 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 337 | ========================= |
| 338 | Creating Release Packages |
| 339 | ========================= |
| 340 | |
| 341 | The following commands can be used to create various types of release packages: |
| 342 | |
| 343 | |
| 344 | Unix |
| 345 | ---- |
| 346 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 347 | make tarball |
| 348 | |
| 349 | Create a binary tarball containing the TigerVNC Viewer |
| 350 | |
| 351 | make servertarball |
| 352 | |
| 353 | Create a binary tarball containing both the TigerVNC Server and Viewer |
| 354 | |
| 355 | make dmg |
| 356 | |
DRC | aab3830 | 2011-06-25 20:24:02 +0000 | [diff] [blame] | 357 | Create Macintosh disk image file that contains an application bundle of the |
| 358 | TigerVNC Viewer |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 359 | |
DRC | aab3830 | 2011-06-25 20:24:02 +0000 | [diff] [blame] | 360 | make udmg |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 361 | |
| 362 | On 64-bit OS X systems, this creates a version of the Macintosh package and |
| 363 | disk image which contains universal i386/x86-64 binaries. You should first |
| 364 | configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit |
| 365 | out-of-tree build, then run 'make udmg' from the 64-bit build directory. The |
| 366 | build system will look for the 32-bit build under {source_directory}/osxx86 |
DRC | aab3830 | 2011-06-25 20:24:02 +0000 | [diff] [blame] | 367 | by default, but you can override this by setting the OSX_X86_BUILD CMake |
| 368 | variable to the directory containing your configured 32-bit build. Either |
| 369 | the 64-bit or 32-bit build can be configured to be backward compatible by |
| 370 | using the instructions in the "Build Recipes" section. |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 371 | |
| 372 | |
| 373 | Windows |
| 374 | ------- |
| 375 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 376 | make installer |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 377 | |
DRC | ccc0969 | 2011-11-08 06:57:58 +0000 | [diff] [blame] | 378 | Create a Windows installer using Inno Setup. The installer package |
| 379 | (TigerVNC[64].exe) will be located under {build_directory}. |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 380 | |
| 381 | |
| 382 | ============= |
| 383 | Build Recipes |
| 384 | ============= |
| 385 | |
| 386 | |
| 387 | 32-bit Build on 64-bit Linux/Unix (including OS X) |
| 388 | -------------------------------------------------- |
| 389 | |
DRC | dc4f354 | 2011-08-24 00:30:49 +0000 | [diff] [blame] | 390 | Set the following environment variables before building TigerVNC. |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 391 | |
| 392 | CFLAGS='-O3 -m32' |
| 393 | CXXFLAGS='-O3 -m32' |
| 394 | LDFLAGS=-m32 |
| 395 | |
DRC | dc4f354 | 2011-08-24 00:30:49 +0000 | [diff] [blame] | 396 | If you are building the TigerVNC Server on a modern Unix/Linux system, then |
| 397 | you will also need to pass the appropriate --host argument when configuring the |
| 398 | X server source (for instance, --host=i686-pc-linux-gnu). |
| 399 | |
DRC | 667df92 | 2011-06-23 10:11:22 +0000 | [diff] [blame] | 400 | |
| 401 | 64-bit Backward-Compatible Build on 64-bit OS X |
| 402 | ----------------------------------------------- |
| 403 | |
| 404 | Add |
| 405 | |
| 406 | -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk \ |
| 407 | -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 |
| 408 | |
| 409 | to the CMake command line. The OS X 10.5 SDK must be installed. |
| 410 | |
| 411 | |
| 412 | 32-bit Backward-Compatible Build on 64-bit OS X |
| 413 | ----------------------------------------------- |
| 414 | |
| 415 | Set the following environment variables: |
| 416 | |
| 417 | CC=gcc-4.0 |
| 418 | CXX=g++-4.0 |
| 419 | CFLAGS='-O3 -m32' |
| 420 | CXXFLAGS='-O3 -m32' |
| 421 | LDFLAGS=-m32 |
| 422 | |
| 423 | and add |
| 424 | |
| 425 | -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk \ |
| 426 | -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 |
| 427 | |
| 428 | 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] | 429 | |
| 430 | |
| 431 | 64-bit MinGW Build on Cygwin |
| 432 | ---------------------------- |
| 433 | |
| 434 | cd {build_directory} |
| 435 | CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \ |
| 436 | RC=/usr/bin/x86_64-w64-mingw32-windres \ |
| 437 | cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ |
| 438 | -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \ |
| 439 | -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory} |
| 440 | make |
| 441 | |
| 442 | This produces a 64-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 443 | other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++ |
| 444 | packages (and their dependencies) must be installed. |
| 445 | |
| 446 | |
| 447 | 32-bit MinGW Build on Cygwin |
| 448 | ---------------------------- |
| 449 | |
| 450 | cd {build_directory} |
| 451 | CC=/usr/bin/i686-w64-mingw32-gcc CXX=/usr/bin/i686-w64-mingw32-g++ \ |
| 452 | RC=/usr/bin/i686-w64-mingw32-windres \ |
| 453 | cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ |
| 454 | -DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \ |
| 455 | -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory} |
| 456 | make |
| 457 | |
| 458 | This produces a 32-bit build of TigerVNC that does not depend on cygwin1.dll or |
| 459 | other Cygwin DLL's. The mingw64-i686-gcc-core and mingw64-i686-gcc-g++ |
| 460 | packages (and their dependencies) must be installed. |
| 461 | |
| 462 | |
| 463 | MinGW-w64 Build on Windows |
| 464 | -------------------------- |
| 465 | |
| 466 | This produces a 64-bit build of TigerVNC using the "native" MinGW-w64 toolchain |
| 467 | (which is faster than the Cygwin version): |
| 468 | |
| 469 | cd {build_directory} |
| 470 | CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \ |
| 471 | CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \ |
| 472 | RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \ |
| 473 | cmake -G "MSYS Makefiles" \ |
| 474 | -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \ |
| 475 | -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \ |
| 476 | {source_directory} |
| 477 | make |
| 478 | |
| 479 | |
| 480 | MinGW Build on Linux |
| 481 | -------------------- |
| 482 | |
| 483 | cd {build_directory} |
| 484 | CC={mingw_binary_path}/i386-mingw32-gcc \ |
| 485 | CXX={mingw_binary_path}/i386-mingw32-g++ \ |
| 486 | RC={mingw_binary_path}/i386-mingw32-windres \ |
| 487 | cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ |
| 488 | -DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \ |
| 489 | -DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \ |
| 490 | {source_directory} |
| 491 | make |
Brian Hinz | 1ff04d1 | 2013-11-28 16:26:08 +0000 | [diff] [blame] | 492 | |
| 493 | |
| 494 | =============================== |
| 495 | Distribution-Specific Packaging |
| 496 | =============================== |
| 497 | |
| 498 | |
| 499 | RPM Packages for RHEL / CentOS |
| 500 | ------------------------------ |
| 501 | |
| 502 | The RPM spec files and patches used to create the nightly builds |
| 503 | and releases can be found in the "contrib/rpm/el{5,6}" directories |
| 504 | of the TigerVNC subversion trunk. All external source tarballs |
| 505 | must be fetched manually and placed into the 'SOURCES' directory |
klemens | 0536d09 | 2017-01-28 20:56:56 +0100 | [diff] [blame] | 506 | under the rpmbuild root. Additionally, the following macros need |
Brian Hinz | 1ff04d1 | 2013-11-28 16:26:08 +0000 | [diff] [blame] | 507 | to be defined: |
| 508 | |
| 509 | EL6: |
| 510 | %debug_package %{nil} |
| 511 | |
| 512 | EL5: |
| 513 | %dist .el5 |
| 514 | %_smp_mflags -j3 |
| 515 | %debug_package %{nil} |
| 516 | %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot |
| 517 | |
| 518 | |
| 519 | Debian packages for Ubuntu 12.04LTS |
| 520 | ----------------------------------- |
| 521 | The debian folder used to create the nightly builds and releases |
| 522 | can be found in the "contrib/deb/ubuntu-precise" directory of the |
| 523 | TigerVNC subversion trunk. |