keepassxc/share/windows/wix-template.xml

112 lines
4.9 KiB
XML
Raw Normal View History

2017-10-30 10:41:20 -04:00
<?xml version="1.0" encoding="UTF-8"?>
<?include "cpack_variables.wxi"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
2017-10-30 10:41:20 -04:00
RequiredVersion="3.6.3303.0">
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
Name="$(var.CPACK_PACKAGE_NAME)"
Language="1033"
Version="$(var.CPACK_PACKAGE_VERSION)"
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
<Package InstallScope="perMachine" InstallerVersion="301" Compressed="yes"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<MajorUpgrade
Schedule="afterInstallInitialize"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
<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="KPXC_ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="LaunchApplication">LAUNCHAPPONEXIT</Publish>
</UI>
2017-10-30 10:41:20 -04:00
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
<!-- Autostart via registry (optional) -->
<Component Id="Autostart" Guid="*" Directory="INSTALL_ROOT">
<RegistryValue Id="Autostart.rst" Root="HKCU" Action="write"
Key="Software\Microsoft\Windows\CurrentVersion\Run"
Name="$(var.CPACK_PACKAGE_NAME)"
Value="[#CM_FP_KeePassXC.exe]"
Type="string" />
<Condition>AUTOSTARTPROGRAM</Condition>
</Component>
2017-10-30 10:41:20 -04:00
<DirectoryRef Id="TARGETDIR">
<!-- Startmenu shortcut -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="KeePassXC">
<Component Id="ApplicationShortcut" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="KeePassXC"
Target="[#CM_FP_KeePassXC.exe]"
WorkingDirectory="INSTALL_ROOT"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
<!-- Desktop shortcut (optional) -->
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="DesktopShortcut" Guid="F8AFBA1C-296C-41AA-B968-60323A206665">
<Condition>INSTALLDESKTOPSHORTCUT</Condition>
<Shortcut Id="ApplicationDesktopShortcut"
Directory="DesktopFolder"
Name="KeePassXC"
Target="[#CM_FP_KeePassXC.exe]"
WorkingDirectory="INSTALL_ROOT" />
<RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</DirectoryRef>
<Property Id="AUTOSTARTPROGRAM" Value="1" />
<Property Id="LAUNCHAPPONEXIT" Value="1" />
<FeatureRef Id="ProductFeature">
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="Autostart" />
<ComponentRef Id="DesktopShortcut" />
</FeatureRef>
<Property Id="WixShellExecTarget" Value="[#CM_FP_KeePassXC.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<Property Id="WixSilentExecCmdLine" Value='"Taskkill" /IM KeePassXC.exe' />
<CustomAction Id="KillKeePassXC" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" />
<Property Id="WixQuietExecCmdLine" Value='"Taskkill" /IM keepassxc-proxy.exe /F' />
<CustomAction Id="KillProxy" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore" />
<InstallExecuteSequence>
<Custom Action="KillKeePassXC" Before="InstallValidate" />
<Custom Action="KillProxy" Before="InstallValidate" />
</InstallExecuteSequence>
2017-10-30 10:41:20 -04:00
</Product>
</Wix>