fix: Wrong webview library path for appimage building
This commit is contained in:
parent
489124a4a3
commit
258ce63bc3
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue