Skip to content

Commit 6efef81

Browse files
committed
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
1 parent 36c922e commit 6efef81

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,11 @@ elseif(NOT APPLE)
10291029
SET(VCREDIST64 "${OpenMW_BINARY_DIR}/vcredist_x64.exe" CACHE FILEPATH "Path to vcredist_x64.exe")
10301030
if(EXISTS ${VCREDIST64})
10311031
INSTALL(FILES ${VCREDIST64} DESTINATION "redist")
1032-
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x64.exe\\\" /q /norestart'" )
1032+
get_filename_component(REDIST_FILENAME "${VCREDIST64}" NAME)
1033+
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
1034+
ExecWait '\\\"$INSTDIR\\\\redist\\\\${REDIST_FILENAME}\\\" /q /norestart'
1035+
RMDir /r \\\"$INSTDIR\\\\redist\\\"
1036+
")
10331037
endif(EXISTS ${VCREDIST64})
10341038

10351039
if(CMAKE_CL_64)

0 commit comments

Comments
 (0)