Merge pull request #6 from dzervas/patch-1

Fix linux builds
This commit is contained in:
Richard Osborne
2024-12-28 22:05:46 +01:00
committed by GitHub
3 changed files with 17 additions and 6 deletions

View File

@@ -18,6 +18,7 @@
"appId": "com.opennoodl.app",
"afterSign": "./build/macos-notarize.js",
"mac": {
"category": "public.app-category.developer-tools",
"hardenedRuntime": true,
"entitlements": "build/entitlements.mac.plist",
"extendInfo": {
@@ -33,7 +34,8 @@
"guid": "com.opennoodl.app"
},
"linux": {
"target": "deb"
"target": "appimage",
"category": "Development"
},
"protocols": {
"name": "opennoodl",
@@ -141,4 +143,4 @@
"optionalDependencies": {
"dmg-license": "^1.0.11"
}
}
}

View File

@@ -6,6 +6,7 @@ import { BuildTarget, getDistPlatform } from './platform/build-platforms';
(async function () {
// Inputs
const DISABLE_SIGNING = valueToBoolean(process.env.DISABLE_SIGNING);
const BUILD_AS_DIR = valueToBoolean(process.env.BUILD_AS_DIR);
const TARGET_PLATFORM = process.env.TARGET_PLATFORM;
if (!TARGET_PLATFORM) throw new Error('TARGET_PLATFORM is falsy');
@@ -19,6 +20,7 @@ import { BuildTarget, getDistPlatform } from './platform/build-platforms';
console.log('@ -> packages/noodl-editor/scripts/build.ts');
console.log('--- Configuration');
console.log('> DISABLE_SIGNING: ', DISABLE_SIGNING);
console.log('> BUILD_AS_DIR: ', BUILD_AS_DIR);
console.log('> TARGET_PLATFORM: ', TARGET_PLATFORM);
console.log('---');
@@ -39,10 +41,14 @@ import { BuildTarget, getDistPlatform } from './platform/build-platforms';
console.log('--- done!');
const platformName = getDistPlatform(target.platform);
const args = [`--${platformName}`, `--${target.arch}`].join(' ');
let args = [`--${target.arch}`, `--${platformName}`];
if (BUILD_AS_DIR === true) {
args.push('--dir');
}
const argsStr = args.join(' ');
console.log(`--- Run: 'npx electron-builder ${args}' ...`);
execSync('npx electron-builder ' + args, {
console.log(`--- Run: 'npx electron-builder ${argsStr}' ...`);
execSync('npx electron-builder ' + argsStr, {
stdio: [0, 1, 2],
env: Object.assign(
DISABLE_SIGNING

View File

@@ -52,7 +52,10 @@ const regexList: RegExp[] = [
/* MacOS */
/.*\.dmg$/,
/.*\.blockmap$/
/.*\.blockmap$/,
/* Linux */
/.*\.AppImage$/,
];
fs.mkdirSync(destinationFolder, { recursive: true });