Browse Source
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds * scripts: cleanup of old CI scripts * scripts: now port to GitHub Actions * actions: fix extras checkout * github: remove codeql action, turned out not to be very useful * github: remove quiet flag on wget * github: are we allowed to use envvars? * github: add needed dependencies for linux * github: install wget for windows * scripts: convert our CPU architecture naming into what AppImage uses * github: run scripts with bash explicitly * github: first try to upload to GitHub Releases, enable amd64 win32 builds * Use our uploadtool fork * ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts * gha: try to fix build * travis: try to fix build * gha: try to fix upload, fix win32 build * gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build * gha: add llvm repository, install clang-12 for android * gha: motomagx: fail fast * gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip * waifulib: xcompile: respect environment variables when using host compiler for Android * waifulib: xcompile: use correct environ dict * gha: try to fix -fuse-ld=lld with clang-12 * waifulib: xcompile: fix typo * scripts: xcompile: fix motomagx build * mainui: upgrade * gha: fix android build, last time * engine: wscript: disable crashhandler for magxpull/2/head
Alibek Omarov #SupportRMS
4 years ago
committed by
GitHub
29 changed files with 417 additions and 537 deletions
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
name: Build & Deploy Engine |
||||
on: [push, pull_request] |
||||
jobs: |
||||
build: |
||||
runs-on: ${{ matrix.os }} |
||||
continue-on-error: true |
||||
strategy: |
||||
fail-fast: false |
||||
matrix: |
||||
include: |
||||
- os: ubuntu-18.04 |
||||
targetos: linux |
||||
targetarch: amd64 |
||||
- os: ubuntu-18.04 |
||||
targetos: linux |
||||
targetarch: i386 |
||||
|
||||
- os: ubuntu-18.04 |
||||
targetos: android |
||||
targetarch: 32 |
||||
- os: ubuntu-18.04 |
||||
targetos: android |
||||
targetarch: 64 |
||||
|
||||
- os: ubuntu-18.04 |
||||
targetos: motomagx |
||||
targetarch: armv6 |
||||
|
||||
- os: windows-latest |
||||
targetos: win32 |
||||
targetarch: amd64 |
||||
- os: windows-latest |
||||
targetos: win32 |
||||
targetarch: i386 |
||||
env: |
||||
SDL_VERSION: 2.0.14 |
||||
GH_CPU_ARCH: ${{ matrix.targetarch }} |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
ANDROID_SDK_TOOLS_VER: 4333796 |
||||
ANDROID_NDK_VER: r10e |
||||
UPLOADTOOL_ISPRERELEASE: true |
||||
steps: |
||||
- name: Checkout |
||||
uses: actions/checkout@v2 |
||||
with: |
||||
submodules: recursive |
||||
- name: Checkout xash-extras |
||||
if: matrix.targetos != 'android' |
||||
uses: actions/checkout@v2 |
||||
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 (android) |
||||
if: matrix.targetos == 'android' |
||||
run: bash scripts/continious_upload.sh xashdroid-${{ matrix.targetarch }}.apk |
||||
- name: Upload engine (motomagx) |
||||
if: matrix.targetos == 'motomagx' |
||||
run: bash scripts/continious_upload.sh xash3d-fwgs-magx.7z |
||||
- name: Upload engine (linux) |
||||
if: matrix.targetos == 'linux' |
||||
run: bash scripts/continious_upload.sh xash3d-fwgs-${{ matrix.targetarch }}.AppImage xashds-linux-${{ matrix.targetarch }} |
||||
- name: Upload engine (windows) |
||||
if: matrix.targetos == 'win32' |
||||
run: bash scripts/continious_upload.sh xash3d-fwgs-win32-${{ matrix.targetarch }}.7z xash3d-fwgs-vc2008-sln-${{ matrix.targetarch }}.7z |
@ -1 +1 @@
@@ -1 +1 @@
|
||||
Subproject commit f12659f17f91111b534ed89170480bebc79fbc9e |
||||
Subproject commit 136a544f60534cdcd11aea9c236ddd529c71ac11 |
@ -1,20 +0,0 @@
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
. scripts/lib.sh |
||||
|
||||
# Build engine |
||||
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 -O1 -g -gdwarf-2" # 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 -s "SDL2_mingw/i686-w64-mingw32/" --build-type=none --prefix="." --win-style-install -v --enable-utils || 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 . |
||||
./waf install || die |
||||
|
||||
7z a -t7z $TRAVIS_BUILD_DIR/xash3d-mingw.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe |
@ -1,12 +0,0 @@
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
. scripts/lib.sh |
||||
|
||||
# Build engine |
||||
|
||||
cd $TRAVIS_BUILD_DIR |
||||
python waf configure -s "$HOME/Library/Frameworks/SDL2.framework/" -T debug --prefix="pkg/" --win-style-install --enable-utils || die |
||||
python waf build || die |
||||
python waf install || die |
||||
cp ~/Library/Frameworks/SDL2.framework/SDL2 pkg/libSDL2.dylib |
||||
tar -cjf $TRAVIS_BUILD_DIR/xash3d-osx.tar.bz2 pkg/* |
@ -1,28 +0,0 @@
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
. scripts/lib.sh |
||||
|
||||
# Build engine |
||||
cd $TRAVIS_BUILD_DIR |
||||
|
||||
# NOTE: to build with other version use --msvc_version during configuration |
||||
# NOTE: sometimes you may need to add WinSDK to %PATH% |
||||
./waf.bat configure -s "$TRAVIS_BUILD_DIR/SDL2_VC" -T "debug" --prefix=`pwd` --enable-utils || die |
||||
./waf.bat build -v || die |
||||
echo After build |
||||
|
||||
./waf.bat install || die |
||||
cp $TRAVIS_BUILD_DIR/SDL2_VC/lib/x86/SDL2.dll . # Install SDL2 |
||||
cp vgui-dev/lib/win32_vc6/vgui.dll . |
||||
|
||||
7z a -t7z $TRAVIS_BUILD_DIR/xash3d-win32-vc.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe *.pdb |
||||
|
||||
echo "Generating VC2008 project" |
||||
rm -rf vc2008/ |
||||
mkdir vc2008/ |
||||
./waf.bat msdev |
||||
cp *.sln vc2008/ |
||||
find . -name "*.vcproj" -exec cp --parents \{\} vc2008/ \; |
||||
rm -rf vc2008/vc2008 # HACKHACK |
||||
|
||||
7z a -t7z $TRAVIS_BUILD_DIR/xash3d-vc2008-sln.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r vc2008 |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash |
||||
|
||||
export ANDROID_SDK_HOME=$GITHUB_WORKSPACE/sdk |
||||
export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk-bundle |
||||
|
||||
pushd android |
||||
if [[ "$GH_CPU_ARCH" == "32" ]]; then |
||||
export ARCHS="armeabi armeabi-v7a x86" |
||||
elif [[ "$GH_CPU_ARCH" == "64" ]]; then |
||||
export ARCHS="aarch64 x86_64" |
||||
elif [[ "$GH_CPU_ARCH" == "32&64" ]]; then |
||||
export ARCHS="armeabi armeabi-v7a x86 aarch64 x86_64" |
||||
fi |
||||
|
||||
export API=21 |
||||
export TOOLCHAIN=host |
||||
export CC=clang-12 |
||||
export CXX=clang++-12 |
||||
export STRIP=llvm-strip-12 |
||||
sh compile.sh release |
||||
|
||||
if [[ "$GH_CPU_ARCH" == "64" ]]; then |
||||
mv xashdroid.apk ../xashdroid-64.apk |
||||
else |
||||
mv xashdroid.apk ../xashdroid-32.apk |
||||
fi |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash |
||||
|
||||
. scripts/lib.sh |
||||
|
||||
# Build engine |
||||
cd $BUILDDIR |
||||
|
||||
if [ "$ARCH" = "amd64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs |
||||
AMD64="-8" |
||||
fi |
||||
|
||||
# NOTE: to build with other version use --msvc_version during configuration |
||||
# NOTE: sometimes you may need to add WinSDK to %PATH% |
||||
./waf.bat configure -s "SDL2_VC" -T "debug" --prefix=`pwd` --enable-utils $AMD64 || die |
||||
./waf.bat build -v || die |
||||
./waf.bat install || die |
||||
|
||||
if [ "$ARCH" = "i386" ]; then |
||||
cp SDL2_VC/lib/x86/SDL2.dll . # Install SDL2 |
||||
cp vgui-dev/lib/win32_vc6/vgui.dll . |
||||
elif [ "$ARCH" = "amd64" ]; then |
||||
cp SDL2_VC/lib/x64/SDL2.dll . |
||||
else |
||||
die |
||||
fi |
||||
|
||||
7z a -t7z $BUILDDIR/xash3d-fwgs-win32-$ARCH.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on *.dll *.exe *.pdb |
||||
|
||||
echo "Generating VC2008 project" |
||||
rm -rf vc2008/ |
||||
mkdir vc2008/ |
||||
./waf.bat msdev |
||||
cp *.sln vc2008/ |
||||
find . -name "*.vcproj" -exec cp --parents \{\} vc2008/ \; |
||||
rm -rf vc2008/vc2008 # HACKHACK |
||||
|
||||
7z a -t7z $BUILDDIR/xash3d-fwgs-vc2008-sln-$ARCH.7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -r vc2008 |
@ -1,41 +1,53 @@
@@ -1,41 +1,53 @@
|
||||
#!/bin/bash |
||||
|
||||
echo "Install packages" |
||||
echo "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main" | sudo tee -a /etc/apt/sources.list |
||||
wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - |
||||
sudo apt update |
||||
sudo apt install clang-12 lld-12 llvm-12 llvm-12-tools p7zip-full |
||||
sudo rm /usr/bin/lld /usr/bin/ld.lld |
||||
sudo ln -s /usr/bin/lld-12 /usr/bin/lld |
||||
sudo ln -s /usr/bin/ld.lld-12 /usr/bin/ld.lld |
||||
|
||||
echo "Download HLSDK" |
||||
|
||||
cd $TRAVIS_BUILD_DIR |
||||
cd $GITHUB_WORKSPACE |
||||
git clone --depth 1 --recursive https://github.com/FWGS/hlsdk-xash3d -b mobile_hacks hlsdk || exit 1 |
||||
|
||||
echo "Download and unpack Android SDK" |
||||
mkdir -p sdk && cd sdk |
||||
mkdir -p sdk || exit 1 |
||||
pushd sdk |
||||
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -qO sdk.zip > /dev/null || exit 1 |
||||
unzip -q sdk.zip || exit 1 |
||||
cd $TRAVIS_BUILD_DIR |
||||
popd |
||||
|
||||
echo "Download all needed tools and NDK" |
||||
yes | sdk/tools/bin/sdkmanager --licenses > /dev/null 2>/dev/null # who even reads licenses? :) |
||||
NDK_BUNDLE="ndk-bundle" |
||||
if [ "$1" = "r10e" ]; then |
||||
if [ "$ANDROID_NDK_VER" = "r10e" ]; then |
||||
NDK_BUNDLE="" |
||||
fi |
||||
sdk/tools/bin/sdkmanager --install build-tools\;29.0.1 platform-tools platforms\;android-29 $NDK_BUNDLE > /dev/null 2>/dev/null |
||||
if [ "$1" = "r10e" ]; then |
||||
if [ "$ANDROID_NDK_VER" = "r10e" ]; then |
||||
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -qO ndk.zip > /dev/null || exit 1 |
||||
unzip -q ndk.zip || exit 1 |
||||
mv android-ndk-r10e sdk/ndk-bundle |
||||
fi |
||||
|
||||
echo "Download Xash3D FWGS Android source" |
||||
git clone --depth 1 https://github.com/FWGS/xash3d-android-project -b waf android || exit 1 |
||||
cd android |
||||
|
||||
echo "Fetching submodules" |
||||
git submodule update --init xash-extras || exit 1 |
||||
pushd android |
||||
|
||||
mv xash3d-fwgs xash3d-fwgs-sub |
||||
ln -s $TRAVIS_BUILD_DIR xash3d-fwgs |
||||
ln -s $GITHUB_WORKSPACE xash3d-fwgs |
||||
echo "Installed Xash3D FWGS source symlink" |
||||
|
||||
mv hlsdk-xash3d hlsdk-xash3d-sub |
||||
ln -s $TRAVIS_BUILD_DIR/hlsdk hlsdk-xash3d |
||||
echo "Install HLSDK source symlink" |
||||
ln -s $GITHUB_WORKSPACE/hlsdk hlsdk-xash3d |
||||
echo "Installed HLSDK source symlink" |
||||
|
||||
mv xash-extras xash-extras-sub |
||||
ln -s $GITHUB_WORKSPACE/xash-extras xash-extras |
||||
echo "Installed xash-extras symlink" |
||||
|
||||
cd $TRAVIS_BUILD_DIR |
||||
popd |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
|
||||
cd $GITHUB_WORKSPACE |
||||
|
||||
if [ "$GH_CPU_ARCH" == "i386" ]; then |
||||
sudo dpkg --add-architecture i386 |
||||
sudo apt update |
||||
sudo apt install gcc-multilib g++-multilib libx11-dev:i386 libxext-dev:i386 x11-utils libgl1-mesa-dev libasound-dev libstdc++6:i386 libfuse2:i386 zlib1g:i386 |
||||
|
||||
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage" -O appimagetool.AppImage |
||||
elif [ "$GH_CPU_ARCH" == "amd64" ]; then |
||||
sudo apt update |
||||
sudo apt install gcc-multilib g++-multilib libx11-dev libxext-dev x11-utils libgl1-mesa-dev libasound-dev libstdc++6 libfuse2 zlib1g |
||||
|
||||
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool.AppImage |
||||
else |
||||
exit 1 |
||||
fi |
||||
|
||||
chmod +x appimagetool.AppImage |
||||
|
||||
wget http://libsdl.org/release/SDL2-$SDL_VERSION.zip -O SDL2.zip |
||||
unzip -q SDL2.zip |
||||
mv SDL2-$SDL_VERSION SDL2_src |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash |
||||
|
||||
cd $GITHUB_WORKSPACE |
||||
|
||||
sudo dpkg --add-architecture i386 |
||||
sudo apt update |
||||
sudo apt install libc6:i386 libstdc++6:i386 gcc-multilib g++-multilib p7zip-full |
||||
|
||||
sudo mkdir -p /opt/toolchains |
||||
|
||||
pushd /opt/toolchains/ |
||||
sudo git clone https://github.com/a1batross/motomagx_toolchain motomagx --depth=1 |
||||
popd |
||||
|
||||
git clone https://github.com/FWGS/hlsdk-xash3d hlsdk -b mobile_hacks --depth=1 |
@ -1,4 +1,5 @@
@@ -1,4 +1,5 @@
|
||||
# SDL2 for VC prebuilt |
||||
#!/bin/bash |
||||
|
||||
curl http://libsdl.org/release/SDL2-devel-$SDL_VERSION-VC.zip -o SDL2.zip |
||||
unzip -q SDL2.zip |
||||
mv SDL2-$SDL_VERSION SDL2_VC |
@ -1,89 +0,0 @@
@@ -1,89 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
die() |
||||
{ |
||||
echo $1 |
||||
exit 1 |
||||
} |
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then |
||||
echo "Travis should not deploy from pull requests" |
||||
exit 0 |
||||
fi |
||||
|
||||
append_readme() |
||||
{ |
||||
for arg in $FILES; do |
||||
echo \* [$arg]\(https://github.com/FWGS/xash3d-deploy/blob/$DEPLOY_BRANCH-$TRAVIS_BRANCH/$arg\?raw\=true\) >> README.md |
||||
echo >> README.md |
||||
done |
||||
} |
||||
|
||||
generate_continious_tag() |
||||
{ |
||||
if [ $TRAVIS_BRANCH == "master" ]; then |
||||
echo "continuous" |
||||
else |
||||
echo "continuous-$TRAVIS_BRANCH" |
||||
fi |
||||
} |
||||
|
||||
generate_readme() |
||||
{ |
||||
TAG=$(generate_continuous_tag) |
||||
# echo \# Moved to GitHub Releases at [here]\(https://github.com/FWGS/xash3d-fwgs/releases/tag/$TAG\) >> README.md |
||||
# echo >> README.md |
||||
# echo >> README.md |
||||
# echo >> README.md |
||||
# echo >> README.md |
||||
echo \# $TRAVIS_BRANCH branch autobuilds from $DEPLOY_BRANCH >> README.md |
||||
echo >> README.md |
||||
echo Short changelog: >> README.md |
||||
echo \`\`\` >> README.md |
||||
(cd $TRAVIS_BUILD_DIR; TZ=UTC git log --pretty=format:'%h %ad %s' --date iso-local -n 10 $REV_RANGE)| cut -d ' ' -f 1-3,5-100 >> README.md |
||||
echo \`\`\` >> README.md |
||||
echo >> README.md |
||||
echo [Code on GitHub]\(https://github.com/FWGS/xash3d-fwgs/tree/$TRAVIS_COMMIT\) >> README.md |
||||
echo >> README.md |
||||
echo [Full changelog for this build]\(https://github.com/FWGS/xash3d-fwgs/commits/$TRAVIS_COMMIT\) >> README.md |
||||
echo >> README.md |
||||
append_readme |
||||
echo $TRAVIS_COMMIT > commit.txt |
||||
} |
||||
|
||||
yadisk_download() |
||||
{ |
||||
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH |
||||
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru |
||||
|
||||
for file in $*; do |
||||
curl -L $WEBDAV_SRV/$FOLDER_NAME/$file -o $file |
||||
done |
||||
} |
||||
|
||||
PUSHED_COMMIT=$(curl --fail https://raw.githubusercontent.com/FWGS/xash3d-deploy/$DEPLOY_BRANCH-$TRAVIS_BRANCH/commit.txt) |
||||
echo "Pushed commit: $PUSHED_COMMIT" |
||||
if [ ! -z "$PUSHED_COMMIT" ]; then |
||||
REV_RANGE="HEAD...$PUSHED_COMMIT" |
||||
else |
||||
REV_RANGE="HEAD" |
||||
fi |
||||
|
||||
git config --global user.name FWGS-deployer |
||||
git config --global user.email FWGS-deployer@users.noreply.github.com |
||||
|
||||
FILES=$* |
||||
|
||||
# Create new repo with new files |
||||
mkdir xash3d-deploy |
||||
cd xash3d-deploy |
||||
git init |
||||
git remote add travis-deploy-public https://FWGS-deployer:${GH_TOKEN}@github.com/FWGS/xash3d-deploy.git |
||||
git checkout -b $DEPLOY_BRANCH-$TRAVIS_BRANCH |
||||
yadisk_download $FILES |
||||
generate_readme |
||||
git add . |
||||
git commit -m "Latest travis deploy $TRAVIS_COMMIT" |
||||
git push -q --force travis-deploy-public $DEPLOY_BRANCH-$TRAVIS_BRANCH >/dev/null 2>/dev/null |
||||
|
||||
exit 0 |
@ -0,0 +1,103 @@
@@ -0,0 +1,103 @@
|
||||
#!/bin/bash |
||||
|
||||
. scripts/lib.sh |
||||
|
||||
APP=xash3d-fwgs |
||||
APPDIR=$APP |
||||
APPIMAGE=$APP-$ARCH.tar.xz |
||||
|
||||
build_sdl2() |
||||
{ |
||||
cd "$BUILDDIR"/SDL2_src || die |
||||
if [ "$ARCH" = "i386" ]; then |
||||
export CFLAGS="-msse2 -march=i686 -m32 -ggdb -O2" |
||||
export LDFLAGS="-m32" |
||||
fi |
||||
./configure \ |
||||
--disable-render \ |
||||
--disable-haptic \ |
||||
--disable-power \ |
||||
--disable-filesystem \ |
||||
--disable-file \ |
||||
--disable-libudev \ |
||||
--disable-dbus \ |
||||
--disable-ibus \ |
||||
--disable-ime \ |
||||
--disable-fcitx \ |
||||
--enable-alsa-shared \ |
||||
--enable-pulseaudio-shared \ |
||||
--enable-wayland-shared \ |
||||
--enable-x11-shared \ |
||||
--prefix / || die # get rid of /usr/local stuff |
||||
make -j2 || die |
||||
mkdir -p "$BUILDDIR"/SDL2_linux |
||||
make install DESTDIR="$BUILDDIR"/SDL2_linux || die |
||||
export CFLAGS="" |
||||
export LDFLAGS="" |
||||
} |
||||
|
||||
build_engine() |
||||
{ |
||||
# Build engine |
||||
cd "$BUILDDIR" || die |
||||
|
||||
if [ "$ARCH" = "amd64" ]; then # we need enabling 64-bit target only on Intel-compatible CPUs |
||||
AMD64="-8" |
||||
fi |
||||
|
||||
if [ "$1" = "dedicated" ]; then |
||||
./waf configure -T release -d -W $AMD64 || die |
||||
elif [ "$1" = "full" ]; then |
||||
./waf configure --sdl2=SDL2_linux -T release --enable-stb --prefix="$APPDIR" -W $AMD64 --enable-utils || die |
||||
else |
||||
die |
||||
fi |
||||
|
||||
./waf build || die |
||||
} |
||||
|
||||
build_archive() |
||||
{ |
||||
cd "$BUILDDIR" || die |
||||
|
||||
./waf install || die |
||||
|
||||
# Generate extras.pak |
||||
python3 scripts/makepak.py xash-extras/ "$APPDIR/extras.pak" |
||||
|
||||
cp SDL2_linux/lib/libSDL2-2.0.so.0 "$APPDIR/" |
||||
if [ "$ARCH" = "i386" ]; then |
||||
cp vgui-dev/lib/vgui.so "$APPDIR/" |
||||
fi |
||||
|
||||
cat > "$APPDIR"/run.sh << 'EOF' |
||||
#!/bin/sh |
||||
|
||||
if [ "$XASH3D_BASEDIR" = "" ]; then |
||||
export XASH3D_BASEDIR=$PWD |
||||
fi |
||||
echo "Xash3D FWGS installed as tarball." |
||||
echo "Base directory is $XASH3D_BASEDIR. Set XASH3D_BASEDIR environment variable to override this" |
||||
|
||||
export XASH3D_EXTRAS_PAK1="${XASH3D_BASEDIR}"/extras.pak |
||||
export LD_LIBRARY_PATH="${XASH3D_BASEDIR}":$LD_LIBRARY_PATH |
||||
${DEBUGGER} "${XASH3D_BASEDIR}"/xash3d "$@" |
||||
exit $? |
||||
EOF |
||||
|
||||
chmod +x "$APPDIR"/xash3d "$APPDIR"/run.sh # Engine launcher & engine launcher script |
||||
|
||||
echo "Contents of tarball: " |
||||
ls -R "$APPDIR" |
||||
|
||||
tar -cJvf $APPIMAGE $APPDIR/* |
||||
} |
||||
|
||||
rm -rf build # clean-up build directory |
||||
build_engine dedicated |
||||
mv build/engine/xash xashds-linux-$ARCH |
||||
|
||||
rm -rf build |
||||
build_sdl2 |
||||
build_engine full |
||||
build_archive |
@ -1,3 +0,0 @@
@@ -1,3 +0,0 @@
|
||||
# SDL2 for MinGW prebuilt |
||||
curl -s http://libsdl.org/release/SDL2-devel-$SDL_VERSION-mingw.tar.gz | tar xzf - |
||||
mv SDL2-$SDL_VERSION SDL2_mingw |
@ -1,9 +0,0 @@
@@ -1,9 +0,0 @@
|
||||
sudo mkdir -p /opt/toolchains |
||||
cd /opt/toolchains/ |
||||
sudo git clone https://github.com/a1batross/motomagx_toolchain motomagx |
||||
cd $TRAVIS_BUILD_DIR |
||||
|
||||
git clone https://github.com/FWGS/hlsdk-xash3d hlsdk -b mobile_hacks --depth=1 |
||||
git clone https://github.com/mittorn/ref_soft ref_soft --depth=1 |
||||
|
||||
sed -i "s|#rsw||" wscript |
@ -1,6 +0,0 @@
@@ -1,6 +0,0 @@
|
||||
# brew install python |
||||
curl -s https://www.libsdl.org/release/SDL2-$SDL_VERSION.dmg > SDL2.dmg |
||||
hdiutil attach SDL2.dmg |
||||
cd /Volumes/SDL2 |
||||
mkdir -p ~/Library/Frameworks |
||||
cp -r SDL2.framework ~/Library/Frameworks/ |
Loading…
Reference in new issue