# 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"