From 642f2b37eeba821f3dacadd3a35d8efd6c02ce35 Mon Sep 17 00:00:00 2001
From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
Date: Wed, 22 Sep 2021 18:48:26 -0700
Subject: [PATCH] able to put release monolithic into an installer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
---
cmake/Packaging.cmake | 13 ++
.../Packaging/BootstrapperTheme.wxl.in | 2 +
.../Packaging/BootstrapperTheme.xml.in | 121 +++++++++---------
.../Platform/Windows/Packaging_windows.cmake | 4 +-
.../build/Platform/Windows/build_config.json | 2 +-
.../Platform/Windows/installer_windows.cmd | 2 +-
6 files changed, 79 insertions(+), 65 deletions(-)
diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake
index d13293db40..3c98c42d86 100644
--- a/cmake/Packaging.cmake
+++ b/cmake/Packaging.cmake
@@ -235,6 +235,8 @@ ly_configure_cpack_component(
DISPLAY_NAME "${PROJECT_NAME}"
DESCRIPTION "${PROJECT_NAME} Headers, scripts and common files"
)
+#file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "set(LY_CPACK_COMPONENTS_ALL ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})\n")
+
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
unset(flags)
@@ -243,11 +245,20 @@ foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
else()
set(flags DISABLED)
endif()
+
+ # Inject a check to not declare components that have not been built. We are using AzCore since that is a
+ # common target that will always be build, in every permutation and configuration
+ #file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}"
+ # "if(EXISTS \"${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${conf}/${CMAKE_STATIC_LIBRARY_PREFIX}AzCore${CMAKE_STATIC_LIBRARY_SUFFIX}\")\n")
ly_configure_cpack_component(
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF} ${flags}
DISPLAY_NAME "${PROJECT_NAME} (${conf})"
DESCRIPTION "${PROJECT_NAME} Libraries and Tools in ${conf}"
)
+ #file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}"
+#"list(APPEND LY_CPACK_COMPONENTS_ALL ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF})
+#endif()\n")
+
endforeach()
if(LY_INSTALLER_DOWNLOAD_URL)
@@ -260,3 +271,5 @@ if(LY_INSTALLER_DOWNLOAD_URL)
ALL
)
endif()
+
+#file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "set(CPACK_COMPONENTS_ALL \${LY_CPACK_COMPONENTS_ALL})\n")
diff --git a/cmake/Platform/Windows/Packaging/BootstrapperTheme.wxl.in b/cmake/Platform/Windows/Packaging/BootstrapperTheme.wxl.in
index 7d221913d5..9e5f796b70 100644
--- a/cmake/Platform/Windows/Packaging/BootstrapperTheme.wxl.in
+++ b/cmake/Platform/Windows/Packaging/BootstrapperTheme.wxl.in
@@ -20,6 +20,8 @@ Setup will install [WixBundleName] on your computer. Click install to continue,
+ Include debug SDK
+ Include release-monolithic SDK
Install location:
&Browse
WARNING:
diff --git a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in
index cafa6c765a..22e76ad2db 100644
--- a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in
+++ b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in
@@ -1,7 +1,7 @@
- #(loc.WindowTitle)
+ #(loc.WindowTitle)
Segoe UI
@@ -15,113 +15,112 @@
Segoe UI
-
+
- #(loc.InstallHeader)
+ #(loc.InstallHeader)
-
-
-
-
+
+
+
+
- #(loc.OptionsHeader)
+ #(loc.OptionsHeader)
- Include debug SDK
- Include release monolithic SDK
+ #(loc.IncludeDebugSDK)
+ #(loc.IncludeReleaseMonolithicSDK)
- #(loc.OptionsLocationLabel)
-
-
- #(loc.OptionsWarningTitle)
- #(loc.OptionsWarning)
+ #(loc.OptionsLocationLabel)
+
+
+ #(loc.OptionsWarningTitle)
+ #(loc.OptionsWarning)
-
-
-
+
+
+
- #(loc.ModifyHeader)
+ #(loc.ModifyHeader)
-
-
-
-
+
+
+
+
- #(loc.ProgressHeader)
+ #(loc.ProgressHeader)
- #(loc.CacheProgressLabel)
-
-
+ #(loc.CacheProgressLabel)
+
+ 100%
- #(loc.ExecuteProgressLabel)
-
-
+ #(loc.ExecuteProgressLabel)
+
+ 100%
-
-
+
+
- #(loc.FilesInUseHeader)
+ #(loc.FilesInUseHeader)
- #(loc.FilesInUseLabel)
-
+ #(loc.FilesInUseLabel)
+
+
+
-
-
-
-
-
-
+
+
+
- #(loc.SuccessHeader)
- #(loc.SuccessInstallHeader)
- #(loc.SuccessRepairHeader)
- #(loc.SuccessUninstallHeader)
+ #(loc.SuccessHeader)
+ #(loc.SuccessInstallHeader)
+ #(loc.SuccessRepairHeader)
+ #(loc.SuccessUninstallHeader)
-
-
-
+
+
+
-
- #(loc.FailureHeader)
- #(loc.FailureInstallHeader)
- #(loc.FailureUninstallHeader)
- #(loc.FailureRepairHeader)
+
+ #(loc.FailureHeader)
+ #(loc.FailureInstallHeader)
+ #(loc.FailureUninstallHeader)
+ #(loc.FailureRepairHeader)
- #(loc.FailureHyperlinkLogText)
-
+ #(loc.FailureHyperlinkLogText)
+ MessageText
-
-
+
+
- #(loc.HelpHeader)
+ #(loc.HelpHeader)
- #(loc.HelpText)
+ #(loc.HelpText)
-
-
+
+
diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake
index ddfaea00d1..63f0abc6ae 100644
--- a/cmake/Platform/Windows/Packaging_windows.cmake
+++ b/cmake/Platform/Windows/Packaging_windows.cmake
@@ -83,8 +83,8 @@ endif()
set(CPACK_WIX_PRODUCT_GUID ${LY_WIX_PRODUCT_GUID})
set(CPACK_WIX_UPGRADE_GUID ${LY_WIX_UPGRADE_GUID})
-set(CPACK_WIX_PRODUCT_LOGO ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/product_logo.png)
-set(CPACK_WIX_PRODUCT_ICON ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/product_icon.ico)
+set(CPACK_WIX_PRODUCT_LOGO ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/logo.png)
+set(CPACK_WIX_PRODUCT_ICON ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/icon.ico)
set(CPACK_WIX_TEMPLATE "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Template.wxs.in")
diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json
index 3848e6f980..a90a99856b 100644
--- a/scripts/build/Platform/Windows/build_config.json
+++ b/scripts/build/Platform/Windows/build_config.json
@@ -359,7 +359,7 @@
"PARAMETERS": {
"CONFIGURATION": "profile",
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
- "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DLY_INSTALLER_WIX_ROOT=\"!WIX! \"",
+ "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DLY_INSTALLER_WIX_ROOT=\"!WIX!\"",
"EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=https://www.o3debinaries.org -DLY_INSTALLER_LICENSE_URL=https://www.o3debinaries.org/license",
"CPACK_BUCKET": "spectra-prism-staging-us-west-2",
"CMAKE_LY_PROJECTS": "",
diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd
index 87f53adc7f..94fb8c4f42 100644
--- a/scripts/build/Platform/Windows/installer_windows.cmd
+++ b/scripts/build/Platform/Windows/installer_windows.cmd
@@ -52,7 +52,7 @@ IF NOT "%CPACK_BUCKET%"=="" (
)
ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS%
-"!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS%
+REM "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS%
IF NOT %ERRORLEVEL%==0 (
REM dump the log file generated by cpack specifically for WIX
ECHO ****************************************************************