[cpack_installer] add desktop and start menu shortcuts

main
scottr 5 years ago
parent 3d4d63ab1d
commit e0cb0fec9b

@ -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)" />

@ -83,6 +83,10 @@ set(CPACK_WIX_PRODUCT_ICON ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/produc
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")
if(LY_INSTALLER_DOWNLOAD_URL)

@ -26,5 +26,6 @@ set(FILES
Packaging_windows.cmake
PackagingPostBuild.cmake
Packaging/Bootstrapper.wxs
Packaging/Shortcuts.wxs
Packaging/Template.wxs.in
)

Loading…
Cancel
Save