travis' configuration test; fixed #123

This commit is contained in:
filux
2016-07-17 17:06:01 +02:00
parent 8b11e875c6
commit 9f301daa1c
8 changed files with 149 additions and 124 deletions

View File

@@ -1,12 +1,64 @@
#!/bin/sh #!/bin/bash
# script for use with travis and on linux only
#
# Copyright (c) 2015-2016 MegaGlest Team under GNU GPL v3.0+
set -ex export LANG=C
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
# ----------------------------------------------------------------------------
# Load shared functions
. $SCRIPTDIR/mk/linux/mg_shared.sh
detect_system
# ----------------------------------------------------------------------------
Compiler_name="$1"; Compiler_version="$2"
set -x
wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
tar xf SDL2-2.0.3.tar.gz if [ "$Compiler_name" = "gcc" ] || ( [ "$Compiler_name" = "clang" ] && [ "$codename" = "precise" ] ); then
( # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
cd SDL2-2.0.3 sudo add-apt-repository --yes "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
./configure --enable-static --disable-shared #sudo add-apt-repository --yes "deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
make fi
sudo make install if [ "$Compiler_name" = "clang" ]; then
) # http://apt.llvm.org/
sudo add-apt-repository --yes "deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename} main"
#sudo add-apt-repository --yes "deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename} main"
sudo add-apt-repository --yes "deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${Compiler_version} main"
#sudo add-apt-repository --yes "deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${Compiler_version} main"
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
fi
fi
set -e
# UPDATE REPOS
sudo apt-get update -qq
#sudo apt-get upgrade -qq # UPGRADE SYSTEM TO LATEST PATCH LEVEL
sudo apt-get install -y -qq
if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
if [ "$Compiler_name" = "gcc" ]; then
sudo apt-get install -qq gcc-${Compiler_version} g++-${Compiler_version}
elif [ "$Compiler_name" = "clang" ]; then
sudo apt-get install -qq clang-${Compiler_version}
fi
fi
# INSTALL OUR DEPENDENCIES
sudo $SCRIPTDIR/mk/linux/setupBuildDeps.sh --quiet
if [ "$distribution" = "Ubuntu" ]; then
case $release in
12.04*)
SDL2_version="2.0.4"
wget https://www.libsdl.org/release/SDL2-${SDL2_version}.tar.gz
tar xf SDL2-${SDL2_version}.tar.gz
( cd SDL2-${SDL2_version}
./configure --enable-static --disable-shared
make
sudo make install )
;;
*)
;;
esac
fi

View File

@@ -3,47 +3,45 @@ language: cpp
sudo: required sudo: required
os:
- linux
- osx
compiler:
- gcc
- clang
env:
- GCC_VERSION="6"
- GCC_VERSION="5"
- GCC_VERSION="native"
- LLVM_VERSION="3.7"
- LLVM_VERSION="native"
matrix: matrix:
exclude: include:
- compiler: gcc - os: linux
env: LLVM_VERSION="3.7" compiler: gcc
- compiler: gcc env: Tr_Compiler_Version="6"
env: LLVM_VERSION="native" # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
- compiler: clang - os: linux
env: GCC_VERSION="6" compiler: gcc
- compiler: clang env: Tr_Compiler_Version="5"
env: GCC_VERSION="5" - os: linux
- compiler: clang compiler: gcc
env: GCC_VERSION="native" env: Tr_Compiler_Version="default"
- os: linux - os: linux
compiler: clang compiler: clang
env: LLVM_VERSION="native" # broken compiler env: Tr_Compiler_Version="3.8"
- os: osx # http://apt.llvm.org/
compiler: gcc # unsupported compiler - os: linux
- os: osx
compiler: clang compiler: clang
env: LLVM_VERSION="3.7" # missing compiler by brew env: Tr_Compiler_Version="3.7"
#- os: linux
#compiler: clang
#env: Tr_Compiler_Version="default" # broken compiler
- os: osx
osx_image: xcode8
env: Tr_Xcode_Version="8"
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
- os: osx
env: Tr_Xcode_Version="default"
fast_finish: true
allow_failures: allow_failures:
- os: linux - os: linux
env: LLVM_VERSION="3.7" # "APT mirror was temporary switched off ..." compiler: gcc
env: Tr_Compiler_Version="6"
- os: linux - os: linux
env: GCC_VERSION="6" compiler: clang
# - os: osx env: Tr_Compiler_Version="3.8"
- os: osx
osx_image: xcode8
env: Tr_Xcode_Version="8"
git: git:
submodules: false submodules: false
@@ -53,25 +51,14 @@ git:
# - master # - master
before_install: before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GCC_VERSION" != "native" ]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./.travis-before_install.sh "$CC" "$Tr_Compiler_Version"; fi
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then sudo add-apt-repository --yes 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then sudo add-apt-repository --yes "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-${LLVM_VERSION} main"; fi
# http://llvm.org/apt/
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi # UPDATE REPOS
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
#- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get upgrade -qq; fi # UPGRADE SYSTEM TO LATEST PATCH LEVEL
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y -qq; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ] && [ "$GCC_VERSION" != "native" ]; then sudo apt-get install -qq gcc-${GCC_VERSION} g++-${GCC_VERSION}; fi
- if [ "$CXX" = "g++" ] && [ "$GCC_VERSION" != "native" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then sudo apt-get --allow-unauthenticated -qq install clang-${LLVM_VERSION}; fi
- if [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then export CXX="clang++-${LLVM_VERSION}" CC="clang-${LLVM_VERSION}"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo mk/linux/setupBuildDeps.sh --quiet; fi # INSTALL OUR DEPENDENCIES
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sdl2 lua freetype ftgl libogg glew libvorbis cppunit glib fribidi miniupnpc wxmac; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sdl2 lua freetype ftgl libogg glew libvorbis cppunit glib fribidi miniupnpc wxmac; fi
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" = "gcc" ]; then export CXX="g++-${Tr_Compiler_Version}" CC="gcc-${Tr_Compiler_Version}"; fi
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" == "clang" ]; then export CXX="clang++-${Tr_Compiler_Version}" CC="clang-${Tr_Compiler_Version}"; fi
- $CC --version
- $CXX --version - $CXX --version
- cmake --version - cmake --version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo ./.travis-before_install.sh; fi
script: script:
# ALL THE BUILD COMMANDS HERE # ALL THE BUILD COMMANDS HERE
@@ -87,7 +74,4 @@ notifications:
use_notice: true use_notice: true
on_success: change on_success: change
template: template:
#- "[%{repository_slug}#%{branch} @%{commit}] %{author}): %{message}"
#- "Diff: %{compare_url}"
#- "Build: %{build_url}"
- "[%{repository_name}#%{branch}@%{commit}] %{author}: %{message} %{build_url}" - "[%{repository_name}#%{branch}@%{commit}] %{author}: %{message} %{build_url}"

49
mk/linux/mg_shared.sh Normal file → Executable file
View File

@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/sh
# #
# Functions shared by several scripts # Functions shared by several scripts
# #
# Copyright (c) 2013-2016 MegaGlest Team under GNU GPL v3.0+
function detect_system { function detect_system {
# Determine distro title, release, codename # Determine distro title, release, codename
@@ -18,48 +18,40 @@ function detect_system {
# codename: codename of the detected Linux distribution (string) # codename: codename of the detected Linux distribution (string)
# architecture: detected machine architecture (string) # architecture: detected machine architecture (string)
if [[ `which lsb_release` = '' ]] if [ "$(which lsb_release)" = "" ]; then
then
lsb=0 lsb=0
if [ -e /etc/debian_version ] if [ -e /etc/debian_version ]; then
then
distribution='Debian' distribution='Debian'
release='unknown release version' release='unknown release version'
codename=`cat /etc/debian_version` codename="$(cat /etc/debian_version)"
elif [ -e /etc/SuSE-release ] elif [ -e /etc/SuSE-release ]; then
then
distribution='SuSE' distribution='SuSE'
release='unknown release version' release='unknown release version'
codename=`cat /etc/SuSE-release` codename="$(cat /etc/SuSE-release)"
elif [ -e /etc/redhat-release ] elif [ -e /etc/redhat-release ]; then
then if [ -e /etc/fedora-release ]; then
if [ -e /etc/fedora-release ]
then
distribution='Fedora' distribution='Fedora'
release='unknown release version' release='unknown release version'
codename=`cat /etc/fedora-release` codename="$(cat /etc/fedora-release)"
else else
distribution='Redhat' distribution='Redhat'
release='unknown release version' release='unknown release version'
codename=`cat /etc/redhat-release` codename="$(cat /etc/redhat-release)"
fi fi
elif [ -e /etc/fedora-release ] elif [ -e /etc/fedora-release ]; then
then
distribution='Fedora' distribution='Fedora'
release='unknown release version' release='unknown release version'
codename=`cat /etc/fedora-release` codename="$(cat /etc/fedora-release)"
elif [ -e /etc/mandrake-release ] elif [ -e /etc/mandrake-release ]; then
then
distribution='Mandrake' distribution='Mandrake'
release='unknown release version' release='unknown release version'
codename=`cat /etc/mandrake-release` codename="$(cat /etc/mandrake-release)"
fi fi
else else
lsb=1 lsb=1
distribution="$(lsb_release -i | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }')"
distribution=`lsb_release -i | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'` release="$(lsb_release -r | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }')"
release=`lsb_release -r | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'` codename="$(lsb_release -c | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }')"
codename=`lsb_release -c | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'`
# Some distribution examples: # Some distribution examples:
# #
@@ -89,6 +81,5 @@ function detect_system {
# Release: 12.04 # Release: 12.04
# Codename: precise # Codename: precise
fi fi
architecture=`uname -m` architecture="$(uname -m)"
} }

View File

@@ -88,8 +88,7 @@ if [ "$quiet" -eq "1" ]; then
URPMI_OPTIONS="$URPMI_OPTIONS -q --auto" URPMI_OPTIONS="$URPMI_OPTIONS -q --auto"
fi fi
packages_for_next_debian_ubuntu_mint="build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev" packages_for_next_debian_ubuntu_mint="build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
packages_for_debian_sid="build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
case $distribution in case $distribution in
Debian) Debian)
@@ -104,12 +103,7 @@ case $distribution in
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
unstable) testing|unstable|9|9.0)
installcommand="apt-get install $APT_OPTIONS $packages_for_debian_sid"
$installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;;
testing|9|9.0)
installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint" installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
@@ -130,24 +124,19 @@ case $distribution in
exit 1 exit 1
;; ;;
12.04*) 12.04*)
#LTS #LTS, name > precise
installcommand="apt-get install $APT_OPTIONS build-essential cmake libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
14.04*) 14.04*)
#LTS #LTS, name > trusty
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
15.10)
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.2-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev"
$installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;;
16.04*) 16.04*)
#LTS #LTS, name > xenial
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
@@ -163,17 +152,23 @@ case $distribution in
LinuxMint) LinuxMint)
case $release in case $release in
13|13.*) 13|13.*)
#LTS #LTS, based on Ubuntu 12.04
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libcppunit-dev"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
17|17.*) 17|17.*)
#LTS #LTS, based on Ubuntu 14.04
installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev" installcommand="apt-get install $APT_OPTIONS build-essential cmake libsdl2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libxml2-dev libircclient-dev libglew-dev libftgl-dev libfribidi-dev libvlc-dev libvlccore-dev libcppunit-dev"
$installcommand $installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;; ;;
18|18.*)
#LTS, based on Ubuntu 16.04
installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng12-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev"
$installcommand
if [ "$?" -ne "0" ]; then error_during_installation; exit 1; fi
;;
*) *)
installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint" installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint"
unsupported_release unsupported_release

View File

@@ -18,6 +18,9 @@ BugReportBoth2="$BugReportBoth"
BugReportData="https://github.com/MegaGlest/megaglest-data/issues" BugReportData="https://github.com/MegaGlest/megaglest-data/issues"
EXC_BINARY="megaglest" EXC_BINARY="megaglest"
SHORT_GAME_NAME="megaglest" SHORT_GAME_NAME="megaglest"
# if long game name contain spaces then write it inside quotes
# e.g. "\"long name with spaces\""
LONG_GAME_NAME="MegaGlest"
# ------- # -------
LIBDIR="lib"; ExitStatus=0; LibsWarnings=""; IgnoredLibs="" LIBDIR="lib"; ExitStatus=0; LibsWarnings=""; IgnoredLibs=""
if [ ! -d "$GAMEDIR/$LIBDIR" ]; then mkdir "$GAMEDIR/$LIBDIR"; fi if [ ! -d "$GAMEDIR/$LIBDIR" ]; then mkdir "$GAMEDIR/$LIBDIR"; fi
@@ -44,20 +47,20 @@ if [ "$OperatingMode" != "--tool-buginfo" ]; then
LDconfigType=9 LDconfigType=9
fi fi
LibsWarnings="$LibsWarnings LibsWarnings="$LibsWarnings
|| MegaGlest requires some libraries to be present on this system. || $LONG_GAME_NAME requires some libraries to be present on this system.
|| Missing libraries (if any) will be listed next, along with full names || Missing libraries (if any) will be listed next, along with full names
|| and default versions. Use the package manager your Linux distribution || and default versions. Use the package manager provided by your Linux
|| provides to install them. Most Linux distributions provide a web search || distribution to install them. Most Linux distributions provide a web search
|| allowing you to identify the packages containing these libraries. || allowing you to identify the packages containing these libraries.
|| Once you installed additional libraries, just run this script again. || Once you installed additional libraries, just run this script again.
|| ||
|| Other issues preventing MegaGlest from starting can occur if this || Other issues preventing $LONG_GAME_NAME from starting can occur if
|| version of MegaGlest has not been tested with this version of your Linux || this version of game has not been tested with this version of your Linux
|| distribution. If so, we may provide compatibility updates which can be || distribution. If so, we may provide compatibility updates which can be
|| downloaded and installed by running this script: || downloaded and installed by running this script:
|| '${SHORT_GAME_NAME}-mini-update.sh' || '${SHORT_GAME_NAME}-mini-update.sh'
|| ||
|| If, after this, MegaGlest still fails to start, please report a bug at || If, after this, $LONG_GAME_NAME still fails to start, please report a bug at
|| '$BugReportEngine' || '$BugReportEngine'
|| or '$BugReportBoth'" || or '$BugReportBoth'"
LibsWarnings="$LibsWarnings LibsWarnings="$LibsWarnings

View File

@@ -4717,27 +4717,27 @@ void Game::keyDown(SDL_KeyboardEvent key) {
switch (healthbarMode) { switch (healthbarMode) {
case hbvUndefined: case hbvUndefined:
healthbarMode=hbvOff; healthbarMode=hbvOff;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsOff")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsOff"));
break; break;
case hbvOff: case hbvOff:
healthbarMode=hbvAlways; healthbarMode=hbvAlways;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsAlways")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsAlways"));
break; break;
case hbvAlways: case hbvAlways:
healthbarMode=hbvIfNeeded; healthbarMode=hbvIfNeeded;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsIfNeeded")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsIfNeeded"));
break; break;
case hbvIfNeeded: case hbvIfNeeded:
healthbarMode=hbvSelected; healthbarMode=hbvSelected;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsSelected")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsSelected"));
break; break;
case hbvSelected: case hbvSelected:
healthbarMode=hbvSelected | hbvIfNeeded; healthbarMode=hbvSelected | hbvIfNeeded;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsSelectedOrNeeded")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsSelectedOrNeeded"));
break; break;
case (hbvSelected | hbvIfNeeded): case (hbvSelected | hbvIfNeeded):
healthbarMode=hbvUndefined; healthbarMode=hbvUndefined;
console.addLine(lang.getString("Healthbar")+": "+lang.getString("HealthbarsFactionDefault")); console.addLine(lang.getString("Healthbar2")+": "+lang.getString("HealthbarsFactionDefault"));
break; break;
default: default:
printf("In [%s::%s Line: %d] Toggle Healthbars Hotkey - Invalid Value. Setting to default.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); printf("In [%s::%s Line: %d] Toggle Healthbars Hotkey - Invalid Value. Setting to default.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);

View File

@@ -724,7 +724,7 @@ void BattleEnd::render() {
renderer.renderButton(&buttonExit); renderer.renderButton(&buttonExit);
//exit message box //exit message box
if(mainMessageBox.getEnabled()){ if(mainMessageBox.getEnabled() && renderToTextureCount < 300){
renderer.renderMessageBox(&mainMessageBox); renderer.renderMessageBox(&mainMessageBox);
} }
@@ -758,7 +758,7 @@ void BattleEnd::keyDown(SDL_KeyboardEvent key){
} }
else { else {
Lang &lang= Lang::getInstance(); Lang &lang= Lang::getInstance();
showMessageBox(lang.getString("ExitGameMenu?"), "", true); showMessageBox(lang.getString("ExitToRootMenu"), "", true);
} }
} }
else if(isKeyPressed(SDLK_RETURN,key) && mainMessageBox.getEnabled()) { else if(isKeyPressed(SDLK_RETURN,key) && mainMessageBox.getEnabled()) {