build: include android runtime helpers

This commit is contained in:
Your Name committed 2026-06-27 19:33:27 +08:00
1 parent f257c4e3fc
commit 63c726ddea
12 files changed
+129 -29

No files matched your search

+19 -19
View File
@@ -132,30 +132,19 @@ foreach ($name in @("DouyinGuajiGUI", "web_gui", "run_cli")) {
Remove-Item -LiteralPath $srcDir -Recurse -Force
}
$RuntimeAssets = @(
"coupon.png",
"fav.png",
"fudai.png",
"fudai_icon_countdown_v20260618.png",
"fudai_icon_pending_v20260618.png",
"fudai_icon_purple_left_v20260618.png",
"fudai_icon_red_left_v20260618.png",
"fudai_task_status_dacheng_shape.png",
"like.png",
"x.png",
"xin.png"
)
$AssetsTarget = Join-Path $DistRoot "assets"
if (Test-Path $AssetsTarget) {
Remove-Item -LiteralPath $AssetsTarget -Recurse -Force
}
New-Item -ItemType Directory -Force $AssetsTarget | Out-Null
foreach ($name in $RuntimeAssets) {
$src = Join-Path $Root "assets\$name"
if (-not (Test-Path $src)) {
throw "Missing runtime asset: assets\$name"
}
Copy-Item -LiteralPath $src -Destination (Join-Path $AssetsTarget $name) -Force
$RuntimeAssetFiles = Get-ChildItem -LiteralPath (Join-Path $Root "assets") -File | Where-Object {
$_.Extension -ieq ".png"
}
if (-not $RuntimeAssetFiles) {
throw "Missing runtime assets: assets\*.png"
}
foreach ($asset in $RuntimeAssetFiles) {
Copy-Item -LiteralPath $asset.FullName -Destination (Join-Path $AssetsTarget $asset.Name) -Force
}
$WebuiTarget = Join-Path $DistRoot "webui"
@@ -242,6 +231,17 @@ foreach ($name in $PlatformToolFiles) {
}
}
$AndroidToolsTarget = Join-Path $DistRoot "android-tools"
if (Test-Path $AndroidToolsTarget) {
Remove-Item -LiteralPath $AndroidToolsTarget -Recurse -Force
}
New-Item -ItemType Directory -Force $AndroidToolsTarget | Out-Null
$AdbKeyboardApk = Join-Path $Root "tools\adb\ADBKeyboard.apk"
if (-not (Test-Path $AdbKeyboardApk)) {
throw "Missing Android helper: tools\adb\ADBKeyboard.apk"
}
Copy-Item -LiteralPath $AdbKeyboardApk -Destination (Join-Path $AndroidToolsTarget "ADBKeyboard.apk") -Force
$licensePath = Join-Path $Root "license.dat"
if ($IncludeLicense -and (Test-Path $licensePath)) {
Copy-Item -LiteralPath $licensePath -Destination (Join-Path $DistRoot "license.dat") -Force