electrobun 0.0.19-beta.73 → 0.0.19-beta.74

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.
@@ -11,8 +11,8 @@ function getAppDataDir(): string {
11
11
  case 'macos':
12
12
  return join(homedir(), "Library", "Application Support");
13
13
  case 'win':
14
- // Use APPDATA environment variable or fallback to default location
15
- return process.env.APPDATA || join(homedir(), "AppData", "Roaming");
14
+ // Use LOCALAPPDATA to match extractor location
15
+ return process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local");
16
16
  case 'linux':
17
17
  // Use XDG_CONFIG_HOME or fallback to ~/.config
18
18
  return process.env.XDG_CONFIG_HOME || join(homedir(), ".config");
@@ -374,18 +374,21 @@ const Updater = {
374
374
  ".."
375
375
  );
376
376
  } else {
377
- // On Windows, the executable is the app itself
378
- runningAppBundlePath = process.execPath;
377
+ // On Windows, executable is at app/bin/launcher.exe (same as Linux)
378
+ runningAppBundlePath = resolve(
379
+ dirname(process.execPath),
380
+ "..",
381
+ ".."
382
+ );
379
383
  }
380
384
  // Platform-specific backup naming and location
381
385
  let backupAppBundlePath: string;
382
- if (currentOS === 'linux') {
383
- // On Linux, keep backup in self-extraction folder
384
- backupAppBundlePath = join(extractionFolder, "backup");
386
+ if (currentOS === 'macos') {
387
+ // On macOS, backup in extraction folder with .app extension
388
+ backupAppBundlePath = join(extractionFolder, "backup.app");
385
389
  } else {
386
- // On macOS/Windows, backup in extraction folder
387
- const backupName = currentOS === 'macos' ? "backup.app" : "backup";
388
- backupAppBundlePath = join(extractionFolder, backupName);
390
+ // On Linux/Windows, keep backup in self-extraction folder
391
+ backupAppBundlePath = join(extractionFolder, "backup");
389
392
  }
390
393
 
391
394
  try {
@@ -421,12 +424,14 @@ const Updater = {
421
424
  await Bun.spawn(["open", runningAppBundlePath]);
422
425
  break;
423
426
  case 'win':
424
- // On Windows, the runningAppBundlePath would be the .exe file
425
- await Bun.spawn([runningAppBundlePath]);
427
+ // On Windows, launch the launcher.exe inside the app directory
428
+ const windowsLauncher = join(runningAppBundlePath, "bin", "launcher.exe");
429
+ await Bun.spawn([windowsLauncher]);
426
430
  break;
427
431
  case 'linux':
428
- // On Linux, directly execute the binary
429
- await Bun.spawn([runningAppBundlePath]);
432
+ // On Linux, launch the launcher inside the app directory
433
+ const linuxLauncher = join(runningAppBundlePath, "bin", "launcher");
434
+ await Bun.spawn([linuxLauncher]);
430
435
  break;
431
436
  }
432
437
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.73",
3
+ "version": "0.0.19-beta.74",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",