From 37b2ac797d9c78fb557051301ec52a146e5d3f57 Mon Sep 17 00:00:00 2001 From: scottr Date: Mon, 17 May 2021 20:52:06 -0700 Subject: [PATCH] [cpack_installer] bootstrap installer is copied to root of build directory. uploads directory is cleaned before copied to. --- cmake/Platform/Windows/PackagingPostBuild.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index bfe725ab3b..cfed90e155 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -54,7 +54,7 @@ set(_light_command -o "${_bootstrap_output_file}" ) -message(STATUS "Creating Installer Bootstrapper...") +message(STATUS "Creating Bootstrap Installer...") execute_process( COMMAND ${_candle_command} COMMAND_ERROR_IS_FATAL ANY @@ -64,6 +64,12 @@ execute_process( COMMAND_ERROR_IS_FATAL ANY ) +file(COPY ${_bootstrap_output_file} + DESTINATION ${CPACK_PACKAGE_DIRECTORY} +) + +message(STATUS "Bootstrap installer generated to ${CPACK_PACKAGE_DIRECTORY}/${_bootstrap_filename}") + # use the internal default path if somehow not specified from cpack_configure_downloads if(NOT CPACK_UPLOAD_DIRECTORY) set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) @@ -73,6 +79,7 @@ endif() # through cpack_configure_downloads. this mimics the same process cpack does natively for # some other frameworks that have built-in online installer support. message(STATUS "Copying installer artifacts to upload directory...") +file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) file(GLOB _artifacts "${_cpack_wix_out_dir}/*.msi" "${_cpack_wix_out_dir}/*.cab") file(COPY ${_artifacts} DESTINATION ${CPACK_UPLOAD_DIRECTORY}