summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-08-13 18:12:06 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-08-13 18:12:06 -0700
commitaff85ed92c5aad3a9445cf4ec5447cc56c44dfc0 (patch)
treef4422d0d332bab3b1bcb6cb651b0575b9598114a
parent8c4f09b6bfa4bdc6608a922d7bd33eb78abb0d49 (diff)
Rewrite of app.config creation for compatibility with 3rd party staging changes from login-api.
-rw-r--r--indra/newview/CMakeLists.txt24
-rw-r--r--indra/newview/build_win32_appConfig.py28
2 files changed, 43 insertions, 9 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c68d01d705..8451bc1223 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1332,9 +1332,27 @@ if (WINDOWS)
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
COMMENT "Copying staged dlls."
)
- endif(WINDOWS)
-
-
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS
+ ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
+ ${CMAKE_CFG_INTDIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ ${VIEWER_BINARY_NAME}.exe.config
+ COMMENT "Creating app.config file"
+ )
+
+ add_custom_target(create_app_config_file ALL
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+ )
+
+ add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
+
+ endif(WINDOWS)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
diff --git a/indra/newview/build_win32_appConfig.py b/indra/newview/build_win32_appConfig.py
index 2ac0e17dc1..06312bea26 100644
--- a/indra/newview/build_win32_appConfig.py
+++ b/indra/newview/build_win32_appConfig.py
@@ -31,11 +31,7 @@
import sys, os
from xml.dom.minidom import parse
-def main():
- src_manifest_name = sys.argv[1]
- src_config_name = sys.argv[2]
- dst_config_name = sys.argv[3]
-
+def munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name):
manifest_dom = parse(src_manifest_name)
node = manifest_dom.getElementsByTagName('assemblyIdentity')[0]
manifest_assm_ver = node.getAttribute('version')
@@ -46,11 +42,31 @@ def main():
node.setAttribute('oldVersion', node.getAttribute('oldVersion') + manifest_assm_ver)
comment = config_dom.createComment("This file is automatically generated by the build. see indra/newview/build_win32_appConfig.py")
config_dom.insertBefore(comment, config_dom.childNodes[0])
-
+
+ print "Writing: " + dst_config_name
f = open(dst_config_name, 'w')
config_dom.writexml(f)
f.close()
+
+
+
+def main():
+ config = sys.argv[1]
+ src_dir = sys.argv[2]
+ dst_dir = sys.argv[3]
+ dst_name = sys.argv[4]
+
+ if config.lower() == 'debug':
+ src_manifest_name = dst_dir + '/Microsoft.VC80.DebugCRT.manifest'
+ src_config_name = src_dir + '/SecondLifeDebug.exe.config'
+ else:
+ src_manifest_name = dst_dir + '/Microsoft.VC80.CRT.manifest'
+ src_config_name = src_dir + '/SecondLife.exe.config'
+
+ dst_config_name = dst_dir + '/' + dst_name
+ munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name)
+
return 0
if __name__ == "__main__":