diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install.py | 19 | ||||
-rw-r--r-- | scripts/messages/message_template.msg | 31 | ||||
-rw-r--r--[-rwxr-xr-x] | scripts/setup-path.py | 40 | ||||
-rw-r--r--[-rwxr-xr-x] | scripts/template_verifier.py | 51 | ||||
-rwxr-xr-x | scripts/update_version_files.py | 42 |
5 files changed, 112 insertions, 71 deletions
diff --git a/scripts/install.py b/scripts/install.py index 6278fba16c..7368af0b37 100755 --- a/scripts/install.py +++ b/scripts/install.py @@ -64,7 +64,6 @@ def add_indra_lib_path(): base_dir = add_indra_lib_path() import copy -import md5 import optparse import os import platform @@ -75,7 +74,12 @@ import tempfile import urllib2 import urlparse -from sets import Set as set, ImmutableSet as frozenset +try: + # Python 2.6 + from hashlib import md5 +except ImportError: + # Python 2.5 and earlier + from md5 import new as md5 from indra.base import llsd from indra.util import helpformatter @@ -106,7 +110,7 @@ class InstallFile(object): return "ifile{%s:%s}" % (self.pkgname, self.url) def _is_md5sum_match(self): - hasher = md5.new(file(self.filename, 'rb').read()) + hasher = md5(file(self.filename, 'rb').read()) if hasher.hexdigest() == self.md5sum: return True return False @@ -789,8 +793,13 @@ def _getuser(): import getpass return getpass.getuser() except ImportError: - import win32api - return win32api.GetUserName() + import ctypes + MAX_PATH = 260 # according to a recent WinDef.h + name = ctypes.create_unicode_buffer(MAX_PATH) + namelen = ctypes.c_int(len(name)) # len in chars, NOT bytes + if not ctypes.windll.advapi32.GetUserNameW(name, ctypes.byref(namelen)): + raise ctypes.WinError() + return name.value def _default_installable_cache(): """In general, the installable files do not change much, so find a diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 23efd65c45..d4f791c202 100644 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -53,7 +53,7 @@ version 2.0 // OpenCircuit - Tells the recipient's messaging system to open the descibed circuit { - OpenCircuit Fixed 0xFFFFFFFC NotTrusted Unencoded + OpenCircuit Fixed 0xFFFFFFFC NotTrusted Unencoded UDPBlackListed { CircuitInfo Single { IP IPADDR } @@ -1383,6 +1383,10 @@ version 2.0 { AgentID LLUUID } { KickedFromEstateID U32 } } + { + AgentInfo Single + { AgentEffectiveMaturity U32 } + } } // DataHomeLocationReply data->sim @@ -5288,6 +5292,10 @@ version 2.0 { AgentLegacyAccess U8 } { AgentMaxAccess U8 } } + { + AgentInfo Variable + { Flags U32 } + } } // ChildAgentAlive @@ -8945,3 +8953,24 @@ version 2.0 { CRC U32 } } } + +// Link inventory +{ + LinkInventoryItem Low 426 NotTrusted Zerocoded + { + AgentData Single + { AgentID LLUUID } + { SessionID LLUUID } + } + { + InventoryBlock Single + { CallbackID U32 } // Async Response + { FolderID LLUUID } + { TransactionID LLUUID } // Going to become TransactionID + { OldItemID LLUUID } + { Type S8 } + { InvType S8 } + { Name Variable 1 } + { Description Variable 1 } + } +} diff --git a/scripts/setup-path.py b/scripts/setup-path.py index 157bda0027..55e0f1a85f 100755..100644 --- a/scripts/setup-path.py +++ b/scripts/setup-path.py @@ -4,31 +4,25 @@ @brief Get the python library directory in the path, so we don't have to screw with PYTHONPATH or symbolic links. -$LicenseInfo:firstyear=2007&license=viewergpl$ +$LicenseInfo:firstyear=2007&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010, Linden Research, Inc. -Copyright (c) 2007-2009, 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. -Second Life Viewer Source Code -The source code in this file ("Source Code") is provided by Linden Lab -to you under the terms of the GNU General Public License, version 2.0 -("GPL"), unless you have obtained a separate licensing agreement -("Other License"), formally executed by you and Linden Lab. Terms of -the GPL can be found in doc/GPL-license.txt in this distribution, or -online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - -There are special exceptions to the terms and conditions of the GPL as -it is applied to this Source Code. View the full text of the exception -in the file doc/FLOSS-exception.txt in this software distribution, or -online at -http://secondlifegrid.net/programs/open_source/licensing/flossexception - -By copying, modifying or distributing this software, you acknowledge -that you have read and understood your obligations described above, -and agree to abide by those obligations. - -ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO -WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, -COMPLETENESS OR PERFORMANCE. +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$ """ diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py index 8bb5e1d76d..ddb050fbbb 100755..100644 --- a/scripts/template_verifier.py +++ b/scripts/template_verifier.py @@ -3,31 +3,25 @@ @file template_verifier.py @brief Message template compatibility verifier. -$LicenseInfo:firstyear=2007&license=viewergpl$ +$LicenseInfo:firstyear=2007&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010, Linden Research, Inc. -Copyright (c) 2007-2009, 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. -Second Life Viewer Source Code -The source code in this file ("Source Code") is provided by Linden Lab -to you under the terms of the GNU General Public License, version 2.0 -("GPL"), unless you have obtained a separate licensing agreement -("Other License"), formally executed by you and Linden Lab. Terms of -the GPL can be found in doc/GPL-license.txt in this distribution, or -online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - -There are special exceptions to the terms and conditions of the GPL as -it is applied to this Source Code. View the full text of the exception -in the file doc/FLOSS-exception.txt in this software distribution, or -online at -http://secondlifegrid.net/programs/open_source/licensing/flossexception - -By copying, modifying or distributing this software, you acknowledge -that you have read and understood your obligations described above, -and agree to abide by those obligations. - -ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO -WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, -COMPLETENESS OR PERFORMANCE. +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$ """ @@ -103,7 +97,7 @@ MESSAGE_TEMPLATE = 'message_template.msg' PRODUCTION_ACCEPTABLE = (compatibility.Same, compatibility.Newer) DEVELOPMENT_ACCEPTABLE = ( compatibility.Same, compatibility.Newer, - compatibility.Older, compatibility.Mixed) + compatibility.Older, compatibility.Mixed) MAX_MASTER_AGE = 60 * 60 * 4 # refresh master cache every 4 hours @@ -203,8 +197,13 @@ def getuser(): import getpass return getpass.getuser() except ImportError: - import win32api - return win32api.GetUserName() + import ctypes + MAX_PATH = 260 # according to a recent WinDef.h + name = ctypes.create_unicode_buffer(MAX_PATH) + namelen = ctypes.c_int(len(name)) # len in chars, NOT bytes + if not ctypes.windll.advapi32.GetUserNameW(name, ctypes.byref(namelen)): + raise ctypes.WinError() + return name.value def local_master_cache_filename(): """Returns the location of the master template cache (which is in the system tempdir) diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py index 9081941521..da60fd105a 100755 --- a/scripts/update_version_files.py +++ b/scripts/update_version_files.py @@ -47,6 +47,9 @@ def usage(): Options: --version Specify the version string to replace current version. + --revision + Specify the revision to replace the last digit of the version. + By default, revision is computed from the version control system. --skip-on-branch Specify a regular expression against which the current branch is matched. If it matches, then leave version strings alone. @@ -161,6 +164,7 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], "", ['version=', + 'revision=', 'channel=', 'server_channel=', 'skip-on-branch=', @@ -171,12 +175,15 @@ def main(): update_server = False update_viewer = False new_version = None + new_revision = None new_viewer_channel = None new_server_channel = None skip_on_branch_re = None for o,a in opts: if o in ('--version'): new_version = a + if o in ('--revision'): + new_revision = a if o in ('--skip-on-branch'): skip_on_branch_re = re.compile(a) if o in ('--channel'): @@ -241,23 +248,26 @@ def main(): if update_server: server_version = new_version else: - # Assume we're updating just the build number - cl = '%s info "%s"' % (svn, src_root) - status, output = _getstatusoutput(cl) - if verbose: - print - print "svn info output:" - print "----------------" - print output - - branch_match = svn_branch_re.search(output) - revision_match = svn_revision_re.search(output) - if not branch_match or not revision_match: - print "Failed to execute svn info, output follows:" - print output + + if llversion.using_svn(): + if new_revision: + revision = new_revision + else: + revision = llversion.get_svn_revision() + branch = llversion.get_svn_branch() + elif llversion.using_hg(): + if new_revision: + revision = new_revision + else: + revision = llversion.get_hg_changeset() + branch = llversion.get_hg_repo() + elif new_revision: + revision = new_revision + branch = "unknown" + else: + print >>sys.stderr, "ERROR: could not determine revision and branch" return -1 - branch = branch_match.group(1) - revision = revision_match.group(1) + if skip_on_branch_re and skip_on_branch_re.match(branch): print "Release Candidate Build, leaving version files untouched." return 0 |