From c39ddb599137692a442e0ecb2d954235b7d17db4 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sat, 28 Jan 2012 00:04:21 -0600 Subject: [PATCH] Packager now conditionally includes fmodex/fmod.dll if project is set to use them. --- indra/newview/CMakeLists.txt | 15 ++++++++++++++- indra/newview/viewer_manifest.py | 25 +++++++++++++++++-------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6dd26f1ae..4e75cb535 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1391,8 +1391,20 @@ if (WINDOWS) else() set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map") endif() - + +if (FMOD) + if(MANIFEST_LIBRARIES) + set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMOD_BINARY_DIR}/fmod.dll") + else(MANIFEST_LIBRARIES) + set(MANIFEST_LIBRARIES "--extra_libraries=${FMOD_BINARY_DIR}/fmod.dll") + endif(MANIFEST_LIBRARIES) +endif (FMOD) if (FMODEX) + if(MANIFEST_LIBRARIES) + set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMODEX_BINARY_DIR}/fmodex.dll") + else(MANIFEST_LIBRARIES) + set(MANIFEST_LIBRARIES "--extra_libraries=${FMODEX_BINARY_DIR}/fmodex.dll") + endif(MANIFEST_LIBRARIES) set(EXTRA_LINKER_FLAGS "/DELAYLOAD:fmodex.dll") endif (FMODEX) @@ -1461,6 +1473,7 @@ endif (FMODEX) --build=${CMAKE_CURRENT_BINARY_DIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat + ${MANIFEST_LIBRARIES} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 689b932d7..7768f05bd 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -208,14 +208,14 @@ class WindowsManifest(ViewerManifest): self.path("dbghelp.dll") # For using FMOD for sound... DJS - if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - try: - self.path("fmod.dll") - pass - except: - print "Skipping fmod.dll - not found" - pass - self.end_prefix() + #~if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): + #~try: + #~self.path("fmod.dll") + #~pass + #~except: + #~print "Skipping fmod.dll - not found" + #~ pass + #~self.end_prefix() # For textures #if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): @@ -320,6 +320,15 @@ class WindowsManifest(ViewerManifest): self.path("wrap_oal.dll") self.end_prefix() + if self.args['extra_libraries'] != None: + print self.args['extra_libraries'] + path_list = self.args['extra_libraries'].split('|') + for path in path_list: + path_pair = path.rsplit('/', 1) + if self.prefix(src=path_pair[0], dst=""): + self.path(path_pair[1]) + self.end_prefix() + # pull in the crash logger and updater from other projects self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'], dst="win_crash_logger.exe") self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'], dst="updater.exe")