summaryrefslogtreecommitdiff
path: root/indra/newview/viewer_manifest.py
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/viewer_manifest.py')
-rwxr-xr-xindra/newview/viewer_manifest.py99
1 files changed, 58 insertions, 41 deletions
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 5e08e54b7c..19863dd845 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -34,9 +34,15 @@ import tarfile
import time
import random
viewer_dir = os.path.dirname(__file__)
-# add llmanifest library to our path so we don't have to muck with PYTHONPATH
-sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
-from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
+# Add indra/lib/python to our path so we don't have to muck with PYTHONPATH.
+# Put it FIRST because some of our build hosts have an ancient install of
+# indra.util.llmanifest under their system Python!
+sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
+from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
+try:
+ from llbase import llsd
+except ImportError:
+ from indra.base import llsd
class ViewerManifest(LLManifest):
def is_packaging_viewer(self):
@@ -65,13 +71,13 @@ class ViewerManifest(LLManifest):
# include the entire shaders directory recursively
self.path("shaders")
# include the extracted list of contributors
- contributor_names = self.extract_names("../../doc/contributions.txt")
- self.put_in_file(contributor_names, "contributors.txt")
- self.file_list.append(["../../doc/contributions.txt",self.dst_path_of("contributors.txt")])
+ contributions_path = "../../doc/contributions.txt"
+ contributor_names = self.extract_names(contributions_path)
+ self.put_in_file(contributor_names, "contributors.txt", src=contributions_path)
# include the extracted list of translators
- translator_names = self.extract_names("../../doc/translations.txt")
- self.put_in_file(translator_names, "translators.txt")
- self.file_list.append(["../../doc/translations.txt",self.dst_path_of("translators.txt")])
+ translations_path = "../../doc/translations.txt"
+ translator_names = self.extract_names(translations_path)
+ self.put_in_file(translator_names, "translators.txt", src=translations_path)
# include the list of Lindens (if any)
# see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
linden_names_path = os.getenv("LINDEN_CREDITS")
@@ -85,10 +91,9 @@ class ViewerManifest(LLManifest):
else:
# all names should be one line, but the join below also converts to a string
linden_names = ', '.join(linden_file.readlines())
- self.put_in_file(linden_names, "lindens.txt")
+ self.put_in_file(linden_names, "lindens.txt", src=linden_names_path)
linden_file.close()
print "Linden names extracted from '%s'" % linden_names_path
- self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")])
# ... and the entire windlight directory
self.path("windlight")
@@ -99,6 +104,27 @@ 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.
+ try:
+ sourceid = os.environ["sourceid"]
+ except KeyError:
+ # no sourceid, no settings_install.xml file
+ pass
+ else:
+ if 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=sourceid))
+ # 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" % (sourceid, settings_install)
+
self.end_prefix("app_settings")
if self.prefix(src="character"):
@@ -196,24 +222,26 @@ class ViewerManifest(LLManifest):
""" Convenience function that returns the command-line flags
for the grid"""
- # Set command line flags relating to the target grid
- grid_flags = ''
- if not self.default_grid():
- grid_flags = "--grid %(grid)s "\
- "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
- {'grid':self.grid()}
-
- # Deal with settings
- setting_flags = ''
- if not self.default_channel() or not self.default_grid():
- if self.default_grid():
- setting_flags = '--settings settings_%s.xml'\
- % self.channel_lowerword()
- else:
- setting_flags = '--settings settings_%s_%s.xml'\
- % (self.grid(), self.channel_lowerword())
-
- return " ".join((grid_flags, setting_flags)).strip()
+ # The original role of this method seems to have been to build a
+ # grid-specific viewer: one that would, on launch, preselect a
+ # particular grid. (Apparently that dates back to when the protocol
+ # between viewer and simulator required them to be updated in
+ # lockstep, so that "the beta grid" required "a beta viewer.") But
+ # those viewer command-line switches no longer work without tweaking
+ # user_settings/grids.xml. In fact, going forward, it's unclear what
+ # use case that would address.
+
+ # This method also set a channel-specific (or grid-and-channel-
+ # specific) user_settings/settings_something.xml file. It has become
+ # clear that saving user settings in a channel-specific file causes
+ # more problems (confusion) than it solves, so we've discontinued that.
+
+ # In fact we now avoid forcing viewer command-line switches at all,
+ # instead introducing a settings_install.xml file. Command-line
+ # switches don't aggregate well; for instance the generated --channel
+ # switch actually prevented the user specifying --channel on the
+ # command line. Settings files have well-defined override semantics.
+ return None
def extract_names(self,src):
try:
@@ -530,8 +558,7 @@ class WindowsManifest(ViewerManifest):
'final_exe' : self.final_exe(),
'grid':self.args['grid'],
'grid_caps':self.args['grid'].upper(),
- # escape quotes becase NSIS doesn't handle them well
- 'flags':self.flags_list().replace('"', '$\\"'),
+ 'flags':'',
'channel':self.channel(),
'channel_oneword':self.channel_oneword(),
'channel_unique':self.channel_unique(),
@@ -759,9 +786,6 @@ class DarwinManifest(ViewerManifest):
self.end_prefix("llplugin")
- # command line arguments for connecting to the proper grid
- self.put_in_file(self.flags_list(), 'arguments.txt')
-
self.end_prefix("Resources")
self.end_prefix("Contents")
@@ -807,10 +831,6 @@ class DarwinManifest(ViewerManifest):
'bundle': self.get_dst_prefix()
})
- channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own
- if not self.default_channel():
- channel_standin = self.channel()
-
imagename="SecondLife_" + '_'.join(self.args['version'])
# MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
@@ -928,9 +948,6 @@ class LinuxManifest(ViewerManifest):
self.path("install.sh")
self.end_prefix("linux_tools")
- # Create an appropriate gridargs.dat for this package, denoting required grid.
- self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
-
if self.prefix(src="", dst="bin"):
self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")