Skip to content

fix(windows): unpack ffmpeg-static from ASAR and fix runtime path#2

Open
ifeelvoid wants to merge 1 commit into
mainfrom
fix/windows-asar-ffmpeg-path
Open

fix(windows): unpack ffmpeg-static from ASAR and fix runtime path#2
ifeelvoid wants to merge 1 commit into
mainfrom
fix/windows-asar-ffmpeg-path

Conversation

@ifeelvoid
Copy link
Copy Markdown
Owner

Summary

  • Added asarUnpack in package.json for ffmpeg-static and essentia.js so native binaries are extracted outside the ASAR archive when packaging
  • Updated worker.js to rewrite the ffmpeg path from app.asar/ to app.asar.unpacked/ at runtime when running inside a packaged Electron app

Why

Native binaries (like ffmpeg) can't execute from inside an ASAR archive — they need to live on the real filesystem. Without this fix, the packaged Windows app would fail silently when trying to process audio files.

Test plan

  • Run npm run build in keyfinder-windows/ and verify both portable and setup EXEs are generated
  • Launch the packaged app and drag in an audio file — confirm key detection works without errors
  • Confirm no ASAR path errors in the Electron console

Native binaries can't run from inside an ASAR archive. Added
asarUnpack rules for ffmpeg-static and essentia.js in package.json,
and updated worker.js to rewrite the ffmpeg path from app.asar
to app.asar.unpacked when running inside a packaged Electron app.
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.

1 participant