-
Notifications
You must be signed in to change notification settings - Fork 3
/
com.modrinth.ModrinthApp.yml
93 lines (81 loc) · 3.13 KB
/
com.modrinth.ModrinthApp.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
id: com.modrinth.ModrinthApp
runtime: org.gnome.Platform
runtime-version: '47'
sdk: org.gnome.Sdk//47
command: modrinth-app
finish-args:
- --filesystem=xdg-download:ro # allow drag and drop from downloads
- --filesystem=xdg-run/app/com.discordapp.Discord:create # allows for discord rpc
- --device=all
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=x11
- --socket=wayland
rename-desktop-file: Modrinth App.desktop
rename-icon: ModrinthApp
modules:
# for the in-game narrator
- name: flite
buildsystem: autotools
config-opts:
- --enable-shared
no-parallel-make: true
cleanup:
- /bin
- /include
- '*.a'
sources:
- type: git
url: https://github.com/festvox/flite.git
tag: v2.2
commit: e9e2e37c329dbe98bfeb27a1828ef9a71fa84f88
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
# for some controller mods (see https://github.com/isXander/Controlify/issues/31)
- shared-modules/libusb/libusb.json
# TODO: compile from source (preferably before the launcher supports arm on linux)
- name: modrinth-app
buildsystem: simple
build-commands:
- chmod +x ModrinthApp.AppImage
- ./ModrinthApp.AppImage --appimage-extract
- |
desktop-file-edit \
--set-comment="Modrinth's game launcher" \
--set-icon="$FLATPAK_ID" \
--set-key="Exec" --set-value="modrinth-app" \
--set-key="StartupNotify" --set-value="true" \
--set-key="Categories" --set-value="Game;ActionGame;AdventureGame;Simulation;" \
--set-key="Keywords" --set-value="game;minecraft;mc;" \
--set-key="StartupWMClass" --set-value="ModrinthApp" \
"squashfs-root/usr/share/applications/Modrinth App.desktop"
- mkdir -p /app/{bin,share}
- cp -r squashfs-root/usr/share/{applications,icons} /app/share/
- install -Dm755 squashfs-root/usr/bin/ModrinthApp /app/bin/modrinth-app
- install -Dm644 com.modrinth.ModrinthApp.metainfo.xml /app/share/metainfo/com.modrinth.ModrinthApp.metainfo.xml
sources:
- type: file
path: com.modrinth.ModrinthApp.metainfo.xml
- type: file
url: https://launcher-files.modrinth.com/versions/0.8.9/linux/Modrinth%20App_0.8.9_amd64.AppImage
dest-filename: ModrinthApp.AppImage
sha256: 6a278a61b428367fd85e9c8d4baf0b2ba033bff3610748f471afe4b9b23d6d44
only-arches: [x86_64]
x-checker-data:
type: json
url: https://launcher-files.modrinth.com/updates.json
version-query: .version
url-query: |
"https://launcher-files.modrinth.com/versions/\($version)/linux/Modrinth%20App_\($version)_amd64.AppImage"
# Wrap the executable in a wrapper to run scripts before running it
- name: wrapper
buildsystem: simple
build-commands:
- mv $FLATPAK_DEST/bin/modrinth-app $FLATPAK_DEST/bin/modrinth-app-wrapped
- install -Dm755 modrinth-app-wrapper.sh $FLATPAK_DEST/bin/modrinth-app
sources:
- type: file
path: modrinth-app-wrapper.sh