fixed: mac post make always runs even if gui not built
This commit is contained in:
parent
ce8630a5c6
commit
5bb7a9fc7c
|
@ -445,9 +445,9 @@ class InternalCommands:
|
||||||
|
|
||||||
if sys.platform == 'darwin' and not "clean" in args:
|
if sys.platform == 'darwin' and not "clean" in args:
|
||||||
for target in targets:
|
for target in targets:
|
||||||
self.macPostMakeGui(target)
|
self.macPostMake(target)
|
||||||
|
|
||||||
def macPostMakeGui(self, target):
|
def macPostMake(self, target):
|
||||||
|
|
||||||
dir = self.getGenerator().binDir
|
dir = self.getGenerator().binDir
|
||||||
|
|
||||||
|
@ -461,32 +461,33 @@ class InternalCommands:
|
||||||
shutil.copy(targetDir + "/synergys", bundleBinDir)
|
shutil.copy(targetDir + "/synergys", bundleBinDir)
|
||||||
shutil.copy(targetDir + "/syntool", bundleBinDir)
|
shutil.copy(targetDir + "/syntool", bundleBinDir)
|
||||||
|
|
||||||
# use qt to copy libs to bundle so no dependencies are needed. do not create a
|
if self.enableMakeGui:
|
||||||
# dmg at this point, since we need to sign it first, and then create our own
|
# use qt to copy libs to bundle so no dependencies are needed. do not create a
|
||||||
# after signing (so that qt does not affect the signed app bundle).
|
# dmg at this point, since we need to sign it first, and then create our own
|
||||||
bin = "macdeployqt Synergy.app -verbose=2"
|
# after signing (so that qt does not affect the signed app bundle).
|
||||||
self.try_chdir(dir)
|
bin = "macdeployqt Synergy.app -verbose=2"
|
||||||
err = os.system(bin)
|
self.try_chdir(dir)
|
||||||
self.restore_chdir()
|
err = os.system(bin)
|
||||||
|
self.restore_chdir()
|
||||||
|
|
||||||
if err != 0:
|
if err != 0:
|
||||||
raise Exception(bin + " failed with error: " + str(err))
|
raise Exception(bin + " failed with error: " + str(err))
|
||||||
|
|
||||||
(qMajor, qMinor, qRev) = self.getQmakeVersion()
|
(qMajor, qMinor, qRev) = self.getQmakeVersion()
|
||||||
if qMajor <= 4:
|
if qMajor <= 4:
|
||||||
frameworkRootDir = "/Library/Frameworks"
|
frameworkRootDir = "/Library/Frameworks"
|
||||||
else:
|
else:
|
||||||
# TODO: auto-detect, qt can now be installed anywhere.
|
# 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"
|
||||||
|
|
||||||
# copy the missing Info.plist files for the frameworks.
|
# copy the missing Info.plist files for the frameworks.
|
||||||
target = dir + "/Synergy.app/Contents/Frameworks"
|
target = dir + "/Synergy.app/Contents/Frameworks"
|
||||||
for root, dirs, files in os.walk(target):
|
for root, dirs, files in os.walk(target):
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
if dir.startswith("Qt"):
|
if dir.startswith("Qt"):
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
frameworkRootDir + "/" + dir + "/Contents/Info.plist",
|
frameworkRootDir + "/" + dir + "/Contents/Info.plist",
|
||||||
target + "/" + dir + "/Resources/")
|
target + "/" + dir + "/Resources/")
|
||||||
|
|
||||||
def signmac(self, identity):
|
def signmac(self, identity):
|
||||||
self.try_chdir("bin")
|
self.try_chdir("bin")
|
||||||
|
|
Loading…
Reference in New Issue