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