summaryrefslogtreecommitdiff
path: root/indra/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'indra/lib/python')
-rw-r--r--indra/lib/python/indra/util/llmanifest.py48
1 files changed, 13 insertions, 35 deletions
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 97cc31bba0..9cb830a2db 100644
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -84,30 +84,8 @@ def get_default_platform(dummy):
'darwin':'darwin'
}[sys.platform]
-def get_default_version(srctree):
- # look up llversion.h and parse out the version info
- paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
- for p in paths:
- if os.path.exists(p):
- contents = open(p, 'r').read()
- major = re.search("LL_VERSION_MAJOR\s=\s([0-9]+)", contents).group(1)
- minor = re.search("LL_VERSION_MINOR\s=\s([0-9]+)", contents).group(1)
- patch = re.search("LL_VERSION_PATCH\s=\s([0-9]+)", contents).group(1)
- build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1)
- return major, minor, patch, build
-
-def get_channel(srctree):
- # look up llversionserver.h and parse out the version info
- paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
- for p in paths:
- if os.path.exists(p):
- contents = open(p, 'r').read()
- channel = re.search("LL_CHANNEL\s=\s\"(.+)\";\s*$", contents, flags = re.M).group(1)
- return channel
-
-
DEFAULT_SRCTREE = os.path.dirname(sys.argv[0])
-DEFAULT_CHANNEL = 'Second Life Release'
+RELEASE_CHANNEL = 'Second Life Release'
ARGUMENTS=[
dict(name='actions',
@@ -140,10 +118,7 @@ ARGUMENTS=[
default=""),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
- default=get_channel),
- dict(name='login_channel',
- description="""The channel to use for login handshake/updates only.""",
- default=None),
+ default='CHANNEL UNSET'),
dict(name='installer_name',
description=""" The name of the file that the installer should be
packaged up into. Only used on Linux at the moment.""",
@@ -164,10 +139,8 @@ ARGUMENTS=[
contain the name of the final package in a form suitable
for use by a .bat file.""",
default=None),
- dict(name='version',
- description="""This specifies the version of Second Life that is
- being packaged up.""",
- default=get_default_version),
+ dict(name='versionfile',
+ description="""The name of a file containing the full version number."""),
dict(name='signature',
description="""This specifies an identity to sign the viewer with, if any.
If no value is supplied, the default signature will be used, if any. Currently
@@ -232,9 +205,14 @@ def main():
args[arg['name']] = default
# fix up version
- if isinstance(args.get('version'), str):
- args['version'] = args['version'].split('.')
-
+ if isinstance(args.get('versionfile'), str):
+ try: # read in the version string
+ vf = open(args['versionfile'], 'r')
+ args['version'] = vf.read().strip().split('.')
+ except:
+ print "Unable to read versionfile '%s'" % args['versionfile']
+ raise
+
# default and agni are default
if args['grid'] in ['default', 'agni']:
args['grid'] = ''
@@ -291,7 +269,7 @@ class LLManifest(object):
def default_grid(self):
return self.args.get('grid', None) == ''
def default_channel(self):
- return self.args.get('channel', None) == DEFAULT_CHANNEL
+ return self.args.get('channel', None) == RELEASE_CHANNEL
def construct(self):
""" Meant to be overriden by LLManifest implementors with code that