aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-17 10:57:59 -0700
committerJacek Antonelli2010-06-19 02:40:53 -0500
commitf286bb2bf6f860419f73983233d4f747feb06300 (patch)
treea1db8a48c4bf1a78788c15afa2c1e8bfaed3bda5 /linden/indra
parentSet the imprudence viewer version in xml (diff)
downloadmeta-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')
-rw-r--r--linden/indra/cmake/BuildVersion.cmake2
-rw-r--r--linden/indra/lib/python/indra/util/llversion.py14
2 files changed, 8 insertions, 8 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)
5macro (build_version _target) 5macro (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$
30import re, sys, os, commands 30import 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
35def get_src_root(): 35def 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
39def get_version_file_contents(version_type): 39def 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
46def get_version(version_type, revision=0): 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 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
59def get_channel(version_type): 59def get_channel(version_type):