From fed63422a6f521428a599f6a82afbff1e4949b44 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 23 Oct 2014 08:19:00 -0700 Subject: [PATCH 1/5] Fix typo causing 64-bit binaries to be excluded on OS X 10.6+. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5704eebe..3c24da84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,7 +168,7 @@ if (UNIX) # 10.4: Universal (32-bit Intel and PowerPC) set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "" FORCE) - else (DARWIN_VERSION LESS 10) + elseif (DARWIN_VERSION LESS 10) # 10.5: 32-bit Intel only set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "" FORCE) From 5b4e46f8ea4b882a2e0479720a769135804edcb4 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 23 Oct 2014 08:29:51 -0700 Subject: [PATCH 2/5] Fix Info.plist for Synergy GUI. This fixes the blurriness on Retina displays. --- src/gui/res/mac/Info.plist | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/res/mac/Info.plist b/src/gui/res/mac/Info.plist index 5635d68c..992df616 100644 --- a/src/gui/res/mac/Info.plist +++ b/src/gui/res/mac/Info.plist @@ -1,7 +1,11 @@ - - + + + CFBundleInfoDictionaryVersion + 6.0 + NSPrincipalClass + NSApplication CFBundleIconFile Synergy.icns CFBundlePackageType From 4f51d5fa50eb8391f03d0fd0111eea5603a7813e Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Fri, 24 Oct 2014 17:22:07 +0100 Subject: [PATCH 3/5] Used Mac Sdk from config to detect Mac version --- CMakeLists.txt | 20 ++++++++++---------- ext/toolchain/commands1.py | 6 ++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c24da84..97d9eae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,19 +161,19 @@ if (UNIX) endif() if (APPLE) - exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) - string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) - message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}") - if (DARWIN_VERSION LESS 9) - # 10.4: Universal (32-bit Intel and PowerPC) + message(STATUS "OSX_TARGET_MAJOR=${OSX_TARGET_MAJOR}") + message(STATUS "OSX_TARGET_MINOR=${OSX_TARGET_MINOR}") + + if (NOT (OSX_TARGET_MAJOR EQUAL 10)) + message(FATAL_ERROR "Mac OS X target must be 10.x") + endif () + + if (OSX_TARGET_MINOR LESS 6) + # <= 10.5: 32-bit Intel and PowerPC set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "" FORCE) - elseif (DARWIN_VERSION LESS 10) - # 10.5: 32-bit Intel only - set(CMAKE_OSX_ARCHITECTURES "i386" - CACHE STRING "" FORCE) else() - # 10.6+: Intel only + # >= 10.6: Intel only set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "" FORCE) endif() diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 5374bcd2..96484505 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -451,9 +451,15 @@ class InternalCommands: cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize() elif sys.platform == "darwin": + macSdkMatch = re.match("(\d+)\.(\d+)", self.macSdk) + if not macSdkMatch: + raise Exception("unknown osx version: " + self.macSdk) + sdkDir = self.getMacSdkDir() cmake_args += " -DCMAKE_OSX_SYSROOT=" + sdkDir cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + self.macSdk + cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1) + cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2) # if not visual studio, use parent dir sourceDir = generator.getSourceDir() From de683468746b5b3d569ad9ee37a5d29c535d559c Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Mon, 27 Oct 2014 11:58:25 +0000 Subject: [PATCH 4/5] Fixed hm config error --- src/cmd/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index 7cf8bf61..5e902ebf 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -25,7 +25,7 @@ if (WIN32) endif() if (APPLE) - if (DARWIN_VERSION GREATER 12) + if (OSX_TARGET_MINOR GREATER 8) add_subdirectory(synmacph) endif() endif() From 35e8c88887e9c8e35fadd81c9ae513ef49d873fe Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Mon, 27 Oct 2014 12:00:18 +0000 Subject: [PATCH 5/5] Updated ignored list on Mac --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 83ae6d2a..c7a96266 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ /src/gui/tmp /src/gui/ui_* src/gui/gui.pro.user +src/gui/.qmake.stash +config.h