Release Healer Man 0.1.3
This commit is contained in:
@@ -8,7 +8,8 @@ $ErrorActionPreference = 'Stop'
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$documentsRoot = Split-Path -Parent $projectRoot
|
||||
$wowRoot = Join-Path $documentsRoot 'wow335a'
|
||||
$jdkRoot = Join-Path $wowRoot 'dungeon-export-work\tools\temurin-21'
|
||||
$projectJdkRoot = Join-Path $projectRoot '.tools\temurin-21'
|
||||
$legacyJdkRoot = Join-Path $wowRoot 'dungeon-export-work\tools\temurin-21'
|
||||
$portableSdkRoot = Join-Path $wowRoot '.android-sdk'
|
||||
|
||||
$jdkHome = $null
|
||||
@@ -16,14 +17,17 @@ $configuredJavaHome = [Environment]::GetEnvironmentVariable('JAVA_HOME')
|
||||
if ($configuredJavaHome -and (Test-Path -LiteralPath (Join-Path $configuredJavaHome 'bin\java.exe'))) {
|
||||
$jdkHome = Get-Item -LiteralPath $configuredJavaHome
|
||||
} else {
|
||||
$jdkHome = Get-ChildItem -LiteralPath $jdkRoot -Directory -ErrorAction SilentlyContinue |
|
||||
Where-Object { Test-Path -LiteralPath (Join-Path $_.FullName 'bin\java.exe') } |
|
||||
$jdkHome = @($projectJdkRoot, $legacyJdkRoot) |
|
||||
ForEach-Object {
|
||||
Get-ChildItem -LiteralPath $_ -Directory -ErrorAction SilentlyContinue |
|
||||
Where-Object { Test-Path -LiteralPath (Join-Path $_.FullName 'bin\java.exe') }
|
||||
} |
|
||||
Sort-Object Name -Descending |
|
||||
Select-Object -First 1
|
||||
}
|
||||
|
||||
if (-not $jdkHome) {
|
||||
throw "Java 21 was not found. Set JAVA_HOME or install the portable JDK under $jdkRoot"
|
||||
throw "Java 21 was not found. Set JAVA_HOME or install the portable JDK under $projectJdkRoot"
|
||||
}
|
||||
|
||||
$configuredSdkRoot = [Environment]::GetEnvironmentVariable('ANDROID_SDK_ROOT')
|
||||
|
||||
Reference in New Issue
Block a user