-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathelectron-builder.config.cjs
More file actions
143 lines (143 loc) · 4.85 KB
/
electron-builder.config.cjs
File metadata and controls
143 lines (143 loc) · 4.85 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/**
* @type {import('electron-builder').Configuration}
*/
module.exports = {
appId: 'com.netcatty.app',
productName: 'Netcatty',
artifactName: '${productName}-${version}-${os}-${arch}.${ext}',
// Platform-split icons (#813):
// - public/icon.png keeps Apple's HIG grid margin so the rendered
// squircle sits at ~88% of the PNG canvas. macOS needs this —
// the dock renders icons with its own rounding/shadow and most
// third-party apps (#803) leave that grid margin alone so the
// squircle lines up with neighbors.
// - public/icon-win.png uses a tight-crop viewBox so the squircle
// fills 100% of the PNG. Windows / Linux taskbars render icons
// full-bleed, so the Apple margin showed up as visible padding,
// making the app icon look smaller than other apps in taskbar /
// Start menu / desktop shortcuts.
icon: 'public/icon.png',
// npmRebuild must stay enabled for macOS and Windows builds — without it,
// node-pty's native module is not recompiled for the Electron ABI, causing
// "posix_spawnp failed" on macOS. Linux builds set npm_config_arch in CI
// and run ensure-node-pty-linux.sh before packaging, so the rebuild is
// redundant but harmless there.
npmRebuild: true,
directories: {
buildResources: 'build',
output: 'release'
},
files: [
'dist/**/*',
'electron/**/*',
'lib/**/*.cjs',
'!electron/.dev-config.json',
'skills/**/*',
'public/**/*',
'node_modules/**/*'
],
asarUnpack: [
'node_modules/node-pty/**/*',
'node_modules/ssh2/**/*',
'node_modules/cpu-features/**/*',
'node_modules/@vscode/windows-process-tree/**/*',
'node_modules/@zed-industries/claude-agent-acp/**/*',
'node_modules/@agentclientprotocol/sdk/**/*',
'node_modules/@anthropic-ai/claude-agent-sdk/**/*',
'node_modules/@zed-industries/codex-acp/**/*',
'node_modules/@zed-industries/codex-acp-*/**/*',
'node_modules/@modelcontextprotocol/sdk/**/*',
'node_modules/zod/**/*',
'node_modules/zod-to-json-schema/**/*',
'node_modules/ajv/**/*',
'node_modules/ajv-formats/**/*',
'node_modules/fast-deep-equal/**/*',
'node_modules/fast-uri/**/*',
'node_modules/json-schema-traverse/**/*',
'electron/cli/**/*',
'electron/mcp/**/*'
,
'skills/**/*'
],
mac: {
target: [
{
target: 'dmg',
arch: ['arm64', 'x64']
},
{
target: 'zip',
arch: ['arm64', 'x64']
}
],
category: 'public.app-category.developer-tools',
hardenedRuntime: true,
notarize: true,
entitlements: 'electron/entitlements.mac.plist',
entitlementsInherit: 'electron/entitlements.mac.plist',
extendInfo: {
NSCameraUsageDescription: 'Netcatty may use the camera for video calls',
NSMicrophoneUsageDescription: 'Netcatty may use the microphone for audio',
NSLocalNetworkUsageDescription: 'Netcatty needs local network access for SSH connections'
}
},
dmg: {
title: '${productName}',
iconSize: 100,
iconTextSize: 12,
window: {
width: 540,
height: 380
},
contents: [
{ x: 140, y: 158 },
{ x: 400, y: 158, type: 'link', path: '/Applications' }
]
},
win: {
icon: 'public/icon-win.png',
target: [
{
target: 'nsis',
arch: ['x64', 'arm64']
},
{
target: 'portable',
arch: ['x64', 'arm64']
}
]
},
portable: {
artifactName: '${productName}-${version}-portable-${os}-${arch}.${ext}',
},
nsis: {
oneClick: false,
perMachine: false,
allowElevation: true,
allowToChangeInstallationDirectory: true,
createDesktopShortcut: true,
createStartMenuShortcut: true,
shortcutName: 'Netcatty'
},
linux: {
// Linux desktop icons render full-bleed like Windows — use the
// tight-crop source so the app icon doesn't look padded in KDE /
// GNOME launchers or AppImage integrations.
icon: 'public/icon-win.png',
target: ['AppImage', 'deb', 'rpm'],
category: 'Development'
},
deb: {
// Use gzip instead of default xz(lzma) for better compatibility with
// Deepin OS and other distros that have issues with lzma decompression
compression: 'gz'
},
publish: [
{
provider: 'github',
owner: 'binaricat',
repo: 'Netcatty',
releaseType: 'release'
}
]
};