From bcff609fb839dc576c7e4f7529e1c751847ffd32 Mon Sep 17 00:00:00 2001 From: JJ Linden Date: Mon, 16 Sep 2013 12:58:40 -0700 Subject: changes for additional packages to be packaged from the same build. see BuildParams for example environment variables used to specify the packages and their channels and sourceids. also updated mac packages to use a larger virtual drive and auto-open on download --- indra/lib/python/indra/util/llmanifest.py | 87 ++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 54049b5545..52b4acbc94 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -224,15 +224,98 @@ def main(): for opt in args: print "Option:", opt, "=", args[opt] + # pass in sourceid as an argument now instead of an environment variable + try: + args['sourceid'] = os.environ["sourceid"] + except KeyError: + args['sourceid'] = "" + + # Build base package. + touch = args.get('touch') + if touch: + print 'Creating base package' + args['package_id'] = "" # base package has no package ID wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args) wm.do(*args['actions']) - + # Store package file for later if making touched file. + base_package_file = "" + if touch: + print 'Created base package ', wm.package_file + base_package_file = "" + wm.package_file + + # handle multiple packages if set + try: + additional_packages = os.environ["additional_packages"] + except KeyError: + additional_packages = "" + if additional_packages: + # Determine destination prefix / suffix for additional packages. + base_dest_postfix = args['dest'] + base_dest_prefix = "" + base_dest_parts = args['dest'].split(os.sep) + if len(base_dest_parts) > 1: + base_dest_postfix = base_dest_parts[len(base_dest_parts) - 1] + base_dest_prefix = base_dest_parts[0] + i = 1 + while i < len(base_dest_parts) - 1: + base_dest_prefix = base_dest_prefix + os.sep + base_dest_parts[i] + i = i + 1 + # Determine touched prefix / suffix for additional packages. + base_touch_postfix = "" + base_touch_prefix = "" + if touch: + base_touch_postfix = touch + base_touch_parts = touch.split('/') + if "arwin" in args['platform']: + if len(base_touch_parts) > 1: + base_touch_postfix = base_touch_parts[len(base_touch_parts) - 1] + base_touch_prefix = base_touch_parts[0] + i = 1 + while i < len(base_touch_parts) - 1: + base_touch_prefix = base_touch_prefix + '/' + base_touch_parts[i] + i = i + 1 + else: + if len(base_touch_parts) > 2: + base_touch_postfix = base_touch_parts[len(base_touch_parts) - 2] + '/' + base_touch_parts[len(base_touch_parts) - 1] + base_touch_prefix = base_touch_parts[0] + i = 1 + while i < len(base_touch_parts) - 2: + base_touch_prefix = base_touch_prefix + '/' + base_touch_parts[i] + i = i + 1 + # Store base channel name. + base_channel_name = args['channel'] + # Build each additional package. + package_id_list = additional_packages.split(" ") + for package_id in package_id_list: + try: + args['package_id'] = package_id + args['channel'] = base_channel_name + os.environ[package_id + "_viewer_channel_suffix"] + if package_id + "_sourceid" in os.environ: + args['sourceid'] = os.environ[package_id + "_sourceid"] + else: + args['sourceid'] = "" + args['dest'] = base_dest_prefix + os.sep + package_id + os.sep + base_dest_postfix + except KeyError: + sys.stderr.write("Failed to create package for package_id: %s" % package_id) + sys.stderr.flush() + continue + if touch: + print 'Creating additional package for ', package_id, ' in ', args['dest'] + wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args) + wm.do(*args['actions']) + if touch: + print 'Created additional package ', wm.package_file, ' for ', package_id + faketouch = base_touch_prefix + '/' + package_id + '/' + base_touch_postfix + fp = open(faketouch, 'w') + fp.write('set package_file=%s\n' % wm.package_file) + fp.close() + # Write out the package file in this format, so that it can easily be called # and used in a .bat file - yeah, it sucks, but this is the simplest... touch = args.get('touch') if touch: fp = open(touch, 'w') - fp.write('set package_file=%s\n' % wm.package_file) + fp.write('set package_file=%s\n' % base_package_file) fp.close() print 'touched', touch return 0 -- cgit v1.2.3 From 6d6b0edfe2aea7890cb33614723b9842e700cfa8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sun, 24 Nov 2013 13:16:36 -0500 Subject: normalize format of and add arch to all installer names --- indra/lib/python/indra/util/llmanifest.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 52b4acbc94..d9f877e07f 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -85,7 +85,8 @@ def get_default_platform(dummy): }[sys.platform] DEFAULT_SRCTREE = os.path.dirname(sys.argv[0]) -RELEASE_CHANNEL = 'Second Life Release' +CHANNEL_VENDOR_BASE = 'Second Life' +RELEASE_CHANNEL = CHANNEL_VENDOR_BASE + ' Release' ARGUMENTS=[ dict(name='actions', @@ -119,6 +120,9 @@ ARGUMENTS=[ dict(name='channel', description="""The channel to use for updates, packaging, settings name, etc.""", default='CHANNEL UNSET'), + dict(name='channel_suffix', + description="""Addition to the channel for packaging and channel value, but not application name (used internally)""", + default=None), 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.""", @@ -286,21 +290,24 @@ def main(): base_channel_name = args['channel'] # Build each additional package. package_id_list = additional_packages.split(" ") + args['channel'] = base_channel_name for package_id in package_id_list: try: - args['package_id'] = package_id - args['channel'] = base_channel_name + os.environ[package_id + "_viewer_channel_suffix"] + if package_id + "_viewer_channel_suffix" in os.environ: + args['channel_suffix'] = os.environ[package_id + "_viewer_channel_suffix"] + else: + args['channel_suffix'] = None if package_id + "_sourceid" in os.environ: args['sourceid'] = os.environ[package_id + "_sourceid"] else: - args['sourceid'] = "" + args['sourceid'] = None args['dest'] = base_dest_prefix + os.sep + package_id + os.sep + base_dest_postfix except KeyError: sys.stderr.write("Failed to create package for package_id: %s" % package_id) sys.stderr.flush() continue if touch: - print 'Creating additional package for ', package_id, ' in ', args['dest'] + print 'Creating additional package for "', package_id, '" in ', args['dest'] wm = LLManifest.for_platform(args['platform'], args.get('arch'))(args) wm.do(*args['actions']) if touch: @@ -332,7 +339,7 @@ class LLManifest(object): manifests = {} def for_platform(self, platform, arch = None): if arch: - platform = platform + '_' + arch + platform = platform + '_' + arch + '_' return self.manifests[platform.lower()] for_platform = classmethod(for_platform) -- cgit v1.2.3 From 79919ef9b6b9e9ede1580ae69231affee3f42ff8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sun, 24 Nov 2013 13:18:12 -0500 Subject: move setting default grid to settings_install.xml so that it works on all platforms --- indra/lib/python/indra/util/llmanifest.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index d9f877e07f..1d85aa2978 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -113,10 +113,8 @@ ARGUMENTS=[ 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 @@ class LLManifest(object): 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 -- cgit v1.2.3