26 lines
730 B
PowerShell
26 lines
730 B
PowerShell
# CI build script for Windows (used by Gitea/GitHub Actions).
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "=== CI build: Windows ===" -ForegroundColor Cyan
|
|
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements-build.txt
|
|
|
|
$env:PLAYWRIGHT_BROWSERS_PATH = "0"
|
|
playwright install chromium
|
|
|
|
pyinstaller --noconfirm --clean "build\scribd_gui.spec"
|
|
|
|
$Dist = "dist\Scribd PDF Downloader"
|
|
if (-not (Test-Path $Dist)) {
|
|
throw "Build output not found: $Dist"
|
|
}
|
|
|
|
Copy-Item "config.ini" $Dist -Force -ErrorAction SilentlyContinue
|
|
|
|
$Zip = "dist\Scribd-PDF-Downloader-Windows.zip"
|
|
if (Test-Path $Zip) { Remove-Item $Zip -Force }
|
|
Compress-Archive -Path $Dist -DestinationPath $Zip
|
|
|
|
Write-Host "Created $Zip" -ForegroundColor Green
|