diff options
author | Jacek Antonelli | 2009-11-03 16:59:53 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-11-03 17:00:00 -0600 |
commit | f89cffa66e087aa23a2b988e5b53ab41c964d51a (patch) | |
tree | 74b95071a667075f676f472a22414ce8d6d417a5 /linden/indra/newview/build_win32_appConfig.py | |
parent | Second Life viewer sources 1.23.4-RC (diff) | |
download | meta-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/newview/build_win32_appConfig.py')
-rw-r--r-- | linden/indra/newview/build_win32_appConfig.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/linden/indra/newview/build_win32_appConfig.py b/linden/indra/newview/build_win32_appConfig.py new file mode 100644 index 0000000..fb6a025 --- /dev/null +++ b/linden/indra/newview/build_win32_appConfig.py | |||
@@ -0,0 +1,58 @@ | |||
1 | # @file build_win32_appConfig.py | ||
2 | # @brief Create the windows app.config file to redirect crt linkage. | ||
3 | # | ||
4 | # $LicenseInfo:firstyear=2009&license=viewergpl$ | ||
5 | # | ||
6 | # Copyright (c) 2009, Linden Research, Inc. | ||
7 | # | ||
8 | # Second Life Viewer Source Code | ||
9 | # The source code in this file ("Source Code") is provided by Linden Lab | ||
10 | # to you under the terms of the GNU General Public License, version 2.0 | ||
11 | # ("GPL"), unless you have obtained a separate licensing agreement | ||
12 | # ("Other License"), formally executed by you and Linden Lab. Terms of | ||
13 | # the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
14 | # online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
15 | # | ||
16 | # There are special exceptions to the terms and conditions of the GPL as | ||
17 | # it is applied to this Source Code. View the full text of the exception | ||
18 | # in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | # online at | ||
20 | # http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | # | ||
22 | # By copying, modifying or distributing this software, you acknowledge | ||
23 | # that you have read and understood your obligations described above, | ||
24 | # and agree to abide by those obligations. | ||
25 | # | ||
26 | # ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | # WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | # COMPLETENESS OR PERFORMANCE. | ||
29 | # $/LicenseInfo$ | ||
30 | |||
31 | import sys, os, re | ||
32 | from xml.dom.minidom import parse | ||
33 | |||
34 | def main(): | ||
35 | src_manifest_name = sys.argv[1] | ||
36 | src_config_name = sys.argv[2] | ||
37 | dst_config_name = sys.argv[3] | ||
38 | |||
39 | manifest_dom = parse(src_manifest_name) | ||
40 | node = manifest_dom.getElementsByTagName('assemblyIdentity')[0] | ||
41 | manifest_assm_ver = node.getAttribute('version') | ||
42 | |||
43 | config_dom = parse(src_config_name) | ||
44 | node = config_dom.getElementsByTagName('bindingRedirect')[0] | ||
45 | node.setAttribute('newVersion', manifest_assm_ver) | ||
46 | src_old_ver = re.match('([^-]*-).*', node.getAttribute('oldVersion')).group(1) | ||
47 | node.setAttribute('oldVersion', src_old_ver + manifest_assm_ver) | ||
48 | comment = config_dom.createComment("This file is automatically generated by the build. see indra/newview/build_win32_appConfig.py") | ||
49 | config_dom.insertBefore(comment, config_dom.childNodes[0]) | ||
50 | |||
51 | f = open(dst_config_name, 'w') | ||
52 | config_dom.writexml(f) | ||
53 | f.close() | ||
54 | |||
55 | return 0 | ||
56 | |||
57 | if __name__ == "__main__": | ||
58 | main() | ||