flotilla/electron/electron-builder.config.mjs
2026-09-14 17:58:14 +00:00

49 lines
1.3 KiB
JavaScript

import {readFileSync} from "node:fs"
const {name, version, author} = JSON.parse(
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
)
const {appId, appName} = JSON.parse(
readFileSync(new URL("generated/capacitor.config.json", import.meta.url), "utf8"),
)
/** @type {import('electron-builder').Configuration} */
export default {
appId,
productName: appName,
executableName: name,
buildVersion: version,
extraMetadata: {
name,
version,
author,
productName: appName,
description: appName,
desktopName: `${appId}.desktop`,
},
artifactName: "${productName}-${version}-${os}-${arch}.${ext}",
directories: {output: "dist", buildResources: "generated"},
icon: "generated/icon.png",
files: [
"build/main.js",
"app/**/*",
"generated/**/*",
"package.json",
{from: "vendor/node_modules", to: "node_modules"},
],
allowMissingDependencies: false,
publish: [],
toolsets: {appimage: "1.0.3"},
linux: {
target: [{target: "AppImage", arch: ["x64"]}],
category: "Network",
syncDesktopName: true,
},
win: {target: [{target: "nsis", arch: ["x64"]}], signExecutable: false},
mac: {
target: [{target: "dmg", arch: ["x64", "arm64"]}],
category: "public.app-category.social-networking",
notarize: false,
},
dmg: {sign: false},
}