Register alpha.0 B4A prototype

This commit is contained in:
2026-06-12 15:11:26 +02:00
commit c97a49cad7
12 changed files with 768 additions and 0 deletions

51
tools/build-b4a.ps1 Normal file
View File

@@ -0,0 +1,51 @@
param(
[string]$ProjectRoot = (Resolve-Path "$PSScriptRoot\..").Path,
[string]$ProjectFile = "swarm.b4a",
[string]$BuilderPath = "C:\Program Files\Anywhere Software\B4A\B4ABuilder.exe",
[ValidateSet("Build", "BuildBundle", "BuildLibrary")]
[string]$Task = "Build",
[switch]$NoSign,
[switch]$Obfuscate,
[switch]$NoClean,
[string]$Configuration = "",
[string]$Output = ""
)
$ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath $BuilderPath)) {
throw "B4ABuilder.exe non trovato: $BuilderPath"
}
if (-not (Test-Path -LiteralPath (Join-Path $ProjectRoot $ProjectFile))) {
throw "Progetto B4A non trovato: $(Join-Path $ProjectRoot $ProjectFile)"
}
$arguments = @(
"-Task=$Task",
"-BaseFolder=$ProjectRoot",
"-Project=$ProjectFile",
"-Obfuscate=$($Obfuscate.IsPresent)",
"-ShowWarnings=True",
"-NoSign=$($NoSign.IsPresent)",
"-NoClean=$($NoClean.IsPresent)"
)
if ($Configuration.Trim().Length -gt 0) {
$arguments += "-Configuration=$Configuration"
}
if ($Output.Trim().Length -gt 0) {
$arguments += "-Output=$Output"
}
Write-Host "B4A build: $ProjectFile"
Write-Host "Root: $ProjectRoot"
Write-Host ""
& $BuilderPath @arguments
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
throw "Build B4A fallita. Exit code: $exitCode"
}