mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
scripts: flatpak: add basic i386 flatpak script
This commit is contained in:
parent
ced6e8869a
commit
f3ff942ea9
20
scripts/flatpak/run.sh
Normal file
20
scripts/flatpak/run.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Xash3D FWGS installed as Flatpak."
|
||||||
|
|
||||||
|
# TODO: detect by libraryfolders.vdf and installed apps
|
||||||
|
HALFLIFESTEAMDIR="$HOME/.steam/steam/steamapps/common/Half-Life"
|
||||||
|
|
||||||
|
if [ -d "$HALFLIFESTEAMDIR" ]; then
|
||||||
|
echo "Detected Half-Life installation in $HALFLIFESTEAMDIR, using as RoDir"
|
||||||
|
export XASH3D_RODIR=$HALFLIFESTEAMDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
XASHDATADIR="$HOME/.xash/"
|
||||||
|
|
||||||
|
mkdir -p $XASHDATADIR
|
||||||
|
export XASH3D_BASEDIR="$XASHDATADIR"
|
||||||
|
echo "Base directory is $XASH3D_BASEDIR"
|
||||||
|
|
||||||
|
export XASH3D_EXTRAS_PAK1=/app/share/xash3d/valve/extras.pk3
|
||||||
|
exec /app/lib32/xash3d/xash3d "$@"
|
82
scripts/flatpak/su.xash.Engine.Compat.i386.yml
Normal file
82
scripts/flatpak/su.xash.Engine.Compat.i386.yml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
app-id: su.xash.Engine.Compat.i386
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: &runtime-version '22.08'
|
||||||
|
x-gl-version: &gl-version '1.4'
|
||||||
|
x-gl-versions: &gl-versions 22.08;1.4
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
command: run.sh
|
||||||
|
separate-locales: false
|
||||||
|
sdk-extensions:
|
||||||
|
- org.freedesktop.Sdk.Compat.i386
|
||||||
|
- org.freedesktop.Sdk.Extension.toolchain-i386
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
- --share=ipc
|
||||||
|
- --socket=wayland
|
||||||
|
- --socket=x11
|
||||||
|
- --socket=pulseaudio
|
||||||
|
- --share=network
|
||||||
|
- --filesystem=~/.steam:ro
|
||||||
|
- --filesystem=~/.xash:rw
|
||||||
|
- --filesystem=xdg-run/app/com.discordapp.Discord:create
|
||||||
|
- --device=all
|
||||||
|
- --allow=multiarch
|
||||||
|
- --allow=devel
|
||||||
|
- --allow=bluetooth
|
||||||
|
|
||||||
|
add-extensions:
|
||||||
|
org.freedesktop.Platform.Compat.i386:
|
||||||
|
directory: lib/i386-linux-gnu
|
||||||
|
version: *runtime-version
|
||||||
|
|
||||||
|
org.freedesktop.Platform.Compat.i386.Debug:
|
||||||
|
directory: lib/debug/lib/i386-linux-gnu
|
||||||
|
version: *runtime-version
|
||||||
|
no-autodownload: true
|
||||||
|
|
||||||
|
org.freedesktop.Platform.GL32:
|
||||||
|
directory: lib/i386-linux-gnu/GL
|
||||||
|
version: *gl-version
|
||||||
|
versions: *gl-versions
|
||||||
|
subdirectories: true
|
||||||
|
autodelete: false
|
||||||
|
add-ld-path: lib
|
||||||
|
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d
|
||||||
|
download-if: active-gl-driver
|
||||||
|
enable-if: active-gl-driver
|
||||||
|
|
||||||
|
x-compat-i386-opts: &compat-i386-opts
|
||||||
|
prepend-pkg-config-path: /app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig
|
||||||
|
ldflags: -L/app/lib32
|
||||||
|
prepend-path: /usr/lib/sdk/toolchain-i386/bin
|
||||||
|
env:
|
||||||
|
CC: i686-unknown-linux-gnu-gcc
|
||||||
|
CXX: i686-unknown-linux-gnu-g++
|
||||||
|
libdir: /app/lib32
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: bundle-setup
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- |
|
||||||
|
mkdir -p /app/lib/i386-linux-gnu
|
||||||
|
mkdir -p /app/lib/debug/lib/i386-linux-gnu
|
||||||
|
mkdir -p /app/lib/i386-linux-gnu/GL
|
||||||
|
install -Dm644 ld.so.conf /app/etc/ld.so.conf
|
||||||
|
sources:
|
||||||
|
- type: file
|
||||||
|
dest-filename: ld.so.conf
|
||||||
|
url: data:/app/lib32%0A/app/lib/i386-linux-gnu%0A
|
||||||
|
- name: xash
|
||||||
|
buildsystem: simple
|
||||||
|
build-options: *compat-i386-opts
|
||||||
|
build-commands:
|
||||||
|
- |
|
||||||
|
python waf configure -T release --enable-all-renderers --enable-packaging --prefix=/app --libdir=/app/lib32
|
||||||
|
python waf build
|
||||||
|
python waf install --destdir=/
|
||||||
|
mkdir -p /app/bin
|
||||||
|
install -m 0755 scripts/flatpak/run.sh /app/bin/run.sh
|
||||||
|
sources:
|
||||||
|
- type: dir
|
||||||
|
path: ../../
|
Loading…
x
Reference in New Issue
Block a user