1
- import type { ForgeConfig , ForgePackagerOptions } from '@electron-forge/shared-types' ;
1
+ import type {
2
+ ForgeConfig ,
3
+ ForgePackagerOptions ,
4
+ } from '@electron-forge/shared-types' ;
2
5
// import { MakerSquirrel } from '@electron-forge/maker-squirrel';
3
6
import { MakerZIP } from '@electron-forge/maker-zip' ;
4
7
// import { MakerDeb } from '@electron-forge/maker-deb';
@@ -14,7 +17,7 @@ const { version } = packageJson;
14
17
const { versionPostfix } = process . env ;
15
18
16
19
const iconDir = path . resolve ( 'assets' , 'icons' ) ;
17
- console . log ( " forge.config.ts iconDir: " , iconDir ) ;
20
+ console . log ( ' forge.config.ts iconDir: ' , iconDir ) ;
18
21
19
22
const packagerConfig : ForgePackagerOptions = {
20
23
asar : true ,
@@ -25,9 +28,9 @@ const packagerConfig: ForgePackagerOptions = {
25
28
{
26
29
name : 'NiceNode Protocol' ,
27
30
schemes : [ 'nice-node' ] ,
28
- }
31
+ } ,
29
32
] ,
30
- appVersion : versionPostfix ? `${ version } ${ versionPostfix } ` : version
33
+ appVersion : versionPostfix ? `${ version } ${ versionPostfix } ` : version ,
31
34
// unsure if this is needed below:
32
35
// ignore: [ /stories/, /__tests__/, /.storybook/, /storybook/, /storybook-static/ ],
33
36
} ;
@@ -48,28 +51,29 @@ const commonLinuxConfig = {
48
51
} ,
49
52
executableName : 'nice-node' ,
50
53
productName : 'NiceNode' ,
51
- productDescription : "By running a node you become part of a global movement to decentralize a world of information. Prevent leaking your personal data to third party nodes. Ensure access when you need it, and don't be censored. Decentralization starts with you. Voice your choice, help your peers." ,
52
- maintainer :
"NiceNode LLC <[email protected] >" ,
54
+ productDescription :
55
+ "By running a node you become part of a global movement to decentralize a world of information. Prevent leaking your personal data to third party nodes. Ensure access when you need it, and don't be censored. Decentralization starts with you. Voice your choice, help your peers." ,
56
+ maintainer :
'NiceNode LLC <[email protected] >' ,
53
57
categories : [ 'Utility' , 'System' , 'Network' , 'Development' ] ,
54
58
mimeType : [ 'application/x-nice-node' , 'x-scheme-handler/nice-node' ] ,
55
- }
59
+ } ;
56
60
57
61
// skip signing & notarizing on local builds
58
- console . log ( " process.env.CI: " , process . env . CI ) ;
59
- if ( process . env . CI && process . env . NO_CODE_SIGNING !== 'true' ) {
60
- console . log ( " Setting packagerConfig.osxSign and osxNotarize" ) ;
61
- if ( process . env . APPLE_PROD_CERT_NAME ) {
62
- console . log ( " process.env.APPLE_PROD_CERT_NAME is not null" ) ;
62
+ console . log ( ' process.env.CI: ' , process . env . CI ) ;
63
+ if ( process . env . CI && process . env . NO_CODE_SIGNING !== 'true' ) {
64
+ console . log ( ' Setting packagerConfig.osxSign and osxNotarize' ) ;
65
+ if ( process . env . APPLE_PROD_CERT_NAME ) {
66
+ console . log ( ' process.env.APPLE_PROD_CERT_NAME is not null' ) ;
63
67
}
64
68
packagerConfig . osxSign = {
65
69
identity : process . env . APPLE_PROD_CERT_NAME ,
66
70
} ;
67
71
packagerConfig . osxNotarize = {
68
72
appleId : process . env . APPLE_ID ,
69
73
appleIdPassword : process . env . APPLE_ID_PASSWORD ,
70
- teamId : process . env . APPLE_TEAM_ID
74
+ teamId : process . env . APPLE_TEAM_ID ,
71
75
} ;
72
- } else if ( process . env . LOCAL_MAC_SIGNING === 'true' ) {
76
+ } else if ( process . env . LOCAL_MAC_SIGNING === 'true' ) {
73
77
packagerConfig . osxSign = { } ; // local keychain works automatically
74
78
}
75
79
@@ -87,27 +91,27 @@ const config: ForgeConfig = {
87
91
exe : 'nice-node.exe' ,
88
92
noMsi : true ,
89
93
setupExe : `NiceNode-${ version } -windows-${ arch } -setup.exe` ,
90
- setupIcon : path . resolve ( iconDir , '..' , 'icon.ico' )
94
+ setupIcon : path . resolve ( iconDir , '..' , 'icon.ico' ) ,
91
95
} ) ,
92
96
} ,
93
97
new MakerZIP ( { } ) ,
94
98
{
95
99
name : '@electron-forge/maker-rpm' ,
96
100
platforms : [ 'linux' ] ,
97
- config : commonLinuxConfig
101
+ config : commonLinuxConfig ,
98
102
} ,
99
103
{
100
104
name : '@electron-forge/maker-deb' ,
101
105
platforms : [ 'linux' ] ,
102
- config : commonLinuxConfig
106
+ config : commonLinuxConfig ,
107
+ } ,
108
+ {
109
+ name : '@electron-forge/maker-dmg' ,
110
+ config : {
111
+ background : './assets/installer.icns' ,
112
+ overwrite : true ,
113
+ } ,
103
114
} ,
104
- new MakerDMG ( {
105
- background : './assets/dmg-background.tiff' ,
106
- // installer name. default includes version number in filename
107
- // name: "NiceNode Installer",
108
- icon : './assets/installer.icns' ,
109
- overwrite : true ,
110
- } ) ,
111
115
] ,
112
116
plugins : [
113
117
new VitePlugin ( {
@@ -118,10 +122,12 @@ const config: ForgeConfig = {
118
122
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
119
123
entry : 'src/main/main.ts' ,
120
124
config : 'vite.main.config.ts' ,
125
+ target : 'main' ,
121
126
} ,
122
127
{
123
128
entry : 'src/main/preload.ts' ,
124
129
config : 'vite.preload.config.ts' ,
130
+ target : 'preload' ,
125
131
} ,
126
132
] ,
127
133
renderer : [
@@ -133,7 +139,7 @@ const config: ForgeConfig = {
133
139
} ) ,
134
140
{
135
141
name : '@electron-forge/plugin-auto-unpack-natives' ,
136
- config : { }
142
+ config : { } ,
137
143
} ,
138
144
// Fuses are used to enable/disable various Electron functionality
139
145
// at package time, before code signing the application
@@ -156,10 +162,10 @@ const config: ForgeConfig = {
156
162
name : 'nice-node' ,
157
163
} ,
158
164
prerelease : true ,
159
- generateReleaseNotes : true
165
+ generateReleaseNotes : true ,
160
166
} ,
161
167
} ,
162
- ]
168
+ ] ,
163
169
} ;
164
170
165
171
export default config ;
0 commit comments