diff options
| author | JJ Linden <jj@lindenlab.com> | 2013-09-23 13:26:24 -0700 | 
|---|---|---|
| committer | JJ Linden <jj@lindenlab.com> | 2013-09-23 13:26:24 -0700 | 
| commit | 6c13c4dd552a05cf055a90bdd90937de9f3903a5 (patch) | |
| tree | 16100beb01938857d1745dc5391bbfd3afb5eca5 | |
| parent | bcff609fb839dc576c7e4f7529e1c751847ffd32 (diff) | |
made change to include channel name in the settings_install.xml file generated. changed so that sourceid is not part of a list of options pulled into that file, along with the channel
| -rwxr-xr-x | indra/newview/viewer_manifest.py | 41 | 
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") | 
