forked from heyito/ito
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron-builder.config.js
More file actions
126 lines (123 loc) · 3.17 KB
/
electron-builder.config.js
File metadata and controls
126 lines (123 loc) · 3.17 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
// Define the native binaries that are shared across platforms
const nativeBinaries = [
'global-key-listener',
'audio-recorder',
'text-writer',
'active-application',
'selected-text-reader',
]
const getMacResources = () =>
nativeBinaries.map(binary => ({
from: `native/target/\${arch}-apple-darwin/release/${binary}`,
to: `binaries/${binary}`,
}))
const getWindowsResources = () =>
nativeBinaries.map(binary => ({
from: `native/target/x86_64-pc-windows-gnu/release/${binary}.exe`,
to: `binaries/${binary}.exe`,
}))
const stage = process.env.ITO_ENV || 'prod'
module.exports = {
appId: stage === 'prod' ? 'ai.ito.ito' : `ai.ito.ito-${stage.toLowerCase()}`,
productName: stage === 'prod' ? 'Ito' : `Ito-${stage}`,
copyright: 'Copyright © 2025 Demox Labs',
directories: {
buildResources: 'resources',
output: 'dist',
},
files: [
'!**/.vscode/*',
'!src/*',
'!electron.vite.config.{js,ts,mjs,cjs}',
'!.eslintignore',
'!.eslintrc.cjs',
'!.prettierignore',
'!.prettierrc.yaml',
'!README.md',
'!.env',
'!.env.*',
'!.npmrc',
'!pnpm-lock.yaml',
'!tsconfig.json',
'!tsconfig.node.json',
'!tsconfig.web.json',
'!native/**',
'!build-*.sh',
{
from: 'out',
filter: ['**/*'],
},
],
asar: true,
asarUnpack: ['resources/**'],
extraMetadata: {
version: process.env.VITE_ITO_VERSION || '0.0.0-dev',
},
protocols: {
name: 'ito',
schemes: stage === 'prod' ? ['ito'] : [`ito-dev`],
},
mac: {
target: 'default',
icon: 'resources/build/icon.icns',
darkModeSupport: true,
hardenedRuntime: true,
gatekeeperAssess: false,
identity: 'Demox Labs, Inc. (294ZSTM7UB)',
notarize: true,
entitlements: 'build/entitlements.mac.plist',
entitlementsInherit: 'build/entitlements.mac.inherit.plist',
extendInfo: {
NSMicrophoneUsageDescription:
'Ito requires microphone access to transcribe your speech.',
},
extraResources: [
...getMacResources(),
{ from: 'resources/build/ito-logo.png', to: 'build/ito-logo.png' },
],
},
dmg: {
artifactName:
stage === 'prod'
? 'Ito-Installer.${ext}'
: `Ito-${stage}-Installer.\${ext}`,
},
win: {
target: [
{
target: 'zip',
arch: ['x64'],
},
{
target: 'nsis',
arch: ['x64'],
},
],
artifactName: '${productName}-${version}.${ext}',
icon: 'resources/build/icon.ico',
executableName: 'Ito',
requestedExecutionLevel: 'asInvoker',
extraResources: [
...getWindowsResources(),
{ from: 'resources/build/ito-logo.png', to: 'build/ito-logo.png' },
],
forceCodeSigning: false,
asarUnpack: [
'resources/**',
'**/node_modules/@sentry/**',
'**/node_modules/sqlite3/**',
],
},
nodeGypRebuild: false,
buildDependenciesFromSource: false,
nsis: {
shortcutName: '${productName}',
uninstallDisplayName: '${productName}-uninstaller',
createDesktopShortcut: false,
createStartMenuShortcut: true,
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: false,
deleteAppDataOnUninstall: true,
},
}