-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathforge.config.cli.cjs
More file actions
123 lines (118 loc) · 3.31 KB
/
forge.config.cli.cjs
File metadata and controls
123 lines (118 loc) · 3.31 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
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
const { FusesPlugin } = require('./tools/forge-fuses-plugin.cjs');
// @electron/fuses@2 is ESM-only; keep Forge config in CJS by inlining the enum values.
const FuseVersion = { V1: '1' };
const FuseV1Options = {
RunAsNode: 0,
EnableCookieEncryption: 1,
EnableNodeOptionsEnvironmentVariable: 2,
EnableNodeCliInspectArguments: 3,
EnableEmbeddedAsarIntegrityValidation: 4,
OnlyLoadAppFromAsar: 5,
LoadBrowserProcessSpecificV8Snapshot: 6,
GrantFileProtocolExtraPrivileges: 7,
};
module.exports = {
packagerConfig: {
name: 'ESP32Tool',
executableName: 'esp32tool',
asar: true,
// Output to separate directory
out: 'out-cli',
// CLI-specific entry point
electronZipDir: undefined,
// Ensure consistent executable name across platforms
win32metadata: {
FileDescription: 'ESP32Tool',
ProductName: 'ESP32Tool',
},
appBundleId: 'com.esp32tool',
appCategoryType: 'public.app-category.developer-tools',
// Override main entry point for CLI
extraResource: [],
// Files to exclude from the app
// Use same approach as GUI config but exclude GUI-specific files
ignore: [
/^\/src\/(?!wasm)/, // Exclude src/ but keep src/wasm/
/^\/script/,
/^\/\.github/,
/^\/tools/,
/^\/binaries/,
/^\/out-cli/,
/^\/out/,
/^\/screenshots/,
/^\/installers/,
// GUI-specific files
/^\/electron\/main\.cjs$/,
/^\/electron\/preload\.js$/,
/^\/index\.html$/,
/^\/install-android\.html$/,
/^\/css\//,
/^\/js\//,
/^\/icons\//,
/^\/apple-touch-icon\.png$/,
/^\/favicon\.ico$/,
/^\/manifest\.json$/,
/^\/sw\.js$/,
// Build artifacts
/^\/dist\/web\//,
/^\/dist\/index\.(js|d\.ts)$/,
// Config files
/\.git/,
/\.eslint/,
/\.prettier/,
/tsconfig\.json/,
/rollup\.config\.(js|mjs)$/,
/forge\.config.*\.cjs$/,
/package\.cli\.json$/,
/build-.*\.cjs$/,
/fix-.*\.cjs$/,
/\.md$/,
],
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: ['darwin', 'linux', 'win32'],
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
name: 'esp32tool',
bin: 'esp32tool',
maintainer: 'Johann Obermeier',
homepage: 'https://github.com/Jason2866/esp32tool',
categories: ['Development', 'Utility'],
},
},
},
{
name: '@electron-forge/maker-rpm',
config: {
options: {
name: 'esp32tool',
bin: 'esp32tool',
homepage: 'https://github.com/Jason2866/esp32tool',
categories: ['Development', 'Utility'],
},
},
},
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
// Fuses are used to enable/disable various Electron functionality
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
};