if X86_64
udmg: all
- sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
- ${srcdir} universal
+ sh makemacpkg universal ${BUILDDIR32}
endif
dmg: all
- sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} ${srcdir}
+ sh makemacpkg
EXTRA_DIST = CMakeLists.txt cmakescripts/getdate.bat LICENCE.TXT \
doc java media release config.h.cmake.in
AC_SUBST(BUILD)
+AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in])
+
AC_OUTPUT([
Makefile
common/Makefile
* zlib v1.2 or later
* OpenSSL v0.9.7 or later
+-- If building VeNCrypt support:
+ * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
+
==================
Out-of-Tree Builds
The following procedure will build the TigerVNC viewer on Linux and Unix
systems. On 64-bit systems, this may build a 32-bit version of TigerVNC,
-depending on the default compiler configuration for your system. See below for
-specific build instructions for 64-bit systems.
+depending on the default autotools configuration for your system. See below
+for specific build instructions for 64-bit systems.
cd {source_directory}
autoreconf -fiv
build configuration or module dependencies.
-==================================
-Build Recipes for Specific Systems
-==================================
+==================
+Unix Build Recipes
+==================
32-bit Build on 64-bit Linux
to the configure command line. The OS X 10.4 SDK must be installed.
-Building VeNCrypt support on OS X
----------------------------------
-
-VeNCrypt requires GnuTLS, which is not available on OS X systems by default.
-However, it can be obtained from MacPorts (http://www.macports.org/). The
-easiest way to build TigerVNC using this version of GnuTLS is simply to
-modify the CPATH and LIBRARY_PATH environment variables to include /opt/local,
-i.e.:
-
-export CPATH=/opt/local/include
-export LIBRARY_PATH=/opt/local/lib
-
-and then build TigerVNC as you would normally. However, this produces run-time
-dependencies on the .dylib files in /opt/local/lib. To statically link with
-GnuTLS, add the following monstrosity to the configure command line:
+Building VeNCrypt support
+-------------------------
- GNUTLS_CFLAGS=-I/opt/local/include \
- GNUTLS_LDFLAGS='/opt/local/lib/libgnutls.a /opt/local/lib/libgcrypt.a \
- /opt/local/lib/libgpg-error.a /opt/local/lib/libz.a \
- /opt/local/lib/libtasn1.a /opt/local/lib/libiconv.a \
- /opt/local/lib/libintl.a -framework CoreFoundation'
+Building VeNCrypt (the TigerVNC security and authentication extensions)
+requires GnuTLS, which is not pre-installed on all platforms. In general, if
+you are building on a Unix-ish platform that has the GnuTLS libraries and
+include files installed in the standard system locations, then the TigerVNC
+build system should detect the system version of GnuTLS automatically and link
+against it. However, this produces a version of TigerVNC that depends on the
+GnuTLS dynamic libraries, and thus the binaries are not portable.
+
+To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt
+support, it is necessary to link against the GnuTLS static library (as well
+as the static libraries of its dependencies.) If you are lucky enough, your
+O/S distribution may include pre-packaged versions of both the static and
+dynamic libraries for GnuTLS and its dependencies. Otherwise, it will probably
+be necessary to build GnuTLS, libgcrypt, libtasn1, and libgpg-error from
+source.
+
+You can manipulate the GNUTLS_CFLAGS and GNUTLS_LDFLAGS configure variables to
+accommodate a custom build of GnuTLS that is installed in a non-system
+directory. For instance, adding
+
+ GNUTLS_CFLAGS=-I/opt/gnutls/include \
+ GNUTLS_LDFLAGS='/opt/gnutls/lib/libgnutls.a /opt/gnutls/lib/libgcrypt.a \
+ /opt/gnutls/lib/libgpg-error.a /opt/gnutls/lib/libtasn1.a' \
+ --with-included-zlib
+
+to the configure or build-xorg command line will cause TigerVNC to be
+statically linked against a custom installation of GnuTLS that resides under
+/opt/gnutls. GnuTLS depends on zlib, so specifying --with-included-zlib will
+satisfy that depency using TigerVNC's in-source version of zlib, which
+eliminates another dynamic library dependency.
*******************************************************************************
C:\Program Files\Inno Setup 5) to the system or user PATH environment
variable prior to building TigerVNC.
+-- If building VeNCrypt support:
+ * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
+
==================
Out-of-Tree Builds
c:\Program Files\TigerVNC.
-=============
-Build Recipes
-=============
+=====================
+Windows Build Recipes
+=====================
64-bit MinGW Build on Cygwin
Create Macintosh package/disk image. This requires the PackageMaker
application, which must be installed in /Developer/Applications/Utilities.
-make udmg
-
- On 64-bit OS X (10.5 "Leopard") and later, this creates a version of the
- Macintosh package/disk image which contains universal i386/x86-64 binaries.
- The 32-bit fork of these binaries is backward compatible with OS X 10.4 and
- later (OS X 10.4 compatibility SDK required.) If building on OS X 10.6
- ("Snow Leopard") or later, the 64-bit fork can be made backward compatible
- with 10.5 by using the instructions in the "Build Recipes" section.
+make udmg [BUILDDIR32={32-bit build directory}]
+
+ On 64-bit OS X systems, this creates a version of the Macintosh package and
+ disk image which contains universal i386/x86-64 binaries. You should first
+ configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
+ out-of-tree build, then run 'make udmg' from the 64-bit build directory. The
+ build system will look for the 32-bit build under {source_directory}/osxx86
+ by default, but you can override this by setting the BUILDDIR32 variable on
+ the make command line as shown above. Either the 64-bit or 32-bit build can
+ be configured to be backward-compatible by using the instructions in the
+ "Unix Build Recipes" section.
Windows
+++ /dev/null
-#!/bin/sh
-
-set -u
-set -e
-trap onexit INT
-trap onexit TERM
-trap onexit EXIT
-
-TMPDIR=
-
-onexit()
-{
- if [ ! "$TMPDIR" = "" ]; then
- sudo rm -rf $TMPDIR
- fi
-}
-
-usage()
-{
- echo "$0 <package name> <version> <build> <source dir.> [universal]"
- exit 1
-}
-
-UNIVERSAL=0
-
-if [ $# -lt 4 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-BUILD=$3
-SRCDIR=$4
-if [ $# -gt 4 ]; then
- if [ "$5" = "universal" ]; then UNIVERSAL=1; fi
-fi
-PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-
-if [ -f $PACKAGE_NAME.dmg ]; then
- rm -f $PACKAGE_NAME.dmg
-fi
-
-umask 022
-TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
-PKGROOT=$TMPDIR/pkg/Package_Root
-mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin
-mkdir -p $PKGROOT/opt/$PACKAGE_NAME/man/man1
-
-install -m 755 unix/vncviewer/vncviewer $PKGROOT/opt/$PACKAGE_NAME/bin/
-
-if [ $UNIVERSAL = 1 ]; then
- if [ ! -d $SRCDIR/osxx86 ]; then
- mkdir -p $SRCDIR/osxx86
- fi
- pushd $SRCDIR/osxx86
- sh $SRCDIR/configure \
- CC=gcc-4.0 CXX=g++-4.0 \
- CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
- CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
- LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -m32'
- make
- popd
- lipo -create -arch i386 $SRCDIR/osxx86/unix/vncviewer/vncviewer -arch x86_64 \
- $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer \
- -output $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer
-fi
-
-mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME
-chmod 1775 $PKGROOT/Library
-chmod 775 $PKGROOT/Library/Documentation
-mkdir -p $TMPDIR/pkg/Resources
-
-(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $TMPDIR/pkg/Description.plist)
-(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist)
-(cat $SRCDIR/release/uninstall.sh.tmpl \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall)
-chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
-
-install -m 644 $SRCDIR/unix/vncviewer/vncviewer.man $PKGROOT/opt/$PACKAGE_NAME/man/man1/vncviewer.1
-install -m 644 $SRCDIR/LICENCE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/
-
-sudo chown -R root:admin $PKGROOT
-cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/
-
-mkdir $TMPDIR/dmg
-$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
- -f $PKGROOT -r $TMPDIR/pkg/Resources \
- -i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist
-install -m 644 $SRCDIR/release/uninstall.applescript $TMPDIR
-sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall.app" $TMPDIR/uninstall.applescript
-sudo chown -R $USER "$TMPDIR/dmg/Uninstall.app"
-hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
- -srcfolder "$TMPDIR/dmg" \
- $TMPDIR/$PACKAGE_NAME.dmg
-cp $TMPDIR/$PACKAGE_NAME.dmg .
-
-exit
--- /dev/null
+#!/bin/sh
+
+set -u
+set -e
+trap onexit INT
+trap onexit TERM
+trap onexit EXIT
+
+TMPDIR=
+
+onexit()
+{
+ if [ ! "$TMPDIR" = "" ]; then
+ sudo rm -rf $TMPDIR
+ fi
+}
+
+usage()
+{
+ echo "$0 [universal [32-bit build dir]]"
+ exit 1
+}
+
+UNIVERSAL=0
+
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+SRCDIR=@srcdir@
+BUILDDIR32=@srcdir@/osxx86
+if [ $# -gt 0 ]; then
+ if [ "$1" = "universal" ]; then
+ UNIVERSAL=1
+ if [ $# -gt 1 ]; then BUILDDIR32=$2; fi
+ fi
+fi
+PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+
+if [ -f $PACKAGE_NAME.dmg ]; then
+ rm -f $PACKAGE_NAME.dmg
+fi
+
+umask 022
+TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
+PKGROOT=$TMPDIR/pkg/Package_Root
+mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin
+mkdir -p $PKGROOT/opt/$PACKAGE_NAME/man/man1
+
+install -m 755 unix/vncviewer/vncviewer $PKGROOT/opt/$PACKAGE_NAME/bin/
+
+if [ $UNIVERSAL = 1 ]; then
+ if [ ! -d $BUILDDIR32 ]; then
+ echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIR32/Makefile ]; then
+ echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
+ exit 1
+ fi
+ pushd $BUILDDIR32
+ make
+ popd
+ lipo -create -arch i386 $BUILDDIR32/unix/vncviewer/vncviewer -arch x86_64 \
+ $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer \
+ -output $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer
+fi
+
+mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME
+chmod 1775 $PKGROOT/Library
+chmod 775 $PKGROOT/Library/Documentation
+mkdir -p $TMPDIR/pkg/Resources
+
+(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
+ | sed s/{__APPNAME}/$PACKAGE_NAME/g \
+ > $TMPDIR/pkg/Description.plist)
+(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
+ | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist)
+(cat $SRCDIR/release/uninstall.sh.tmpl \
+ | sed s/{__APPNAME}/$PACKAGE_NAME/g \
+ > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall)
+chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
+
+install -m 644 $SRCDIR/unix/vncviewer/vncviewer.man $PKGROOT/opt/$PACKAGE_NAME/man/man1/vncviewer.1
+install -m 644 $SRCDIR/LICENCE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/
+
+sudo chown -R root:admin $PKGROOT
+cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/
+
+mkdir $TMPDIR/dmg
+$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
+ -f $PKGROOT -r $TMPDIR/pkg/Resources \
+ -i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist
+install -m 644 $SRCDIR/release/uninstall.applescript $TMPDIR
+sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall.app" $TMPDIR/uninstall.applescript
+sudo chown -R $USER "$TMPDIR/dmg/Uninstall.app"
+hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
+ -srcfolder "$TMPDIR/dmg" \
+ $TMPDIR/$PACKAGE_NAME.dmg
+cp $TMPDIR/$PACKAGE_NAME.dmg .
+
+exit