Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wix-template.xml « windows « share - github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9693d63444c9e74f1e6dadd687231b72e45c32c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?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"
    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?>
        
        <FeatureRef Id="ProductFeature">
            <ComponentRef Id="ApplicationShortcut" />
        </FeatureRef>

        <UI>
            <UIRef Id="$(var.CPACK_WIX_UI_REF)" />
            <Publish Dialog="ExitDialog" 
                     Control="Finish" 
                     Event="DoAction" 
                     Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
        </UI>

        <?include "properties.wxi"?>
        <?include "product_fragment.wxi"?>

        <DirectoryRef Id="TARGETDIR">
            <Directory Id="ProgramMenuFolder">
                <Directory Id="ApplicationProgramsFolder" Name="KeePassXC"/>
            </Directory>
        </DirectoryRef>

        <DirectoryRef Id="ApplicationProgramsFolder">
            <Component Id="ApplicationShortcut" Guid="*">
                <Shortcut Id="ApplicationStartMenuShortcut" 
                    Name="KeePassXC"
                    Target="[#CM_FP_KeePassXC.exe]"
                    Icon="ProductIcon.ico"
                    WorkingDirectory="INSTALL_ROOT"/>
                <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
           </Component>
        </DirectoryRef>

        <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
        <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch $(var.CPACK_PACKAGE_NAME)" />
        <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="KillKeePassXCInstall" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" />
        <CustomAction Id="KillKeePassXCUninstall" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" />

        <Property Id="WixQuietExecCmdLine" Value='"Taskkill" /IM keepassxc-proxy.exe /F' />
        <CustomAction Id="KillProxyInstall" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore" />
        <CustomAction Id="KillProxyUninstall" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore" />

        <InstallExecuteSequence>
            <Custom Action="KillKeePassXCInstall" After="InstallInitialize" />
            <Custom Action="KillProxyInstall" After="InstallInitialize" />
            <Custom Action="KillKeePassXCUninstall" Before="InstallValidate">Installed</Custom>
            <Custom Action="KillProxyUninstall" Before="InstallValidate">Installed</Custom>
        </InstallExecuteSequence>
    </Product>
</Wix>