1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-25 18:15:00 +00:00

Delete redist installer once it's installed

Also make the redist installation code filename-agnostic so it's easier to test with a dummy redist or eventually support Windows on Arm64
This commit is contained in:
AnyOldName3 2024-12-19 17:46:16 +00:00
parent 36c922eded
commit 6efef81635

View File

@ -1029,7 +1029,11 @@ elseif(NOT APPLE)
SET(VCREDIST64 "${OpenMW_BINARY_DIR}/vcredist_x64.exe" CACHE FILEPATH "Path to vcredist_x64.exe")
if(EXISTS ${VCREDIST64})
INSTALL(FILES ${VCREDIST64} DESTINATION "redist")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x64.exe\\\" /q /norestart'" )
get_filename_component(REDIST_FILENAME "${VCREDIST64}" NAME)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
ExecWait '\\\"$INSTDIR\\\\redist\\\\${REDIST_FILENAME}\\\" /q /norestart'
RMDir /r \\\"$INSTDIR\\\\redist\\\"
")
endif(EXISTS ${VCREDIST64})
if(CMAKE_CL_64)