This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge.config.js
139 lines (138 loc) · 3.04 KB
/
forge.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Document https://electron.github.io/electron-packager/main/modules/electronpackager.html
const path = require("node:path"),
ignore = (file) => {
if (!file) return false;
if (file.endsWith(path.join(".webpack", "main", "stats.json"))) {
return true;
}
if (file.endsWith(path.join(".webpack", "renderer", "stats.json"))) {
return true;
}
if (/[^/\\]+\.js\.map$/.test(file)) {
return true;
}
return !/^[/\\]\.webpack|icons($|[/\\]).*$/.test(file);
};
module.exports = {
makers: [
{
config: {
iconUrl: "https://cdn.discordapp.com/attachments/933328430404087818/989502310478659584/icon.ico",
name: "Hareshi",
setupIcon: path.join(__dirname, "/icons/win/icon.ico"),
},
name: "@electron-forge/maker-squirrel",
},
{
name: "@electron-forge/maker-zip",
platforms: ["darwin", "linux"], // "win32"
},
{
config: {
executableName: "hareshi",
icon: path.join(__dirname, "/icons/mac/icon.icns"),
mimeType: ["x-scheme-handler/hareshi"],
},
name: "@electron-forge/maker-deb",
},
{
config: {
executableName: "hareshi",
homepage: "https://hareshi.net",
icon: path.join(__dirname, "/icons/png/icon.png"),
},
name: "@electron-forge/maker-rpm",
},
{
config: {
icon: path.join(__dirname, "/icons/mac/icon.icns"),
},
name: "@electron-forge/maker-dmg",
platforms: ["darwin"],
},
{
name: "electron-forge-maker-appimage",
platforms: ["linux"],
},
// {
// config: {
// features: {
// audio: true,
// browserSandbox: true,
// mpris: "com.hareshi.net",
// webgl: true,
// },
// summary: "Desktop Application",
// },
// name: "@electron-forge/maker-snap",
// },
],
packagerConfig: {
// arch: ["ia32", "x64", "armv7l", "arm64"],
// platform: ["darwin", "linux", "win32"],
asar: true,
executableName: "hareshi",
icon: process.env.RUN_OS === "macos-latest" ? path.join(__dirname, "/icons/mac/icon.icns") : path.join(__dirname, "/icons/win/icon.ico"),
ignore,
protocols: [
{
name: "Hareshi",
schemes: ["hareshi"],
},
],
},
plugins: [
[
"@electron-forge/plugin-electronegativity",
{
isSarif: true,
},
],
[
"@electron-forge/plugin-webpack",
{
mainConfig: "./webpack.main.config.js",
renderer: {
config: "./webpack.renderer.config.js",
entryPoints: [
{
html: "./src/loading/main.html",
js: "./src/loading/renderer.ts",
name: "loading",
preload: {
js: "./src/loading/loading.ts",
},
},
{
js: "./src/renderer.ts",
name: "main_window",
preload: {
js: "./src/preload.ts",
},
},
{
js: "./src/renderer.ts",
name: "signin",
preload: {
js: "./src/signin.ts",
},
},
],
},
},
],
],
publishers: [
{
config: {
draft: false,
prerelease: process.env.prerelease || false,
repository: {
name: "hareshi-desktop",
owner: "hareshi",
},
},
name: "@electron-forge/publisher-github",
},
],
};