Files
Ratdoku/tools/build_android.ps1
Ratdoku Builder e0f712b39c build: restore Android toolchain and verify APK icon
Points the Android build at a portable JDK/SDK in the approved temp folder, hardens QA so export failures cannot false-pass, and confirms the rebuilt APK ships the new gouache launcher icon.
2026-12-05 22:57:33 -06:00

26 lines
919 B
PowerShell

param(
[string]$Godot = "C:\Program Files (x86)\Steam\steamapps\common\Godot Engine\godot.windows.opt.tools.64.exe",
[string]$Jdk = "C:\Users\enter\AppData\Local\Temp\opencode\android-toolchain\jdk",
[string]$Sdk = "C:\Users\enter\AppData\Local\Temp\opencode\android-toolchain\sdk",
[string]$Out = "build/Ratdoku.apk"
)
$ErrorActionPreference = "Stop"
$project = Split-Path $PSScriptRoot -Parent
$env:JAVA_HOME = $Jdk
$env:ANDROID_HOME = $Sdk
$env:ANDROID_SDK_ROOT = $Sdk
$env:Path = "$Jdk\bin;$Sdk\platform-tools;$Sdk\build-tools\35.0.0;$env:Path"
New-Item -ItemType Directory -Force -Path (Join-Path $project "build") | Out-Null
Write-Host "Exporting $Out ..."
& $Godot --headless --path $project --export-debug "Android" $Out
$apk = Join-Path $project $Out
if (Test-Path $apk) {
Get-Item $apk | Select-Object FullName, Length, LastWriteTime
} else {
throw "Export did not produce $apk"
}