From 258ce63bc3cb24c6fb273fd98a1323ae7fde439d Mon Sep 17 00:00:00 2001 From: Simeon Radivoev Date: Sun, 15 Mar 2026 16:40:28 +0200 Subject: [PATCH] fix: Wrong webview library path for appimage building --- scripts/build-appimage.ts | 1 + scripts/package-bun.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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",