[main] windows installer icons and shortcuts

Merge pull request #844 from aws-lumberyard-dev/cpack_installer

Re-organized windows installer resources
Added product logo to bootstrapper UI
Added product icon to bootstrapper exe and control panel entry
Added creation of desktop and start menu shortcuts
Fixed issue where default GUIDs were not properly updated if seed value changes (e.g. version bump)
This commit is contained in:
Scott Romero
2021-05-20 16:28:48 -07:00
committed by GitHub
8 changed files with 108 additions and 20 deletions
@@ -9,6 +9,7 @@
Version="$(var.CPACK_PACKAGE_VERSION)"
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_BOOTSTRAP_UPGRADE_GUID)"
IconSourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"
DisableModify="yes">
<Variable Name="InstallFolder"
@@ -20,12 +21,14 @@
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl="$(var.CPACK_LICENSE_URL)"
LogoFile="$(var.CPACK_WIX_PRODUCT_LOGO)"
ShowVersion="yes" />
</BootstrapperApplicationRef>
<?else?>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.CPACK_WIX_LICENSE_RTF)"
LogoFile="$(var.CPACK_WIX_PRODUCT_LOGO)"
ShowVersion="yes" />
</BootstrapperApplicationRef>
<?endif?>
@@ -0,0 +1,68 @@
<?xml version='1.0' encoding='windows-1252'?>
<?include "cpack_variables.wxi"?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.CPACK_PACKAGE_NAME)">
<Directory Id="VersionedApplicationProgramsFolder" Name="$(var.CPACK_PACKAGE_VERSION)"/>
</Directory>
</Directory>
<Directory Id="DesktopFolder" SourceName="Desktop"/>
</DirectoryRef>
<!-- the WorkingDirectory attribute for shortcuts uses directory refs -->
<DirectoryRef Id="INSTALL_ROOT">
<Directory Id="root.bin" Name="bin">
<Directory Id="root.bin.Windows" Name="Windows">
<Directory Id="root.bin.Windows.profile" Name="profile" />
</Directory>
</Directory>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcuts" Guid="{2600B54A-65FB-4507-A7CD-3CE4817C7173}">
<Shortcut Id="DesktopShortcut_Launcher"
Target="[root.bin.Windows.profile]o3de.exe"
WorkingDirectory="root.bin.Windows.profile"
Name="$(var.CPACK_PACKAGE_NAME) $(var.CPACK_PACKAGE_VERSION)" />
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\$(var.CPACK_PACKAGE_VENDOR)\$(var.CPACK_PACKAGE_NAME)"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="VersionedApplicationProgramsFolder">
<Component Id="StartMenuShortcuts" Guid="{E6447F0F-A46E-4A72-83D8-600707B590E8}">
<Shortcut Id="StartMenuShortcut_Launcher"
Target="[root.bin.Windows.profile]o3de.exe"
WorkingDirectory="root.bin.Windows.profile"
Name="$(var.CPACK_PACKAGE_NAME)" />
<RemoveFolder Id="RemoveVersionedApplicationProgramsFolder" Directory='VersionedApplicationProgramsFolder' On="uninstall"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\$(var.CPACK_PACKAGE_VENDOR)\$(var.CPACK_PACKAGE_NAME)"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
</Fragment>
</Wix>
@@ -38,7 +38,10 @@
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
<?endif?>
<FeatureRef Id="ProductFeature"/>
<FeatureRef Id="ProductFeature">
<ComponentRef Id="DesktopShortcuts"/>
<ComponentRef Id="StartMenuShortcuts"/>
</FeatureRef>
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c042fce57915fc749abc7b37de765fd697c3c4d7de045a3d44805aa0ce29901a
size 107016
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac0348c906c91de864cba91c0231b4794d8a00fafa630d13f2232351b90aa59b
size 11074
@@ -30,6 +30,7 @@ set(_addtional_defines
-dCPACK_LOCAL_INSTALLER_DIR=${_cpack_wix_out_dir}
-dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME}
-dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir}
-dCPACK_WIX_PRODUCT_LOGO=${CPACK_WIX_PRODUCT_LOGO}
)
if(CPACK_LICENSE_URL)
@@ -43,7 +44,7 @@ set(_candle_command
"-I${_cpack_wix_out_dir}" # to include cpack_variables.wxi
${_addtional_defines}
${_ext_flags}
"${CPACK_SOURCE_DIR}/Platform/Windows/PackagingBootstrapper.wxs"
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Bootstrapper.wxs"
-o "${_bootstrap_out_dir}/"
)
+22 -16
View File
@@ -48,29 +48,28 @@ set(_guid_seed_base "${PROJECT_NAME}_${LY_VERSION_STRING}")
generate_wix_guid(_wix_default_product_guid "${_guid_seed_base}_ProductID" )
generate_wix_guid(_wix_default_upgrade_guid "${_guid_seed_base}_UpgradeCode")
set(LY_WIX_PRODUCT_GUID "${_wix_default_product_guid}" CACHE STRING "GUID for the Product ID field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(LY_WIX_UPGRADE_GUID "${_wix_default_upgrade_guid}" CACHE STRING "GUID for the Upgrade Code field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(LY_WIX_PRODUCT_GUID "" CACHE STRING "GUID for the Product ID field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(LY_WIX_UPGRADE_GUID "" CACHE STRING "GUID for the Upgrade Code field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(_uses_default_product_guid FALSE)
if(NOT LY_WIX_PRODUCT_GUID OR LY_WIX_PRODUCT_GUID STREQUAL ${_wix_default_product_guid})
set(_uses_default_product_guid TRUE)
set(LY_WIX_PRODUCT_GUID ${_wix_default_product_guid})
# clear previously cached default values to correct future runs. this will
# unfortunately only work if the seed properties still haven't changed
if(LY_WIX_PRODUCT_GUID STREQUAL ${_wix_default_product_guid})
unset(LY_WIX_PRODUCT_GUID CACHE)
endif()
if(LY_WIX_UPGRADE_GUID STREQUAL ${_wix_default_upgrade_guid})
unset(LY_WIX_UPGRADE_GUID CACHE)
endif()
set(_uses_default_upgrade_guid FALSE)
if(NOT LY_WIX_UPGRADE_GUID OR LY_WIX_UPGRADE_GUID STREQUAL ${_wix_default_upgrade_guid})
set(_uses_default_upgrade_guid TRUE)
set(LY_WIX_UPGRADE_GUID ${_wix_default_upgrade_guid})
endif()
if(_uses_default_product_guid OR _uses_default_upgrade_guid)
if(NOT (LY_WIX_PRODUCT_GUID AND LY_WIX_UPGRADE_GUID))
message(STATUS "One or both WiX GUIDs were auto generated. It is recommended you supply your own GUIDs through LY_WIX_PRODUCT_GUID and LY_WIX_UPGRADE_GUID.")
if(_uses_default_product_guid)
if(NOT LY_WIX_PRODUCT_GUID)
set(LY_WIX_PRODUCT_GUID ${_wix_default_product_guid})
message(STATUS "-> Default LY_WIX_PRODUCT_GUID = ${LY_WIX_PRODUCT_GUID}")
endif()
if(_uses_default_upgrade_guid)
if(NOT LY_WIX_UPGRADE_GUID)
set(LY_WIX_UPGRADE_GUID ${_wix_default_upgrade_guid})
message(STATUS "-> Default LY_WIX_UPGRADE_GUID = ${LY_WIX_UPGRADE_GUID}")
endif()
endif()
@@ -78,7 +77,14 @@ endif()
set(CPACK_WIX_PRODUCT_GUID ${LY_WIX_PRODUCT_GUID})
set(CPACK_WIX_UPGRADE_GUID ${LY_WIX_UPGRADE_GUID})
set(CPACK_WIX_TEMPLATE "${CPACK_SOURCE_DIR}/Platform/Windows/PackagingTemplate.wxs.in")
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_TEMPLATE "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Template.wxs.in")
set(CPACK_WIX_EXTRA_SOURCES
"${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Shortcuts.wxs"
)
set(_embed_artifacts "yes")
@@ -24,7 +24,8 @@ set(FILES
PALDetection_windows.cmake
Install_windows.cmake
Packaging_windows.cmake
PackagingBootstrapper.wxs
PackagingPostBuild.cmake
PackagingTemplate.wxs.in
Packaging/Bootstrapper.wxs
Packaging/Shortcuts.wxs
Packaging/Template.wxs.in
)