diff options
author | Glenn Glazer <coyot@lindenlab.com> | 2016-07-28 08:50:52 -0700 |
---|---|---|
committer | Glenn Glazer <coyot@lindenlab.com> | 2016-07-28 08:50:52 -0700 |
commit | fc7c0645fa9c9d47c1462387a3de82a2a4474467 (patch) | |
tree | 1e691ed23900cc0c88cb3406236fe1a107262e1e /indra/viewer_components | |
parent | 2bb4214866ddd17578ff094b83f3bcf5a46053c0 (diff) |
SL-321: add in resource files, more CLI handling fixes
Diffstat (limited to 'indra/viewer_components')
-rw-r--r-- | indra/viewer_components/Resources/README | 9 | ||||
-rw-r--r-- | indra/viewer_components/Resources/summary.json | 1 | ||||
-rw-r--r-- | indra/viewer_components/manager/InstallerError.py | 49 | ||||
-rwxr-xr-x | indra/viewer_components/manager/SL_Launcher | 5 | ||||
-rw-r--r-- | indra/viewer_components/manager/icons/SL_Logo.gif | bin | 0 -> 1322 bytes | |||
-rw-r--r-- | indra/viewer_components/manager/icons/SL_Logo.png | bin | 0 -> 1484 bytes | |||
-rw-r--r-- | indra/viewer_components/manager/icons/head-sl-logo.gif | bin | 0 -> 960 bytes | |||
-rw-r--r-- | indra/viewer_components/manager/icons/head-sl-logo.png | bin | 0 -> 2316 bytes | |||
-rwxr-xr-x | indra/viewer_components/manager/update_manager.py | 11 |
9 files changed, 71 insertions, 4 deletions
diff --git a/indra/viewer_components/Resources/README b/indra/viewer_components/Resources/README new file mode 100644 index 0000000000..e1b35730d4 --- /dev/null +++ b/indra/viewer_components/Resources/README @@ -0,0 +1,9 @@ +This directory only exists as a place for the summary.json file to exist when the unit tests are run on a Mac, where the file goes to a sibling directory of the scripts dir. In Linux and Windows, the JSON file goes into the same directory as the script. + +See: + +test_get_summary.py +update_manager.get_summary() + +for more details +- coyot 201606.02 diff --git a/indra/viewer_components/Resources/summary.json b/indra/viewer_components/Resources/summary.json new file mode 100644 index 0000000000..b78859d427 --- /dev/null +++ b/indra/viewer_components/Resources/summary.json @@ -0,0 +1 @@ +{"Type":"viewer","Version":"4.0.5.315117","Channel":"Second Life Release"} diff --git a/indra/viewer_components/manager/InstallerError.py b/indra/viewer_components/manager/InstallerError.py new file mode 100644 index 0000000000..3b199ea231 --- /dev/null +++ b/indra/viewer_components/manager/InstallerError.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +"""\ +@file InstallerError.py +@author coyot +@date 2016-05-16 +@brief custom exception class for VMP + +$LicenseInfo:firstyear=2016&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2016, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +""" +usage: + +>>> import InstallerError +>>> import os +>>> try: +... os.mkdir('/tmp') +... except OSError, oe: +... ie = InstallerError.InstallerError(oe, "foo") +... raise ie + +Traceback (most recent call last): + File "<stdin>", line 5, in <module> +InstallerError.InstallerError: [Errno [Errno 17] File exists: '/tmp'] foo +""" + +class InstallerError(OSError): + def __init___(self, message): + Exception.__init__(self, message) diff --git a/indra/viewer_components/manager/SL_Launcher b/indra/viewer_components/manager/SL_Launcher index dde7cd9c2e..0403e01cec 100755 --- a/indra/viewer_components/manager/SL_Launcher +++ b/indra/viewer_components/manager/SL_Launcher @@ -106,11 +106,12 @@ def capture_vmp_args(arg_list = None, cmd_line = None): no_dashes = vmp_params[param] count = cmd_line[no_dashes]['count'] param_args = [] - if count: - for argh in range(1,count): + if count > 0: + for argh in range(0,count): param_args.append(vmp_queue.popleft()) #the parameter name is the key, the (possibly empty) list of args is the value cli_overrides[vmp_params[param]] = param_args + print "cli override param %s vmp_param %s args %s count %s" % (param, vmp_params[param], param_args, count) #to prevent KeyErrors on missing keys, set the remainder to None for key in vmp_params: diff --git a/indra/viewer_components/manager/icons/SL_Logo.gif b/indra/viewer_components/manager/icons/SL_Logo.gif Binary files differnew file mode 100644 index 0000000000..c24d6b08cb --- /dev/null +++ b/indra/viewer_components/manager/icons/SL_Logo.gif diff --git a/indra/viewer_components/manager/icons/SL_Logo.png b/indra/viewer_components/manager/icons/SL_Logo.png Binary files differnew file mode 100644 index 0000000000..5e376c72f9 --- /dev/null +++ b/indra/viewer_components/manager/icons/SL_Logo.png diff --git a/indra/viewer_components/manager/icons/head-sl-logo.gif b/indra/viewer_components/manager/icons/head-sl-logo.gif Binary files differnew file mode 100644 index 0000000000..d635348dcc --- /dev/null +++ b/indra/viewer_components/manager/icons/head-sl-logo.gif diff --git a/indra/viewer_components/manager/icons/head-sl-logo.png b/indra/viewer_components/manager/icons/head-sl-logo.png Binary files differnew file mode 100644 index 0000000000..5c214e96d1 --- /dev/null +++ b/indra/viewer_components/manager/icons/head-sl-logo.png diff --git a/indra/viewer_components/manager/update_manager.py b/indra/viewer_components/manager/update_manager.py index 398c8bb55d..ff0f69a1b1 100755 --- a/indra/viewer_components/manager/update_manager.py +++ b/indra/viewer_components/manager/update_manager.py @@ -252,8 +252,15 @@ def query_vvm(log_file_handle = None, platform_key = None, settings = None, summ #normal case, no testing key test_ok = 'testok' UUID = make_VVM_UUID_hash(platform_key) + print repr(channelname) + print repr(version) + print repr(platform_key) + print repr(platform_version) + print repr(test_ok) + print repr(UUID) #because urljoin can't be arsed to take multiple elements - query_string = '/v1.0/' + channelname + '/' + version + '/' + platform_key + '/' + platform_version + '/' + test_ok + '/' + UUID + #channelname is a list because although it can only be one word, it is a kind of argument and viewer args can take multiple keywords. + query_string = '/v1.0/' + channelname[0] + '/' + version + '/' + platform_key + '/' + platform_version + '/' + test_ok + '/' + UUID VVMService = llrest.SimpleRESTService(name='VVM', baseurl=base_URI) try: result_data = VVMService.get(query_string) @@ -351,7 +358,7 @@ def update_manager(cli_overrides = None): parent_dir = get_parent_path(platform_key) log_file_handle = get_log_file_handle(parent_dir) settings = None - print "parent dir: " + str(parent_dir) + print "cli_overrides: " + str(cli_overrides) #check to see if user has install rights #get the owner of the install and the current user |