From fd9abce229a5a00e792ca9674da8afd8649bf919 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 28 Jan 2014 11:33:54 +0000 Subject: [PATCH] added applications shortcut to dmg, prevented synergy from opening in /Volumes/, attempted fix for os x 10.8 would show assistive devices warning even if enabled. --- src/gui/src/main.cpp | 15 ++++++++++++++- tools/build/toolchain.py | 8 ++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/gui/src/main.cpp b/src/gui/src/main.cpp index 0cab4a9a..8247e8f7 100644 --- a/src/gui/src/main.cpp +++ b/src/gui/src/main.cpp @@ -56,6 +56,14 @@ int main(int argc, char* argv[]) QSynergyApplication app(argc, argv); #if defined(Q_OS_MAC) + + if (app.applicationDirPath().startsWith("/Volumes/")) { + QMessageBox::information( + NULL, "Synergy", + "Please drag Synergy to the Applications folder, and open it from there."); + return 1; + } + if (!checkMacAssistiveDevices()) { return 1; @@ -139,7 +147,12 @@ bool checkMacAssistiveDevices() // now deprecated in mavericks. bool result = AXAPIEnabled(); - QMessageBox::information(NULL, "Synergy", "Please enable access to assistive devices (System Preferences), then re-open Synergy."); + if (!result) { + QMessageBox::information( + NULL, "Synergy", + "Please enable access to assistive devices " + "(System Preferences), then re-open Synergy."); + } return result; #endif diff --git a/tools/build/toolchain.py b/tools/build/toolchain.py index 14b596c8..e0a2f731 100644 --- a/tools/build/toolchain.py +++ b/tools/build/toolchain.py @@ -662,11 +662,15 @@ class InternalCommands: # ensure dist dir is clean if os.path.exists(dist): - os.rmdir(dist) + shutil.rmtree(dist) os.makedirs(dist) shutil.copytree(dir + "/" + name + ".app", dist + "/" + name + ".app") - + + self.try_chdir(dist) + err = os.system("ln -s /Applications") + self.restore_chdir() + fileName = "%s-%s-%s.dmg" % ( self.project, self.getVersionFromCmake(),