forked from DeepinkApp/deepink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforge.config.ts
More file actions
102 lines (98 loc) · 2.51 KB
/
Copy pathforge.config.ts
File metadata and controls
102 lines (98 loc) · 2.51 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
/* eslint-disable @cspell/spellchecker */
import type { MakerDebConfig } from '@electron-forge/maker-deb';
import type { MakerDMGConfig } from '@electron-forge/maker-dmg';
import type { MakerWixConfig } from '@electron-forge/maker-wix';
import type { MakerZIPConfig } from '@electron-forge/maker-zip';
import type { ForgeConfig } from '@electron-forge/shared-types';
import type { MakerAppImageConfig } from '@reforged/maker-appimage';
import projectInfo from './package.json';
import { getAbout } from './src/about';
// We do not need any files except those in dist
const allowedPathPrefixes = ['/dist', '/package.json'];
const about = getAbout();
// Docs: https://electron.github.io/packager/main/interfaces/Options.html
export default {
packagerConfig: {
asar: true,
name: about.displayName,
executableName: process.platform === 'darwin' ? about.displayName : about.name,
icon: 'assets/icons/app',
ignore(path) {
const isAllowed =
path.trim().length === 0 ||
allowedPathPrefixes.some((allowedPath) => path.startsWith(allowedPath));
return !isAllowed;
},
extraResource: ['./dist/assets'],
},
makers: [
{
name: '@electron-forge/maker-zip',
config: {} satisfies MakerZIPConfig,
},
{
name: '@electron-forge/maker-wix',
platforms: ['win32'],
config: {
autoRun: true,
icon: 'dist/assets/icons/app.ico',
features: {
autoLaunch: true,
autoUpdate: false,
},
ui: {
chooseDirectory: true,
},
} satisfies MakerWixConfig,
},
{
name: '@electron-forge/maker-dmg',
platforms: ['darwin'],
config: {
title: about.displayName,
format: 'ULFO',
overwrite: true,
} satisfies MakerDMGConfig,
},
{
name: '@reforged/maker-appimage',
platforms: ['linux'],
config: {
options: {
icon: 'assets/icons/app.png',
categories: [
'Office',
'Education',
'Dictionary',
'Documentation',
'Presentation',
'ProjectManagement',
'Science',
'TextEditor',
'TextTools',
'Utility',
],
},
} satisfies MakerAppImageConfig,
},
{
name: '@electron-forge/maker-deb',
platforms: ['linux'],
config: {
options: {
productName: about.displayName,
genericName: about.description,
maintainer: projectInfo.author,
icon: 'assets/icons/app.png',
categories: ['Office', 'Science', 'Education'],
},
} satisfies MakerDebConfig,
},
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
],
} satisfies ForgeConfig;