Browse Source

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

pull/2/head
fgsfds 1 year ago
parent
commit
919d510f63
  1. 33
      .github/workflows/c-cpp.yml
  2. 2
      filesystem/wad.c
  3. 26
      scripts/flatpak/run.sh
  4. 10
      scripts/flatpak/su.xash.Engine.Compat.i386.desktop
  5. 6
      scripts/flatpak/su.xash.Engine.Compat.i386.yml

33
.github/workflows/c-cpp.yml

@ -51,18 +51,10 @@ jobs: @@ -51,18 +51,10 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout xash-extras
uses: actions/checkout@v3
with:
repository: FWGS/xash-extras
path: xash-extras
- name: Install dependencies
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
- name: Build engine
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
- name: Upload engine (prereleases)
run: bash scripts/continious_upload.sh artifacts/*
- name: Upload engine (artifacts)
@ -70,3 +62,28 @@ jobs: @@ -70,3 +62,28 @@ jobs:
with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/*
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- app: su.xash.Engine.Compat.i386
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
options: --privileged
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOADTOOL_ISPRERELEASE: true
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build flatpak (Compat.i386)
uses: FWGS/flatpak-github-actions/flatpak-builder@v5
with:
bundle: ${{ matrix.app }}.flatpak
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
- name: Upload engine (prereleases)
run: bash scripts/continious_upload.sh ${{ matrix.app }}.flatpak

2
filesystem/wad.c

@ -301,7 +301,7 @@ static wfile_t *W_Open( const char *filename, int *error ) @@ -301,7 +301,7 @@ static wfile_t *W_Open( const char *filename, int *error )
if( wad->handle == NULL )
{
Con_Reportf( S_ERROR "W_Open: couldn't open %s\n", filename );
Con_Reportf( S_ERROR "W_Open: couldn't open %s: %s\n", filename, strerror( errno ));
if( error ) *error = WAD_LOAD_COULDNT_OPEN;
FS_CloseWAD( wad );
return NULL;

26
scripts/flatpak/run.sh

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

10
scripts/flatpak/su.xash.Engine.Compat.i386.desktop

@ -0,0 +1,10 @@ @@ -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

6
scripts/flatpak/su.xash.Engine.Compat.i386.yml

@ -17,6 +17,7 @@ finish-args: @@ -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: @@ -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: ../../

Loading…
Cancel
Save