update
This commit is contained in:
80
AzA march 2026/build_test_chat_only_host.ps1
Normal file
80
AzA march 2026/build_test_chat_only_host.ps1
Normal file
@@ -0,0 +1,80 @@
|
||||
# Lokaler Testbuild: Chat-only Host + Update-Badge (kein produktiver Release)
|
||||
# Erzeugt dist\test_chat_only_host_update_v1\
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$projectRoot = $PSScriptRoot
|
||||
Set-Location $projectRoot
|
||||
|
||||
$outDir = Join-Path $projectRoot "dist\test_chat_only_host_update_v1"
|
||||
Write-Host "AZA Chat-only Testbuild -> $outDir"
|
||||
|
||||
Write-Host "Build-Stamp..."
|
||||
python (Join-Path $projectRoot "aza_build_stamp.py")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "Build-Stamp fehlgeschlagen."
|
||||
}
|
||||
|
||||
$specs = @(
|
||||
@{ Name = "AZA_Chat"; Spec = "AZA_Chat.spec" },
|
||||
@{ Name = "AZA_EmpfangShell"; Spec = "AZA_EmpfangShell.spec" },
|
||||
@{ Name = "AZA_KontaktPanel"; Spec = "AZA_KontaktPanel.spec" },
|
||||
@{ Name = "aza_updater"; Spec = "aza_updater.spec" }
|
||||
)
|
||||
|
||||
foreach ($s in $specs) {
|
||||
Write-Host "PyInstaller: $($s.Name)..."
|
||||
pyinstaller --noconfirm (Join-Path $projectRoot $s.Spec)
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Build fehlgeschlagen: $($s.Spec)"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path $outDir) {
|
||||
Remove-Item $outDir -Recurse -Force
|
||||
}
|
||||
New-Item -ItemType Directory -Path $outDir | Out-Null
|
||||
|
||||
$distRoot = Join-Path $projectRoot "dist"
|
||||
$copyMap = @{
|
||||
"AZA_Chat.exe" = "AZA_Chat.exe"
|
||||
"AZA_EmpfangShell.exe" = "AZA_EmpfangShell.exe"
|
||||
"AZA_KontaktPanel.exe" = "AZA_KontaktPanel.exe"
|
||||
"aza_updater.exe" = "aza_updater.exe"
|
||||
}
|
||||
foreach ($src in $copyMap.Keys) {
|
||||
$from = Join-Path $distRoot $src
|
||||
if (-not (Test-Path $from)) {
|
||||
Write-Error "EXE fehlt: $from"
|
||||
exit 1
|
||||
}
|
||||
Copy-Item $from (Join-Path $outDir $copyMap[$src]) -Force
|
||||
Write-Host " kopiert: $src"
|
||||
}
|
||||
|
||||
$assetsSrc = Join-Path $projectRoot "assets"
|
||||
if (Test-Path $assetsSrc) {
|
||||
Copy-Item $assetsSrc (Join-Path $outDir "assets") -Recurse -Force
|
||||
Write-Host " assets\ kopiert"
|
||||
}
|
||||
|
||||
foreach ($cfg in @("backend_url.txt", "backend_token.txt", "_build_info.py")) {
|
||||
$p = Join-Path $projectRoot $cfg
|
||||
if (Test-Path $p) {
|
||||
Copy-Item $p (Join-Path $outDir $cfg) -Force
|
||||
Write-Host " $cfg kopiert"
|
||||
}
|
||||
}
|
||||
|
||||
$testManifest = Join-Path $projectRoot "test_data\chat_version_test.json"
|
||||
if (Test-Path $testManifest) {
|
||||
$td = Join-Path $outDir "test_data"
|
||||
New-Item -ItemType Directory -Path $td -Force | Out-Null
|
||||
Copy-Item $testManifest (Join-Path $td "chat_version_test.json") -Force
|
||||
Write-Host " test_data\chat_version_test.json kopiert"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Testbuild fertig: $outDir"
|
||||
Write-Host "Start Chat-only: AZA_Chat.exe (ohne Office)"
|
||||
Write-Host "Update-Test: set AZA_CHAT_UPDATE_TEST=1 vor Start"
|
||||
Reference in New Issue
Block a user