fix: AppImage required --no-sandbox
Queue Release Build / prepare (push) Successful in 28s
Deploy Web Apps / deploy (push) Failing after 10m14s
Queue Release Build / build-windows (push) Failing after 15m12s
Queue Release Build / build-linux (push) Successful in 43m41s
Queue Release Build / finalize (push) Skipped
Queue Release Build / build-android (push) Successful in 17m25s
Queue Release Build / prepare (push) Successful in 28s
Deploy Web Apps / deploy (push) Failing after 10m14s
Queue Release Build / build-windows (push) Failing after 15m12s
Queue Release Build / build-linux (push) Successful in 43m41s
Queue Release Build / finalize (push) Skipped
Queue Release Build / build-android (push) Successful in 17m25s
Not tested enough but works on my machine
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const {
|
||||
buildLinuxLauncherScript,
|
||||
resolveLinuxLauncherNames
|
||||
} = require('../dist/electron/app/linux-launcher.rules.js');
|
||||
|
||||
const LAUNCHER_MODE = 0o755;
|
||||
|
||||
function installLinuxLauncher(appOutDir, executableName) {
|
||||
const { launcherFileName, binaryFileName } = resolveLinuxLauncherNames(executableName);
|
||||
const launcherPath = path.join(appOutDir, launcherFileName);
|
||||
const binaryPath = path.join(appOutDir, binaryFileName);
|
||||
|
||||
if (!fs.existsSync(binaryPath)) {
|
||||
fs.renameSync(launcherPath, binaryPath);
|
||||
}
|
||||
|
||||
fs.writeFileSync(launcherPath, buildLinuxLauncherScript({ binaryFileName }), 'utf8');
|
||||
fs.chmodSync(launcherPath, LAUNCHER_MODE);
|
||||
|
||||
return launcherFileName;
|
||||
}
|
||||
|
||||
exports.default = async function afterPack(context) {
|
||||
if (context.electronPlatformName !== 'linux') {
|
||||
return;
|
||||
}
|
||||
|
||||
const launcherFileName = installLinuxLauncher(context.appOutDir, context.packager.executableName);
|
||||
|
||||
console.log(` • linux launcher installed file=${launcherFileName}`);
|
||||
};
|
||||
Reference in New Issue
Block a user