DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 1 | ******************************************************************************* |
| 2 | ** Building TigerVNC |
| 3 | ******************************************************************************* |
| 4 | |
| 5 | |
| 6 | ================== |
| 7 | Build Requirements |
| 8 | ================== |
| 9 | |
| 10 | -- autoconf 2.57 or later |
| 11 | |
| 12 | -- automake 1.7 or later |
| 13 | |
| 14 | -- libtool 1.4 or later |
| 15 | |
| 16 | -- NASM |
| 17 | * 0.98 or later is required for a 32-bit build |
| 18 | * NASM 2.05 or later is required for a 64-bit build |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 19 | * 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] | 20 | obtained from MacPorts (http://www.macports.org/). |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 21 | |
| 22 | The NASM 2.05 RPMs do not work on older Linux systems, such as Enterprise |
| 23 | Linux 4. On such systems, you can easily build and install NASM 2.05 |
| 24 | from the source RPM by executing the following as root: |
| 25 | |
| 26 | ARCH=`uname -m` |
| 27 | wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm |
| 28 | rpmbuild --rebuild nasm-2.05.01-1.src.rpm |
| 29 | rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm |
| 30 | |
| 31 | NOTE: NASM build will fail if texinfo is not installed. |
| 32 | |
| 33 | -- GCC v4.1 or later recommended for best performance |
| 34 | |
| 35 | -- X11 development kit |
| 36 | |
| 37 | -- If building Xvnc: |
| 38 | * Python v2.3 or later |
| 39 | * zlib v1.2 or later |
| 40 | * OpenSSL v0.9.7 or later |
| 41 | |
| 42 | |
| 43 | ================= |
| 44 | Building TigerVNC |
| 45 | ================= |
| 46 | |
| 47 | The following procedure will build the TigerVNC viewer on Linux and Unix |
| 48 | systems. On 64-bit systems, this may build a 32-bit version of TigerVNC, |
| 49 | depending on the default compiler configuration for your system. See below for |
| 50 | specific build instructions for 64-bit systems. |
| 51 | |
| 52 | cd tigervnc |
| 53 | autoreconf -fiv |
| 54 | sh ./configure [additional configure flags] |
| 55 | make |
| 56 | |
| 57 | NOTE: Running autoreconf is only necessary if building TigerVNC from the SVN |
| 58 | repository. |
| 59 | |
| 60 | Building the TigerVNC server (Xvnc) is a bit trickier. On newer systems, such |
| 61 | as Fedora, Xvnc is typically built to use the X11 shared libraries provided |
| 62 | with the system. This requires a system with Xorg 7.4 or later, however. |
| 63 | Systems with older versions of Xorg must build a "legacy-friendly" version of |
| 64 | the TigerVNC server. This is accomplished by downloading and building the |
| 65 | more recent Xorg modules in a local directory and then building Xvnc such that |
| 66 | it links against the local build of these libraries, not the X11 libraries |
| 67 | installed on the system. The "build-xorg" script in the TigerVNC source |
| 68 | distribution automates this process. |
| 69 | |
| 70 | The following procedure will build both the TigerVNC viewer and a |
| 71 | "legacy-friendly" version of the TigerVNC server: |
| 72 | |
| 73 | cd tigervnc |
| 74 | unix/build-xorg init -version 7.4 |
| 75 | unix/build-xorg build -version 7.4 [-static] [additional configure flags] |
| 76 | |
| 77 | Passing an argument of "-static" to the build command line will generate a |
| 78 | version of Xvnc that has no external dependencies on the X11 shared libraries |
| 79 | or any other distribution-specific shared libraries. This version of Xvnc |
| 80 | should be transportable across multiple O/S distributions. The legacy-friendly |
| 81 | build should work on RedHat Enterprise 4, its contemporaries, and later |
| 82 | systems. It probably will not work on older systems. It has not been tested |
| 83 | on non-Linux systems (yet). |
| 84 | |
| 85 | build-xorg can also be used to rebuild just the TigerVNC server and viewer, |
| 86 | once the X11 modules and other dependencies have been built the first time. |
| 87 | This is convenient for testing changes that just apply to the TigerVNC source |
| 88 | code. To accomplish this, run: |
| 89 | |
| 90 | unix/build-xorg rebuild [additional make flags] |
| 91 | |
| 92 | For instance, |
| 93 | |
| 94 | unix/build-xorg rebuild clean |
| 95 | |
| 96 | will clean both the Xvnc and vncviewer builds without destroying any of the |
| 97 | build configuration or module dependencies. |
| 98 | |
| 99 | |
| 100 | ================================== |
| 101 | Build Recipes for Specific Systems |
| 102 | ================================== |
| 103 | |
| 104 | |
| 105 | 32-bit Build on 64-bit Linux |
| 106 | ---------------------------- |
| 107 | |
| 108 | Add |
| 109 | |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 110 | --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 111 | |
| 112 | to the configure and build command lines. |
| 113 | |
| 114 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 115 | 64-bit Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 116 | --------------------------- |
| 117 | |
| 118 | Add |
| 119 | |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 120 | --host x86_64-apple-darwin NASM=/opt/local/bin/nasm |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 121 | |
| 122 | to the configure command line. NASM 2.07 or later from MacPorts must be |
| 123 | installed. |
| 124 | |
| 125 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 126 | 32-bit Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 127 | --------------------------- |
| 128 | |
| 129 | Add |
| 130 | |
| 131 | CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 |
| 132 | |
| 133 | to the configure command line. |
| 134 | |
| 135 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 136 | 64-bit Backward-Compatible Build on 64-bit OS X |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 137 | ----------------------------------------------- |
| 138 | |
| 139 | Add |
| 140 | |
| 141 | --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \ |
| 142 | CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 143 | -mmacosx-version-min=10.5 -O3' \ |
| 144 | CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 145 | -mmacosx-version-min=10.5 -O3' \ |
| 146 | LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \ |
| 147 | -mmacosx-version-min=10.5' |
| 148 | |
| 149 | to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from |
| 150 | MacPorts, must be installed. |
| 151 | |
| 152 | |
DRC | ef5e17f | 2010-09-30 18:53:42 +0000 | [diff] [blame] | 153 | 32-bit Backward-Compatible Build on 64-bit OS X |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 154 | ----------------------------------------------- |
| 155 | |
| 156 | Add |
| 157 | |
| 158 | CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 159 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 160 | CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 161 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 162 | LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 163 | -mmacosx-version-min=10.4 -m32' |
| 164 | |
| 165 | to the configure command line. The OS X 10.4 SDK must be installed. |
| 166 | |
| 167 | |
DRC | 2e0b965 | 2010-10-01 09:31:44 +0000 | [diff] [blame^] | 168 | Building VeNCrypt support on OS X |
| 169 | --------------------------------- |
| 170 | |
| 171 | VeNCrypt requires GnuTLS, which is not available on OS X systems by default. |
| 172 | However, it can be obtained from MacPorts (http://www.macports.org/). The |
| 173 | easiest way to build TigerVNC using this version of GnuTLS is simply to |
| 174 | modify the CPATH and LIBRARY_PATH environment variables to include /opt/local, |
| 175 | i.e.: |
| 176 | |
| 177 | export CPATH=/opt/local/include |
| 178 | export LIBRARY_PATH=/opt/local/lib |
| 179 | |
| 180 | and then build TigerVNC as you would normally. However, this produces run-time |
| 181 | dependencies on the .dylib files in /opt/local/lib. To statically link with |
| 182 | GnuTLS, add the following monstrosity to the configure command line: |
| 183 | |
| 184 | GNUTLS_CFLAGS=-I/opt/local/include \ |
| 185 | GNUTLS_LDFLAGS='/opt/local/lib/libgnutls.a /opt/local/lib/libgcrypt.a \ |
| 186 | /opt/local/lib/libgpg-error.a /opt/local/lib/libz.a \ |
| 187 | /opt/local/lib/libtasn1.a /opt/local/lib/libiconv.a \ |
| 188 | /opt/local/lib/libintl.a -framework CoreFoundation' |
| 189 | |
| 190 | |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 191 | ******************************************************************************* |
| 192 | ** Creating Release Packages |
| 193 | ******************************************************************************* |
| 194 | |
| 195 | The following commands can be used to create various types of release packages: |
| 196 | |
| 197 | make dmg |
| 198 | |
| 199 | Create Macintosh package/disk image. This requires the PackageMaker |
| 200 | application, which must be installed in /Developer/Applications/Utilities. |
| 201 | |
| 202 | make udmg |
| 203 | |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 204 | On 64-bit OS X (10.5 "Leopard") and later, this creates a version of the |
DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame] | 205 | Macintosh package/disk image which contains universal i386/x86-64 binaries. |
| 206 | The 32-bit fork of these binaries is backward compatible with OS X 10.4 and |
DRC | 896a96c | 2010-07-08 07:12:09 +0000 | [diff] [blame] | 207 | later (OS X 10.4 compatibility SDK required.) If building on OS X 10.6 |
| 208 | ("Snow Leopard") or later, the 64-bit fork can be made backward compatible |
| 209 | with 10.5 by using the instructions in the "Build Recipes" section. |