summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install.py9
-rw-r--r--scripts/messages/message_template.msg6
-rwxr-xr-xscripts/template_verifier.py11
-rwxr-xr-xscripts/update_version_files.py20
4 files changed, 38 insertions, 8 deletions
diff --git a/scripts/install.py b/scripts/install.py
index 78b8880b95..7368af0b37 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -793,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 a5a99d79f0..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
diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py
index 8bb5e1d76d..adcfcbcae6 100755
--- a/scripts/template_verifier.py
+++ b/scripts/template_verifier.py
@@ -103,7 +103,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 +203,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 ee1ce69a15..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'):
@@ -243,11 +250,20 @@ def main():
else:
if llversion.using_svn():
- revision = llversion.get_svn_revision()
+ if new_revision:
+ revision = new_revision
+ else:
+ revision = llversion.get_svn_revision()
branch = llversion.get_svn_branch()
elif llversion.using_hg():
- revision = llversion.get_hg_changeset()
+ 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