diff --git a/build/commands.py b/build/commands.py index 8389714f..1c667798 100644 --- a/build/commands.py +++ b/build/commands.py @@ -42,6 +42,7 @@ class InternalCommands: config_filename = '%s.cfg' % this_cmd qtpro_filename = 'qsynergy.pro' doxygen_filename = 'doxygen.cfg' + macPackageName = 'MacOSX-Universal' cmake_url = 'http://www.cmake.org/cmake/resources/software.html' @@ -164,7 +165,7 @@ class InternalCommands: # default is default for non-vs if target == '': target = 'debug' - cmake_args = ' -DCMAKE_BUILD_TYPE=' + target.capitalize() + cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize() # if not visual studio, use parent dir sourceDir = self.source_dir @@ -478,7 +479,27 @@ class InternalCommands: elif type == 'mac': if sys.platform == 'darwin': - self.dist_run('cpack -G PackageMaker', unixTarget) + # nb: disabling package maker, as it doesn't + # work too well (screws with permissions). + #self.dist_run('cpack -G PackageMaker', unixTarget) + + # nb: temporary fix (just distribute a zip) + bin = self.getBinDir(unixTarget) + version = self.getVersionFromCmake() + zipFile = (self.project + '-' + + version + '-' + + self.macPackageName + '.zip') + + zipCmd = ('zip ' + zipFile + ' ' + + 'synergyc synergys'); + + print 'Creating package: ' + zipCmd + self.try_chdir(self.getBinDir(unixTarget)) + err = os.system(zipCmd) + self.restore_chdir() + if err != 0: + raise Exception( + 'Zip failed, code: ' + err) else: package_unsupported = True @@ -596,13 +617,14 @@ class InternalCommands: platform = 'Windows-x86' elif type == 'mac': - ext = 'dmg' - platform = 'MacOSX-Universal' + #ext = 'dmg' + ext = 'zip' + platform = self.macPackageName if not platform: raise Exception('Unable to detect package platform.') - pattern = re.escape('synergy-') + '\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 = '' diff --git a/hm.py b/hm.py index b266c169..b50b60e7 100644 --- a/hm.py +++ b/hm.py @@ -46,7 +46,7 @@ build_options_long = ['debug', 'release'] cmd_opt_dict = { 'about' : ['', []], 'setup' : ['', []], - 'configure' : ['', []], + 'configure' : [build_options, build_options_long], 'build' : [build_options, build_options_long], 'clean' : [build_options, build_options_long], 'update' : ['', []],