mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
scripts: add script building AppImage based on portable build for Linux
This commit is contained in:
parent
130a7b3c42
commit
3c4e75f1b2
51
scripts/build_appimage.sh
Normal file
51
scripts/build_appimage.sh
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
APP=Xash3DFWGS
|
||||||
|
ARCH=i686
|
||||||
|
APPDIR=$APP.AppDir
|
||||||
|
mkdir -p $APPDIR
|
||||||
|
|
||||||
|
# Generate extras.pak
|
||||||
|
python3 scripts/makepak.py extras.pak
|
||||||
|
|
||||||
|
# Copy all needed files
|
||||||
|
cp SDL2_linux/lib/libSDL2-2.0.so.0 $APPDIR/
|
||||||
|
cp vgui-dev/lib/vgui.so $APPDIR/
|
||||||
|
cp extras.pak $APPDIR/extras.pak
|
||||||
|
cp build/engine/libxash.so \
|
||||||
|
build/mainui/libmenu.so \
|
||||||
|
build/vgui_support/libvgui_support.so \
|
||||||
|
build/game_launch/xash3d $APPDIR
|
||||||
|
|
||||||
|
cat > $APPDIR/AppRun << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Xash3D FWGS installed as AppImage."
|
||||||
|
|
||||||
|
ENGINEROOT=$(dirname -- "$(readlink -f -- "$0")")
|
||||||
|
if [ -z "$XASH3D_BASEDIR" ]; then
|
||||||
|
export XASH3D_BASEDIR=$PWD
|
||||||
|
fi
|
||||||
|
export XASH3D_EXTRAS_PAK1="${ENGINEROOT}"/extras.pak
|
||||||
|
export LD_LIBRARY_PATH="${ENGINEROOT}":$LD_LIBRARY_PATH
|
||||||
|
${DEBUGGER} "${ENGINEROOT}"/xash3d "$@"
|
||||||
|
exit $?
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x $APPDIR/xash3d # Engine launcher
|
||||||
|
chmod +x $APPDIR/AppRun # Engine launcher script
|
||||||
|
|
||||||
|
wget "https://raw.githubusercontent.com/FWGS/fwgs-artwork/master/xash3d/icon_512.png" -O $APPDIR/$APP.png
|
||||||
|
|
||||||
|
cat > $APPDIR/$APP.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=$APP
|
||||||
|
Icon=$APP
|
||||||
|
Type=Application
|
||||||
|
Exec=AppRun
|
||||||
|
Categories=Game;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$ARCH.AppImage"
|
||||||
|
chmod +x appimagetool-$ARCH.AppImage
|
||||||
|
./appimagetool-$ARCH.AppImage $APPDIR
|
Loading…
x
Reference in New Issue
Block a user