Skip to content

Commit

Permalink
Delete redist installer once it's installed
Browse files Browse the repository at this point in the history
Also make the redist installation code filename-agnostic so it's easier to test with a dummy redist or eventually support Windows on Arm64
  • Loading branch information
AnyOldName3 committed Dec 19, 2024
1 parent 36c922e commit 6efef81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6efef81

Please sign in to comment.