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

40
tools/deploy-emulator.ps1 Normal file
View File

@@ -0,0 +1,40 @@
param(
[string]$ProjectRoot = (Resolve-Path "$PSScriptRoot\..").Path,
[string]$AdbPath = "C:\android\platform-tools\adb.exe",
[string]$PackageName = "anywheresoftware.b4a.swarm",
[string]$MainActivity = ".main",
[switch]$NoBuild,
[switch]$NoLaunch,
[switch]$KeepLogcat
)
$ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath $AdbPath)) {
throw "adb.exe non trovato: $AdbPath"
}
if (-not $NoBuild) {
& "$PSScriptRoot\build-b4a.ps1" -ProjectRoot $ProjectRoot
}
$apkPath = Join-Path $ProjectRoot "Objects\swarm.apk"
if (-not (Test-Path -LiteralPath $apkPath)) {
throw "APK non trovato: $apkPath"
}
& $AdbPath wait-for-device
if (-not $KeepLogcat) {
& $AdbPath logcat -c
}
Write-Host ""
Write-Host "Installo APK: $apkPath"
& $AdbPath install -r -d $apkPath
if (-not $NoLaunch) {
Write-Host ""
Write-Host "Avvio app: $PackageName/$MainActivity"
& $AdbPath shell am start -n "$PackageName/$MainActivity"
}