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
On Arch Linux:
chmod +x scripts/build-arch.sh
./scripts/build-arch.sh # .pkg.tar.zst for pacman
sudo pacman -U packaging/arch/posprint-*-x86_64.pkg.tar.zst
Outputs:
| Artifact | Path |
|---|---|
| Binary | target/release/posprint |
| Debian package | target/debian/*.deb |
| Arch package | packaging/arch/posprint-*-x86_64.pkg.tar.zst |
Linux targets we support
| Format | Distros | Notes |
|---|---|---|
.deb | Debian, Ubuntu, Mint, Pop!_OS, etc. | Recommended for apt-based systems; produced by cargo-deb |
.pkg.tar.zst | Arch Linux, Manjaro, EndeavourOS, etc. | Recommended for pacman; sudo pacman -U posprint-*.pkg.tar.zst |
| 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
Arch Linux build dependencies
sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \
wayland libx11 fontconfig freetype2 libglvnd git rsync
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 | On **Arch Linux**: |
| 28 | |
| 29 | ```bash |
| 30 | chmod +x scripts/build-arch.sh |
| 31 | ./scripts/build-arch.sh # .pkg.tar.zst for pacman |
| 32 | sudo pacman -U packaging/arch/posprint-*-x86_64.pkg.tar.zst |
| 33 | ``` |
| 34 | |
| 35 | Outputs: |
| 36 | |
| 37 | | Artifact | Path | |
| 38 | |----------|------| |
| 39 | | Binary | `target/release/posprint` | |
| 40 | | Debian package | `target/debian/*.deb` | |
| 41 | | Arch package | `packaging/arch/posprint-*-x86_64.pkg.tar.zst` | |
| 42 | |
| 43 | ### Linux targets we support |
| 44 | |
| 45 | | Format | Distros | Notes | |
| 46 | |--------|---------|-------| |
| 47 | | **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` | |
| 48 | | **`.pkg.tar.zst`** | Arch Linux, Manjaro, EndeavourOS, etc. | **Recommended** for pacman; `sudo pacman -U posprint-*.pkg.tar.zst` | |
| 49 | | **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime | |
| 50 | | **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed | |
| 51 | | **AppImage** | Universal | Not automated yet; good for portable distribution | |
| 52 | |
| 53 | **Architecture:** `x86_64` (amd64) only in CI and build scripts today. |
| 54 | |
| 55 | ### Linux build dependencies (Debian/Ubuntu) |
| 56 | |
| 57 | ```bash |
| 58 | sudo apt-get install -y build-essential pkg-config \ |
| 59 | libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev |
| 60 | ``` |
| 61 | |
| 62 | For `.deb`: |
| 63 | |
| 64 | ```bash |
| 65 | cargo install cargo-deb --locked |
| 66 | ``` |
| 67 | |
| 68 | ### Arch Linux build dependencies |
| 69 | |
| 70 | ```bash |
| 71 | sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \ |
| 72 | wayland libx11 fontconfig freetype2 libglvnd git rsync |
| 73 | ``` |
| 74 | |
| 75 | ## Tests before release |
| 76 | |
| 77 | ```bash |
| 78 | cargo test --release |
| 79 | ``` |