From 0ac3fd05631c612b651ba9010ea63ffaa115bd43 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 22 Dec 2014 20:52:11 -0600 Subject: [PATCH] Rename linux build directory from viewer-* to build-*. Also have mac use the unix run_build if not using Xcode --- indra/develop.py | 29 ++++++++++++++++++++--------- indra/newview/viewer_manifest.py | 11 ++++++----- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/indra/develop.py b/indra/develop.py index 462263ea0..a5d1dd9d0 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -280,14 +280,7 @@ class LinuxSetup(UnixSetup): return 'linux' def build_dirs(self): - if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'): - prefix = '../' - else: - prefix = '' - - platform_build = '%s-%s' % (self.platform(), self.build_type.lower()) - - return [prefix+'viewer-' + platform_build] + return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()] def cmake_commandline(self, src_dir, build_dir, opts, simple): args = dict( @@ -409,6 +402,12 @@ class DarwinSetup(UnixSetup): else: return UnixSetup.arch(self) + def build_dirs(self): + if(self.generator == 'Xcode'): + return PlatformSetup.build_dirs(self) + else: + return [PlatformSetup.build_dirs(self)[0]+'-'+self.build_type.lower()] + def cmake_commandline(self, src_dir, build_dir, opts, simple): args = dict( dir=src_dir, @@ -428,7 +427,7 @@ class DarwinSetup(UnixSetup): #if simple: # return 'cmake %(opts)s %(dir)r' % args return ('cmake -G %(generator)r ' - '%(type) ' + '%(type)s ' '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' '-DWORD_SIZE:STRING=%(word_size)s ' @@ -437,6 +436,18 @@ class DarwinSetup(UnixSetup): '%(opts)s %(dir)r' % args) def run_build(self, opts, targets): + if(self.generator != 'Xcode'): + if targets: + targets = ' '.join(targets) + else: + targets = 'all' + + for d in self.build_dirs(): + cmd = 'make -C %r %s %s' % (d, ' '.join(opts), targets) + print 'Running %r' % cmd + self.run(cmd) + return + cwd = getcwd() if targets: targets = ' '.join(['-target ' + repr(t) for t in targets]) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 61197aa4e..2c053c312 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -687,12 +687,13 @@ class DarwinManifest(ViewerManifest): if not os.path.exists (self.src_path_of(dmg_template)): dmg_template = os.path.join ('installers', 'darwin', 'release-dmg') - for s,d in {self.get_dst_prefix():app_name + ".app", - os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns", - os.path.join(dmg_template, "background.jpg"): "background.jpg", - os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items(): + + for s,d in {self.build_path_of(self.get_dst_prefix()):app_name + ".app", + self.src_path_of(os.path.join(dmg_template, "_VolumeIcon.icns")): ".VolumeIcon.icns", + self.src_path_of(os.path.join(dmg_template, "background.jpg")): "background.jpg", + self.src_path_of(os.path.join(dmg_template, "_DS_Store")): ".DS_Store"}.items(): print "Copying to dmg", s, d - self.copy_action(self.src_path_of(s), os.path.join(volpath, d)) + self.copy_action(s, os.path.join(volpath, d)) # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit) self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')