-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathio.github.theforceengine.tfe.yml
More file actions
150 lines (142 loc) · 5.55 KB
/
io.github.theforceengine.tfe.yml
File metadata and controls
150 lines (142 loc) · 5.55 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
id: io.github.theforceengine.tfe
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: io.github.theforceengine.tfe.sh
cleanup:
- include
- lib/cmake/*
- share/rtmidi/*
finish-args:
# hardware 3D and controller access
- --device=all
# X11 + XShm access
- --share=ipc
- --socket=x11
# Audio
- --socket=pulseaudio
# Access to the default Steam Dark Forces data directory for loose, Flatpak and Snap versions of Steam
- --filesystem=home/.local/share/Steam/steamapps/common/Dark Forces/Game:ro
- --filesystem=home/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Dark Forces/Game:ro
- --filesystem=home/snap/steam/common/.local/share/Steam/steamapps/common/Dark Forces/Game:ro
modules:
- name: tfe
modules:
- shared-modules/glu/glu-9.json
- name: rtmidi
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/thestk/rtmidi/archive/refs/tags/6.0.0.tar.gz
sha256: ef7bcda27fee6936b651c29ebe9544c74959d0b1583b716ce80a1c6fea7617f0
x-checker-data:
type: anitya
project-id: 4220
url-template: https://github.com/thestk/rtmidi/archive/refs/tags/$version.tar.gz
sources:
- &tfe_git_source
type: git
url: https://github.com/luciusDXL/TheForceEngine.git
x-checker-data:
type: git
tag-pattern: ^v\\d+(\\.\\d+)+$
tag: v1.22.000
# Separate engine data from user data on Linux by setting PATH_USER_DOCUMENTS to XDG_HOME.
- type: patch
path: tfe_01_user_data.patch
# Patch automatic detection of Dark Forces installation
- type: patch
path: tfe_02_game_data_detection.patch
# Release metadata
- type: file
path: io.github.theforceengine.tfe.releases.xml
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DENABLE_EDITOR=ON
builddir: true
post-install:
# Install release metadata
- install -Dvm 0644
-t "$FLATPAK_DEST/share/metainfo/releases"
"$FLATPAK_BUILDER_BUILDDIR/$FLATPAK_ID.releases.xml"
# `.Mod.AdjustableHud` extension
- name: AdjustableHud
sources:
- *tfe_git_source
buildsystem: simple
build-commands:
# Install AdjustableHud mod’s AppStream metadata
- install -Dvm 0644
-t "$FLATPAK_DEST/share/TheForceEngine/Mods/share/metainfo"
"TheForceEngine/$FLATPAK_ID.Mod.AdjustableHud.metainfo.xml"
# Compose AdjustableHud mod’s AppStream metadata catalog
- appstreamcli compose
--prefix=/
--origin="$FLATPAK_ID.Mod.AdjustableHud"
--result-root="$FLATPAK_DEST/share/TheForceEngine/Mods"
--data-dir="$FLATPAK_DEST/share/TheForceEngine/Mods/share/app-info/xmls"
--icons-dir="$FLATPAK_DEST/share/TheForceEngine/Mods/share/app-info/icons/flatpak"
--components="$FLATPAK_ID.Mod.AdjustableHud"
"$FLATPAK_DEST/share/TheForceEngine/Mods"
# `.Debug` extension
- name: debug
sources:
- type: file
path: io.github.theforceengine.tfe.Debug.metainfo.xml
- type: file
url: https://sourceware.org/gdb/images/archer.svg
sha256: 0b395702ca5d13ef32f7b9643b24a0c968ad193f45c22601ac3049b0575273ff
dest-filename: io.github.theforceengine.tfe.Debug.svg
buildsystem: simple
build-commands:
# Install `.Debug` extension AppStream metadata
- install -Dvm 0644
-t "$FLATPAK_DEST/lib/debug/share/metainfo"
"$FLATPAK_ID.Debug.metainfo.xml"
- install -Dvm 0644
-t "$FLATPAK_DEST/lib/debug/share/icons/hicolor/scalable/apps"
"$FLATPAK_ID.Debug.svg"
# Compose `.Debug` extension’s AppStream metadata catalog
- appstreamcli compose
--prefix=/
--origin="$FLATPAK_ID.Debug"
--result-root="$FLATPAK_DEST/lib/debug"
--data-dir="$FLATPAK_DEST/lib/debug/share/app-info/xmls"
--icons-dir="$FLATPAK_DEST/lib/debug/share/app-info/icons/flatpak"
--components="$FLATPAK_ID.Debug"
"$FLATPAK_DEST/lib/debug"
# Add a wrapper script that points TFE_DATA_HOME to the correct location within the sandbox
- name: launch_script
sources:
- type: file
path: io.github.theforceengine.tfe.sh
buildsystem: simple
build-commands:
# Install launch script
- install -Dm 0755 "$FLATPAK_ID.sh" -t "$FLATPAK_DEST/bin"
# Update desktop launcher file to exec the launch script
- desktop-file-edit --set-key=Exec
--set-value="$FLATPAK_ID.sh"
"$FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop"
cleanup-commands:
- rm -rvf "$FLATPAK_DEST/share/metainfo/$FLATPAK_ID.Mod.AdjustableHud.metainfo.xml"
"$FLATPAK_DEST/include"
"$FLATPAK_DEST/lib/"*'.a'
"$FLATPAK_DEST/lib/pkgconfig"
add-extensions:
# TFE’s mod extension point
io.github.theforceengine.tfe.Mod:
directory: share/TheForceEngine/Mods
merge-dirs: .
no-autodownload: true
autodelete: false
bundle: false
subdirectories: true
# AdjustableHud mod bundled with TFE
io.github.theforceengine.tfe.Mod.AdjustableHud:
directory: share/TheForceEngine/Mods
no-autodownload: false
autodelete: true
bundle: true
subdirectories: false