summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-09-24 10:10:03 -0400
committerOz Linden <oz@lindenlab.com>2013-09-24 10:10:03 -0400
commitbd18f3c097304504c398df02613229a64f7eac81 (patch)
tree6ddee118196870f4aedb392681a90f2808e493ab
parent25e7f5ded1d6cd5f7e136c6023136dfc35b0e118 (diff)
parent6c13c4dd552a05cf055a90bdd90937de9f3903a5 (diff)
merge more changes for CHOP-985
-rwxr-xr-xindra/newview/viewer_manifest.py41
1 files changed, 29 insertions, 12 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index effe3994a3..894e368427 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -104,20 +104,37 @@ class ViewerManifest(LLManifest):
self.path("dictionaries")
self.end_prefix(pkgdir)
- # CHOP-955: If we have "sourceid" in the build process
- # environment, generate it into settings_install.xml.
- if self.args['sourceid']:
- # Single-entry subset of the LLSD content of settings.xml
- content = dict(sourceid=dict(Comment='Identify referring agency to Linden web servers',
- Persist=1,
- Type='String',
- Value=self.args['sourceid']))
+ # CHOP-955: If we have "sourceid" or "viewer_channel" in the
+ # build process environment, generate it into
+ # settings_install.xml.
+ settings_template = dict(
+ sourceid=dict(Comment='Identify referring agency to Linden web servers',
+ Persist=1,
+ Type='String',
+ Value=''),
+ CmdLineChannel=dict(Comment='Command line specified channel name',
+ Persist=0,
+ Type='String',
+ Value=''))
+ settings_install = {}
+ for key, setting in (("sourceid", "sourceid"),
+ ("channel", "CmdLineChannel")):
+ if key in self.args:
+ # only set if value is non-empty
+ if self.args[key]:
+ # copy corresponding setting from settings_template
+ settings_install[setting] = settings_template[setting].copy()
+ # then fill in Value
+ settings_install[setting]["Value"] = self.args[key]
+ print "Put %s '%s' in settings_install.xml" % (setting, self.args[key])
+
+ # did we actually copy anything into settings_install dict?
+ if settings_install:
# put_in_file(src=) need not be an actual pathname; it
# only needs to be non-empty
- settings_install = self.put_in_file(llsd.format_pretty_xml(content),
- "settings_install.xml",
- src="environment")
- print "Put sourceid '%s' in %s" % (self.args['sourceid'], settings_install)
+ self.put_in_file(llsd.format_pretty_xml(settings_install),
+ "settings_install.xml",
+ src="environment")
self.end_prefix("app_settings")