diff --git a/scripts/build-appimage.ts b/scripts/build-appimage.ts index 447c32d..70100fe 100644 --- a/scripts/build-appimage.ts +++ b/scripts/build-appimage.ts @@ -23,6 +23,7 @@ const APPDIR = path.resolve(TMP_FOLDER, `${APP_ID}.AppDir`); console.log(`>>> Building AppImage for ${APP_NAME} (${APP_ID})...`); await ensureDir(path.join(APPDIR, `usr`, 'bin')); +await ensureDir(path.join(APPDIR, `usr`, 'lib')); await ensureDir("build"); // Copy app dir diff --git a/scripts/package-bun.ts b/scripts/package-bun.ts index 917c0c5..f22dd96 100644 --- a/scripts/package-bun.ts +++ b/scripts/package-bun.ts @@ -27,8 +27,9 @@ if (process.platform === 'linux' && system.arch === 'arm64') if (process.platform === 'darwin') webviewLib = "libwebview-arm64.dylib"; +let webviewLibPath = '.'; if (process.env.APPIMAGE === "true") - webviewLib = `./usr/lib/${webviewLib}`; + webviewLibPath = `./usr/lib`; await Bun.build({ entrypoints: ["./src/bun/index.ts", `./src/bun/webview/${system.platform}.ts`], @@ -38,7 +39,7 @@ await Bun.build({ root: './src/bun', define: { "process.env.IS_BINARY": "true", - "process.env.WEBVIEW_PATH": `./${webviewLib}`, + "process.env.WEBVIEW_PATH": `${webviewLibPath}/${webviewLib}`, }, minify: process.env.NODE_ENV !== 'development', sourcemap: process.env.NODE_ENV === 'development' ? 'inline' : "linked",