Skip to content

Commit 3af1bdd

Browse files
committed
[xaprepare] Fix JetBrains OpenJDK8 extraction on Windows.
1 parent fd9df7c commit 3af1bdd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build-tools/xaprepare/xaprepare/Steps/Step_InstallJetBrainsOpenJDK.Windows.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ partial class Step_InstallJetBrainsOpenJDK
88
{
99
async Task<bool> Unpack (string fullArchivePath, string destinationDirectory, bool cleanDestinationBeforeUnpacking = false)
1010
{
11+
// https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbrsdk-8u202-windows-x64-b1483.37.tar.gz
12+
// doesn't contain a single root directory! This causes the
13+
// "JetBrains root directory not found after unpacking" check to fail on Windows.
14+
// "Fix" things by setting destinationDirectory to contain RootDirName, allowing
15+
// the check to succeed.
16+
if (JdkVersion == Configurables.Defaults.JetBrainsOpenJDK8Version) {
17+
destinationDirectory = Path.Combine (destinationDirectory, RootDirName);
18+
}
19+
1120
// On Windows we don't have Tar available and the Windows package is a .tar.gz
1221
// 7zip can unpack tar.gz but it's a two-stage process - first it decompresses the package, then it can be
1322
// invoked again to extract the actual tar contents.

0 commit comments

Comments
 (0)