-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling
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.
These are for Windows XP SP3 (the earliest Windows supported) and above.
- Visual Studio 2010
- Qt 5.6
- CMake 2.8
- Python 2.x
- Wix v3.8
- Bonjour SDK for Windows
- Command line git in your PATH.
(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.
QMAKESPEC
environmental variable. the correct value for this is X:\Qt\5.6\mingw49_32\mkspecs\win32-g++
- All dependencies required for Windows x86
- 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 readif sys.platform == "darwin":
-
- In the function
macPostGuiMake()
at approx line 772 and 775 change the path offrameworkRootDir
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.
- In the function
- Now configure and build - if running El Capitan, change the mac-sdk parameter below from
10.10
to10.11
./hm.sh conf -g2 --mac-sdk 10.10 --mac-identity test
./hm.sh build
Credits to this blog entry
Install Command Line Tools In OSX 10.9 Mavericks
- 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)
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.
Brew for Mac OS X is an alternative to MacPorts and Fink.
brew install cmake
If you already have [MacPorts], run:
sudo port install cmake
sudo apt-get install cmake make g++ xorg-dev libqt4-dev libcurl4-openssl-dev libavahi-compat-libdnssd-dev libssl-dev libx11-dev
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"
sudo apt-get install build-essential cmake libavahi-compat-libdnssd-dev libcurl4-openssl-dev libssl-dev lintian python qt4-dev-tools xorg-dev
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"
su yast2 -i cmake python gcc-c++ xorg-x11-devel libcurl-devel (SSL dev package, not sure what it's called on SuSE)
su urpmi cmake python gcc-c++ make xorg-x11-dev libcurl-dev (SSL dev package, not sure what it's called on Mandriva)
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)
- 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
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.
hm conf -g1 hm build
./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).
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.