-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcom.tominlab.wonderpen.yaml
71 lines (70 loc) · 2.95 KB
/
com.tominlab.wonderpen.yaml
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
app-id: com.tominlab.wonderpen
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
separate-locales: false
rename-icon: wonderpen
rename-desktop-file: wonderpen.desktop
command: wonderpen
finish-args:
- --share=ipc
- --socket=x11
- --device=dri
- --share=network
# required to fix cursor scaling on wayland
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
modules:
- name: wonderpen
buildsystem: simple
build-options:
no-debuginfo: true
build-commands:
- bsdtar --to-stdout -xf wonderpen.deb data.* | bsdtar -xf -
- rm -r usr/share/doc
- cp -a opt/WonderPen $FLATPAK_DEST/
- cp -a usr/share $FLATPAK_DEST/
- desktop-file-edit --set-key="Exec" --set-value="wonderpen %U" $FLATPAK_DEST/share/applications/wonderpen.desktop
- desktop-file-edit --set-key="Name[zh_CN]" --set-value="妙笔" $FLATPAK_DEST/share/applications/wonderpen.desktop
- desktop-file-edit --set-key="Name[zh_TW]" --set-value="妙筆" $FLATPAK_DEST/share/applications/wonderpen.desktop
- install -Dm644 com.tominlab.wonderpen.metainfo.xml -t /app/share/metainfo
- install -Dm755 wonderpen.sh /app/bin/wonderpen
sources:
- type: file
dest-filename: wonderpen.deb
only-arches:
- x86_64
url: https://file.tominlab.com/WonderPen/2.5/WonderPen_linux_amd64_2.5.9(7612).deb
sha256: 5d86ec16273a068cacf0091c555a060a8748b919b84aedc056d5b07d4bd5b57c
x-checker-data:
type: json
url: https://app.tominlab.com/api/product/wonderpen/downloads/latest
version-query: .data[0] | .version
url-query: .data[] | select(.format=="linux_deb" and (.url | contains("amd64")))
| "https://file.tominlab.com/" + .url
- type: file
path: com.tominlab.wonderpen.metainfo.xml
- type: script
dest-filename: wonderpen.sh
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
- |
if [[ -e "$XDG_RUNTIME_DIR/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime"
fi
- exec zypak-wrapper.sh /app/WonderPen/wonderpen $FLAGS "$@"
- type: file
dest-filename: wonderpen.deb
only-arches:
- aarch64
url: https://file.tominlab.com/WonderPen/2.5/WonderPen_linux_arm64_2.5.1(7414).deb
sha256: 2924956a3c317693b1f7fbddfc129b7de9dbca8b9bd8ee287e687f5c22b04c76
x-checker-data:
type: json
url: https://app.tominlab.com/api/product/wonderpen/downloads/latest
version-query: .data[0] | .version
url-query: .data[] | select(.format=="linux_deb" and (.url | contains("arm64")))
| "https://file.tominlab.com/" + .url