Skip to content

Instantly share code, notes, and snippets.

@roubles
Last active May 28, 2022 00:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roubles/a1cbffbc2319c5123dd0c4efeae75da4 to your computer and use it in GitHub Desktop.
Save roubles/a1cbffbc2319c5123dd0c4efeae75da4 to your computer and use it in GitHub Desktop.
How to install Synergy on OS X Sierra (10.12)

Install homebrew

brew.sh

Install cmake and qt

$ brew install cmake qt

Install XCode

Clone the symless/synergy repo

$ git clone https://github.com/symless/synergy.git

Figure out SDK version

$ xcrun --show-sdk-version
10.12

Use this version to configure the compiler in the next step.

Export qt into PATH

$ export PATH=/usr/local/Cellar/qt/5.9.1/bin:$PATH

Note your PATH to qt will be different.

Configure compiler

$ cd synergy
$ ./hm.sh configure -g2 --mac-sdk 10.12 --mac-identity test

Issue number 1

Ran into this issue: https://github.com/symless/synergy/issues/5666

Build synergy

$ ./hm.sh build

Issue number 2

Ran into this issue: https://github.com/symless/synergy/issues/5719

Used a combination of this https://blog.update.sh/archives/category/os and the solution listed https://github.com/symless/synergy/issues/5719 to come with the following diffs

diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py
index f32ec483..1b3edf8a 100644
--- a/ext/toolchain/commands1.py
+++ b/ext/toolchain/commands1.py
@@ -779,7 +779,8 @@ class InternalCommands:
                                frameworkRootDir = "/Library/Frameworks"
                        else:
                                # TODO: auto-detect, qt can now be installed anywhere.
-                               frameworkRootDir = "/Developer/Qt5.2.1/5.2.1/clang_64/lib"
+                               #frameworkRootDir = "/Developer/Qt5.2.1/5.2.1/clang_64/lib"
+                                frameworkRootDir = "/usr/local/Cellar/qt/5.9.1/Frameworks"
 
                        target = bundleTargetDir + "/Contents/Frameworks"
 
@@ -788,7 +789,7 @@ class InternalCommands:
                                for dir in dirs:
                                        if dir.startswith("Qt"):
                                                shutil.copy(
-                                                       frameworkRootDir + "/" + dir + "/Contents/Info.plist",
+                                                       frameworkRootDir + "/" + dir + "/Resources/Info.plist",
                                                        target + "/" + dir + "/Resources/")
 
        def symlink(self, source, target):
@@ -823,7 +824,6 @@ class InternalCommands:
                                                if dir.startswith("Qt"):
                                                        self.try_chdir(target + "/" + dir +"/Versions")
                                                        self.symlink("5", "Current")
-                                                       self.move("../Resources", "5")
                                                        self.restore_chdir()
 
                                                        self.try_chdir(target + "/" + dir)

Apply diffs.

Re-Build synergy

$ ./hm.sh build

TADA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment