aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lib/python
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-09-08 18:17:08 -0700
committerMcCabe Maxsted2011-09-08 18:17:08 -0700
commit4fe672aeefeb04d43cafede0fa678db2e58a61f4 (patch)
treed24a8fac155f7e8b29f43e4d34c0aa70976b33c5 /linden/indra/lib/python
parentFixed windows packaging merge errors (diff)
downloadmeta-impy-4fe672aeefeb04d43cafede0fa678db2e58a61f4.zip
meta-impy-4fe672aeefeb04d43cafede0fa678db2e58a61f4.tar.gz
meta-impy-4fe672aeefeb04d43cafede0fa678db2e58a61f4.tar.bz2
meta-impy-4fe672aeefeb04d43cafede0fa678db2e58a61f4.tar.xz
Get the default version from viewerinfo.cpp in the build system
Diffstat (limited to 'linden/indra/lib/python')
-rw-r--r--linden/indra/lib/python/indra/util/llmanifest.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py
index 20875f9..fbd7fea 100644
--- a/linden/indra/lib/python/indra/util/llmanifest.py
+++ b/linden/indra/lib/python/indra/util/llmanifest.py
@@ -76,17 +76,15 @@ def get_default_platform(dummy):
76 }[sys.platform] 76 }[sys.platform]
77 77
78def get_default_version(srctree): 78def get_default_version(srctree):
79 # look up llversion.h and parse out the version info 79 p = os.path.join(srctree, 'viewerinfo.cpp')
80 paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']] 80 if os.path.exists(p):
81 for p in paths: 81 contents = open(p, 'r').read()
82 if os.path.exists(p): 82 major = re.search("MAJOR\s=\s([0-9]+)", contents).group(1)
83 contents = open(p, 'r').read() 83 minor = re.search("MINOR\s=\s([0-9]+)", contents).group(1)
84 major = re.search("IMP_VERSION_MAJOR\s=\s([0-9]+)", contents).group(1) 84 patch = re.search("PATCH\s=\s([0-9]+)", contents).group(1)
85 minor = re.search("IMP_VERSION_MINOR\s=\s([0-9]+)", contents).group(1) 85 rleas = re.search("RLEAS\s=\s([0-9]+)", contents).group(1)
86 patch = re.search("IMP_VERSION_PATCH\s=\s([0-9]+)", contents).group(1) 86 extra = re.search('string\sEXTRA\s=\s"(.*)";', contents).group(1)
87 #build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1) 87 return major, minor, patch, rleas, extra
88 build = re.search('const char \* const IMP_VERSION_TEST = "(.*)";', contents).group(1)
89 return major, minor, patch, build
90 88
91def get_channel(srctree): 89def get_channel(srctree):
92 # look up llversionserver.h and parse out the version info 90 # look up llversionserver.h and parse out the version info