-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
65 lines (60 loc) · 1.44 KB
/
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
// Import package.json
const path = require('path')
const package = require('./package.json')
// Get environment variables
const platform = process.env.PACKAGE_PLATFORM
// Mac OS (App Store) configurations
const macOSConfig = {
appBundleId: package.appBundleId,
appCategoryType: 'public.app-category.developer-tools',
darwinDarkModeSupport: false,
protocols: [
{
// Open markotron:// links in app
name: 'Open Link in markotron',
schemes: [
'markotron'
]
}
],
usageDescription: {
Camera: 'Needed for video calls',
Microphone: 'Needed for voice calls',
// ...
}
}
// Windows configurations
const windowsConfig = {
win32metadata: {
CompanyName: package.author,
FileDescription: package.productName,
OriginalFilename: package.productName + '.exe',
ProductName: package.productName,
InternalName: package.productName
}
}
// Export configurations for Electron Packager
module.exports = {
dir: path.join(__dirname),
appCopyright: package.author,
appVersion: package.version,
arch: 'all',
asar: false,
executableName: package.productName,
icon: platform === 'darwin' ? './resources/icons/icon.icns' : platform === 'win32' && './resources/icons/icon.ico',
ignore: [
/app/,
/build/,
/.dockerignore/,
/.gitignore/,
/.jshintrc/,
/Dockerfile/,
/webpack.config.js/,
],
name: package.productName,
out: path.join(__dirname, 'release'),
overwrite: true,
platform: platform,
...macOSConfig,
...windowsConfig
}