From 827105405f2f208cba7cd8775ffe676865b10599 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 20 Jul 2019 05:07:22 +0300 Subject: [PATCH] travis: enable building and publishing for AMD64. Use at your own risk! --- .travis.yml | 50 ++++++++++++-- scripts/build_appimage.sh | 50 -------------- scripts/build_linux_engine.sh | 122 +++++++++++++++++++++++++--------- scripts/travis_common_deps.sh | 2 - 4 files changed, 136 insertions(+), 88 deletions(-) delete mode 100755 scripts/build_appimage.sh diff --git a/.travis.yml b/.travis.yml index 6f134c07..affb570a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,14 +14,15 @@ jdk: jobs: include: - stage: build - name: "Build for Linux & Android" + name: "Build for Linux i686" cache: ccache os: linux dist: xenial + env: + - ARCH=i686 addons: apt: packages: - - p7zip-full - gcc-multilib - g++-multilib - libx11-dev:i386 @@ -29,19 +30,56 @@ jobs: - x11-utils - libgl1-mesa-dev - libasound-dev - - zlib1g:i386 - libstdc++6:i386 - libfuse2:i386 before_script: - sh scripts/travis_common_deps.sh - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh - - export ANDROID_HOME=$PWD/android-sdk-linux - - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:$PWD/android-ndk script: - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh after_script: - ccache --show-stats - - sh scripts/continious_upload.sh Xash3DFWGS-i386.AppImage + - sh scripts/continious_upload.sh Xash3DFWGS-${ARCH}.AppImage + - # ... + name: "Build for Linux amd64" + cache: ccache + os: linux + dist: xenial + env: + - ARCH=amd64 + addons: + apt: + packages: + - libx11-dev + - libxext-dev + - x11-utils + - libgl1-mesa-dev + - libasound-dev + - libstdc++6 + - libfuse2 + before_script: + - sh scripts/travis_common_deps.sh + - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh + script: + - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh + after_script: + - ccache --show-stats + - sh scripts/continious_upload.sh Xash3DFWGS-${ARCH}.AppImage +# - # ... +# name: "Build for Android" +# cache: ccache +# os: linux +# dist: xenial +# before_script: +# - sh scripts/travis_common_deps.sh +# - sh scripts/travis_${TRAVIS_OS_NAME}_deps.sh +# - export ANDROID_HOME=$PWD/android-sdk-linux +# - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:$PWD/android-ndk +# script: +# - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh +# after_script: +# - ccache --show-stats +# - sh scripts/continious_upload.sh xash3d-fwgs.apk # - # ... # name: "Build for Windows MinGW" # cache: ccache diff --git a/scripts/build_appimage.sh b/scripts/build_appimage.sh deleted file mode 100755 index c70fd80c..00000000 --- a/scripts/build_appimage.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -APP=Xash3DFWGS -ARCH=i686 -APPDIR=$APP-i386.AppDir - -# Copy all needed files -./waf install -mv appimage $APPDIR - -# Generate extras.pak -python3 scripts/makepak.py xash-extras/ $APPDIR/extras.pak - -cp SDL2_linux/lib/libSDL2-2.0.so.0 $APPDIR/ -cp vgui-dev/lib/vgui.so $APPDIR/ - -cat > $APPDIR/AppRun << 'EOF' -#!/bin/sh - -echo "Xash3D FWGS installed as AppImage." - -if [ "$XASH3D_BASEDIR" = "" ]; then - export XASH3D_BASEDIR=$PWD -fi -export XASH3D_EXTRAS_PAK1="${APPDIR}"/extras.pak -export LD_LIBRARY_PATH="${APPDIR}":$LD_LIBRARY_PATH -${DEBUGGER} "${APPDIR}"/xash3d "$@" -exit $? -EOF - -chmod +x $APPDIR/xash3d # Engine launcher -chmod +x $APPDIR/AppRun # Engine launcher script - -echo "Contents of AppImage: " -ls $APPDIR - -wget "https://raw.githubusercontent.com/FWGS/fwgs-artwork/master/xash3d/icon_512.png" -O $APPDIR/$APP.png - -cat > $APPDIR/$APP.desktop < $APPDIR/AppRun << 'EOF' +#!/bin/sh + +if [ "$XASH3D_BASEDIR" = "" ]; then + export XASH3D_BASEDIR=$PWD +fi +echo "Xash3D FWGS installed as AppImage." +echo "Base directory is $XASH3D_BASEDIR. Set XASH3D_BASEDIR environment variable to override this" + +export XASH3D_EXTRAS_PAK1="${APPDIR}"/extras.pak +export LD_LIBRARY_PATH="${APPDIR}":$LD_LIBRARY_PATH +${DEBUGGER} "${APPDIR}"/xash3d "$@" +exit $? +EOF + + chmod +x $APPDIR/xash3d $APPDIR/AppRun # Engine launcher & engine launcher script + + echo "Contents of AppImage: " + ls -R $APPDIR + + wget "https://raw.githubusercontent.com/FWGS/fwgs-artwork/master/xash3d/icon_512.png" -O $APPDIR/$APP.png + + cat > $APPDIR/$APP.desktop <