diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/cmake/BuildVersion.cmake | 2 | ||||
-rw-r--r-- | linden/indra/lib/python/indra/util/llversion.py | 14 | ||||
-rwxr-xr-x | linden/scripts/build_version.py | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/cmake/BuildVersion.cmake b/linden/indra/cmake/BuildVersion.cmake index 60a519c..59b36ff 100644 --- a/linden/indra/cmake/BuildVersion.cmake +++ b/linden/indra/cmake/BuildVersion.cmake | |||
@@ -5,7 +5,7 @@ include(Python) | |||
5 | macro (build_version _target) | 5 | macro (build_version _target) |
6 | execute_process( | 6 | execute_process( |
7 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py | 7 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py |
8 | llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS} | 8 | viewerversion.xml ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/ |
9 | OUTPUT_VARIABLE ${_target}_VERSION | 9 | OUTPUT_VARIABLE ${_target}_VERSION |
10 | OUTPUT_STRIP_TRAILING_WHITESPACE | 10 | OUTPUT_STRIP_TRAILING_WHITESPACE |
11 | ) | 11 | ) |
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): |
diff --git a/linden/scripts/build_version.py b/linden/scripts/build_version.py index 908c57d..9746b7c 100755 --- a/linden/scripts/build_version.py +++ b/linden/scripts/build_version.py | |||
@@ -20,13 +20,13 @@ def get_version(filename): | |||
20 | fp.close() | 20 | fp.close() |
21 | 21 | ||
22 | vals = {} | 22 | vals = {} |
23 | m = re.search('const S32 IMP_VERSION_MAJOR = (\d+);', data) | 23 | m = re.search('<viewer version_major="(\d+)" />', data) |
24 | vals['major'] = m.group(1) | 24 | vals['major'] = m.group(1) |
25 | m = re.search('const S32 IMP_VERSION_MINOR = (\d+);', data) | 25 | m = re.search('<viewer version_minor="(\d+)" />', data) |
26 | vals['minor'] = m.group(1) | 26 | vals['minor'] = m.group(1) |
27 | m = re.search('const S32 IMP_VERSION_PATCH = (\d+);', data) | 27 | m = re.search('<viewer version_patch="(\d+)" />', data) |
28 | vals['patch'] = m.group(1) | 28 | vals['patch'] = m.group(1) |
29 | m = re.search('const char \* const IMP_VERSION_TEST = "(.*)";', data) | 29 | m = re.search('<viewer version_test="(.*)" />', data) |
30 | vals['test'] = m.group(1) | 30 | vals['test'] = m.group(1) |
31 | 31 | ||
32 | version = "%(major)s.%(minor)s.%(patch)s" % vals | 32 | version = "%(major)s.%(minor)s.%(patch)s" % vals |