Packaging Plan¶
Last updated: 2025-11-19
FiberPath ships a cross-platform desktop GUI (Tauri + React) that shells out to the Python CLI. Our packaging goal for Phase 6 is to produce signed/unsigned installers for Windows, macOS, and Linux on every push so we can test the bundles ahead of release tagging. This document captures the current plan for local builds and CI automation.
Deliverables¶
- Windows:
.msi+.exebundles emitted bynpm run tauri buildon a Windows host. - macOS:
.dmg+.appbundles built natively on macOS runners (arm64 by default). - Linux:
.AppImage+.debartifacts generated on Ubuntu runners with GTK/WebKit deps. - Artifacts: Uploaded per-platform in GitHub Actions for manual QA and smoke testing.
The GUI still shells out to the Python CLI at runtime, so end users must install
fiberpathseparately. Bundling the interpreter plus CLI will be evaluated after the core packaging infrastructure is stable.
Local Build Requirements (Windows)¶
Install the following once per machine:
- Node.js 20+ – aligns with the
enginesfield infiberpath_gui/package.json. - Rust toolchain – via
rustup, includescargo,clippy, andrustfmt. - Python environment with
fiberpathinstalled –uv pip install -e .[cli]ensures the CLI is available onPATHfor runtime testing. - Microsoft Visual C++ Build Tools – required by Rust on Windows (usually present on GitHub runners and most dev machines running VS Build Tools 2022).
- NSIS 3.x – installer generator used by Tauri for
.exebundles (winget install NSIS.NSIS -e --accept-package-agreements --accept-source-agreements).
Once installed, run the packaging command from a PowerShell prompt inside fiberpath_gui:
npm install
npm run package
npm run package wraps tauri build --ci, which emits artifacts under
fiberpath_gui/src-tauri/target/release/bundle/ (NSIS .exe and WiX .msi on Windows).
CI Build Strategy¶
We run a dedicated GitHub Actions workflow (.github/workflows/gui-package.yml) that triggers on
every push affecting the GUI workspace (plus manual dispatch). The job matrix covers Windows,
macOS, and Ubuntu runners with OS-specific prep steps and shared packaging logic. Highlights:
- Checkout the repo and enable a
tauri-build-cachekeyed by OS +package-lock.jsonhash to speed up Node and Cargo builds between runs. - Install toolchains
- Node.js 20 via
actions/setup-node@v4. - Rust via
dtolnay/rust-toolchain@stable(ensures nightly updates automatically). - Linux-only: install
pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf. (Ubuntu 24.04 dropped the 4.0-era WebKit/JavaScriptCore headers, so we rely on the newer 4.1 packages.) - Dependencies:
npm ciunderfiberpath_gui(linting already handled by the smoke workflow). - Packaging:
npm run package(which wrapstauri build --cito keep the CLI non-interactive inside GitHub Actions). - Artifacts: Upload the entire
src-tauri/target/release/bundle/**/*directory for later download. Artifact names encode the platform (fiberpath-gui-windows,fiberpath-gui-macos,fiberpath-gui-linux).
Tip: if GitHub bumps
ubuntu-latestbefore Tauri updates its instructions, temporarily pin the Linux matrix entry toubuntu-22.04to keep the older packages available.
The workflow intentionally separates smoke testing (gui-smoke.yml) from packaging so lint/build
failures are caught earlier and packaging can remain focused on producing installers.
Future Enhancements¶
- Wire releases to tags (e.g.,
v0.1.0) and automatically attach the installers. - Add codesigning for macOS (
developer-id) and Windows (signtool+ certificate) when credentials are available. - Evaluate bundling a minimal Python runtime or verifying
fiberpathCLI availability at app start. - Consider caching
.venv/CLI assets if we eventually run end-to-end GUI tests as part of the packaging job.
Local Verification¶
After running npm run package, verify the installer artifacts before pushing:
- Inspect bundles – confirm files exist under
src-tauri/target/release/bundle/<target>/(e.g.,nsis/FiberPath GUI_0.1.0_x64-setup.exe). - Run the app – either execute the generated installer or launch the raw binary using
Start-Process '.\src-tauri\target\release\FiberPath GUI.exe'(PowerShell) to ensure the GUI opens and can reach the CLI onPATH. - Manual smoke test – plan/plot a small
.windvia the GUI to confirm the packaged build can locate the Python CLI before uploading artifacts or pushing to CI.