-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforge.config.js
More file actions
55 lines (54 loc) · 1.78 KB
/
Copy pathforge.config.js
File metadata and controls
55 lines (54 loc) · 1.78 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
const { execFileSync } = require('child_process');
const path = require('path');
module.exports = {
packagerConfig: {
name: 'PapaStudio',
executableName: 'PapaStudio',
appBundleId: 'io.papastud.app',
icon: './static/icon',
ignore: [
/^\/server\//,
/^\/tests\//,
/^\/data\//,
/^\/\.github\//,
/^\/\.claude\//,
/Dockerfile/,
/playwright\.config/,
/CHANGES\//,
/CLAUDE\.md/,
/\.gitignore/,
],
},
// Override CFBundleDisplayName so macOS dock + Finder show "Papa Studio"
// (with space) instead of the filesystem-friendly "PapaStudio". Don't
// touch CFBundleName — Electron derives the Helper bundle paths from it
// (e.g. `${CFBundleName} Helper (Renderer).app`), so a rename here would
// make the runtime fail with "Unable to find helper app" → SIGTRAP.
// The plist edit invalidates the bundle's ad-hoc signature; re-sign with
// --deep so cross-arch builds (where electron-packager leaves nested
// Squirrel.framework unsigned) get a complete signature chain.
hooks: {
postPackage: async (_forgeConfig, options) => {
if (options.platform !== 'darwin') return;
for (const outPath of options.outputPaths) {
const appPath = path.join(outPath, 'PapaStudio.app');
const plist = path.join(appPath, 'Contents', 'Info.plist');
execFileSync('/usr/libexec/PlistBuddy', ['-c', 'Set :CFBundleDisplayName Papa Studio', plist]);
execFileSync('codesign', ['--force', '--deep', '--sign', '-', appPath]);
}
},
},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: ['darwin', 'linux', 'win32'],
},
{
name: '@electron-forge/maker-dmg',
config: {
name: 'PapaStudio',
format: 'ULFO',
},
},
],
};