Sandbox - dagelf/synergy-core GitHub Wiki
Before building you will need to install the dependencies. To build, 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).
This guide is for Synergy version 1.3.5 and above. First you need to download the Source Code. To compile 1.3.4 and below, please refer to the legacy compile guide on the old website. Automake will no longer be used, which means, but you can still use the GNU style ./configure; make
command sequence (the configure
script just calls cmake). CMake is *not* a replacement for make
or Visual Studio; it doesn't compile source code, but it does generate project files (like Makefile, Visual Studio, and Xcode) much like the configure
command.
The -g1
argument (shown below) will cause the 1st CMake generator to be used; use the hm genlist
command to see other generators. You may want to do this if you are building with Eclipse, for example.
With no extra arguments, release build will be compiled. If you need the debug release, 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]
After compiling the executables can be found in the bin
directory in the root of the source tree (not in the build directory).
After configuring, if you want to build without using the hm
script.
cd build/release # or build/debug if you configured with -d make
- Open the
build
directory. - Double click:
synergy.sln
- Click
Build
from the menu, then clickBuild Solution
.
Run:
./hm.sh conf -g2
to create synergy.xcodeproj
, then:
- Open the
build
directory. - Double click:
synergy.xcodeproj
- Click
Build
from the menu, then clickBuild
.
Windows users can download a free version of Visual C++ Express 2008, which can open the Visual Studio 2008 files generated by CMake. Other supported project types are Code::Blocks, Eclipse CDT, and MinGW
For Mac OS X users, although Xcode isn't necessary for compiling on Mac OS X (you can just use Unix Makefiles), it is a neat IDE and very widely used (and it's free). There others, such as Code::Blocks and Eclipse CDT which (apparently) work on Mac OS X.
Use the hm package
command to build installers. Of course you can only build those that are applicable for your platform.
- Visual C++ Express 2008 (or VC++ 6.0 and above)
- CMake
- Python
- Qt SDK 2010.02 (provides qmake and MinGW used for building the GUI. Note: use the MinGW version provided with Qt as a mismatch can cause random crashes)
- Wix v3.8 (for building the windows installer, since Synergy version 1.4.17)
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
- All dependencies required for Windows x86
- Visual Studio 2008 (x64) *SP1* or Visual Studio 2005 (x64) *SP1*
- 64-bit compiler extensions installed (you may need to re-run Visual Studio setup)
- Install cmake and Qt as usual (e.g. using brew):
brew install cmake brew install qt
- Fix
./ext/toolchain/commands1.py
:
elif sys.platform == "darwin":
to read if sys.platform == "darwin":
In the function macPostGuiMake(), at approx line 770 and/or 773 change the path to be what your Qt library path is, probably,
frameworkRootDir = "/usr/local/Cellar/qt/4.8.7/Frameworks"
See this github issue for more information.
- Now configure and build:
./hm.sh conf -g1 --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)
- Qt SDK 2010.03 (provides qmake)
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
sudo apt-get install cmake make g++ xorg-dev libqt4-dev libcurl4-openssl-dev libavahi-compat-libdnssd-dev libssl-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 PATH="$PATH:/usr/lib64/qt4/bin:/usr/lib/qt4/bin"
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 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 (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