Merge branch '1.6.3-stable'

This commit is contained in:
Nick Bolton 2015-03-21 23:51:27 +00:00
commit be06c198d4
2 changed files with 81 additions and 58 deletions

View File

@ -7,6 +7,14 @@ Enhancement #4397 - Modernize Mac build script (deployment and signing)
Enhancement #4398 - Remove obsolete Mac database cleaner Enhancement #4398 - Remove obsolete Mac database cleaner
Enhancement #4337 - Remove IStreamFilterFactory dead code Enhancement #4337 - Remove IStreamFilterFactory dead code
1.6.3
=====
Bug #4349 - Mouse click does not always bring window to front
Bug #4463 - Unidentified developer error on Mac OS X
Bug #4464 - Code signing verify failure not reported on Mac build
Bug #4465 - Binary (syntool) is not code signed on Windows
Enhancement #4455 - Replace version with branch name in package filename
1.6.2 1.6.2
===== =====
Bug #4227 - Helper tool crashes when service checks elevation state Bug #4227 - Helper tool crashes when service checks elevation state

View File

@ -677,74 +677,91 @@ class InternalCommands:
raise Exception('Build command not supported with generator: ' + generator) raise Exception('Build command not supported with generator: ' + generator)
def makeGui(self, targets, args=""): def makeGui(self, targets, args=""):
name = "Synergy.app" for target in targets:
self.try_chdir(self.getGenerator().binDir)
if os.path.exists(name): if sys.platform == 'win32':
print "removing exisiting bundle"
shutil.rmtree(name) gui_make_cmd = self.w32_make_cmd + ' ' + target + args
self.restore_chdir() print 'Make GUI command: ' + gui_make_cmd
if sys.platform == 'win32':
gui_make_cmd = self.w32_make_cmd
elif sys.platform in ['linux2', 'sunos5', 'freebsd7', 'darwin']:
gui_make_cmd = self.make_cmd + " -w"
else:
raise Exception('Unsupported platform: ' + sys.platform)
gui_make_cmd += args
print 'Make GUI command: ' + gui_make_cmd
if sys.platform == 'win32':
for target in targets:
self.try_chdir(self.gui_dir) self.try_chdir(self.gui_dir)
err = os.system(gui_make_cmd + ' ' + target) err = os.system(gui_make_cmd)
self.restore_chdir() self.restore_chdir()
if err != 0: if err != 0:
raise Exception(gui_make_cmd + ' failed with error: ' + str(err)) raise Exception(gui_make_cmd + ' failed with error: ' + str(err))
else:
self.try_chdir(self.gui_dir)
err = os.system(gui_make_cmd)
self.restore_chdir()
if err != 0: elif sys.platform in ['linux2', 'sunos5', 'freebsd7', 'darwin']:
raise Exception(gui_make_cmd + ' failed with error: ' + str(err))
if sys.platform == 'darwin' and not "clean" in args: gui_make_cmd = self.make_cmd + " -w" + args
for target in targets: print 'Make GUI command: ' + gui_make_cmd
self.macPostMake(target)
def macPostMake(self, target): # start with a clean app bundle
targetDir = self.getGenerator().getBinDir(target)
bundleTargetDir = targetDir + '/Synergy.app'
if os.path.exists(bundleTargetDir):
shutil.rmtree(bundleTargetDir)
dir = self.getGenerator().binDir binDir = self.getGenerator().binDir
bundleTempDir = binDir + '/Synergy.app'
if os.path.exists(bundleTempDir):
shutil.rmtree(bundleTempDir)
self.try_chdir(self.gui_dir)
err = os.system(gui_make_cmd)
self.restore_chdir()
if err != 0:
raise Exception(gui_make_cmd + ' failed with error: ' + str(err))
if sys.platform == 'darwin' and not "clean" in args:
self.macPostGuiMake(target)
else:
raise Exception('Unsupported platform: ' + sys.platform)
def macPostGuiMake(self, target):
bundle = 'Synergy.app'
binDir = self.getGenerator().binDir
targetDir = self.getGenerator().getBinDir(target)
bundleTempDir = binDir + '/' + bundle
bundleTargetDir = targetDir + '/' + bundle
if os.path.exists(bundleTempDir):
shutil.move(bundleTempDir, bundleTargetDir)
if self.enableMakeCore: if self.enableMakeCore:
# copy core binaries into the bundle, since the gui # copy core binaries into the bundle, since the gui
# now looks for the binaries in the current app dir. # now looks for the binaries in the current app dir.
targetDir = self.getGenerator().getBinDir(target) bundleBinDir = bundleTargetDir + "/Contents/MacOS/"
bundleBinDir = dir + "/Synergy.app/Contents/MacOS/"
shutil.copy(targetDir + "/synergyc", bundleBinDir) shutil.copy(targetDir + "/synergyc", bundleBinDir)
shutil.copy(targetDir + "/synergys", bundleBinDir) shutil.copy(targetDir + "/synergys", bundleBinDir)
shutil.copy(targetDir + "/syntool", bundleBinDir) shutil.copy(targetDir + "/syntool", bundleBinDir)
if self.enableMakeGui: self.loadConfig()
if not self.macIdentity:
raise Exception("run config with --mac-identity")
self.loadConfig() if sys.version_info < (2, 4):
if not self.macIdentity: raise Exception("Python 2.4 or greater required.")
raise Exception("run config with --mac-identity")
# use qt to copy libs to bundle so no dependencies are needed. do not create a (qMajor, qMinor, qRev) = self.getQmakeVersion()
# dmg at this point, since we need to sign it first, and then create our own if qMajor >= 5:
# after signing (so that qt does not affect the signed app bundle). output = commands.getstatusoutput(
bin = "macdeployqt Synergy.app -verbose=2 -codesign='" + self.macIdentity + "'" "macdeployqt %s/Synergy.app -verbose=2 -codesign='%s'" % (
self.try_chdir(dir) targetDir, self.macIdentity))
err = os.system(bin) else:
self.restore_chdir() # no code signing available in old versions
output = commands.getstatusoutput(
if err != 0: "macdeployqt %s/Synergy.app -verbose=2" % (
raise Exception(bin + " failed with error: " + str(err)) targetDir))
print output[1]
if "ERROR" in output[1]:
(qMajor, qMinor, qRev) = self.getQmakeVersion()
if qMajor >= 5:
# only listen to errors in qt 5+
raise Exception("macdeployqt failed")
def signmac(self): def signmac(self):
print "signmac is now obsolete" print "signmac is now obsolete"
@ -766,6 +783,7 @@ class InternalCommands:
self.signFile(pfx, pwd, 'bin/Release', 'synergyc.exe') self.signFile(pfx, pwd, 'bin/Release', 'synergyc.exe')
self.signFile(pfx, pwd, 'bin/Release', 'synergys.exe') self.signFile(pfx, pwd, 'bin/Release', 'synergys.exe')
self.signFile(pfx, pwd, 'bin/Release', 'synergyd.exe') self.signFile(pfx, pwd, 'bin/Release', 'synergyd.exe')
self.signFile(pfx, pwd, 'bin/Release', 'syntool.exe')
self.signFile(pfx, pwd, 'bin/Release', 'synwinhk.dll') self.signFile(pfx, pwd, 'bin/Release', 'synwinhk.dll')
def signFile(self, pfx, pwd, dir, file): def signFile(self, pfx, pwd, dir, file):
@ -1154,16 +1172,16 @@ class InternalCommands:
def distMac(self): def distMac(self):
self.loadConfig() self.loadConfig()
dir = self.getGenerator().binDir binDir = self.getGenerator().getBinDir('Release')
name = "Synergy" name = "Synergy"
dist = dir + "/" + name dist = binDir + "/" + name
# ensure dist dir is clean # ensure dist dir is clean
if os.path.exists(dist): if os.path.exists(dist):
shutil.rmtree(dist) shutil.rmtree(dist)
os.makedirs(dist) os.makedirs(dist)
shutil.move(dir + "/" + name + ".app", dist + "/" + name + ".app") shutil.move(binDir + "/" + name + ".app", dist + "/" + name + ".app")
self.try_chdir(dist) self.try_chdir(dist)
err = os.system("ln -s /Applications") err = os.system("ln -s /Applications")
@ -1176,7 +1194,7 @@ class InternalCommands:
cmd = "hdiutil create " + fileName + " -srcfolder ./" + name + "/ -ov" cmd = "hdiutil create " + fileName + " -srcfolder ./" + name + "/ -ov"
self.try_chdir(dir) self.try_chdir(binDir)
err = os.system(cmd) err = os.system(cmd)
self.restore_chdir() self.restore_chdir()
@ -1275,12 +1293,8 @@ class InternalCommands:
dest = self.dist_name_rev(type) dest = self.dist_name_rev(type)
print 'Uploading %s to FTP server %s...' % (dest, ftp.host) print 'Uploading %s to FTP server %s...' % (dest, ftp.host)
srcDir = 'bin/' binDir = self.getGenerator().getBinDir('Release')
generator = self.getGeneratorFromConfig().cmakeName ftp.run(binDir + '/' + src, dest)
#if not generator.startswith('Visual Studio'):
# srcDir += 'release/'
ftp.run(srcDir + src, dest)
print 'Done' print 'Done'
def getDebianArch(self): def getDebianArch(self):
@ -1347,8 +1361,9 @@ class InternalCommands:
pattern = re.escape(self.project + '-') + '\d+\.\d+\.\d+' + re.escape('-' + platform + '.' + ext) pattern = re.escape(self.project + '-') + '\d+\.\d+\.\d+' + re.escape('-' + platform + '.' + ext)
# only use release dir if not windows
target = '' target = ''
if type == 'mac':
target = 'Release'
for filename in os.listdir(self.getBinDir(target)): for filename in os.listdir(self.getBinDir(target)):
if re.search(pattern, filename): if re.search(pattern, filename):