build: add portable single-file EXE to the build

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-21 13:31:02 +02:00
1 parent 735585c579
commit c42cedd655
3 files changed
+34 -18

No files matched your search

+11 -2
View File
@@ -1,15 +1,17 @@
<#
.SYNOPSIS
Baut NetBox Synchronizer: Tests, PyInstaller-Build und Inno-Setup-Installer.
Baut NetBox Synchronizer: Tests, PyInstaller-Build, Inno-Setup-Installer und portable EXE.
.EXAMPLE
.\build.ps1 # alles
.\build.ps1 -SkipInstaller # nur dist\NetBoxSynchronizer\
.\build.ps1 -SkipInstaller # nur dist\NetBoxSynchronizer\ (und portable EXE)
.\build.ps1 -SkipPortable # ohne dist\portable\NetBox VM Import.exe
.\build.ps1 -SkipTests
#>
param(
[switch]$SkipTests,
[switch]$SkipInstaller,
[switch]$SkipPortable,
[string]$InnoSetupCompiler
)
@@ -38,6 +40,13 @@ Write-Host "Baue NetBox Synchronizer $version …" -ForegroundColor Cyan
& $python -m PyInstaller --noconfirm --clean --log-level WARN NetBoxSynchronizer.spec
if ($LASTEXITCODE) { throw "PyInstaller fehlgeschlagen." }
if (-not $SkipPortable) {
Write-Host "Baue portable EXE …" -ForegroundColor Cyan
& $python -m PyInstaller --noconfirm --clean --log-level WARN --distpath dist\portable --workpath build\portable NetBoxSynchronizer.spec -- --portable
if ($LASTEXITCODE) { throw "PyInstaller (portabel) fehlgeschlagen." }
Write-Host "Fertig: dist\portable\NetBox VM Import.exe" -ForegroundColor Green
}
if ($SkipInstaller) {
Write-Host "Fertig: dist\NetBoxSynchronizer\NetBoxSynchronizer.exe" -ForegroundColor Green
return