-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforge.config.js
More file actions
58 lines (56 loc) · 1.49 KB
/
forge.config.js
File metadata and controls
58 lines (56 loc) · 1.49 KB
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
const path = require("node:path");
const fs = require("node:fs");
module.exports = {
packagerConfig: {
// This forces forge to only package already builded files
ignore: ["^\\/public$", "^\\/src$", "^\\/node_modules$", "^\\/[.].+"],
icon: "public/brand/logo256-text",
name: "AymurAI",
protocols: [
{
name: "AymurAI",
schemes: ["aymurai.app"],
},
],
},
rebuildConfig: {},
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {},
},
{
name: "@electron-forge/maker-zip",
platforms: ["darwin"],
},
{
name: "@electron-forge/maker-deb",
config: {
mimeType: ["x-scheme-handler/aymurai.app"],
},
},
{
name: "@electron-forge/maker-rpm",
config: {},
},
],
hooks: {
packageAfterCopy: async (
_config,
buildPath,
_electronVersion,
_platform,
_arch,
) => {
// Create logs in the root directory
const twoAbove = path.join(buildPath, "../../");
// const logMessage = `Build Path: ${twoAbove}\nDirname: ${__dirname}\n---\n`;
// fs.appendFileSync(path.join(__dirname, "logs.txt"), logMessage);
// biome-ignore lint/style/noVar: Don't know why this is needed
var src = path.join(__dirname, "build/app/run_server.bat");
// biome-ignore lint/style/noVar: Don't know why this is needed
var dst = `${twoAbove}/run_server.bat`;
fs.cpSync(src, dst, { recursive: true });
},
},
};