2024-03-05 07:03:53 +01:00
|
|
|
const pkg = require("./package.json");
|
|
|
|
const fs = require("fs");
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {import('electron-builder').Configuration}
|
|
|
|
* @see https://www.electron.build/configuration/configuration
|
|
|
|
*/
|
|
|
|
const config = {
|
|
|
|
appId: pkg.build.appId,
|
|
|
|
productName: pkg.productName,
|
|
|
|
artifactName: "${productName}-${platform}-${arch}-${version}.${ext}",
|
|
|
|
npmRebuild: false,
|
|
|
|
nodeGypRebuild: false,
|
|
|
|
electronCompile: false,
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
from: "./dist",
|
|
|
|
to: "./dist",
|
|
|
|
filter: ["**/*"],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: "./public",
|
|
|
|
to: "./public",
|
|
|
|
filter: ["**/*"],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: "./bin",
|
|
|
|
to: "./bin",
|
|
|
|
filter: ["**/*"],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
from: ".",
|
|
|
|
to: ".",
|
|
|
|
filter: ["package.json"],
|
|
|
|
},
|
|
|
|
"!**/node_modules/**${/*}", // Ignore node_modules by default
|
|
|
|
{
|
|
|
|
from: "./node_modules",
|
|
|
|
to: "./node_modules",
|
|
|
|
filter: ["monaco-editor/min/**/*"], // This is the only module we want to include
|
|
|
|
},
|
|
|
|
],
|
|
|
|
directories: {
|
|
|
|
output: "make",
|
|
|
|
},
|
|
|
|
asarUnpack: ["bin/**/*"],
|
|
|
|
mac: {
|
2024-03-07 01:07:48 +01:00
|
|
|
target: [
|
|
|
|
{
|
|
|
|
target: "zip",
|
|
|
|
arch: "universal",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
target: "dmg",
|
|
|
|
arch: "universal",
|
|
|
|
},
|
|
|
|
],
|
2024-03-05 07:03:53 +01:00
|
|
|
icon: "public/waveterm.icns",
|
|
|
|
category: "public.app-category.developer-tools",
|
|
|
|
minimumSystemVersion: "10.15.0",
|
2024-03-07 01:07:48 +01:00
|
|
|
notarize: process.env.APPLE_TEAM_ID
|
|
|
|
? {
|
|
|
|
teamId: process.env.APPLE_TEAM_ID,
|
|
|
|
}
|
|
|
|
: false,
|
2024-03-05 07:03:53 +01:00
|
|
|
binaries: fs
|
|
|
|
.readdirSync("bin", { recursive: true, withFileTypes: true })
|
|
|
|
.filter((f) => f.isFile())
|
|
|
|
.map((f) => path.resolve(f.path, f.name)),
|
|
|
|
},
|
|
|
|
linux: {
|
|
|
|
executableName: pkg.productName,
|
|
|
|
category: "TerminalEmulator",
|
|
|
|
icon: "public/waveterm.icns",
|
|
|
|
target: ["zip", "deb", "rpm", "AppImage"],
|
|
|
|
synopsis: pkg.description,
|
|
|
|
description: null,
|
|
|
|
desktop: {
|
|
|
|
Name: pkg.productName,
|
|
|
|
Comment: pkg.description,
|
|
|
|
Keywords: "developer;terminal;emulator;",
|
|
|
|
category: "Development;Utility;",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
appImage: {
|
|
|
|
license: "LICENSE",
|
|
|
|
},
|
|
|
|
publish: {
|
|
|
|
provider: "generic",
|
2024-03-07 01:07:48 +01:00
|
|
|
url: "https://dl.waveterm.dev/releases",
|
2024-03-05 07:03:53 +01:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|