diff options
author | McCabe Maxsted | 2010-05-17 10:57:59 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:40:53 -0500 |
commit | f286bb2bf6f860419f73983233d4f747feb06300 (patch) | |
tree | a1db8a48c4bf1a78788c15afa2c1e8bfaed3bda5 /linden/indra/lib | |
parent | Set the imprudence viewer version in xml (diff) | |
download | meta-impy-f286bb2bf6f860419f73983233d4f747feb06300.zip meta-impy-f286bb2bf6f860419f73983233d4f747feb06300.tar.gz meta-impy-f286bb2bf6f860419f73983233d4f747feb06300.tar.bz2 meta-impy-f286bb2bf6f860419f73983233d4f747feb06300.tar.xz |
Made CMake find the viewer version in xml
Diffstat (limited to 'linden/indra/lib')
-rw-r--r-- | linden/indra/lib/python/indra/util/llversion.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linden/indra/lib/python/indra/util/llversion.py b/linden/indra/lib/python/indra/util/llversion.py index aedb947..5d164fc 100644 --- a/linden/indra/lib/python/indra/util/llversion.py +++ b/linden/indra/lib/python/indra/util/llversion.py | |||
@@ -30,14 +30,14 @@ $/LicenseInfo$ | |||
30 | import re, sys, os, commands | 30 | import re, sys, os, commands |
31 | 31 | ||
32 | # Methods for gathering version information from | 32 | # Methods for gathering version information from |
33 | # llversionviewer.h and llversionserver.h | 33 | # viewerversion.xml |
34 | 34 | ||
35 | def get_src_root(): | 35 | def get_src_root(): |
36 | indra_lib_python_indra_path = os.path.dirname(__file__) | 36 | indra_lib_python_indra_path = os.path.dirname(__file__) |
37 | return os.path.abspath(os.path.realpath(indra_lib_python_indra_path + "/../../../../../")) | 37 | return os.path.abspath(os.path.realpath(indra_lib_python_indra_path + "/../../../../../")) |
38 | 38 | ||
39 | def get_version_file_contents(version_type): | 39 | def get_version_file_contents(version_type): |
40 | filepath = get_src_root() + '/indra/llcommon/llversion%s.h' % version_type | 40 | filepath = get_src_root() + '/indra/newview/app_settings/viewerversion.xml' |
41 | file = open(filepath,"r") | 41 | file = open(filepath,"r") |
42 | file_str = file.read() | 42 | file_str = file.read() |
43 | file.close() | 43 | file.close() |
@@ -45,15 +45,15 @@ def get_version_file_contents(version_type): | |||
45 | 45 | ||
46 | def get_version(version_type, revision=0): | 46 | def 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 IMP_VERSION_MAJOR = (\d+);', file_str) | 48 | m = re.search('<viewer version_major="(\d+)" />', file_str) |
49 | VER_MAJOR = m.group(1) | 49 | VER_MAJOR = m.group(1) |
50 | m = re.search('const S32 IMP_VERSION_MINOR = (\d+);', file_str) | 50 | m = re.search('<viewer version_minor="(\d+)" />', file_str) |
51 | VER_MINOR = m.group(1) | 51 | VER_MINOR = m.group(1) |
52 | m = re.search('const S32 IMP_VERSION_PATCH = (\d+);', file_str) | 52 | m = re.search('<viewer version_patch="(\d+)" />', file_str) |
53 | VER_PATCH = m.group(1) | 53 | VER_PATCH = m.group(1) |
54 | m = re.search('const S32 IMP_VERSION_TEST = (\d+);', file_str) | 54 | m = re.search('<viewer version_test="(.*)" />', file_str) |
55 | VER_BUILD = m.group(1) | 55 | VER_BUILD = m.group(1) |
56 | version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_TEST)s" % locals() | 56 | version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s-%(VER_TEST)s" % locals() |
57 | return version | 57 | return version |
58 | 58 | ||
59 | def get_channel(version_type): | 59 | def get_channel(version_type): |