Build scripts
Local release builds for Windows and Linux.
Windows
.\scripts\build-windows.ps1
Output: target\release\posprint.exe
Options:
.\scripts\build-windows.ps1 -Deb:$false # exe only (default)
Linux
chmod +x scripts/build-linux.sh
./scripts/build-linux.sh # release binary
./scripts/build-linux.sh --deb # binary + .deb package
Outputs:
| Artifact | Path |
|---|---|
| Binary | target/release/posprint |
| Debian package | target/debian/*.deb |
Linux targets we support
| Format | Distros | Notes |
|---|---|---|
.deb | Debian, Ubuntu, Mint, Pop!_OS, etc. | Recommended for apt-based systems; produced by cargo-deb |
| Raw binary | Any x86_64 Linux | Copy target/release/posprint; needs X11/Wayland libs at runtime |
.rpm | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with fpm if needed |
| AppImage | Universal | Not automated yet; good for portable distribution |
Architecture: x86_64 (amd64) only in CI and build scripts today.
Linux build dependencies (Debian/Ubuntu)
sudo apt-get install -y build-essential pkg-config \
libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
For .deb:
cargo install cargo-deb --locked
Tests before release
cargo test --release
Source
| 1 | # Build scripts |
| 2 | |
| 3 | Local release builds for Windows and Linux. |
| 4 | |
| 5 | ## Windows |
| 6 | |
| 7 | ```powershell |
| 8 | .\scripts\build-windows.ps1 |
| 9 | ``` |
| 10 | |
| 11 | Output: `target\release\posprint.exe` |
| 12 | |
| 13 | Options: |
| 14 | |
| 15 | ```powershell |
| 16 | .\scripts\build-windows.ps1 -Deb:$false # exe only (default) |
| 17 | ``` |
| 18 | |
| 19 | ## Linux |
| 20 | |
| 21 | ```bash |
| 22 | chmod +x scripts/build-linux.sh |
| 23 | ./scripts/build-linux.sh # release binary |
| 24 | ./scripts/build-linux.sh --deb # binary + .deb package |
| 25 | ``` |
| 26 | |
| 27 | Outputs: |
| 28 | |
| 29 | | Artifact | Path | |
| 30 | |----------|------| |
| 31 | | Binary | `target/release/posprint` | |
| 32 | | Debian package | `target/debian/*.deb` | |
| 33 | |
| 34 | ### Linux targets we support |
| 35 | |
| 36 | | Format | Distros | Notes | |
| 37 | |--------|---------|-------| |
| 38 | | **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` | |
| 39 | | **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime | |
| 40 | | **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed | |
| 41 | | **AppImage** | Universal | Not automated yet; good for portable distribution | |
| 42 | |
| 43 | **Architecture:** `x86_64` (amd64) only in CI and build scripts today. |
| 44 | |
| 45 | ### Linux build dependencies (Debian/Ubuntu) |
| 46 | |
| 47 | ```bash |
| 48 | sudo apt-get install -y build-essential pkg-config \ |
| 49 | libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev |
| 50 | ``` |
| 51 | |
| 52 | For `.deb`: |
| 53 | |
| 54 | ```bash |
| 55 | cargo install cargo-deb --locked |
| 56 | ``` |
| 57 | |
| 58 | ## Tests before release |
| 59 | |
| 60 | ```bash |
| 61 | cargo test --release |
| 62 | ``` |