Skip to content

Switch PyInstaller backend build from --onefile to --onedir#4

Merged
arshsisodiya merged 2 commits intomasterfrom
copilot/update-backend-build-to-onedir
Mar 16, 2026
Merged

Switch PyInstaller backend build from --onefile to --onedir#4
arshsisodiya merged 2 commits intomasterfrom
copilot/update-backend-build-to-onedir

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

--onefile extracts the entire bundled archive to a temp directory on every launch, causing significant startup latency. Switching to --onedir eliminates that extraction step — the EXE runs directly from its directory.

PyInstaller spec (stasis-backend.spec)

  • Removed a.binaries and a.datas from EXE() args (onefile pattern)
  • Added COLLECT() block with a.binaries and a.datas (onedir pattern)
  • Removed runtime_tmpdir (onefile-only)

Build script (build.ps1)

  • $DistDir / $DistExe now point into dist\stasis-backend\ (onedir output)
  • Copy step uses Copy-Item -Recurse to copy the full directory to frontend\src-tauri\bin\stasis-backend\
  • Versioned release artifact is now a zip (Compress-Archive) instead of a renamed .exe

Tauri bundling

  • tauri.conf.json resources changed from single-file mapping to glob: "bin/stasis-backend/**/*"
  • main.rs backend resolution path updated: bin/stasis-backend.exebin/stasis-backend/stasis-backend.exe

GitHub workflow (.github/workflows/build-and-release.yml)

  • Release artifact upload pattern updated from dist/stasis-backend-v*.exe to dist/stasis-backend-v*.zip

Docs

  • README, docs/developer-guide.md, and docs/architecture.md updated to reflect the new onedir output paths and artifact format.

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: arshsisodiya <56303690+arshsisodiya@users.noreply.github.com>
Copilot AI changed the title [WIP] Update backend build from --onefile to --onedir Switch PyInstaller backend build from --onefile to --onedir Mar 16, 2026
Copilot AI requested a review from arshsisodiya March 16, 2026 17:57
@arshsisodiya arshsisodiya marked this pull request as ready for review March 16, 2026 19:35
@arshsisodiya arshsisodiya merged commit d1e35a3 into master Mar 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants