Skip to content
Snippets Groups Projects
Commit 79919ef9 authored by Oz Linden's avatar Oz Linden
Browse files

move setting default grid to settings_install.xml so that it works on all platforms

parent 6d6b0edf
No related branches found
No related tags found
No related merge requests found
......@@ -113,10 +113,8 @@ def get_default_platform(dummy):
default="Release"),
dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE),
dict(name='grid',
description="""Which grid the client will try to connect to. Even
though it's not strictly a grid, 'firstlook' is also an acceptable
value for this parameter.""",
default=""),
description="""Which grid the client will try to connect to.""",
default=None),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
default='CHANNEL UNSET'),
......@@ -217,9 +215,9 @@ def main():
print "Unable to read versionfile '%s'" % args['versionfile']
raise
# default and agni are default
if args['grid'] in ['default', 'agni']:
args['grid'] = ''
# unspecified, default, and agni are default
if args['grid'] in ['', 'default', 'agni']:
args['grid'] = None
if 'actions' in args:
args['actions'] = args['actions'].split()
......@@ -356,8 +354,6 @@ def __init__(self, args):
self.created_paths = []
self.package_name = "Unknown"
def default_grid(self):
return self.args.get('grid', None) == ''
def default_channel(self):
return self.args.get('channel', None) == RELEASE_CHANNEL
......
......@@ -72,16 +72,8 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru"
LangString LanguageCode ${LANG_TURKISH} "tr"
LangString LanguageCode ${LANG_TRADCHINESE} "zh"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
;; For example:
;; !define INSTFLAGS "%(flags)s"
;; !define INSTNAME "SecondLife%(grid_caps)s"
;; !define SHORTCUT "Second Life (%(grid_caps)s)"
;; !define URLNAME "secondlife%(grid)s"
;; !define UNINSTALL_SETTINGS 1
%%GRID_VARS%%
;; this placeholder is replaced by viewer_manifest.py
%%INST_VARS%%
Name ${INSTNAME}
......
......@@ -112,6 +112,10 @@ def construct(self):
Persist=1,
Type='String',
Value=''),
CmdLineGridChoice=dict(Comment='Default grid',
Persist=0,
Type='String',
Value=''),
CmdLineChannel=dict(Comment='Command line specified channel name',
Persist=0,
Type='String',
......@@ -123,11 +127,15 @@ def construct(self):
print "Set sourceid in settings_install.xml to '%s'" % self.args['sourceid']
if 'channel_suffix' in self.args and self.args['channel_suffix']:
print "DEBUG CmdLineChannel channel_suffix '%s'" % self.args['channel_suffix']
settings_install['CmdLineChannel'] = settings_template['CmdLineChannel'].copy()
settings_install['CmdLineChannel']['Value'] = self.channel_with_pkg_suffix()
print "Set CmdLineChannel in settings_install.xml to '%s'" % self.channel_with_pkg_suffix()
if 'grid' in self.args and self.args['grid']:
settings_install['CmdLineGridChoice'] = settings_template['CmdLineGridChoice'].copy()
settings_install['CmdLineGridChoice']['Value'] = self.grid()
print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid()
# did we actually copy anything into settings_install dict?
if settings_install:
# put_in_file(src=) need not be an actual pathname; it
......@@ -264,31 +272,6 @@ def app_name_oneword(self):
def icon_path(self):
return "icons/" + self.channel_type()
def flags_list(self):
""" Convenience function that returns the command-line flags
for the grid"""
# 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:
contrib_file = open(src,'r')
......@@ -616,9 +599,8 @@ def package_finish(self):
else:
substitution_strings['caption'] = self.app_name() + ' ${VERSION}'
grid_vars_template = """
inst_vars_template = """
OutFile "%(installer_file)s"
!define INSTFLAGS "%(flags)s"
!define INSTNAME "%(app_name_oneword)s"
!define SHORTCUT "%(app_name)s"
!define URLNAME "secondlife"
......@@ -631,7 +613,7 @@ def package_finish(self):
self.replace_in("installers/windows/installer_template.nsi", tempfile, {
"%%VERSION%%":version_vars,
"%%SOURCE%%":self.get_src_prefix(),
"%%GRID_VARS%%":grid_vars_template % substitution_strings,
"%%INST_VARS%%":inst_vars_template % substitution_strings,
"%%INSTALL_FILES%%":self.nsi_file_commands(True),
"%%DELETE_FILES%%":self.nsi_file_commands(False)})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment