-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Bug Description
When running npm run build-native locally without a specific --target argument, the Rust binaries (such as desktop_proxy on Linux) are compiled successfully but are not copied to the apps/desktop/desktop_native/dist/ directory.
This causes subsequent packaging commands (like npm run flatpak:dev) to fail because electron-builder expects the binaries to exist in dist/ with specific names (e.g., desktop_proxy.linux-x64).
Steps To Reproduce
- On a Linux machine, check out the repository.
- Navigate to
apps/desktop. - Run
npm run build-native. - Run
npm run flatpak:dev.
Expected Behavior:
The Flatpak build should succeed.
Actual Behavior:
The build fails with an error fromelectron-builderstating that the source filedesktop_native/dist/desktop_proxy.linux-x64does not exist.
Root Cause
In apps/desktop/desktop_native/build.js, the buildProxyBin function wraps the file copy logic in an if (target) block. During local development, target is typically undefined, so the copy step is skipped.
Proposed Fix
Update build.js to perform the copy operation even when target is undefined, defaulting to the current platform/architecture naming convention expected by electron-builder.