summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-client/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-client/src/main.js')
-rw-r--r--packages/meshbay-client/src/main.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js
index d341619..bd82342 100644
--- a/packages/meshbay-client/src/main.js
+++ b/packages/meshbay-client/src/main.js
@@ -792,7 +792,15 @@ function registerBridge() {
});
function findNodeBinary() {
- if (process.platform !== 'win32') {
+ if (process.platform === 'win32') {
+ // A packaged Windows build carries the frozen daemon as an
+ // extraResource (package.json build.win, packaging/win/). Prefer it —
+ // it is the version that shipped with this client.
+ if (app.isPackaged) {
+ const bundled = path.join(process.resourcesPath, 'node-runtime', 'meshbay-node.exe');
+ if (fs.existsSync(bundled)) return bundled;
+ }
+ } else {
const local = path.join(os.homedir(), '.local', 'bin', 'meshbay-node');
if (fs.existsSync(local)) return local;
}