From 8cf55933d3c3da064a5191c77320ebf08de4a671 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 28 May 2024 22:03:44 +1200 Subject: [PATCH] fix for dist windows exe path not found due to missing file extension --- electron/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index 02e6a60..356bf29 100644 --- a/electron/main.js +++ b/electron/main.js @@ -59,11 +59,12 @@ app.whenReady().then(async () => { await mainWindow.loadFile(path.join(__dirname, 'loading.html')); // find path to python/cxfreeze reticulum webchat executable - var exe = path.join(__dirname, 'build/exe/ReticulumWebChat'); + const exeName = process.platform === "win32" ? "ReticulumWebChat.exe" : "ReticulumWebChat"; + var exe = path.join(__dirname, `build/exe/${exeName}`); // if dist exe doesn't exist, check local build if(!fs.existsSync(exe)){ - exe = path.join(__dirname, '..', 'build/exe/ReticulumWebChat'); + exe = path.join(__dirname, '..', `build/exe/${exeName}`); } // ask mac users for microphone access for audio calls to work