ms-windowsWindows Build Environment

dependenciesExternal Dependencies

You will need to install the following components which are bundled in the installer:
  • Python: the programming language used by this software (version 2.6 and 2.7 are supported)

    (you may encounter errors in Cython.distutils.extension, in which case just delete the offending comment block)

  • Xming: the X server
  • Putty: the SSH client
  • GStreamer: the library used for network sound, install both the runtime and the SDK

Also, to generate the installer you will need:

GTKGTK & PyGTK

There are many ways of installing all the required components, here are the most popular ones:

All-in-one Installer

The easiest way is to install the all-in-one PyGTK package from ftp.gnome.org.

Downloading Individual Packages

The individual packages required for GTK can be downloaded from gtk.org, you will need cairo, gobject, pango, atk, glib and pygtk as well as their dependencies: image libraries (jpeg, tiff, png, svg...), compression libraries (zlib, bzip2, ..), etc..
You will also need to download and install svg support separately and update the gdk pixbuf loader cache: uncompress the svg related libraries, place the loaders in the gdk-pixbuf directory then run:

C:\GTK\bin\gdk-pixbuf-query-loaders.exe > C:\GTK\lib\gtk-pixbuf-2.0\2.10.0\z\loaders\loaders.cache

To simplify things somewhat, you can start with the all-in-one GTK runtime installer from gtk.org, or one of our pre-assembled all-in-one archives which you can find here. Then install PyGTK on top of that..

All the PyGTK components can be found in the win32 binaries section of ftp.gnome.org:

(always use the latest version)

pythonPython Extras

Most of the following python libraries must be installed using setuptools, so install that first. If you can find a binary installer for the libraries matching your version of Python, feel free to use that instead.
You will also need to install Microsoft Visual Studio, failure to do so will lead to this error: unable to find vcvarsall bat. Note: you will need to use the same version that was used to compile the version of Python you have installed (python 2.6 and 2.7 were compiled using Visual Studio 2008). Do not use MinGW unless your version of python was also built with it.


Then install the following extras using a command line similar to:
C:\Python27\Scripts\easy_install.exe -Z extrapackagename
  • pyasn1: ASN1 library used by Twisted Conch SSH
  • pycrypto: provides encryption for many other components
  • zope.interface: required by Twisted
  • Twisted: the networking library. You can use one of the installers from the download page or build from source if no installer is available for your desired version of Python and Twisted
  • netifaces: to list the network interfaces
  • pillow: Python Imaging Library fork
  • PyOpenGL and numpy if building Xpra with OpenGL support.
  • lz4: faster than zlib for packet compression
  • Cython: used for building some Xpra components
The following python libraries and tools need to be installed separately, installers are provided:
  • pywin32: which provides access to Windows specific API from python
  • python wmi: which provides access to the Windows Management Instrumentation API
  • py2exe: to generate the Windows executable
(if you encounter errors using py2exe due to missing packages, you may want to make sure that you used the -Z flag with setuptools, or unzip the eggs by hand)

xpraXpra Extras

Xpra also needs webp, x264 and vpx library support for best performance:
  • webp: Note: versions 0.2.1 onwards require you to build the DLLs from the source with Visual Studio, please refer to the webp build documentation for details - something like:
    nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=static OBJDIR=output
    and then you must copy the resulting binary directory from "libwebp-0.4.1\output\release-dynamic\x86\*" to "C:\libwebp-windows-x86\" which is where the build expects to find the files (..)
  • VPX: download the 1.1.0 source from code.google.com/p/webm and uncompress into C:\vpx-vp8, then build it with:
    ./configure --enable-vp8 --enable-runtime-cpu-detect --enable-realtime-only
    make && make install
    			

    (if you get a failure to strip libgtest.a, you can just copy and optionally strip the file by hand)
    (if you want the newer {{{libvpx-1.2}}}, please see here)

  • ffmpeg (swscale):
    wget https://ffmpeg.org/releases/ffmpeg-2.1.4.tar.bz2
    tar jxvf ffmpeg-2.1.4.tar.bz2
    cd ffmpeg-2.1.4
    ./configure \
    	--cpu=i686 --enable-runtime-cpudetect \
    	--enable-static --enable-shared --enable-gpl \
    	--enable-memalign-hack \
    	--enable-swscale \
    	--enable-libx264 --enable-decoder=h264 \
    	--enable-libvpx --enable-decoder=vp8 --enable-decoder=vp9 \
    	--enable-decoder=hevc
        --prefix=/c/ffmpeg-win32-bin
  • x264:
    wget http://download.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2
    tar -jxf last_stable_x264.tar.bz2
    cd x264-snapshot-*-stable
    ./configure --enable-shared --enable-static
    make && make install

setup-installerGenerating the installer

The win32\MAKE-INSTALLER.BAT script will build everything and package it up in a self-contained setup executable.

(You must adjust the file locations at the top of the file to match your own environment)