src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/template.wxs
author herrick
Mon, 11 Mar 2019 13:24:47 -0400
branchJDK-8200758-branch
changeset 57254 c1b92a014e89
parent 57181 d10b861e8d62
child 57255 f686bda3b831
permissions -rw-r--r--
8214566: --win-dir-chooser does not prompt if destination folder is not empty Submitten-by: almatvee Reviewed-by: herrick
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57254
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     2
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     3
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     4
    <Product Id="PRODUCT_GUID" Name="APPLICATION_NAME"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     5
             Language="1033" Version="APPLICATION_VERSION"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     6
             Manufacturer="APPLICATION_VENDOR"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     7
             UpgradeCode="PRODUCT_UPGRADE_GUID">
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     8
        <Package Description="APPLICATION_DESCRIPTION" Comments="None"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
     9
                 InstallerVersion="200" Compressed="yes"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    10
                 InstallScope="INSTALL_SCOPE" Platform="PLATFORM"/>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    11
        <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    12
        UPGRADE_BLOCK
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    13
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    14
        <!-- We use RemoveFolderEx to ensure application folder is fully
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    15
             removed on uninstall. Including files created outside of MSI
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    16
             after application had been installed (e.g. on AU or user state).
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    17
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    18
             Hovewer, RemoveFolderEx is only available in WiX 3.6,
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    19
             we will comment it out if we running older WiX.
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    20
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    21
             RemoveFolderEx requires that we "remember" the path for uninstall.
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    22
             Read the path value and set the APPLICATIONFOLDER property with the value.
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    23
        -->
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    24
        <Property Id="APPLICATIONFOLDER">
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    25
            <RegistrySearch Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    26
                            Root="REGISTRY_ROOT" Type="raw"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    27
                            Id="APPLICATIONFOLDER_REGSEARCH" Name="Path" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    28
        </Property>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    29
        <DirectoryRef Id="APPLICATIONFOLDER">
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    30
            <Component Id="CleanupMainApplicationFolder" Guid="*" Win64="WIN64">
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    31
                <RegistryValue Root="REGISTRY_ROOT"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    32
                               Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    33
                               Name="Path" Type="string" Value="[APPLICATIONFOLDER]"
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    34
                               KeyPath="yes" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    35
                <!-- We need to use APPLICATIONFOLDER variable here or RemoveFolderEx
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    36
                     will not remove on "install". But only if WiX 3.6 is used. -->
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    37
                WIX36_ONLY_START
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    38
                  <util:RemoveFolderEx On="uninstall" Property="APPLICATIONFOLDER" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    39
                WIX36_ONLY_END
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    40
            </Component>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    41
        </DirectoryRef>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    42
        <?include bundle.wxi ?>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    43
        CA_BLOCK
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    44
        <UI>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    45
            INVALID_INSTALL_DIR_DLG_BLOCK
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    46
            UI_BLOCK
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    47
        </UI>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    48
        <Icon Id="DesktopIcon.exe" SourceFile="APPLICATION_ICON" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    49
        <Icon Id="StartMenuIcon.exe" SourceFile="APPLICATION_ICON" />
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    50
        SECONDARY_LAUNCHER_ICONS
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    51
    </Product>
c1b92a014e89 8214566: --win-dir-chooser does not prompt if destination folder is not empty
herrick
parents: 57181
diff changeset
    52
</Wix>