Skip to content
Qi-rui Chen edited this page Sep 28, 2016 · 35 revisions

Table of Contents

Introduction

This guide is for Synergy version 1.3.5 and above. First you need to download the Source Code, then install the dependencies, and finally follow the compile instructions.

Dependencies

Windows x86

These are for Windows XP SP3 (the earliest Windows supported) and above.

You may need to add your Python install directory to the end of your PATH environment variable
(System --> Advanced System Settings --> Environment Variables)
so that hm can be called from the command prompt.

Using Python 3.x will result in syntax errors as print became a function rather than a statement: What's new in Python 3.0

Note: If you want to change the installed directory of Bonjour SDK, please double check the BONJOUR_SDK_HOME environment variable after installation.

Note: You may need to add your QT directory to your PATH environment variable, especially for the qmake and mingw32-make. make sure:

  • add X:\Qt\5.6\mingw49_32\bin;X:\Qt\Tools\mingw492_32\bin into the Path.
Note: You may need to set your QMAKESPEC environmental variable. the correct value for this is X:\Qt\5.6\mingw49_32\mkspecs\win32-g++

Windows 64-bit

Mac OS X

Mac OS X 10.10 and above

  • Install Homebrew
  • Install XCode (also available via the Mac App Store)
  • Install cmake and Qt using Homebrew
brew install cmake
brew install qt
  • Fix "./ext/toolchain/commands1.py"
    • In the function configureCore() at approx line 433, change:
      • elif sys.platform == "darwin": to read if sys.platform == "darwin":
    • In the function macPostGuiMake() at approx line 772 and 775 change the path of frameworkRootDir to be what your Qt library path is, something like:
      • frameworkRootDir = "/usr/local/Cellar/qt/4.8.7_2/Frameworks"
    • See this github issue for more information.
  • Now configure and build - if running El Capitan, change the mac-sdk parameter below from 10.10 to 10.11
./hm.sh conf -g2 --mac-sdk 10.10 --mac-identity test
./hm.sh build

Credits to this blog entry

Mac OS X 10.9 Mavericks

Install Command Line Tools In OSX 10.9 Mavericks

Mac OS X 10.4 through 10.8.x

  • XCode (with command line tools. Make sure to download the Xcode version for your OS X version, e.g Xcode 3.1.4 for 10.5)
  • Qt SDK 2010.03 (provides qmake)
To install the command line tools:
 Xcode --> Preferences --> Downloads and install ''Command Line Tools''.

If you are missing the /Developer directory, you may need to run (assuming the path is correct):

 mkdir /Developer
 cd /Developer
 ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Library
 ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/SDKs

Note: For Mac OS X 10.5 and above, Python should already be installed. Otherwise, visit the CMake and Python download pages.

Note: Upgrading Mac OS X may cause the command line tools and Qt libraries to be removed (even on minor upgrades), so you may have to reinstall both each time after doing this.

Using “brew” method

Brew for Mac OS X is an alternative to MacPorts and Fink.

 brew install cmake

Using “macports” method

If you already have [MacPorts], run:

 sudo port install cmake

Ubuntu 10.04 to 15.10

 sudo apt-get install cmake make g++ xorg-dev libqt4-dev libcurl4-openssl-dev libavahi-compat-libdnssd-dev libssl-dev libx11-dev

CentOS 6.5

 su
 yum install cmake make gcc-c++ libX11-devel libXext-devel libXi-devel libXtst-devel libXinerama-devel libcurl-devel qt-devel avahi-compat-libdns_sd-devel openssl-devel rpm-build rpmlint
 PATH="$PATH:/usr/lib64/qt4/bin:/usr/lib/qt4/bin"

Debian 7/8

  sudo apt-get install build-essential cmake libavahi-compat-libdnssd-dev libcurl4-openssl-dev libssl-dev lintian python qt4-dev-tools xorg-dev

Fedora 20

 sudo yum install cmake make gcc-c++ libX11-devel libXtst-devel libXext-devel libXinerama-devel libcurl-devel qt-devel avahi-compat-libdns_sd-devel openssl-devel rpm-build rpmlint
 PATH="$PATH:/usr/lib64/qt4/bin:/usr/lib/qt4/bin"

OpenSUSE 11.1

 su
 yast2 -i cmake python gcc-c++ xorg-x11-devel libcurl-devel (SSL dev package, not sure what it's called on SuSE)

Mandriva One 200

 su
 urpmi cmake python gcc-c++ make xorg-x11-dev libcurl-dev (SSL dev package, not sure what it's called on Mandriva)

OpenSolaris 2009.06

 su
 pkg install SUNWPython SUNWcmake SUNWgcc SUNWxorg-headers SUNWxwinc libcurl-devel

(libcurl-devel or SSL dev package, not sure what it's called on Solaris)

Unix or other Linux

  • CMake
  • Python
  • GNU Make
  • GCC (2.95 and up)
  • X11R4 and up (headers and libraries)
  • Xtst (e.g. libXtst-devel)
  • Qt 2010.03
  • libCURL
  • SSL dev package

Compile

Use the hm (or ./hm.sh) script located the root of our project directory. This is just a wrapper for cmake, so you don't need to use it, however we recommend you do. The conf command will generate the projects in the build directory (which can be opened manually and used for compiling).

Use the hm genlist command to see other generators. The -g1 argument (shown below) will cause the 1st CMake generator to be used. You may want to use other generators if you are building with Eclipse, for example.

With no extra arguments, release build will be compiled. If you need the debug version, use the -d argument.

Windows

 hm conf -g1
 hm build

Unix, Linux, Mac OS X

 ./hm.sh conf -g1 [-d] # Use -d to build a debug version.
 ./hm.sh build [-d]

Note: This project uses Qt4. If you have multiple versions of Qt installed, your system will default to the newest one. If that is Qt5, you can override this by specifying the env variable QT_SELECT=4, like so:

QT_SELECT=4 ./hm.sh conf -g1

After compiling, the binaries can be found in the bin directory in the root of the source tree (not in the build directory).

Building installers

Use the hm package [os] command to build installers. On Windows the WiX Toolset is required. Note: On Windows, when using Visual C++ 2010 Express, it does not provide the Merge Module needed for packaging.

Clone this wiki locally