mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-10 04:31:16 +00:00
scripts: use waf install to generate packages
This commit is contained in:
parent
aa30661c26
commit
041315da44
@ -9,12 +9,10 @@ mkdir -p $APPDIR
|
||||
python3 scripts/makepak.py xash-extras/ $APPDIR/extras.pak
|
||||
|
||||
# Copy all needed files
|
||||
./waf install
|
||||
mv appimage $APPDIR
|
||||
cp SDL2_linux/lib/libSDL2-2.0.so.0 $APPDIR/
|
||||
cp vgui-dev/lib/vgui.so $APPDIR/
|
||||
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
|
||||
@ -22,7 +20,7 @@ cat > $APPDIR/AppRun << 'EOF'
|
||||
echo "Xash3D FWGS installed as AppImage."
|
||||
|
||||
ENGINEROOT=$(dirname -- "$(readlink -f -- "$0")")
|
||||
if [ -z "$XASH3D_BASEDIR" ]; then
|
||||
if [ "$XASH3D_BASEDIR" == "" ]; then
|
||||
export XASH3D_BASEDIR=$PWD
|
||||
fi
|
||||
export XASH3D_EXTRAS_PAK1="${ENGINEROOT}"/extras.pak
|
||||
|
@ -31,7 +31,7 @@ make install DESTDIR=$TRAVIS_BUILD_DIR/SDL2_linux
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
export CC="ccache gcc"
|
||||
export CXX="ccache g++"
|
||||
./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_linux --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug --enable-stb || die
|
||||
./waf configure -s SDL2_linux -T debug --enable-stb --prefix="appimage" --win-style-install || die
|
||||
./waf build || die
|
||||
|
||||
# Build AppImage
|
||||
|
@ -6,16 +6,15 @@
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
export CC="ccache i686-w64-mingw32-gcc"
|
||||
export CXX="ccache i686-w64-mingw32-g++"
|
||||
export CFLAGS="-static-libgcc -no-pthread -msse2" # add sse2 to workaround mingw multiple definition of MemoryBarrier bug
|
||||
export CFLAGS="-static-libgcc -no-pthread -msse2 -msse -mmmx -march=pentium4m -mtune=pentium4m -Ofast -ffast-math -funsafe-math-optimizations -funsafe-loop-optimizations -g -gdwarf-2 -fomit-frame-pointer" # add sse2 to workaround mingw multiple definition of MemoryBarrier bug
|
||||
export CXXFLAGS="-static-libgcc -static-libstdc++ -no-pthread -msse2"
|
||||
export LDFLAGS="-static-libgcc -static-libstdc++ -no-pthread -Wl,--allow-multiple-definition" # workaround some other mingw bugs
|
||||
export WINRC="i686-w64-mingw32-windres"
|
||||
rm -rf build # clean build directory
|
||||
./waf configure --sdl2=$TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32/ --disable-vgui --build-type=debug --verbose || die # can't compile VGUI support on MinGW, due to differnet C++ ABI
|
||||
./waf build --verbose || die
|
||||
./waf configure -s "SDL2_mingw/i686-w64-mingw32/" --build-type=none --prefix="." --win-style-install -v || die # can't compile VGUI support on MinGW, due to differnet C++ ABI
|
||||
./waf build -v || die
|
||||
cp $TRAVIS_BUILD_DIR/SDL2_mingw/i686-w64-mingw32//bin/SDL2.dll . # Install SDL2
|
||||
cp vgui_support_bin/vgui_support.dll .
|
||||
cp build/engine/xash.dll .
|
||||
cp build/mainui/menu.dll .
|
||||
cp build/game_launch/xash3d.exe .
|
||||
./waf install || die
|
||||
|
||||
7z a -t7z $TRAVIS_BUILD_DIR/xash3d-mingw.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe
|
||||
|
@ -5,9 +5,8 @@
|
||||
# Build engine
|
||||
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
python waf configure --sdl2=$HOME/Library/Frameworks/SDL2.framework/ --vgui=$TRAVIS_BUILD_DIR/vgui-dev --build-type=debug || die
|
||||
python waf configure -s "$HOME/Library/Frameworks/SDL2.framework/" -T debug --prefix="pkg/" --win-style-install || die
|
||||
python waf build || die
|
||||
mkdir -p pkg/
|
||||
cp build/engine/libxash.dylib build/game_launch/xash3d build/mainui/libmenu.dylib build/vgui_support/libvgui_support.dylib vgui-dev/lib/vgui.dylib pkg/
|
||||
python waf install || die
|
||||
cp ~/Library/Frameworks/SDL2.framework/SDL2 pkg/libSDL2.dylib
|
||||
tar -cjf $TRAVIS_BUILD_DIR/xash3d-osx.tar.bz2 pkg/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user