forked from SilverHoodCorp/polar-bookshelf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectron-builder.yml
117 lines (99 loc) · 3.44 KB
/
electron-builder.yml
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
productName: Polar Bookshelf
# TODO: unfortunately this needs to be set. Not sure why but it reverted to
# using nightly versions when not set. It should use package.json
electronVersion: 7.1.2
appId: io.inputneuron/polar
compression: normal
npmRebuild: false
# TODO: enable this in the future once we sign all the linux builds.
#forceCodeSigning: true
directories:
output: dist
buildResources: build
app: .
mac:
category: Reference
icon: ./icons/icon.icns
target:
- target: dmg
- target: zip
fileAssociations:
- ext: pdf
role: Viewer
# steps for notarizing the MacOS builds:
# https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
hardenedRuntime: true
gatekeeperAssess: false
entitlements: build/macos/entitlements.mac.plist
entitlementsInherit: build/macos/entitlements.mac.plist
dmg:
# The inner app inside the .dmg is signed and there is some broken logic
# which requires that the DMG itself is not signed.
sign: false
linux:
# TODO: consider using a custom productName here of polar-bookshelf to fix
# a bug on Linux with the application windows.
artifactName: ${name}-${version}-${arch}.${ext}
synopsis: Polar Bookshelf
description: Polar Bookshelf
category: Office
target:
- target: deb
- target: tar.gz
- target: snap
# WARNING: 'icon' is NOT supported well or at all on Linux. the only way to
# get them to work is to define them under 'mac' and use the icon.icns file
# to specify the icons.
fileAssociations:
- ext: pdf
mimeType: application/pdf
nsis:
artifactName: ${name}-${version}-${arch}.${ext}
appx:
artifactName: ${name}-${version}-${arch}.${ext}
applicationId: polar
identityName: 25130KevinBurton.PolarBookshelf
publisher: CN=D3591277-F57D-4C75-B342-D158E6C4AAF5
publisherDisplayName: Kevin Burton
win:
artifactName: ${name}-${version}-${arch}.${ext}
target:
# Building on Linux requires nsis packages and they're built in a
# docker container for windows.
- target: nsis
# appx packages are built for Windows on Windows and are designed
# for the windows store.
- target: appx
#- target: portable
icon: ./icons/icon-512x512.png
fileAssociations:
- ext: pdf
description: Polar PDF
publisherName: Spinn3r
snap:
confinement: "strict"
grade: "stable"
stagePackages:
- "default"
plugs:
- default
- home
- removable-media
#- "X11"
#- "wayland"
# additional plugs to pick up the GTK theme and icons from the system, mouse cursor theme still not fixed
- { "gtk-3-themes": { "interface": "content", "target": "$SNAP/data-dir/themes", "default-provider": "gtk-common-themes:gtk-3-themes" }, }
- { "icon-themes": { "interface": "content", "target": "$SNAP/data-dir/icons", "default-provider": "gtk-common-themes:icon-themes" }, }
- { "sound-themes": { "interface": "content", "target": "$SNAP/data-dir/sounds", "default-provider": "gtk-common-themes:sounds-themes" }, }
# NOTE that this requires manual approval via snapcraft...
#- { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true }, }
environment:
DISABLE_WAYLAND: 1 #use XWayland
# https://www.electron.build/configuration/publish
# https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
publish:
provider: github
publishAutoUpdate: true
asar: true
afterPack: "./electron-builder-afterpack.js"
afterSign: "./build/macos/notarize.js"