Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs into switch_newer

This commit is contained in:
fgsfds
2023-02-05 02:37:40 +01:00
5 changed files with 59 additions and 22 deletions

30
scripts/flatpak/run.sh Normal file → Executable file
View File

@@ -2,19 +2,23 @@
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"
export XASH3D_BASEDIR="$HOME/.xash/"
mkdir -p $XASH3D_BASEDIR
cd $XASH3D_BASEDIR
echo "Base directory is $XASH3D_BASEDIR"
# TODO: detect by libraryfolders.vdf and installed apps
HALFLIFESTEAMDIRS="../.local/share/Steam/steamapps/common/Half-Life ../.steam/steam/steamapps/common/Half-Life"
for i in $HALFLIFESTEAMDIRS; do
# echo $i
if [ -d "$i" ]; then
echo "Detected Half-Life installation in $i, using as RoDir"
export XASH3D_RODIR=$i
break
fi
done
export XASH3D_EXTRAS_PAK1=/app/share/xash3d/valve/extras.pk3
exec /app/lib32/xash3d/xash3d "$@"
exec $DEBUGGER /app/lib32/xash3d/xash3d "$@"

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Categories=Game;Shooter;
Comment=Half-Life compatible game engine
Exec=
Icon=su.xash.Engine.Compat.i386
Keywords=first;person;shooter;multiplayer;half-life;halflife;singleplayer;
Name=Xash3D FWGS
PrefersNonDefaultGPU=true
Terminal=false
Type=Application

View File

@@ -17,6 +17,7 @@ finish-args:
- --socket=pulseaudio
- --share=network
- --filesystem=~/.steam:ro
- --filesystem=~/.local/share/Steam:ro
- --filesystem=~/.xash:rw
- --filesystem=xdg-run/app/com.discordapp.Discord:create
- --device=all
@@ -76,7 +77,12 @@ modules:
python waf build
python waf install --destdir=/
mkdir -p /app/bin
mkdir -p /app/share/icons/hicolor/256x256/apps/
mkdir -p /app/share/applications
install -m 0755 3rdparty/vgui_support/vgui-dev/lib/vgui.so /app/lib32/xash3d/vgui.so
install -m 0755 scripts/flatpak/run.sh /app/bin/run.sh
install -m 0644 game_launch/icon-xash-material.png /app/share/icons/hicolor/256x256/apps/su.xash.Engine.Compat.i386.png
install -m 0644 scripts/flatpak/su.xash.Engine.Compat.i386.desktop /app/share/applications/su.xash.Engine.Compat.i386.desktop
sources:
- type: dir
path: ../../