Files
zeal/pkg/wix/template.xml
T
2026-07-26 18:44:28 +03:00

63 lines
3.1 KiB
XML

<!-- 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" ?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<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" />
<MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
<Launch Condition="VersionNT64" Message="This package can only be installed on 64-bit versions of Windows." />
<!-- Qt supports Windows 10 version 1809 (build 17763) and later. Repair and removal of an
existing installation remain possible on older builds, while an upgrade is refused
there, since the newer version would not start. -->
<Launch Condition="Installed OR WindowsBuild &gt;= 17763" Message="[ProductName] requires Windows 10 version 1809 or later." />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT" />
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id="ARPPRODUCTICON" Value="ProductIcon.ico" />
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)" />
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)" />
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)" />
<?endif?>
<UI>
<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 -->
<Property Id="LAUNCHAPPONEXIT" Value="1" Secure="yes" />
<!-- Pull in the auto-generated feature/component fragments. -->
<FeatureRef Id="ProductFeature" />
<!-- Action to launch application after installer exits. -->
<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>
<Custom Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)" Before="RemoveFiles" />
</InstallExecuteSequence>
</Package>
</Wix>