[cpack_installer] bootstrap installer is copied to root of build directory. uploads directory is cleaned before copied to.

This commit is contained in:
scottr
2021-05-17 20:52:06 -07:00
parent 2ddbd36f9a
commit 37b2ac797d
@@ -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}