This directory contains automation scripts for building, packaging, and releasing ZPL2PDF across multiple platforms.
📦 For full releases, use the scripts in the
release/folder
These scripts in this directory are individual build utilities.
Scripts to test the REST API locally (health check, PDF/PNG conversion, error handling). Run from project root.
| Platform | Command |
|---|---|
| Windows | .\scripts\api\test-api.ps1 |
| Linux/macOS | ./scripts/api/test-api.sh |
Requires the API server to be free on port 5000. See API Guide.
Purpose: Build ZPL2PDF for all supported platforms (8 platforms total)
Platforms:
- Windows: x64, x86, ARM64
- Linux: x64, ARM64, ARM
- macOS: x64 (Intel), ARM64 (Apple Silicon)
Usage:
# Windows PowerShell
.\scripts\build-all-platforms.ps1
# Skip tests (faster)
.\scripts\build-all-platforms.ps1 -SkipTests
# Custom output directory
.\scripts\build-all-platforms.ps1 -OutputDir "dist"# Linux/macOS
./scripts/build-all-platforms.sh
# Skip tests
./scripts/build-all-platforms.sh --skip-tests
# Custom output directory
./scripts/build-all-platforms.sh --output distOutput:
- Compiled binaries for all platforms in
build/publish/ - Compressed archives (.zip for Windows, .tar.gz for Linux/macOS)
- SHA256 checksums file (
SHA256SUMS.txt)
Features:
- ✅ Parallel-ready (builds sequentially but designed for parallel execution)
- ✅ Self-contained builds (no .NET runtime required)
- ✅ Single-file executables
- ✅ Automatic archive creation
- ✅ Checksum generation
- ✅ Progress feedback with colored output
- ✅ Error handling and reporting
Purpose: Build Windows installer using Inno Setup
Prerequisites:
- Inno Setup 6 installed
- Windows only
- Project must be built first
Usage:
# Build installer with default settings
.\scripts\build-installer.ps1
# Build with specific version
.\scripts\build-installer.ps1 -Version "2.1.0"
# Custom Inno Setup path
.\scripts\build-installer.ps1 -InnoSetupPath "C:\InnoSetup\ISCC.exe"
# Show help
.\scripts\build-installer.ps1 -HelpOutput:
- Windows installer (.exe) in
install/output/ - Multi-language support (EN, PT-BR, ES, FR, DE, IT)
- Automatic environment variable configuration
- Start menu shortcuts
- Uninstaller
Features:
- ✅ Multi-language installer
- ✅ Automatic language detection
- ✅ Sets
ZPL2PDF_LANGUAGEenvironment variable - ✅ Creates start menu shortcuts
- ✅ Adds to Windows PATH (optional)
- ✅ Silent install support
Purpose: Automate WinGet package submission to microsoft/winget-pkgs
Prerequisites:
- GitHub CLI (
gh) installed and authenticated - Windows only (PowerShell)
- Installer must be built and published to GitHub Release
Usage:
# Automatic (downloads installer from release)
.\scripts\winget-submit.ps1 -Version "2.0.0"
# Custom installer path
.\scripts\winget-submit.ps1 -Version "2.0.0" -InstallerPath "installer\ZPL2PDF-Setup-2.0.0.exe"
# Dry run (test without submitting)
.\scripts\winget-submit.ps1 -Version "2.0.0" -DryRun
# Skip validation
.\scripts\winget-submit.ps1 -Version "2.0.0" -SkipValidationWhat it does:
- ✅ Validates prerequisites (Git, GitHub CLI)
- ✅ Locates installer and calculates SHA256
- ✅ Extracts Product Code from Inno Setup script
- ✅ Updates 4 manifest files (version, installer, locales)
- ✅ Validates manifests with
winget validate - ✅ Forks/updates brunoleocam/winget-pkgs
- ✅ Creates new branch:
brunoleocam.ZPL2PDF-2.0.0 - ✅ Commits and pushes changes
- ✅ Creates Pull Request to microsoft/winget-pkgs
Output:
- Updated manifests in
manifests/ - Pull Request to microsoft/winget-pkgs
- Users can install via:
winget install brunoleocam.ZPL2PDF
Features:
- ✅ Automatic SHA256 calculation
- ✅ Product Code extraction
- ✅ Manifest validation
- ✅ Fork management
- ✅ Automated PR creation
- ✅ Detailed progress feedback
Purpose: Full release script that automates the entire deployment process
Prerequisites:
- .NET SDK 9.0+
- Docker Desktop (for Linux packages and Docker images)
- GitHub CLI (
gh) authenticated - Inno Setup 6 (for the Windows installer)
Usage:
# Full release
.\scripts\full-release.ps1 -Version "2.1.0"
# Dry run (test without publishing)
.\scripts\full-release.ps1 -Version "2.1.0" -DryRun
# Skip specific steps
.\scripts\full-release.ps1 -Version "2.1.0" -SkipTests
.\scripts\full-release.ps1 -Version "2.1.0" -SkipDocker
.\scripts\full-release.ps1 -Version "2.1.0" -SkipWinGet
.\scripts\full-release.ps1 -Version "2.1.0" -SkipGitHubReleaseWhat it does (12 steps):
- ✅ Checks prerequisites (git, dotnet, docker, gh)
- ✅ Updates the version in ALL project files
- ✅ Generates builds for 8 platforms (Windows, Linux, macOS)
- ✅ Builds Linux packages (.deb and .rpm) via Docker
- ✅ Generates the Windows installer (Inno Setup)
- ✅ Generates SHA256 checksums
- ✅ Builds and pushes Docker images (Docker Hub + GHCR)
- ✅ Creates the GitHub release with all assets
- ✅ Updates WinGet manifests
- ✅ Submits a PR to microsoft/winget-pkgs
- ✅ Commits changes to the repository
- ✅ Displays the final summary
Output:
- Builds for all platforms in
build/publish/ - Windows installer
- .deb and .rpm packages
- Published Docker images
- GitHub release
- WinGet PR
Purpose: Basic release (version + build + git tag) - Use full-release.ps1 for full deployment
Usage:
# Windows PowerShell - Full release
.\scripts\release.ps1 -Version "2.1.0"
# Pre-release
.\scripts\release.ps1 -Version "2.1.0-rc1" -PreRelease $true
# Dry run (test without pushing)
.\scripts\release.ps1 -Version "2.1.0" -DryRun $true# Linux/macOS - Full release
./scripts/release.sh -v 2.1.0
# Pre-release
./scripts/release.sh -v 2.1.0-rc1 -p
# Dry run
./scripts/release.sh -v 2.1.0 -dWhat it does:
- ✅ Validates prerequisites (git, dotnet)
- ✅ Checks working directory is clean
- ✅ Updates version in all files:
ZPL2PDF.csprojsrc/Shared/Constants/ApplicationConstants.cswinget-manifest.yamlscripts/release/packages/rpm/rpm/zpl2pdf.specscripts/release/packages/debian/debian/controlCHANGELOG.md
- ✅ Runs tests
- ✅ Builds all platforms (calls
build-all-platforms.*) - ✅ Builds Windows installer (calls
build-installer.ps1) - ✅ Creates git tag
- ✅ Pushes to GitHub (unless dry-run)
- ✅ Provides GitHub release instructions
Output:
- All platform builds in
build/publish/ - Windows installer in
build/publish/ - Git tag
v2.1.0 - Checksums in
SHA256SUMS.txt
Just want to build for your current platform?
# Windows
dotnet build -c Release
dotnet publish -c Release -r win-x64 --self-contained trueWant to test on multiple platforms?
# Windows
.\scripts\build-all-platforms.ps1 -SkipTests# Linux/macOS
./scripts/build-all-platforms.sh --skip-testsReady to publish a new version? Use the scripts in the release/ folder:
# Windows - Test first with dry-run
.\release\release-main.ps1 -Version "3.1.0" -DryRun
# Windows - Full release (does everything automatically)
.\release\release-main.ps1 -Version "3.1.0"
# Skip steps if needed
.\release\release-main.ps1 -Version "3.1.0" -SkipDocker -SkipWinGet
# Run a specific step
.\release\07-build-all-platforms.ps1 -Version "3.1.0"📚 See the Full Release Guide for more details.
If you prefer the basic script (without Docker/WinGet):
# Windows - Test first with dry-run
.\scripts\release.ps1 -Version "2.1.0" -DryRun $true
# Windows - Actual release
.\scripts\release.ps1 -Version "2.1.0"# Linux/macOS - Test first
./scripts/release.sh -v 2.1.0 -d
# Linux/macOS - Actual release
./scripts/release.sh -v 2.1.0| Feature | full-release ⭐ | build-all-platforms | build-installer | winget-submit | release |
|---|---|---|---|---|---|
| Build all platforms | ✅ | ✅ | ❌ | ❌ | ✅ |
| Create archives | ✅ | ✅ | ❌ | ❌ | ✅ |
| Windows installer | ✅ | ❌ | ✅ | ❌ | ✅ |
| Linux packages (.deb/.rpm) | ✅ | ❌ | ❌ | ❌ | ❌ |
| Docker build & push | ✅ | ❌ | ❌ | ❌ | ❌ |
| GitHub Release | ✅ | ❌ | ❌ | ❌ | ❌ |
| Update versions | ✅ | ❌ | ❌ | ❌ | ✅ |
| Run tests | ✅ (optional) | ✅ (optional) | ❌ | ❌ | ✅ |
| Git operations | ✅ | ❌ | ❌ | ✅ (fork/PR) | ✅ |
| Checksums | ✅ | ✅ | ❌ | ✅ | ✅ |
| WinGet submission | ✅ | ❌ | ❌ | ✅ | ❌ |
| GHCR push | ✅ | ❌ | ❌ | ❌ | ❌ |
- .NET SDK 9.0 or later
- Git (for release scripts)
- PowerShell 7+ (for colored output)
- Inno Setup 6 (for installer creation)
- GitHub CLI (
gh) (for WinGet submission)
- Bash 4+
- zip/tar (usually pre-installed)
- sha256sum or shasum (usually pre-installed)
After running build-all-platforms.*:
build/publish/
├── win-x64/
│ └── ZPL2PDF.exe
├── win-x86/
│ └── ZPL2PDF.exe
├── linux-x64/
│ └── ZPL2PDF
├── linux-arm64/
│ └── ZPL2PDF
├── osx-x64/
│ └── ZPL2PDF
├── osx-arm64/
│ └── ZPL2PDF
├── ZPL2PDF-v2.0.0-win-x64.zip
├── ZPL2PDF-v2.0.0-win-x86.zip
├── ZPL2PDF-v2.0.0-linux-x64.tar.gz
├── ZPL2PDF-v2.0.0-linux-arm64.tar.gz
├── ZPL2PDF-v2.0.0-osx-x64.tar.gz
├── ZPL2PDF-v2.0.0-osx-arm64.tar.gz
└── SHA256SUMS.txt
Solution: Install Inno Setup 6 from https://jrsoftware.org/isinfo.php or specify path with -InnoSetupPath
Solution: Install Git for Windows (includes tar) or use WSL
Solution: Commit or stash your changes before running release script
Solution: Fix failing tests or use -SkipTests flag (not recommended for releases)
Solution: Run with -ExecutionPolicy Bypass:
powershell -ExecutionPolicy Bypass -File .\scripts\build-all-platforms.ps1These scripts are designed to work with GitHub Actions, Azure Pipelines, and other CI/CD systems.
Example GitHub Actions usage:
- name: Build All Platforms
run: pwsh scripts/build-all-platforms.ps1 -SkipTests
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: builds
path: build/publish/- ../README.md - Project documentation
- ../release/README.md - Guia completo de release ⭐
- ../CONTRIBUTING.md - Contribution guidelines
- ../CHANGELOG.md - Version history
- ../docs/development/WINGET_GUIDE.md - WinGet packaging guide
- ../docs/guides/LANGUAGE_CONFIGURATION.md - Language system
To improve these scripts:
- Test thoroughly on your platform
- Update this README with any changes
- Ensure cross-platform compatibility
- Add error handling for edge cases
Last Updated: December 2025
Version: 2.0.1