- Windows exe:electron-builder 配置 + build:exe 一键打包 - Android APK:离线打包脚手架(命令打包,无需 Android Studio),包名/签名沿用散单项目 - 版本统一:package.json 三段版本,APK versionCode 自动推导 - 配置统一到 config/ 目录,含密钥文件 git 忽略并配套 example 模板 - env.js 接口地址改为环境变量注入,移除敏感信息 - 删除 info/basicinfo.txt(含账号/IP 数据) - tsconfig 移除已弃用的 baseUrl
35 lines
1.4 KiB
PowerShell
35 lines
1.4 KiB
PowerShell
# Extract needed parts from DCloud Android offline SDK zip into android-offline/.
|
|
# Wanted: HBuilder-Integrate-AS (packaging project), SDK (native libs), readme/, license.md
|
|
# Skip: __MACOSX, HBuilder-HelloUniApp, UniPlugin-Hello-AS
|
|
# ASCII-only script to avoid encoding issues on Windows PowerShell 5.1.
|
|
|
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
|
|
|
$zipPath = 'd:\wms_worker_station\android-offline\Android-SDK@5.24.82669_20260813.zip'
|
|
$destRoot = 'd:\wms_worker_station\android-offline'
|
|
$prefix = 'Android-SDK@5.24.82669_20260813/'
|
|
$wanted = @('HBuilder-Integrate-AS/', 'SDK/', 'readme/', 'license.md')
|
|
|
|
$zip = [System.IO.Compression.ZipFile]::OpenRead($zipPath)
|
|
$count = 0
|
|
foreach ($entry in $zip.Entries) {
|
|
$name = $entry.FullName
|
|
if (-not $name.StartsWith($prefix)) { continue }
|
|
$rel = $name.Substring($prefix.Length)
|
|
if ($rel -eq '') { continue }
|
|
$take = $false
|
|
foreach ($w in $wanted) {
|
|
if ($rel -eq $w -or $rel.StartsWith($w)) { $take = $true; break }
|
|
}
|
|
if (-not $take) { continue }
|
|
if ($rel.EndsWith('/')) { continue }
|
|
$dest = Join-Path $destRoot ($rel -replace '/', '\')
|
|
$dir = Split-Path $dest -Parent
|
|
if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir -Force | Out-Null }
|
|
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $dest, $true)
|
|
$count++
|
|
}
|
|
$zip.Dispose()
|
|
Write-Host "extracted files: $count"
|
|
Write-Host "done"
|