electrobun 0.0.19-beta.80 → 0.0.19-beta.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -372,21 +372,16 @@ const Updater = {
372
372
  "..",
373
373
  ".."
374
374
  );
375
- } else if (currentOS === 'linux') {
376
- // On Linux, executable is at app/bin/launcher
377
- runningAppBundlePath = resolve(
378
- dirname(process.execPath),
379
- "..",
380
- ".."
381
- );
382
375
  } else {
383
- // On Windows, handle versioned app folders
384
- // Current executable is at app-<hash>/bin/launcher.exe
385
- runningAppBundlePath = resolve(
386
- dirname(process.execPath),
387
- "..",
388
- ".."
389
- );
376
+ // On Linux/Windows, calculate app path using app data directory structure
377
+ const appDataFolder = await Updater.appDataFolder();
378
+ if (currentOS === 'linux') {
379
+ runningAppBundlePath = join(appDataFolder, "app");
380
+ } else {
381
+ // On Windows, use versioned app folders
382
+ const currentHash = (await Updater.getLocallocalInfo()).hash;
383
+ runningAppBundlePath = join(appDataFolder, `app-${currentHash}`);
384
+ }
390
385
  }
391
386
  // Platform-specific backup handling
392
387
  let backupPath: string;
@@ -487,9 +482,9 @@ start "" launcher.exe
487
482
  await Bun.spawn(["cmd", "/c", runBatPath], { detached: true });
488
483
  break;
489
484
  case 'linux':
490
- // On Linux, launch the launcher inside the app directory
485
+ // On Linux, launch the launcher inside the app directory using nohup to detach
491
486
  const linuxLauncher = join(runningAppBundlePath, "bin", "launcher");
492
- await Bun.spawn([linuxLauncher]);
487
+ Bun.spawn(["nohup", linuxLauncher], { detached: true});
493
488
  break;
494
489
  }
495
490
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.80",
3
+ "version": "0.0.19-beta.82",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",