Skip to content

Commit

Permalink
Merge branch 'release/3.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
filux committed Mar 8, 2017
2 parents 0fcffb1 + 4846ad0 commit 967257e
Show file tree
Hide file tree
Showing 178 changed files with 3,895 additions and 3,194 deletions.
109 changes: 97 additions & 12 deletions .travis-before_install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,97 @@
#!/bin/sh

set -ex

wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar xf SDL2-2.0.3.tar.gz
(
cd SDL2-2.0.3
./configure --enable-static --disable-shared
make
sudo make install
)
#!/bin/bash
# script for use with travis and on linux only
#
# Copyright (c) 2015-2016 MegaGlest Team under GNU GPL v3.0+

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"
Compiler_version_grep="$(echo "$Compiler_version" | sed 's/\./\\./g')"

set -x
if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
# UPDATE REPOS
sudo apt-get update -qq
sudo apt-get install -y -qq

set +x
if [ "$Compiler_name" = "gcc" ]; then
VersionAvByDefault="$(apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^gcc-$Compiler_version_grep")"
elif [ "$Compiler_name" = "clang" ]; then
VersionAvByDefault="$(apt-cache search ^clang-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^clang-$Compiler_version_grep")"
fi
set -x
if [ "$VersionAvByDefault" = "" ]; then
if [ "$distribution" = "Ubuntu" ]; then
if [ "$Compiler_name" = "gcc" ] || ( [ "$Compiler_name" = "clang" ] && [ "$codename" = "precise" ] ); then
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
sudo add-apt-repository --yes "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
#sudo add-apt-repository --yes "deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
fi
fi
if [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Debian" ]; then
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
fi
fi
set -e

if [ "$VersionAvByDefault" = "" ]; then
# UPDATE REPOS
sudo apt-get update -qq
#sudo apt-get upgrade -qq # UPGRADE SYSTEM TO LATEST PATCH LEVEL
sudo apt-get install -y -qq
fi

if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
if [ "$Compiler_name" = "gcc" ]; then
set +ex
Gcc_AvSepGpp="$(apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^g++-$Compiler_version_grep")"
set -ex
if [ "$Gcc_AvSepGpp" = "" ]; then
sudo apt-get --allow-unauthenticated install -qq --force-yes gcc-${Compiler_version}
else
sudo apt-get --allow-unauthenticated install -qq --force-yes gcc-${Compiler_version} g++-${Compiler_version}
fi
elif [ "$Compiler_name" = "clang" ]; then
sudo apt-get --allow-unauthenticated install -qq --force-yes clang-${Compiler_version}
fi
fi

# what available versions we can use
set +x
apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]'
apt-cache search ^clang-[0-9] | grep -v '[0-9]-[a-zA-Z]'
set -x

# INSTALL OUR DEPENDENCIES
sudo $SCRIPTDIR/mk/linux/setupBuildDeps.sh --quiet

if [ "$distribution" = "Ubuntu" ]; then
case $release in
12.04*)
SDL2_version="2.0.5"
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
88 changes: 39 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,37 @@ language: cpp

sudo: required

os:
- linux
- osx

compiler:
- gcc
- clang

env:
- GCC_VERSION="5"
- GCC_VERSION="native"
- LLVM_VERSION="3.7"
- LLVM_VERSION="native"

matrix:
exclude:
- compiler: gcc
env: LLVM_VERSION="3.7"
- compiler: gcc
env: LLVM_VERSION="native"
- compiler: clang
env: GCC_VERSION="5"
- compiler: clang
env: GCC_VERSION="native"
include:
- os: linux
compiler: gcc
env: Tr_Compiler_Version="6"
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
dist: trusty # broken compiler on 12.04
- os: linux
compiler: gcc
env: Tr_Compiler_Version="default"
- os: linux
compiler: clang
env: Tr_Compiler_Version="3.9"
# http://apt.llvm.org/, compiler not newer than available on debian testing
# https://packages.debian.org/search?suite=testing&keywords=clang-
dist: trusty
- os: linux
compiler: clang
env: LLVM_VERSION="native" # broken compiler
env: Tr_Compiler_Version="default"
dist: trusty # broken compiler on 12.04
- os: osx
compiler: gcc # unsupported compiler
#osx_image: xcode6.4 # seems broken and has lower priority in queue than default one
env: Tr_Xcode_Version="default"
#env: Tr_Xcode_Version="6.4"
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
# https://github.com/Homebrew/brew/blob/master/docs/Installation.md#requirements
fast_finish: true
allow_failures:
- os: osx
compiler: clang
env: LLVM_VERSION="3.7" # missing compiler by brew
#allow_failures:
# - os: osx
# it's not really acceptable to wait 40 minutes or sometimes up to even 3 hours
# for the result just because the queue for mac is always so long

git:
submodules: false
Expand All @@ -46,30 +43,26 @@ git:
# - master

before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GCC_VERSION" != "native" ]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; 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" = "linux" ]; then ./.travis-before_install.sh "$CC" "$Tr_Compiler_Version"; 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
# ^ not on travis also needed are: cmake + pkgconfig + xquartz (find by "search") + (maybe) git + (maybe) bash
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew outdated cmake || brew upgrade cmake; brew outdated pkgconfig || brew upgrade pkgconfig; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew link --force gettext; fi
# ^ odd linking problems related with brew which is not creating links
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$Tr_Xcode_Version" = "6.4" ]; then brew install Caskroom/cask/xquartz; 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
- cmake --version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo ./.travis-before_install.sh; fi

script:
# ALL THE BUILD COMMANDS HERE
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then mk/linux/build-mg.sh -c 4; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mk/macosx/build-mg.sh -c 4; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$(echo "$CC" | grep 'clang')" = "" ]; then mk/linux/build-mg.sh -c 4; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$(echo "$CC" | grep 'clang')" != "" ]; then mk/linux/build-mg.sh -w -c 4; fi
# ^ -w may be removed on more modern dist: than trusty, problems related with 'new wx+clang+old gcc'
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mk/macos/build-mg.sh -c 4; fi

# https://docs.travis-ci.com/user/notifications/#IRC-notification
notifications:
Expand All @@ -80,7 +73,4 @@ notifications:
use_notice: true
on_success: change
template:
#- "[%{repository_slug}#%{branch} @%{commit}] %{author}): %{message}"
#- "Diff: %{compare_url}"
#- "Build: %{build_url}"
- "[%{repository_name}#%{branch}@%{commit}] %{author}: %{message} %{build_url}"
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ENDIF()

## Compiler flags, CPACK configuration and other Apple specific code.
IF(APPLE)
include(${PROJECT_SOURCE_DIR}/mk/macosx/CMakeLists.txt)
include(${PROJECT_SOURCE_DIR}/mk/macos/CMakeLists.txt)
ENDIF(APPLE)

IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
Expand Down Expand Up @@ -227,7 +227,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)

# Get the current commit SHA1
execute_process(
COMMAND git log -1 --format=%h
COMMAND git log -1 --format=%h --abbrev=7
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_SHA1
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand All @@ -241,7 +241,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
OUTPUT_STRIP_TRAILING_WHITESPACE
)

SET(GIT_LIVE_REV_CMD "`cd '${PROJECT_SOURCE_DIR}' && git rev-list HEAD --count`.`cd '${PROJECT_SOURCE_DIR}' && git log -1 --format=%h`")
SET(GIT_LIVE_REV_CMD "`cd '${PROJECT_SOURCE_DIR}' && git rev-list HEAD --count`.`cd '${PROJECT_SOURCE_DIR}' && git log -1 --format=%h --abbrev=7`")

MESSAGE(STATUS "Using GIT revision stamp: [${GIT_COMMIT_COUNT}.${GIT_SHA1}] CMD [${GIT_LIVE_REV_CMD}]")

Expand Down Expand Up @@ -282,8 +282,10 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDFOREACH()
ENDIF()

IF(NOT CUSTOM_DATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
SET(CUSTOM_DATA_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)")
IF(NOT WANT_SINGLE_INSTALL_DIRECTORY)
IF(NOT CUSTOM_DATA_INSTALL_PATH)
SET(CUSTOM_DATA_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)")
ENDIF()
SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")
ENDIF()

Expand Down Expand Up @@ -337,7 +339,7 @@ OPTION(WANT_DEV_OUTPATH "Use developer friendly output paths." OFF)
IF(UNIX AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/linux/")
ELSEIF(UNIX AND APPLE)
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macosx/")
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macos/")
ELSEIF(UNIX AND NOT APPLE)
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/other_unix/")
ELSE()
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ MegaGlest is an entertaining free (freeware and free software)
and open source cross-platform 3D real-time strategy (RTS) game,
where you control the armies of one of seven different factions:
Tech, Magic, Egypt, Indians, Norsemen, Persian or Romans. The
game is setup in one of 17 naturally looking settings, which
-like the unit models- are crafted with great appreciation for
game is played in one of 17 naturally looking settings, which,
like the unit models, are crafted with great attention to
detail. A lot of additional game data can be downloaded from
within the game at no cost.

Expand All @@ -22,10 +22,12 @@ within the game at no cost.
[![intro](http://megaglest.org/uploads/images/trailer3.png)]
(http://downloads.megaglest.org/videos/megaglest_game_trailer_lq.webm)

If you want compile MegaGlest yourself then you should read the
[**tutorial**](https://docs.megaglest.org/MG/Development) or
[tutorial2](https://github.com/MegaGlest/megaglest-source/wiki/Git-How-To)
If you want to compile MegaGlest yourself, you should read the following:

[Development Tutorial](https://docs.megaglest.org/MG/Development)

go to the [Main Repository](https://github.com/MegaGlest/megaglest-source)
( e.g. from the fork ... )
[Git Workflow](https://github.com/MegaGlest/megaglest-source/wiki/Git-How-To)



Return to the main (upstream) repository [**here**](https://github.com/MegaGlest/megaglest-source)
2 changes: 1 addition & 1 deletion data/glest_game
Submodule glest_game updated 643 files
20 changes: 18 additions & 2 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ MEGAGLEST CHANGELOG
To see a timeline of detail changes please visit:
https://github.com/MegaGlest/megaglest-source/commits/master

v3.13.0
- important sounds like "attack alarm" are always played
- display build/morph/upgrade time
- new AI tag <ai-build-size> for units(buildings) which allows fake size for buildings
while placing them
- much better error handling and messages especially for modders and xml-related problems
- fix unwanted double event for some keys ( like alt+enter )
- map filter option for game setup on headless server
- option to select/command multiple buildings of same type ( uniform-selection )
- major cross platform OOS fix which especially showed up quite often when playing without
fog of war
- you must prove basic game knowledge before you can play online by winning a special scenario
- less visible parts of black squares while rendering cliffs
- possibility to let units spawn units on death
- improved AI behavior per faction ( mostly magic )

v3.12.0
- MegaGlest uses SDL2 now
- glowing meshes. ( models can glow like particles do )
Expand All @@ -16,12 +32,12 @@ v3.12.0
v3.11.1
- no more false clicks when commanding via mini map
- map editor has a more useful and powerful map height randomizer
- map editor saves all maps with .mgm ending by default.
- map editor saves all maps with .mgm ending by default
- fixed map editor ( several linux distributions had trouble )
- for missing tilesets and techs optional download from mod center instead of server. (bugfix)
- healthbar default set to "if needed"
- nicer tilesets as defaults
- improved camera startposition on game start ( main building in center ).
- improved camera startposition on game start ( main building in center )
- attackBoosts: Ep + Hp regeneration is shown in description
- MegaGlest can be build easier on MacOS ( sadly noone was willing to test )

Expand Down
Loading

0 comments on commit 967257e

Please sign in to comment.