-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcom.modrinth.ModrinthApp.yml
More file actions
99 lines (84 loc) · 3.53 KB
/
Copy pathcom.modrinth.ModrinthApp.yml
File metadata and controls
99 lines (84 loc) · 3.53 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
id: com.modrinth.ModrinthApp
runtime: org.gnome.Platform
runtime-version: '49'
sdk: org.gnome.Sdk
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 (flatpak)
- --filesystem=xdg-run/discord-ipc-0 # allows for discord rpc
# We can't use this yet, see <https://github.com/flatpak/flatpak/issues/5681>
# So we have to use device=all
# - --device=dri
# - --device=input
- --device=all
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=wayland
- --socket=fallback-x11
- --env=MODRINTH_EXTERNAL_UPDATE_PROVIDER=1
- --env=MODRINTH_APP_SOURCE=flatpak
rename-desktop-file: Modrinth App.desktop
rename-icon: ModrinthApp
modules:
# For the in-game narrator
- modules/flite/flite.yml
# Used by TinyFileDialogs from LWJGL
- modules/xprop/xprop.yml
# Required for older versions of Minecraft
- modules/xrandr.yml
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
# Some controller mods require libusb (see https://github.com/isXander/Controlify/issues/31)
# Indeed, it is already provided by the runtime
# Helper script used to wrap instances with the proper configuration for dGPUs
- name: prime-run
buildsystem: simple
build-commands:
- install -Dm755 prime-run "$FLATPAK_DEST"/bin/prime-run
sources:
- type: file
path: prime-run
# 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 "$FLATPAK_DEST"/{bin,share}
- cp -r squashfs-root/usr/share/{applications,icons} "$FLATPAK_DEST"/share/
- install -Dm755 squashfs-root/usr/bin/ModrinthApp "$FLATPAK_DEST"/bin/modrinth-app
- install -Dm644 com.modrinth.ModrinthApp.metainfo.xml "$FLATPAK_DEST"/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.20.0/linux/Modrinth%20App_0.20.0_amd64.AppImage
dest-filename: ModrinthApp.AppImage
sha256: 9204895b804f320164ef6f6c6f743f13c479d1e8168104f8fc529100da67ab8d
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