Skip to content

Commit 93f2333

Browse files
committed
v17.6.4
- Change the Electron wrapper to resolve its own directory and exec the bundled megacubo.original binary (instead of using electronBinPath), ensuring the app launches the local packaged binary with sandbox flags.
1 parent 2f16ad7 commit 93f2333

6 files changed

Lines changed: 492 additions & 406 deletions

File tree

electron-builder.config.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { readFileSync, writeFileSync, unlinkSync, existsSync } from 'fs';
1+
import { readFileSync, writeFileSync, unlinkSync, existsSync, renameSync } from 'fs';
22
import { fileURLToPath } from 'url';
33
import { dirname, join } from 'path';
44
import { execSync } from 'child_process';
@@ -234,8 +234,11 @@ export ELECTRON_DISABLE_SANDBOX=1
234234
export ELECTRON_NO_SANDBOX=1
235235
export DISABLE_SANDBOX=1
236236
237+
# Get the directory where this script is located
238+
DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)"
239+
237240
# Launch electron with sandbox disabled
238-
exec "${electronBinPath}" --no-sandbox --disable-dev-shm-usage --disable-gpu-sandbox "$@"
241+
exec "\${DIR}/megacubo.original" --no-sandbox --disable-dev-shm-usage --disable-gpu-sandbox "$@"
239242
`;
240243

241244
const wrapperPath = join(appOutDir, 'megacubo-wrapper');

0 commit comments

Comments
 (0)