Skip to content

Commit b18c8bb

Browse files
authored
Merge pull request #75968 from andrurogerz/android-ndk-extract
[Android] fix NDK extract location
2 parents f4c3d8f + 511e879 commit b18c8bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

utils/build.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,8 @@ function Fetch-Dependencies {
629629
(
630630
[string]$ZipFileName,
631631
[string]$BinaryCache,
632-
[string]$ExtractPath
632+
[string]$ExtractPath,
633+
[bool]$CreateExtractPath = $true
633634
)
634635

635636
$source = Join-Path -Path $BinaryCache -ChildPath $ZipFileName
@@ -646,11 +647,14 @@ function Fetch-Dependencies {
646647
}
647648
}
648649

650+
$destination = if ($CreateExtractPath) { $destination } else { $BinaryCache }
651+
649652
Write-Output "Extracting '$ZipFileName' ..."
650653
New-Item -ItemType Directory -ErrorAction Ignore -Path $BinaryCache | Out-Null
651654
Expand-Archive -Path $source -DestinationPath $destination -Force
652655
}
653656

657+
654658
function Extract-Toolchain {
655659
param
656660
(
@@ -727,7 +731,7 @@ function Fetch-Dependencies {
727731
$NDKHash = "A478D43D4A45D0D345CDA6BE50D79642B92FB175868D9DC0DFC86181D80F691E"
728732
DownloadAndVerify $NDKURL "$BinaryCache\android-ndk-$AndroidNDKVersion-windows.zip" $NDKHash
729733

730-
Extract-ZipFile -ZipFileName "android-ndk-$AndroidNDKVersion-windows.zip" -BinaryCache $BinaryCache -ExtractPath "android-ndk-$AndroidNDKVersion"
734+
Extract-ZipFile -ZipFileName "android-ndk-$AndroidNDKVersion-windows.zip" -BinaryCache $BinaryCache -ExtractPath "android-ndk-$AndroidNDKVersion" -CreateExtractPath $false
731735
}
732736

733737
if ($WinSDKVersion) {

0 commit comments

Comments
 (0)