aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lib/python
diff options
context:
space:
mode:
authorJacek Antonelli2009-11-03 16:59:53 -0600
committerJacek Antonelli2009-11-03 17:00:00 -0600
commitf89cffa66e087aa23a2b988e5b53ab41c964d51a (patch)
tree74b95071a667075f676f472a22414ce8d6d417a5 /linden/indra/lib/python
parentSecond Life viewer sources 1.23.4-RC (diff)
downloadmeta-impy-f89cffa66e087aa23a2b988e5b53ab41c964d51a.zip
meta-impy-f89cffa66e087aa23a2b988e5b53ab41c964d51a.tar.gz
meta-impy-f89cffa66e087aa23a2b988e5b53ab41c964d51a.tar.bz2
meta-impy-f89cffa66e087aa23a2b988e5b53ab41c964d51a.tar.xz
Second Life viewer sources 1.23.5
Diffstat (limited to 'linden/indra/lib/python')
-rw-r--r--linden/indra/lib/python/indra/util/llversion.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/linden/indra/lib/python/indra/util/llversion.py b/linden/indra/lib/python/indra/util/llversion.py
index 770b861..77fa5a2 100644
--- a/linden/indra/lib/python/indra/util/llversion.py
+++ b/linden/indra/lib/python/indra/util/llversion.py
@@ -43,7 +43,7 @@ def get_version_file_contents(version_type):
43 file.close() 43 file.close()
44 return file_str 44 return file_str
45 45
46def get_version(version_type): 46def get_version(version_type, revision=0):
47 file_str = get_version_file_contents(version_type) 47 file_str = get_version_file_contents(version_type)
48 m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str) 48 m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str)
49 VER_MAJOR = m.group(1) 49 VER_MAJOR = m.group(1)
@@ -51,8 +51,11 @@ def get_version(version_type):
51 VER_MINOR = m.group(1) 51 VER_MINOR = m.group(1)
52 m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str) 52 m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str)
53 VER_PATCH = m.group(1) 53 VER_PATCH = m.group(1)
54 m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str) 54 if revision > 0:
55 VER_BUILD = m.group(1) 55 VER_BUILD = revision
56 else:
57 m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str)
58 VER_BUILD = m.group(1)
56 version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals() 59 version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals()
57 return version 60 return version
58 61
@@ -61,11 +64,11 @@ def get_channel(version_type):
61 m = re.search('const char \* const LL_CHANNEL = "(.+)";', file_str) 64 m = re.search('const char \* const LL_CHANNEL = "(.+)";', file_str)
62 return m.group(1) 65 return m.group(1)
63 66
64def get_viewer_version(): 67def get_viewer_version(revision=0):
65 return get_version('viewer') 68 return get_version('viewer', revision)
66 69
67def get_server_version(): 70def get_server_version(revision=0):
68 return get_version('server') 71 return get_version('server', revision)
69 72
70def get_viewer_channel(): 73def get_viewer_channel():
71 return get_channel('viewer') 74 return get_channel('viewer')