mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-06-14 03:16:38 +10:00
Update builder for ARM.
This commit is contained in:
@@ -248,6 +248,4 @@ ModelManifest.xml
|
|||||||
[Oo]thers/
|
[Oo]thers/
|
||||||
|
|
||||||
# Arm Build Files
|
# Arm Build Files
|
||||||
arm_build.bat
|
|
||||||
ArmBuild.ps1
|
|
||||||
package.zip
|
package.zip
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
$staging = Join-Path $root "_staging"
|
||||||
|
$outZip = Join-Path $root "package.zip"
|
||||||
|
|
||||||
|
function Copy-Binaries-ToRoot($src)
|
||||||
|
{
|
||||||
|
if (!(Test-Path $src)) { return }
|
||||||
|
|
||||||
|
Get-ChildItem $src -File | Where-Object {
|
||||||
|
$_.Extension -in ".exe", ".dll"
|
||||||
|
} | ForEach-Object {
|
||||||
|
Copy-Item $_.FullName $staging -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Preparing staging..."
|
||||||
|
Remove-Item $staging -Recurse -Force -ErrorAction Ignore
|
||||||
|
New-Item $staging -ItemType Directory | Out-Null
|
||||||
|
|
||||||
|
# ① 先放 Release
|
||||||
|
Copy-Binaries-ToRoot (Join-Path $root "Release")
|
||||||
|
|
||||||
|
# ② 再放 ARM\Release(覆盖同名)
|
||||||
|
Copy-Binaries-ToRoot (Join-Path $root "ARM\Release")
|
||||||
|
|
||||||
|
# ③ shared 全部铺到根目录
|
||||||
|
$shared = Join-Path $root "shared"
|
||||||
|
if (Test-Path $shared) {
|
||||||
|
Get-ChildItem $shared -Recurse | ForEach-Object {
|
||||||
|
$rel = $_.FullName.Substring($shared.Length).TrimStart('\')
|
||||||
|
$dest = Join-Path $staging $rel
|
||||||
|
|
||||||
|
if ($_.PSIsContainer) {
|
||||||
|
New-Item $dest -ItemType Directory -Force | Out-Null
|
||||||
|
} else {
|
||||||
|
Copy-Item $_.FullName $dest -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Creating ZIP..."
|
||||||
|
if (Test-Path $outZip) { Remove-Item $outZip -Force }
|
||||||
|
|
||||||
|
Compress-Archive `
|
||||||
|
-Path (Join-Path $staging "*") `
|
||||||
|
-DestinationPath $outZip `
|
||||||
|
-CompressionLevel Fastest
|
||||||
|
|
||||||
|
Remove-Item $staging -Recurse -Force
|
||||||
|
|
||||||
|
Write-Host "Done: $outZip"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
@echo off
|
||||||
|
set SCRIPT_DIR=%~dp0
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%ArmBuild.ps1"
|
||||||
|
pause
|
||||||
Reference in New Issue
Block a user