8233138 : Error 2343 when using --win-dir-chooser JDK-8200758-branch
authorherrick
Thu, 31 Oct 2019 11:11:42 -0400
branchJDK-8200758-branch
changeset 58887 920f6770d71c
parent 58886 45bb0bebd36f
child 58888 d802578912f3
8233138 : Error 2343 when using --win-dir-chooser Submitted-by: asemenyuk Reviewed-by: aherrick, almatvee
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixSourcesBuilder.java
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_en.wxl
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs
src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixSourcesBuilder.java	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixSourcesBuilder.java	Thu Oct 31 11:11:42 2019 -0400
@@ -409,10 +409,6 @@
         for (var folder : defineShortcutFolders) {
             Path path = folder.getPath(this);
             componentIds.addAll(addRootBranch(xml, path));
-
-            if (!KNOWN_DIRS.contains(path)) {
-                componentIds.add(addDirectoryCleaner(xml, path));
-            }
         }
 
         addComponentGroup(xml, "Shortcuts", componentIds);
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_en.wxl	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_en.wxl	Thu Oct 31 11:11:42 2019 -0400
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="1252">
-  <String Id="message.install.dir.exist">The folder [APPLICATIONFOLDER] already exist. Would you like to install to that folder anyway?</String>
+  <String Id="message.install.dir.exist">The folder [INSTALLDIR] already exist. Would you like to install to that folder anyway?</String>
 </WixLocalization>
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl	Thu Oct 31 11:11:42 2019 -0400
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="1252">
-  <String Id="message.install.dir.exist">The folder [APPLICATIONFOLDER] already exist. Would you like to install to that folder anyway?</String>
+  <String Id="message.install.dir.exist">The folder [INSTALLDIR] already exist. Would you like to install to that folder anyway?</String>
 </WixLocalization>
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl	Thu Oct 31 11:11:42 2019 -0400
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="1252">
-  <String Id="message.install.dir.exist">The folder [APPLICATIONFOLDER] already exist. Would you like to install to that folder anyway?</String>
+  <String Id="message.install.dir.exist">The folder [INSTALLDIR] already exist. Would you like to install to that folder anyway?</String>
 </WixLocalization>
--- a/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs	Thu Oct 31 11:11:42 2019 -0400
@@ -53,7 +53,7 @@
       <!--
         Run WixUI_InstallDir dialog in the default install directory.
       -->
-      <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER"/>
+      <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
       <UIRef Id="WixUI_InstallDir" />
 
       <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="JpCheckInstallDir" Order="3">1</Publish>
--- a/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp	Thu Oct 31 11:07:01 2019 -0400
+++ b/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp	Thu Oct 31 11:11:42 2019 -0400
@@ -58,13 +58,13 @@
         TCHAR *szValue = NULL;
         DWORD cchSize = 0;
 
-        UINT result = MsiGetProperty(hInstall, TEXT("APPLICATIONFOLDER"),
+        UINT result = MsiGetProperty(hInstall, TEXT("INSTALLDIR"),
                 TEXT(""), &cchSize);
         if (result == ERROR_MORE_DATA) {
             cchSize = cchSize + 1; // NULL termination
             szValue = new TCHAR[cchSize];
             if (szValue) {
-                result = MsiGetProperty(hInstall, TEXT("APPLICATIONFOLDER"),
+                result = MsiGetProperty(hInstall, TEXT("INSTALLDIR"),
                         szValue, &cchSize);
             } else {
                 return ERROR_INSTALL_FAILURE;