electrobun 0.0.19-beta.20 → 0.0.19-beta.29

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.
Files changed (2) hide show
  1. package/package.json +6 -4
  2. package/src/cli/index.ts +16 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.20",
3
+ "version": "0.0.19-beta.29",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",
@@ -44,12 +44,14 @@
44
44
  "push:beta": "bun npm:version:beta && git push origin main --tags",
45
45
  "push:patch": "npm version patch && git push origin main --tags",
46
46
  "push:minor": "npm version minor && git push origin main --tags",
47
- "push:major": "npm version major && git push origin main --tags"
47
+ "push:major": "npm version major && git push origin main --tags",
48
+ "build:push:artifacts": "bun scripts/build-and-upload-artifacts.js"
49
+ },
50
+ "devDependencies": {
51
+ "@types/bun": "1.1.9"
48
52
  },
49
53
  "dependencies": {
50
54
  "@oneidentity/zstd-js": "^1.0.3",
51
- "@types/bun": "1.1.9",
52
- "bun": "1.1.9",
53
55
  "rpc-anywhere": "1.5.0",
54
56
  "tar": "^6.2.1"
55
57
  }
package/src/cli/index.ts CHANGED
@@ -75,6 +75,7 @@ const PATHS = {
75
75
  ),
76
76
  NATIVE_WRAPPER_WIN: join(ELECTROBUN_DEP_PATH, "dist", "libNativeWrapper.dll"),
77
77
  NATIVE_WRAPPER_LINUX: join(ELECTROBUN_DEP_PATH, "dist", "libNativeWrapper.so"),
78
+ NATIVE_WRAPPER_LINUX_CEF: join(ELECTROBUN_DEP_PATH, "dist", "libNativeWrapper_cef.so"),
78
79
  WEBVIEW2LOADER_WIN: join(ELECTROBUN_DEP_PATH, "dist", "WebView2Loader.dll"),
79
80
  BSPATCH: join(ELECTROBUN_DEP_PATH, "dist", "bspatch") + binExt,
80
81
  EXTRACTOR: join(ELECTROBUN_DEP_PATH, "dist", "extractor") + binExt,
@@ -575,15 +576,21 @@ if (commandArg === "init") {
575
576
  cpSync(webview2LibSource, webview2LibDestination);
576
577
 
577
578
  } else if (OS === 'linux') {
578
- const nativeWrapperLinuxSource = PATHS.NATIVE_WRAPPER_LINUX;
579
+ // Choose the appropriate native wrapper based on bundleCEF setting
580
+ const useCEF = config.build.linux?.bundleCEF;
581
+ const nativeWrapperLinuxSource = useCEF ? PATHS.NATIVE_WRAPPER_LINUX_CEF : PATHS.NATIVE_WRAPPER_LINUX;
579
582
  const nativeWrapperLinuxDestination = join(
580
583
  appBundleMacOSPath,
581
584
  "libNativeWrapper.so"
582
585
  );
586
+
583
587
  if (existsSync(nativeWrapperLinuxSource)) {
584
588
  cpSync(nativeWrapperLinuxSource, nativeWrapperLinuxDestination, {
585
589
  dereference: true,
586
590
  });
591
+ console.log(`Using ${useCEF ? 'CEF' : 'GTK'} native wrapper for Linux`);
592
+ } else {
593
+ throw new Error(`Native wrapper not found: ${nativeWrapperLinuxSource}`);
587
594
  }
588
595
  }
589
596
 
@@ -1355,6 +1362,14 @@ function getConfig() {
1355
1362
  ...(loadedConfig?.build?.mac?.entitlements || {}),
1356
1363
  },
1357
1364
  },
1365
+ win: {
1366
+ ...defaultConfig.build.win,
1367
+ ...(loadedConfig?.build?.win || {}),
1368
+ },
1369
+ linux: {
1370
+ ...defaultConfig.build.linux,
1371
+ ...(loadedConfig?.build?.linux || {}),
1372
+ },
1358
1373
  bun: {
1359
1374
  ...defaultConfig.build.bun,
1360
1375
  ...(loadedConfig?.build?.bun || {}),