diff options
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/SConstruct | 24 | ||||
-rwxr-xr-x | linden/indra/newview/viewer_manifest.py | 13 |
2 files changed, 26 insertions, 11 deletions
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 9353317..0f9f237 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct | |||
@@ -100,6 +100,8 @@ opts.AddOptions( | |||
100 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), | 100 | BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), |
101 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), | 101 | BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), |
102 | BoolOption('RUNTESTS', 'Run tests at end of compilation', True), | 102 | BoolOption('RUNTESTS', 'Run tests at end of compilation', True), |
103 | BoolOption('MAKE_PACKAGE', 'Create a package (tarball) after compiling "releasefordownload".', True), | ||
104 | PathOption('BUILD_DIR', 'Specify full path to build directory. If omitted, use default build directory.', '', PathOption.PathAccept), | ||
103 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line | 105 | BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line |
104 | ) | 106 | ) |
105 | optenv = Environment(options = opts) | 107 | optenv = Environment(options = opts) |
@@ -120,6 +122,7 @@ runtests = optenv['RUNTESTS'] | |||
120 | opensource = standalone or optenv['OPENSOURCE'] | 122 | opensource = standalone or optenv['OPENSOURCE'] |
121 | enable_fmod = not opensource and optenv['FMOD'] | 123 | enable_fmod = not opensource and optenv['FMOD'] |
122 | elfio = optenv['ELFIO'] | 124 | elfio = optenv['ELFIO'] |
125 | make_package = optenv['MAKE_PACKAGE'] | ||
123 | 126 | ||
124 | targets = [ target_param ] | 127 | targets = [ target_param ] |
125 | 128 | ||
@@ -205,12 +208,19 @@ for build_target in targets: | |||
205 | system_lib_dir += '/lib_release' | 208 | system_lib_dir += '/lib_release' |
206 | lib_dir = './lib_release_' + build_target + '/' + system_str | 209 | lib_dir = './lib_release_' + build_target + '/' + system_str |
207 | 210 | ||
208 | try: | 211 | |
209 | build_dir_prefix = os.environ['TEMP_BUILD_DIR'] | 212 | build_dir = optenv['BUILD_DIR'] |
210 | except: | 213 | if build_dir != '': |
211 | build_dir_prefix = '/tmp/' + os.environ['USER'] | 214 | # Validate directory, and create if needed. |
212 | 215 | # This is a hack to get around SCons' inflexibility. | |
213 | build_dir = build_dir_prefix + os.getcwd() + '/' + system_str + '-' + build_target + '-' + buildtype | 216 | PathOption.PathIsDirCreate("BUILD_DIR", build_dir, optenv) |
217 | else: | ||
218 | try: | ||
219 | build_dir_prefix = os.environ['TEMP_BUILD_DIR'] | ||
220 | except: | ||
221 | build_dir_prefix = '/tmp/' + os.environ['USER'] + os.getcwd() + '/' | ||
222 | |||
223 | build_dir = build_dir_prefix + system_str + '-' + build_target + '-' + buildtype | ||
214 | 224 | ||
215 | ### Base include directories ### | 225 | ### Base include directories ### |
216 | 226 | ||
@@ -717,6 +727,8 @@ for build_target in targets: | |||
717 | 'arch':arch} | 727 | 'arch':arch} |
718 | if login_channel: | 728 | if login_channel: |
719 | cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) | 729 | cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) |
730 | if not make_package: | ||
731 | cmd += ' --actions="copy"' | ||
720 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) | 732 | env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) |
721 | Depends('newview/' + package_name, output_bin + '-stripped') | 733 | Depends('newview/' + package_name, output_bin + '-stripped') |
722 | Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') | 734 | 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): | |||
483 | find %(dst)s -type f -perm 0400 | xargs chmod 0444; | 483 | find %(dst)s -type f -perm 0400 | xargs chmod 0444; |
484 | true""" % {'dst':self.get_dst_prefix() }) | 484 | true""" % {'dst':self.get_dst_prefix() }) |
485 | 485 | ||
486 | # temporarily move directory tree so that it has the right name in the tarfile | 486 | if("package" in self.args['actions'] or |
487 | self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) | 487 | "unpacked" in self.args['actions']): |
488 | # --numeric-owner hides the username of the builder for security etc. | 488 | # temporarily move directory tree so that it has the right name in the tarfile |
489 | 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)}) | 489 | self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) |
490 | self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) | 490 | # --numeric-owner hides the username of the builder for security etc. |
491 | 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)}) | ||
492 | self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) | ||
493 | |||
491 | 494 | ||
492 | class Linux_i686Manifest(LinuxManifest): | 495 | class Linux_i686Manifest(LinuxManifest): |
493 | def construct(self): | 496 | def construct(self): |