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.

This commit is contained in:
Nick Bolton 2014-01-28 11:33:54 +00:00
parent f050f04014
commit fd9abce229
2 changed files with 20 additions and 3 deletions

View File

@ -56,6 +56,14 @@ int main(int argc, char* argv[])
QSynergyApplication app(argc, argv); QSynergyApplication app(argc, argv);
#if defined(Q_OS_MAC) #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()) if (!checkMacAssistiveDevices())
{ {
return 1; return 1;
@ -139,7 +147,12 @@ bool checkMacAssistiveDevices()
// now deprecated in mavericks. // now deprecated in mavericks.
bool result = AXAPIEnabled(); 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; return result;
#endif #endif

View File

@ -662,11 +662,15 @@ class InternalCommands:
# ensure dist dir is clean # ensure dist dir is clean
if os.path.exists(dist): if os.path.exists(dist):
os.rmdir(dist) shutil.rmtree(dist)
os.makedirs(dist) os.makedirs(dist)
shutil.copytree(dir + "/" + name + ".app", dist + "/" + name + ".app") 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" % ( fileName = "%s-%s-%s.dmg" % (
self.project, self.project,
self.getVersionFromCmake(), self.getVersionFromCmake(),