From 9bced5eac4d1928f87fdc70a51e0eb76109b52ed Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 19 Sep 2008 16:51:37 -0500 Subject: VWR-2865: New SConstruct flag to (not) make tarball after compiling. For convenience until we switch to CMake. --- linden/indra/SConstruct | 4 ++++ linden/indra/newview/viewer_manifest.py | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 9353317..5ca22e6 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -100,6 +100,7 @@ opts.AddOptions( BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), BoolOption('RUNTESTS', 'Run tests at end of compilation', True), + BoolOption('MAKE_PACKAGE', 'Create a package (tarball) after compiling "releasefordownload".', True), BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line ) optenv = Environment(options = opts) @@ -120,6 +121,7 @@ runtests = optenv['RUNTESTS'] opensource = standalone or optenv['OPENSOURCE'] enable_fmod = not opensource and optenv['FMOD'] elfio = optenv['ELFIO'] +make_package = optenv['MAKE_PACKAGE'] targets = [ target_param ] @@ -717,6 +719,8 @@ for build_target in targets: 'arch':arch} if login_channel: cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) + if not make_package: + cmd += ' --actions="copy"' env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) Depends('newview/' + package_name, output_bin + '-stripped') Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 27c12dd..ae25745 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -483,11 +483,14 @@ class LinuxManifest(ViewerManifest): find %(dst)s -type f -perm 0400 | xargs chmod 0444; true""" % {'dst':self.get_dst_prefix() }) - # temporarily move directory tree so that it has the right name in the tarfile - self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) - # --numeric-owner hides the username of the builder for security etc. - self.run_command('tar -C %(dir)s --numeric-owner -cjf %(inst_path)s.tar.bz2 %(inst_name)s' % {'dir':self.get_src_prefix(), 'inst_name': installer_name, 'inst_path':self.src_path_of(installer_name)}) - self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + if("package" in self.args['actions'] or + "unpacked" in self.args['actions']): + # temporarily move directory tree so that it has the right name in the tarfile + self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + # --numeric-owner hides the username of the builder for security etc. + self.run_command('tar -C %(dir)s --numeric-owner -cjf %(inst_path)s.tar.bz2 %(inst_name)s' % {'dir':self.get_src_prefix(), 'inst_name': installer_name, 'inst_path':self.src_path_of(installer_name)}) + self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + class Linux_i686Manifest(LinuxManifest): def construct(self): -- cgit v1.1