8233138 : Error 2343 when using --win-dir-chooser
Submitted-by: asemenyuk
Reviewed-by: aherrick, almatvee
--- 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;