From d7e90f4160aaa81e30206c80047b82833c049482 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 7 Feb 2013 11:56:57 -0500 Subject: derive version number from indra/VIEWER_VERSION.txt --- indra/lib/python/indra/util/llmanifest.py | 41 +++++++++---------------------- 1 file changed, 11 insertions(+), 30 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 97cc31bba0..eaa94925b1 100644 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -84,28 +84,6 @@ 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' @@ -140,7 +118,7 @@ ARGUMENTS=[ default=""), dict(name='channel', description="""The channel to use for updates, packaging, settings name, etc.""", - default=get_channel), + default='CHANNEL UNSET'), dict(name='login_channel', description="""The channel to use for login handshake/updates only.""", default=None), @@ -164,10 +142,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 +208,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'] = '' -- cgit v1.2.3 From 5ea68c69a443fb9364c6e86ec373d3bd57382da7 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 12 Feb 2013 10:50:47 -0500 Subject: convert to new channel name scheme and remove login_channel build time parameter --- indra/lib/python/indra/util/llmanifest.py | 5 +---- 1 file changed, 1 insertion(+), 4 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 eaa94925b1..25a1b95b9a 100644 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -85,7 +85,7 @@ def get_default_platform(dummy): }[sys.platform] DEFAULT_SRCTREE = os.path.dirname(sys.argv[0]) -DEFAULT_CHANNEL = 'Second Life Release' +DEFAULT_CHANNEL = 'Second Life Test' ARGUMENTS=[ dict(name='actions', @@ -119,9 +119,6 @@ ARGUMENTS=[ dict(name='channel', description="""The channel to use for updates, packaging, settings name, etc.""", default='CHANNEL UNSET'), - dict(name='login_channel', - description="""The channel to use for login handshake/updates only.""", - 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.""", -- cgit v1.2.3 From 237a48721d9df6a8bbf8a3255bb80f348eb2322e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 15 Feb 2013 09:29:09 -0500 Subject: clarify windows installer name --- indra/lib/python/indra/util/llmanifest.py | 4 ++-- 1 file changed, 2 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 25a1b95b9a..9cb830a2db 100644 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -85,7 +85,7 @@ def get_default_platform(dummy): }[sys.platform] DEFAULT_SRCTREE = os.path.dirname(sys.argv[0]) -DEFAULT_CHANNEL = 'Second Life Test' +RELEASE_CHANNEL = 'Second Life Release' ARGUMENTS=[ dict(name='actions', @@ -269,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 -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/lib/python/indra/__init__.py | 0 indra/lib/python/indra/base/__init__.py | 0 indra/lib/python/indra/base/cllsd_test.py | 0 indra/lib/python/indra/base/config.py | 0 indra/lib/python/indra/base/llsd.py | 0 indra/lib/python/indra/base/lluuid.py | 0 indra/lib/python/indra/base/metrics.py | 0 indra/lib/python/indra/ipc/__init__.py | 0 indra/lib/python/indra/ipc/compatibility.py | 0 indra/lib/python/indra/ipc/httputil.py | 0 indra/lib/python/indra/ipc/llmessage.py | 0 indra/lib/python/indra/ipc/llsdhttp.py | 0 indra/lib/python/indra/ipc/mysql_pool.py | 0 indra/lib/python/indra/ipc/russ.py | 0 indra/lib/python/indra/ipc/servicebuilder.py | 0 indra/lib/python/indra/ipc/siesta.py | 0 indra/lib/python/indra/ipc/siesta_test.py | 0 indra/lib/python/indra/ipc/tokenstream.py | 0 indra/lib/python/indra/ipc/webdav.py | 0 indra/lib/python/indra/ipc/xml_rpc.py | 0 indra/lib/python/indra/util/__init__.py | 0 indra/lib/python/indra/util/fastest_elementtree.py | 0 indra/lib/python/indra/util/helpformatter.py | 0 indra/lib/python/indra/util/iterators.py | 0 indra/lib/python/indra/util/llmanifest.py | 0 indra/lib/python/indra/util/llsubprocess.py | 0 indra/lib/python/indra/util/llversion.py | 0 indra/lib/python/indra/util/named_query.py | 0 indra/lib/python/indra/util/shutil2.py | 0 indra/lib/python/indra/util/term.py | 0 indra/lib/python/indra/util/test_win32_manifest.py | 0 indra/lib/python/uuid.py | 0 32 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/lib/python/indra/__init__.py mode change 100644 => 100755 indra/lib/python/indra/base/__init__.py mode change 100644 => 100755 indra/lib/python/indra/base/cllsd_test.py mode change 100644 => 100755 indra/lib/python/indra/base/config.py mode change 100644 => 100755 indra/lib/python/indra/base/llsd.py mode change 100644 => 100755 indra/lib/python/indra/base/lluuid.py mode change 100644 => 100755 indra/lib/python/indra/base/metrics.py mode change 100644 => 100755 indra/lib/python/indra/ipc/__init__.py mode change 100644 => 100755 indra/lib/python/indra/ipc/compatibility.py mode change 100644 => 100755 indra/lib/python/indra/ipc/httputil.py mode change 100644 => 100755 indra/lib/python/indra/ipc/llmessage.py mode change 100644 => 100755 indra/lib/python/indra/ipc/llsdhttp.py mode change 100644 => 100755 indra/lib/python/indra/ipc/mysql_pool.py mode change 100644 => 100755 indra/lib/python/indra/ipc/russ.py mode change 100644 => 100755 indra/lib/python/indra/ipc/servicebuilder.py mode change 100644 => 100755 indra/lib/python/indra/ipc/siesta.py mode change 100644 => 100755 indra/lib/python/indra/ipc/siesta_test.py mode change 100644 => 100755 indra/lib/python/indra/ipc/tokenstream.py mode change 100644 => 100755 indra/lib/python/indra/ipc/webdav.py mode change 100644 => 100755 indra/lib/python/indra/ipc/xml_rpc.py mode change 100644 => 100755 indra/lib/python/indra/util/__init__.py mode change 100644 => 100755 indra/lib/python/indra/util/fastest_elementtree.py mode change 100644 => 100755 indra/lib/python/indra/util/helpformatter.py mode change 100644 => 100755 indra/lib/python/indra/util/iterators.py mode change 100644 => 100755 indra/lib/python/indra/util/llmanifest.py mode change 100644 => 100755 indra/lib/python/indra/util/llsubprocess.py mode change 100644 => 100755 indra/lib/python/indra/util/llversion.py mode change 100644 => 100755 indra/lib/python/indra/util/named_query.py mode change 100644 => 100755 indra/lib/python/indra/util/shutil2.py mode change 100644 => 100755 indra/lib/python/indra/util/term.py mode change 100644 => 100755 indra/lib/python/indra/util/test_win32_manifest.py mode change 100644 => 100755 indra/lib/python/uuid.py (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/__init__.py b/indra/lib/python/indra/__init__.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/__init__.py b/indra/lib/python/indra/base/__init__.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/cllsd_test.py b/indra/lib/python/indra/base/cllsd_test.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/config.py b/indra/lib/python/indra/base/config.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/llsd.py b/indra/lib/python/indra/base/llsd.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/lluuid.py b/indra/lib/python/indra/base/lluuid.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/base/metrics.py b/indra/lib/python/indra/base/metrics.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/__init__.py b/indra/lib/python/indra/ipc/__init__.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/compatibility.py b/indra/lib/python/indra/ipc/compatibility.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/httputil.py b/indra/lib/python/indra/ipc/httputil.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/llmessage.py b/indra/lib/python/indra/ipc/llmessage.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/llsdhttp.py b/indra/lib/python/indra/ipc/llsdhttp.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/mysql_pool.py b/indra/lib/python/indra/ipc/mysql_pool.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/russ.py b/indra/lib/python/indra/ipc/russ.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/servicebuilder.py b/indra/lib/python/indra/ipc/servicebuilder.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/siesta.py b/indra/lib/python/indra/ipc/siesta.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/siesta_test.py b/indra/lib/python/indra/ipc/siesta_test.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/tokenstream.py b/indra/lib/python/indra/ipc/tokenstream.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/webdav.py b/indra/lib/python/indra/ipc/webdav.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/ipc/xml_rpc.py b/indra/lib/python/indra/ipc/xml_rpc.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/__init__.py b/indra/lib/python/indra/util/__init__.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/fastest_elementtree.py b/indra/lib/python/indra/util/fastest_elementtree.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/helpformatter.py b/indra/lib/python/indra/util/helpformatter.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/iterators.py b/indra/lib/python/indra/util/iterators.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/llsubprocess.py b/indra/lib/python/indra/util/llsubprocess.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/llversion.py b/indra/lib/python/indra/util/llversion.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/named_query.py b/indra/lib/python/indra/util/named_query.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/shutil2.py b/indra/lib/python/indra/util/shutil2.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/term.py b/indra/lib/python/indra/util/term.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py old mode 100644 new mode 100755 diff --git a/indra/lib/python/uuid.py b/indra/lib/python/uuid.py old mode 100644 new mode 100755 -- cgit v1.2.3 From cb5289e02a4003ca7057a392d41127b36614658c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 18 Jun 2013 12:31:54 -0400 Subject: remove files incorrectly brought back from the past by merges --- indra/lib/python/indra/util/llversion.py | 107 ------------------------------- 1 file changed, 107 deletions(-) delete mode 100755 indra/lib/python/indra/util/llversion.py (limited to 'indra/lib/python') diff --git a/indra/lib/python/indra/util/llversion.py b/indra/lib/python/indra/util/llversion.py deleted file mode 100755 index ba6f567b60..0000000000 --- a/indra/lib/python/indra/util/llversion.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -"""\ -@file llversion.py -@brief Parses llcommon/llversionserver.h and llcommon/llversionviewer.h - for the version string and channel string. - Parses hg info for branch and revision. - -$LicenseInfo:firstyear=2006&license=mit$ - -Copyright (c) 2006-2009, Linden Research, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -$/LicenseInfo$ -""" - -import re, sys, os, subprocess - -# Methods for gathering version information from -# llversionviewer.h and llversionserver.h - -def get_src_root(): - indra_lib_python_indra_path = os.path.dirname(__file__) - return os.path.abspath(os.path.realpath(indra_lib_python_indra_path + "/../../../../../")) - -def get_version_file_contents(version_type): - filepath = get_src_root() + '/indra/llcommon/llversion%s.h' % version_type - file = open(filepath,"r") - file_str = file.read() - file.close() - return file_str - -def get_version(version_type): - file_str = get_version_file_contents(version_type) - m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str) - VER_MAJOR = m.group(1) - m = re.search('const S32 LL_VERSION_MINOR = (\d+);', file_str) - VER_MINOR = m.group(1) - m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str) - VER_PATCH = m.group(1) - m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str) - VER_BUILD = m.group(1) - version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals() - return version - -def get_channel(version_type): - file_str = get_version_file_contents(version_type) - m = re.search('const char \* const LL_CHANNEL = "(.+)";', file_str) - return m.group(1) - -def get_viewer_version(): - return get_version('viewer') - -def get_server_version(): - return get_version('server') - -def get_viewer_channel(): - return get_channel('viewer') - -def get_server_channel(): - return get_channel('server') - -# Methods for gathering hg information -def get_hg_repo(): - child = subprocess.Popen(["hg","showconfig","paths.default"], stdout=subprocess.PIPE) - output, error = child.communicate() - status = child.returncode - if status: - print >> sys.stderr, error - sys.exit(1) - if not output: - print >> sys.stderr, 'ERROR: cannot find repo we cloned from' - sys.exit(1) - return output - -def get_hg_changeset(): - # The right thing to do would be to use the *global* revision id: - # "hg id -i" - # For the moment though, we use the parent revision: - child = subprocess.Popen(["hg","parents","--template","{rev}"], stdout=subprocess.PIPE) - output, error = child.communicate() - status = child.returncode - if status: - print >> sys.stderr, error - sys.exit(1) - lines = output.splitlines() - if len(lines) > 1: - print >> sys.stderr, 'ERROR: working directory has %d parents' % len(lines) - return lines[0] - -def using_hg(): - return os.path.isdir(os.path.join(get_src_root(), '.hg')) -- cgit v1.2.3 From a207b24d331539e16bd66ca09df3c585529c99f0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Jul 2013 10:42:13 -0400 Subject: CHOP-955: Include app_settings/settings_install.xml in file_list. viewer_manifest.py uses its base-class llmanifest.LLManifest.put_in_file() method to create several different files in the install image being marshalled. I based the logic to create settings_install.xml on that example. Unfortunately I failed to notice that after every existing call, the script also explicitly appended the newly-created file to self.file_list... which only matters on Windows. file_list is fed to the NSIS installer. Change put_in_file() method to implicitly append to self.file_list. Change every existing viewer_manifest.py call to pass new put_in_file(src=) param instead of explicitly appending to self.file_list. --- indra/lib/python/indra/util/llmanifest.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 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 9cb830a2db..54049b5545 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -392,11 +392,21 @@ class LLManifest(object): raise ManifestError, "Should be something at path " + path self.created_paths.append(path) - def put_in_file(self, contents, dst): + def put_in_file(self, contents, dst, src=None): # write contents as dst - f = open(self.dst_path_of(dst), "wb") - f.write(contents) - f.close() + dst_path = self.dst_path_of(dst) + f = open(dst_path, "wb") + try: + f.write(contents) + finally: + f.close() + + # Why would we create a file in the destination tree if not to include + # it in the installer? The default src=None (plus the fact that the + # src param is last) is to preserve backwards compatibility. + if src: + self.file_list.append([src, dst_path]) + return dst_path def replace_in(self, src, dst=None, searchdict={}): if dst == None: -- cgit v1.2.3 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