Skip to content

Commit

Permalink
Merge branch 'tidy-windows-installer' into 'master'
Browse files Browse the repository at this point in the history
Tidy Windows installation directory

See merge request OpenMW/openmw!4484
  • Loading branch information
psi29a committed Dec 21, 2024
2 parents 356c530 + 6efef81 commit 7afbf81
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -945,23 +945,43 @@ elseif(NOT APPLE)

if(WIN32)
INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." FILES_MATCHING PATTERN "*.dll"
PATTERN "deps" EXCLUDE
PATTERN ".cmake" EXCLUDE
PATTERN ".qt" EXCLUDE
PATTERN "_CPack_Packages" EXCLUDE
PATTERN "_deps" EXCLUDE
PATTERN "apps" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "CMakeFiles" EXCLUDE
PATTERN "components" EXCLUDE
PATTERN "deps" EXCLUDE
PATTERN "docs" EXCLUDE
PATTERN "extern" EXCLUDE
PATTERN "files" EXCLUDE
PATTERN "Testing" EXCLUDE)
PATTERN "lib" EXCLUDE
PATTERN "SymStore" EXCLUDE
PATTERN "symstore-venv" EXCLUDE
PATTERN "Testing" EXCLUDE
PATTERN "tests_output" EXCLUDE
PATTERN "try-compile")
INSTALL(DIRECTORY "${INSTALL_SOURCE}/" DESTINATION "." CONFIGURATIONS Debug;RelWithDebInfo FILES_MATCHING PATTERN "*.pdb"
PATTERN "deps" EXCLUDE
PATTERN ".cmake" EXCLUDE
PATTERN ".qt" EXCLUDE
PATTERN "_CPack_Packages" EXCLUDE
PATTERN "_deps" EXCLUDE
PATTERN "apps" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "CMakeFiles" EXCLUDE
PATTERN "components" EXCLUDE
PATTERN "deps" EXCLUDE
PATTERN "docs" EXCLUDE
PATTERN "extern" EXCLUDE
PATTERN "files" EXCLUDE
PATTERN "Testing" EXCLUDE)
PATTERN "lib" EXCLUDE
PATTERN "SymStore" EXCLUDE
PATTERN "symstore-venv" EXCLUDE
PATTERN "Testing" EXCLUDE
PATTERN "tests_output" EXCLUDE
PATTERN "try-compile")
INSTALL(FILES "${INSTALL_SOURCE}/openmw.cfg.install" DESTINATION "." RENAME "openmw.cfg")
INSTALL(FILES "${OpenMW_SOURCE_DIR}/CHANGELOG.md" DESTINATION "." RENAME "CHANGELOG.txt")
INSTALL(FILES "${OpenMW_SOURCE_DIR}/README.md" DESTINATION "." RENAME "README.txt")
Expand Down Expand Up @@ -1009,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 7afbf81

Please sign in to comment.