2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-25 19:30:08 +01:00

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
commit 919d510f63
5 changed files with 59 additions and 22 deletions

View File

@ -51,18 +51,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: recursive submodules: recursive
- name: Checkout xash-extras
uses: actions/checkout@v3
with:
repository: FWGS/xash-extras
path: xash-extras
- name: Install dependencies - name: Install dependencies
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
- name: Build engine - name: Build engine
run: bash scripts/gha/build_${{ matrix.targetos }}.sh run: bash scripts/gha/build_${{ matrix.targetos }}.sh
- name: Upload engine (prereleases) - name: Upload engine (prereleases)
run: bash scripts/continious_upload.sh artifacts/* run: bash scripts/continious_upload.sh artifacts/*
- name: Upload engine (artifacts) - name: Upload engine (artifacts)
@ -70,3 +62,28 @@ jobs:
with: with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }} name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/* 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

View File

@ -301,7 +301,7 @@ static wfile_t *W_Open( const char *filename, int *error )
if( wad->handle == NULL ) 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; if( error ) *error = WAD_LOAD_COULDNT_OPEN;
FS_CloseWAD( wad ); FS_CloseWAD( wad );
return NULL; return NULL;

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

@ -2,19 +2,23 @@
echo "Xash3D FWGS installed as Flatpak." echo "Xash3D FWGS installed as Flatpak."
# TODO: detect by libraryfolders.vdf and installed apps export XASH3D_BASEDIR="$HOME/.xash/"
HALFLIFESTEAMDIR="$HOME/.steam/steam/steamapps/common/Half-Life" mkdir -p $XASH3D_BASEDIR
cd $XASH3D_BASEDIR
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" 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 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 - --socket=pulseaudio
- --share=network - --share=network
- --filesystem=~/.steam:ro - --filesystem=~/.steam:ro
- --filesystem=~/.local/share/Steam:ro
- --filesystem=~/.xash:rw - --filesystem=~/.xash:rw
- --filesystem=xdg-run/app/com.discordapp.Discord:create - --filesystem=xdg-run/app/com.discordapp.Discord:create
- --device=all - --device=all
@ -76,7 +77,12 @@ modules:
python waf build python waf build
python waf install --destdir=/ python waf install --destdir=/
mkdir -p /app/bin 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 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: sources:
- type: dir - type: dir
path: ../../ path: ../../