fixed dist command to work with code signing (using hdiutil instead of qt's -dmg)
This commit is contained in:
parent
8c018b5f19
commit
ed2360f1b2
|
@ -477,6 +477,17 @@ class InternalCommands:
|
||||||
shutil.copy(dir + "/synergys",
|
shutil.copy(dir + "/synergys",
|
||||||
dir + "/Synergy.app/Contents/MacOS/")
|
dir + "/Synergy.app/Contents/MacOS/")
|
||||||
|
|
||||||
|
# use qt to copy libs to bundle so no dependencies are needed. do not create a
|
||||||
|
# dmg at this point, since we need to sign it first, and then create our own
|
||||||
|
# after signing (so that qt does not affect the signed app bundle).
|
||||||
|
bin = "macdeployqt Synergy.app -verbose=2"
|
||||||
|
self.try_chdir(dir)
|
||||||
|
err = os.system(bin)
|
||||||
|
self.restore_chdir()
|
||||||
|
|
||||||
|
if err != 0:
|
||||||
|
raise Exception(bin + " failed with error: " + str(err))
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
generator = self.getGeneratorFromConfig().cmakeName
|
generator = self.getGeneratorFromConfig().cmakeName
|
||||||
if generator.startswith('Visual Studio'):
|
if generator.startswith('Visual Studio'):
|
||||||
|
@ -577,7 +588,7 @@ class InternalCommands:
|
||||||
|
|
||||||
elif type == 'mac':
|
elif type == 'mac':
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
self.distMac(unixTarget)
|
self.distMac()
|
||||||
else:
|
else:
|
||||||
package_unsupported = True
|
package_unsupported = True
|
||||||
|
|
||||||
|
@ -625,26 +636,27 @@ class InternalCommands:
|
||||||
if err != 0:
|
if err != 0:
|
||||||
raise Exception('Package failed: ' + str(err))
|
raise Exception('Package failed: ' + str(err))
|
||||||
|
|
||||||
def distMac(self, unixTarget):
|
def distMac(self):
|
||||||
|
|
||||||
dir = self.getGenerator().binDir
|
dir = self.getGenerator().binDir
|
||||||
|
dist = dir + "/dist"
|
||||||
|
|
||||||
# use qt to copy libs to bundle so no dependencies are needed,
|
# ensure dist dir is clean
|
||||||
# and create dmg for easy download.
|
if os.path.exists(dist):
|
||||||
bin = "macdeployqt Synergy.app -dmg -verbose=2"
|
os.rmdir(dist)
|
||||||
self.try_chdir(dir)
|
|
||||||
err = os.system(bin)
|
|
||||||
self.restore_chdir()
|
|
||||||
|
|
||||||
if err != 0:
|
os.makedirs(dist)
|
||||||
raise Exception(bin + " failed with error: " + str(err))
|
shutil.copytree(dir + "/Synergy.app", dist + "/Synergy.app")
|
||||||
|
|
||||||
fileName = "%s-%s-%s.dmg" % (
|
fileName = "%s-%s-%s.dmg" % (
|
||||||
self.project,
|
self.project,
|
||||||
self.getVersionFromCmake(),
|
self.getVersionFromCmake(),
|
||||||
self.getMacPackageName())
|
self.getMacPackageName())
|
||||||
|
|
||||||
shutil.move(dir + "/Synergy.dmg", dir + "/" + fileName)
|
cmd = "hdiutil create " + fileName + " -srcfolder ./dist/ -ov"
|
||||||
|
|
||||||
|
self.try_chdir(dir)
|
||||||
|
err = os.system(cmd)
|
||||||
|
self.restore_chdir()
|
||||||
|
|
||||||
def distNsis(self, vcRedistDir, qtDir):
|
def distNsis(self, vcRedistDir, qtDir):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue