Files
zeal/pkg/wix/template.xml
T

59 lines
2.8 KiB
XML
Raw Normal View History

2026-03-29 04:01:43 +03:00
<!-- SPDX-FileCopyrightText: Oleg Shparber, et al. <https://zealdocs.org> -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<!-- Based on: https://gitlab.kitware.com/cmake/cmake/-/blob/master/Utilities/Release/WiX/WIX.template.in -->
<?include "cpack_variables.wxi"?>
<?define AppExeName="zeal.exe" ?>
2026-04-11 18:33:11 +03:00
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
2026-04-11 18:33:11 +03:00
<Package Name="$(var.CPACK_PACKAGE_NAME)" Language="1033" Version="$(var.CPACK_PACKAGE_VERSION)" Manufacturer="$(var.CPACK_PACKAGE_VENDOR)" UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)" InstallerVersion="500" ProductCode="$(var.CPACK_WIX_PRODUCT_GUID)">
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
2026-04-11 18:33:11 +03:00
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
2026-04-11 18:33:11 +03:00
<Launch Condition="VersionNT64" Message="This package can only be installed on 64-bit versions of Windows." />
2026-04-11 18:33:11 +03:00
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT" />
<?ifdef CPACK_WIX_PRODUCT_ICON?>
2026-04-11 18:33:11 +03:00
<Property Id="ARPPRODUCTICON" Value="ProductIcon.ico" />
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)" />
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
2026-04-11 18:33:11 +03:00
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)" />
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
2026-04-11 18:33:11 +03:00
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)" />
<?endif?>
<UI>
2026-04-11 18:33:11 +03:00
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
<Publish Dialog="Zeal_ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="LaunchApplication" Condition="LAUNCHAPPONEXIT AND (NOT Installed OR WIX_UPGRADE_DETECTED)" />
</UI>
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
<!-- Custom properties to control installation options -->
2026-04-11 18:33:11 +03:00
<Property Id="LAUNCHAPPONEXIT" Value="1" Secure="yes" />
2026-04-11 18:33:11 +03:00
<!-- Pull in the auto-generated feature/component fragments. -->
<FeatureRef Id="ProductFeature" />
<!-- Action to launch application after installer exits. -->
2026-04-11 18:33:11 +03:00
<Property Id="WixShellExecTarget" Value="[#CM_FP_zeal.exe]" />
<CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" />
<!-- Close running Zeal processes. -->
<util:CloseApplication CloseMessage="yes" Target="$(var.AppExeName)" ElevatedCloseMessage="yes" RebootPrompt="no" TerminateProcess="0" />
<InstallExecuteSequence>
2026-04-11 18:33:11 +03:00
<Custom Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)" Before="RemoveFiles" />
</InstallExecuteSequence>
2026-04-11 18:33:11 +03:00
</Package>
</Wix>