Skip to content

Resolve the static folder from the app's Resources when packaged - #524

Merged
jtklein merged 1 commit into
AntonelliLab:masterfrom
jtklein-agents:369-packaged-app-binary-path
Nov 25, 2026
Merged

jtklein merged 1 commit into
AntonelliLab:masterfrom
jtklein-agents:369-packaged-app-binary-path

Conversation

@jtklein-agents

Copy link
Copy Markdown
Contributor

Fixes jtklein-agents#369.

Summary

Since the move to electron-vite, __static was a build-time define holding the build machine's absolute static/ path. A packaged app looked for RAxML, readal and ASTRAL in the CI runner's checkout.

 getStaticDir()
-  if RAXMLGUI_E2E: <repo>/static
-  else:            __static        # "/Users/<builder>/…/raxmlGUI/static", baked in at build
+  if app.isPackaged: process.resourcesPath/static   # where extraResources copies bin/
+  else:              <repo>/static                  # dev and e2e

The __static define in electron.vite.config.js and src/__static.d.ts are removed. Example files are unaffected: getExampleFiles runs only in dev and e2e.

Evidence

  • Before: out/main/index.js contains the builder's absolute ".../raxmlGUI/static" path. binaryDir points outside the app bundle.
    After: yarn dist-pack (signing off), then:
    rg -a 'raxmlGUI/static' Resources/app.asar        → no match
    rg -a 'process.resourcesPath, "static"' app.asar  → match
    ls Resources/static/bin                           → raxml-ng, raxmlHPC*, modeltest-ng*, readal
    
  • yarn test 474 passed; yarn test:e2e 4 passed (unpacked path).
  • Not done: starting a run in the packed app. Playwright could not attach to the packed binary.

Merge Danger

Door: two-way

Blast Radius: packaged-runs

Every packaged-app run resolves its binaries through this path. A wrong path would break all RAxML, ModelTest and ASTRAL runs in the release build, though not in dev or e2e. Worth one manual run from a packed build before the release candidate.

🤖 Generated with Claude Code

electron.vite.config.js baked the build machine's absolute static/ path
into out/main/index.js as __static, so a packaged app looked for RAxML,
readal and ASTRAL in the CI runner's checkout. getStaticDir() now uses
process.resourcesPath/static when packaged, where extraResources copies
the binaries, and the repo's static/ otherwise. The __static define and
its declaration are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtklein
jtklein merged commit fe1d2d1 into AntonelliLab:master Nov 25, 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.

Packaged app looks for the RAxML binaries in the build machine's checkout

2 participants