fix: Wrong webview library path for appimage building

This commit is contained in:
Simeon Radivoev 2026-03-15 16:40:28 +02:00
parent 489124a4a3
commit 258ce63bc3
Signed by: simeonradivoev
GPG key ID: C16C2132A7660C8E
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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",