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