added mac signing to toolchain, renamed windows signing command

This commit is contained in:
Nick Bolton 2012-07-29 17:19:11 +00:00
parent e7f5d0dbf3
commit 42419dc353
2 changed files with 29 additions and 12 deletions

3
hm.py
View File

@ -69,7 +69,8 @@ cmd_opt_dict = {
'open' : ['', []], 'open' : ['', []],
'genlist' : ['', []], 'genlist' : ['', []],
'reset' : ['', []], 'reset' : ['', []],
'sign' : ['', ['pfx=', 'pwd=', 'dist']] 'signwin' : ['', ['pfx=', 'pwd=', 'dist']],
'signmac' : ['', []]
} }
# aliases to valid commands # aliases to valid commands

View File

@ -347,7 +347,13 @@ class InternalCommands:
if self.enable_make_gui: if self.enable_make_gui:
self.make_gui(targets) self.make_gui(targets)
def sign(self, pfx, pwdFile, dist): def signmac(self):
self.try_chdir("bin")
err = os.system(
'codesign -fs "Developer ID Application: Nick Bolton" Synergy.app')
self.restore_chdir()
def signwin(self, pfx, pwdFile, dist):
generator = self.getGeneratorFromConfig().cmakeName generator = self.getGeneratorFromConfig().cmakeName
if not generator.startswith('Visual Studio'): if not generator.startswith('Visual Studio'):
raise Exception('only windows is supported') raise Exception('only windows is supported')
@ -948,12 +954,19 @@ class InternalCommands:
raise Exception("User does not have correct setup version.") raise Exception("User does not have correct setup version.")
def get_generators(self): def get_generators(self):
if sys.platform == 'win32': if sys.platform == 'win32':
return self.win32_generators return self.win32_generators
elif sys.platform in ['linux2', 'sunos5', 'freebsd7', 'aix5']: elif sys.platform in ['linux2', 'sunos5', 'freebsd7', 'aix5']:
return self.unix_generators return self.unix_generators
elif sys.platform == 'darwin': elif sys.platform == 'darwin':
return self.darwin_generators return self.darwin_generators
else: else:
raise Exception('Unsupported platform: ' + sys.platform) raise Exception('Unsupported platform: ' + sys.platform)
@ -1280,7 +1293,7 @@ class CommandHandler:
def reset(self): def reset(self):
self.ic.reset() self.ic.reset()
def sign(self): def signwin(self):
pfx = None pfx = None
pwd = None pwd = None
dist = False dist = False
@ -1291,4 +1304,7 @@ class CommandHandler:
pwd = a pwd = a
elif o == '--dist': elif o == '--dist':
dist = True dist = True
self.ic.sign(pfx, pwd, dist) self.ic.signwin(pfx, pwd, dist)
def signmac(self):
self.ic.signmac()