Add wrapper script

This commit is contained in:
Bernd Schoolmann 2024-05-28 14:43:09 +02:00
parent 034227d993
commit 9a5b26e975
No known key found for this signature in database
3 changed files with 27 additions and 2 deletions

View File

@ -11,8 +11,9 @@
"output": "dist",
"app": "build"
},
"beforePack": "scripts/before-pack.js",
"afterSign": "scripts/after-sign.js",
"asarUnpack": ["**/*.node"],
"asarUnpack": ["**/*.node", "**/bw-coredump-wrapper.sh"],
"files": [
"**/*",
"!**/node_modules/@bitwarden/desktop-native/**/*",
@ -22,7 +23,9 @@
"!**/node_modules/argon2/**/*",
"**/node_modules/argon2/argon2.js",
"**/node_modules/argon2/package.json",
"**/node_modules/argon2/lib/binding/napi-v3/argon2.node"
"**/node_modules/argon2/lib/binding/napi-v3/argon2.node",
"resources/bw-coredump-wrapper.sh"
],
"electronVersion": "28.3.1",
"generateUpdatesFilesForAllChannels": true,

View File

@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
require("dotenv").config();
const path = require("path");
const fse = require("fs-extra");
exports.default = run;
async function run(context) {
console.log("## Before pack");
const targetPath = path.join(context.outDir, "../build", "bw-coredump-wrapper.sh");
const wrapperScript = path.join(__dirname, "./bw-coredump-wrapper.sh");
if (context.electronPlatformName === "linux") {
fse.copySync(wrapperScript, targetPath);
}
}

View File

@ -0,0 +1,4 @@
#!/bin/bash
# disable coredumps
ulimit -c 0
bitwarden