waveterm/electron-builder.config.js
Evan Simkowitz 4ef921bdd1
Support Linux packaging via electron-builder (#371)
* Add linux makers

* missed some

* remove eu-strip

* blah

* add description

* remove v from version

* add exec name

* use bin

* add bin to both

* test flatpak

* test adding dev dependencies

* remove flatpak for now

* add command to flatten directory structure

* update package info

* save rpm info

* save work

* add bin to packagerConfig

* save work

* okay let's see what happens

* iterate array

* test more

* remove large

* test

* test

* remove linux arm

* test addl targets

* add quiet to zip

* revert dir flatten

* remove pacman

* add s3 bucket to electron-builder config

* make dir

* only copy artifacts

* don't merge

* zip recurse

* blah

* replace with electronupdater

* make generic

* fix

* fix stuff

* Update build-helper.yml

* test fix

* fix path

* remove tree

* messed up comment

* remove touch

* add platform name to artifact

* remove license

* remove forge

* cleanup builder config

* switch artifact name order

* Remove darwin restriction on autoupdate

* try adding back pacman

* fix license

* remove pacman again

* rewrite scripts

* add binary paths to builder

* clean up

* Update scripts

* update interval and readme

* remove flatpak and snap dependencies for now

* upload with a wildcard

* fix paths for addl binaries

* add back blockmap

* update release path

* add newline

* remove forge config

* 2 small fixes - remove double cd for waveshell building, and remove GOARCH for wavesrv binary in dev mode
2024-03-04 22:03:53 -08:00

85 lines
2.3 KiB
JavaScript

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: {
target: {
target: "zip",
arch: "universal",
},
icon: "public/waveterm.icns",
category: "public.app-category.developer-tools",
minimumSystemVersion: "10.15.0",
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",
url: "https://waveterm-test-autoupdate.s3.us-west-2.amazonaws.com/autoupdate",
},
};
module.exports = config;