From 6a71cf21b0faf400db173b8dea3983f3e265fca2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 16 Feb 2012 08:52:26 +0100 Subject: [PATCH] Added OpenAL redistributable to OpenMW installer --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d556ae147..9c702be2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -348,10 +348,18 @@ if(WIN32) SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_INSTALLED_ICON_NAME "omwlauncher.exe") - if(EXISTS "${OpenMW_BINARY_DIR}/vcredist_x86.exe") - INSTALL(FILES "${OpenMW_BINARY_DIR}/vcredist_x86.exe" DESTINATION "redist") + SET(VCREDIST "${OpenMW_BINARY_DIR}/vcredist_x86.exe") + if(EXISTS ${VCREDIST}) + INSTALL(FILES ${VCREDIST} DESTINATION "redist") SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x86.exe\\\" /q'" ) - endif(EXISTS "${OpenMW_BINARY_DIR}/vcredist_x86.exe") + endif(EXISTS ${VCREDIST}) + + SET(OALREDIST "${OpenMW_BINARY_DIR}/oalinst.exe") + if(EXISTS ${OALREDIST}) + INSTALL(FILES ${OALREDIST} DESTINATION "redist") + SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} + ExecWait '\\\"$INSTDIR\\\\redist\\\\oalinst.exe\\\" /s'" ) + endif(EXISTS ${OALREDIST}) include(CPack) endif(WIN32)