-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathforge.config.js
151 lines (145 loc) · 4.84 KB
/
forge.config.js
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
144
145
146
147
148
149
150
151
// forge.config.js
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
const path = require('path');
module.exports = {
packagerConfig: {
name: "Paraglide",
executableName: "Paraglide",
win32metadata: {
CompanyName: "WareAoba",
FileDescription: "Paraglide",
OriginalFilename: "Paraglide.exe",
ProductName: "Paraglide",
InternalName: "Paraglide",
requestedExecutionLevel: 'asInvoker',
manifestVersion: '1.0.0.0'
},
signAndEditExecutable: true,
certificateFile: process.env.WINDOWS_CODESIGN_FILE,
certificatePassword: process.env.WINDOWS_CODESIGN_PASSWORD,
asar: {
unpack: "**/{node_modules/node-global-key-listener,public}/**/*",
compression: 'normal',
smartUnpack: true
},
dir: './',
icon: process.platform === 'darwin'
? path.resolve(__dirname, 'public/icons/mac/icon.icns')
: path.resolve(__dirname, 'public/icons/win/icon.ico'),
appBundleId: 'com.paraglide.app',
appCategoryType: "public.app-category.productivity",
extendInfo: path.resolve(__dirname, 'public/mac/Info.plist'),
ignore: [
// 불필요한 파일 제외
// 기존 패턴
/\.git/,
/node_modules[\/\\].*[/\\]test[/\\].*/,
/node_modules[\/\\].*[/\\]docs[/\\].*/,
/node_modules[\/\\].*[/\\]example[/\\].*/,
/\.map$/,
/\.md$/,
/\.test\.js$/,
/\.spec\.js$/,
/\.iss$/,
// 추가할 패턴
/node_modules[\/\\].*[/\\]\.github[/\\].*/, // GitHub 관련 파일
/node_modules[\/\\].*[/\\]typescript[/\\].*/, // TypeScript 정의 파일
/\.ts$/, // TypeScript 소스
/\.tsx$/,
/\.d\.ts$/,
/\.tsbuildinfo$/,
/\.eslintrc.*/, // lint 설정
/\.prettierrc.*/, // prettier 설정
/\.babelrc.*/, // babel 설정
/\.editorconfig/, // 에디터 설정
/thumbs\.db$/, // Windows 썸네일
/\.DS_Store$/, // macOS 메타데이터
/node_modules[\/\\].*[/\\]CHANGELOG.*/, // 변경 로그
/node_modules[\/\\].*[/\\]LICENSE.*/, // 라이선스 파일
/node_modules[\/\\].*[/\\]coverage[/\\].*/, // 테스트 커버리지 파일
/node_modules[\/\\].*[/\\]__tests__[/\\].*/, // Jest 테스트 파일
/node_modules[\/\\].*[/\\]__mocks__[/\\].*/, // Jest 목 파일
/\.npmignore$/,
/\.gitignore$/,
/\.yarn-integrity$/,
/yarn-debug\.log$/,
/yarn-error\.log$/,
/npm-debug\.log$/,
/node_modules[\/\\].*[/\\]obj[/\\].*/, // 중간 빌드 파일
/\.zip$/, // 압축 파일
/\.tar$/,
/\.gz$/,
/node_modules[\/\\].*[/\\]samples[/\\].*/, // 예제 파일
/node_modules[\/\\].*[/\\]demo[/\\].*/, // 데모 파일
/\.min\.(js|css)\.map$/, // 최소화된 파일의 소스맵
/forge.config.js$/, // Electron Forge 설정 파일
/releases/, // 릴리즈 파일
/out/, // 빌드 결과 파일
/\.lock$/, // 락 파일 (yarn.lock, package-lock.json 등)
/\lock.json$/, // 락 파일
/\.log$/, // 모든 로그 파일
/\.tmp$/, // 임시 파일
/\.cache$/, // 캐시 파일
/node_modules[\/\\].*[/\\]types[/\\].*/, // 타입 정의 파일
/\.(md|markdown)$/, // 모든 마크다운 파일
/^\.env.*/, // 환경 설정 파일
/^\.vscode[\/\\].*/, // VS Code 설정 파일
],
protocols: [{
name: "Paraglide URL",
schemes: ["paraglide"]
}],
files: [
"dist/**/*",
"src/main.js",
"src/SystemListener.jsx",
"package.json"
],
directories: {
output: 'out',
buildResources: 'assets' // 리소스 디렉토리
},
extraResource: [
"./dist" // Vite 빌드 출력을 리소스로 포함
]
},
makers: [
{
name: '@electron-forge/maker-dmg',
config: {
icon: path.resolve(__dirname, 'public/icons/mac/icon.icns'),
format: 'ULFO'
}
},
{
// Windows용 portable exe
name: '@electron-forge/maker-zip',
platforms: ['win32'],
config: {
// Windows 설정
options: {
icon: path.resolve(__dirname, 'public/icons/win/icon.ico'),
certificateFile: process.env.WINDOWS_CODESIGN_FILE,
certificatePassword: process.env.WINDOWS_CODESIGN_PASSWORD,
signWithParams: '/tr http://timestamp.digicert.com /td sha256 /fd sha256'
}
}
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin']
}
],
plugins: [
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true
})
]
};