Skip to content

Commit 967257e

Browse files
committed
Merge branch 'release/3.13.0'
2 parents 0fcffb1 + 4846ad0 commit 967257e

File tree

178 files changed

+3895
-3194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+3895
-3194
lines changed

.travis-before_install.sh

Lines changed: 97 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,97 @@
1-
#!/bin/sh
2-
3-
set -ex
4-
5-
wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
6-
tar xf SDL2-2.0.3.tar.gz
7-
(
8-
cd SDL2-2.0.3
9-
./configure --enable-static --disable-shared
10-
make
11-
sudo make install
12-
)
1+
#!/bin/bash
2+
# script for use with travis and on linux only
3+
#
4+
# Copyright (c) 2015-2016 MegaGlest Team under GNU GPL v3.0+
5+
6+
export LANG=C
7+
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
8+
# ----------------------------------------------------------------------------
9+
# Load shared functions
10+
. $SCRIPTDIR/mk/linux/mg_shared.sh
11+
detect_system
12+
# ----------------------------------------------------------------------------
13+
Compiler_name="$1"; Compiler_version="$2"
14+
Compiler_version_grep="$(echo "$Compiler_version" | sed 's/\./\\./g')"
15+
16+
set -x
17+
if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
18+
# UPDATE REPOS
19+
sudo apt-get update -qq
20+
sudo apt-get install -y -qq
21+
22+
set +x
23+
if [ "$Compiler_name" = "gcc" ]; then
24+
VersionAvByDefault="$(apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^gcc-$Compiler_version_grep")"
25+
elif [ "$Compiler_name" = "clang" ]; then
26+
VersionAvByDefault="$(apt-cache search ^clang-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^clang-$Compiler_version_grep")"
27+
fi
28+
set -x
29+
if [ "$VersionAvByDefault" = "" ]; then
30+
if [ "$distribution" = "Ubuntu" ]; then
31+
if [ "$Compiler_name" = "gcc" ] || ( [ "$Compiler_name" = "clang" ] && [ "$codename" = "precise" ] ); then
32+
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
33+
sudo add-apt-repository --yes "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
34+
#sudo add-apt-repository --yes "deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${codename} main"
35+
fi
36+
fi
37+
if [ "$distribution" = "Ubuntu" ] || [ "$distribution" = "Debian" ]; then
38+
if [ "$Compiler_name" = "clang" ]; then
39+
# http://apt.llvm.org/
40+
sudo add-apt-repository --yes "deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename} main"
41+
#sudo add-apt-repository --yes "deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename} main"
42+
sudo add-apt-repository --yes "deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${Compiler_version} main"
43+
#sudo add-apt-repository --yes "deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${Compiler_version} main"
44+
45+
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
46+
fi
47+
fi
48+
fi
49+
fi
50+
set -e
51+
52+
if [ "$VersionAvByDefault" = "" ]; then
53+
# UPDATE REPOS
54+
sudo apt-get update -qq
55+
#sudo apt-get upgrade -qq # UPGRADE SYSTEM TO LATEST PATCH LEVEL
56+
sudo apt-get install -y -qq
57+
fi
58+
59+
if [ "$Compiler_version" != "" ] && [ "$Compiler_version" != "default" ]; then
60+
if [ "$Compiler_name" = "gcc" ]; then
61+
set +ex
62+
Gcc_AvSepGpp="$(apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]' | grep "^g++-$Compiler_version_grep")"
63+
set -ex
64+
if [ "$Gcc_AvSepGpp" = "" ]; then
65+
sudo apt-get --allow-unauthenticated install -qq --force-yes gcc-${Compiler_version}
66+
else
67+
sudo apt-get --allow-unauthenticated install -qq --force-yes gcc-${Compiler_version} g++-${Compiler_version}
68+
fi
69+
elif [ "$Compiler_name" = "clang" ]; then
70+
sudo apt-get --allow-unauthenticated install -qq --force-yes clang-${Compiler_version}
71+
fi
72+
fi
73+
74+
# what available versions we can use
75+
set +x
76+
apt-cache search ^g[c+][c+]-[0-9] | grep -v '[0-9]-[a-zA-Z]'
77+
apt-cache search ^clang-[0-9] | grep -v '[0-9]-[a-zA-Z]'
78+
set -x
79+
80+
# INSTALL OUR DEPENDENCIES
81+
sudo $SCRIPTDIR/mk/linux/setupBuildDeps.sh --quiet
82+
83+
if [ "$distribution" = "Ubuntu" ]; then
84+
case $release in
85+
12.04*)
86+
SDL2_version="2.0.5"
87+
wget https://www.libsdl.org/release/SDL2-${SDL2_version}.tar.gz
88+
tar xf SDL2-${SDL2_version}.tar.gz
89+
( cd SDL2-${SDL2_version}
90+
./configure --enable-static --disable-shared
91+
make
92+
sudo make install )
93+
;;
94+
*)
95+
;;
96+
esac
97+
fi

.travis.yml

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,37 @@ language: cpp
33

44
sudo: required
55

6-
os:
7-
- linux
8-
- osx
9-
10-
compiler:
11-
- gcc
12-
- clang
13-
14-
env:
15-
- GCC_VERSION="5"
16-
- GCC_VERSION="native"
17-
- LLVM_VERSION="3.7"
18-
- LLVM_VERSION="native"
19-
206
matrix:
21-
exclude:
22-
- compiler: gcc
23-
env: LLVM_VERSION="3.7"
24-
- compiler: gcc
25-
env: LLVM_VERSION="native"
26-
- compiler: clang
27-
env: GCC_VERSION="5"
28-
- compiler: clang
29-
env: GCC_VERSION="native"
7+
include:
8+
- os: linux
9+
compiler: gcc
10+
env: Tr_Compiler_Version="6"
11+
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
12+
dist: trusty # broken compiler on 12.04
13+
- os: linux
14+
compiler: gcc
15+
env: Tr_Compiler_Version="default"
16+
- os: linux
17+
compiler: clang
18+
env: Tr_Compiler_Version="3.9"
19+
# http://apt.llvm.org/, compiler not newer than available on debian testing
20+
# https://packages.debian.org/search?suite=testing&keywords=clang-
21+
dist: trusty
3022
- os: linux
3123
compiler: clang
32-
env: LLVM_VERSION="native" # broken compiler
24+
env: Tr_Compiler_Version="default"
25+
dist: trusty # broken compiler on 12.04
3326
- os: osx
34-
compiler: gcc # unsupported compiler
27+
#osx_image: xcode6.4 # seems broken and has lower priority in queue than default one
28+
env: Tr_Xcode_Version="default"
29+
#env: Tr_Xcode_Version="6.4"
30+
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
31+
# https://github.com/Homebrew/brew/blob/master/docs/Installation.md#requirements
32+
fast_finish: true
33+
allow_failures:
3534
- os: osx
36-
compiler: clang
37-
env: LLVM_VERSION="3.7" # missing compiler by brew
38-
#allow_failures:
39-
# - os: osx
35+
# it's not really acceptable to wait 40 minutes or sometimes up to even 3 hours
36+
# for the result just because the queue for mac is always so long
4037

4138
git:
4239
submodules: false
@@ -46,30 +43,26 @@ git:
4643
# - master
4744

4845
before_install:
49-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GCC_VERSION" != "native" ]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; fi
50-
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
51-
- 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
52-
- 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
53-
# http://llvm.org/apt/
54-
- 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
55-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi # UPDATE REPOS
46+
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./.travis-before_install.sh "$CC" "$Tr_Compiler_Version"; fi
5647
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
57-
#- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get upgrade -qq; fi # UPGRADE SYSTEM TO LATEST PATCH LEVEL
58-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y -qq; fi
59-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ] && [ "$GCC_VERSION" != "native" ]; then sudo apt-get install -qq gcc-${GCC_VERSION} g++-${GCC_VERSION}; fi
60-
- if [ "$CXX" = "g++" ] && [ "$GCC_VERSION" != "native" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
61-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then sudo apt-get --allow-unauthenticated -qq install clang-${LLVM_VERSION}; fi
62-
- if [ "$CXX" == "clang++" ] && [ "$LLVM_VERSION" != "native" ]; then export CXX="clang++-${LLVM_VERSION}" CC="clang-${LLVM_VERSION}"; fi
63-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo mk/linux/setupBuildDeps.sh --quiet; fi # INSTALL OUR DEPENDENCIES
6448
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install sdl2 lua freetype ftgl libogg glew libvorbis cppunit glib fribidi miniupnpc wxmac; fi
49+
# ^ not on travis also needed are: cmake + pkgconfig + xquartz (find by "search") + (maybe) git + (maybe) bash
50+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew outdated cmake || brew upgrade cmake; brew outdated pkgconfig || brew upgrade pkgconfig; fi
51+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew link --force gettext; fi
52+
# ^ odd linking problems related with brew which is not creating links
53+
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$Tr_Xcode_Version" = "6.4" ]; then brew install Caskroom/cask/xquartz; fi
54+
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" = "gcc" ]; then export CXX="g++-${Tr_Compiler_Version}" CC="gcc-${Tr_Compiler_Version}"; fi
55+
- if [ "$Tr_Compiler_Version" != "" ] && [ "$Tr_Compiler_Version" != "default" ] && [ "$CC" == "clang" ]; then export CXX="clang++-${Tr_Compiler_Version}" CC="clang-${Tr_Compiler_Version}"; fi
56+
- $CC --version
6557
- $CXX --version
6658
- cmake --version
67-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo ./.travis-before_install.sh; fi
6859

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

7467
# https://docs.travis-ci.com/user/notifications/#IRC-notification
7568
notifications:
@@ -80,7 +73,4 @@ notifications:
8073
use_notice: true
8174
on_success: change
8275
template:
83-
#- "[%{repository_slug}#%{branch} @%{commit}] %{author}): %{message}"
84-
#- "Diff: %{compare_url}"
85-
#- "Build: %{build_url}"
8676
- "[%{repository_name}#%{branch}@%{commit}] %{author}: %{message} %{build_url}"

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ENDIF()
9797

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

103103
IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
@@ -227,7 +227,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
227227

228228
# Get the current commit SHA1
229229
execute_process(
230-
COMMAND git log -1 --format=%h
230+
COMMAND git log -1 --format=%h --abbrev=7
231231
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
232232
OUTPUT_VARIABLE GIT_SHA1
233233
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -241,7 +241,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
241241
OUTPUT_STRIP_TRAILING_WHITESPACE
242242
)
243243

244-
SET(GIT_LIVE_REV_CMD "`cd '${PROJECT_SOURCE_DIR}' && git rev-list HEAD --count`.`cd '${PROJECT_SOURCE_DIR}' && git log -1 --format=%h`")
244+
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`")
245245

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

@@ -282,8 +282,10 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
282282
ENDFOREACH()
283283
ENDIF()
284284

285-
IF(NOT CUSTOM_DATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
286-
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)")
285+
IF(NOT WANT_SINGLE_INSTALL_DIRECTORY)
286+
IF(NOT CUSTOM_DATA_INSTALL_PATH)
287+
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)")
288+
ENDIF()
287289
SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")
288290
ENDIF()
289291

@@ -337,7 +339,7 @@ OPTION(WANT_DEV_OUTPATH "Use developer friendly output paths." OFF)
337339
IF(UNIX AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
338340
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/linux/")
339341
ELSEIF(UNIX AND APPLE)
340-
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macosx/")
342+
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macos/")
341343
ELSEIF(UNIX AND NOT APPLE)
342344
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/other_unix/")
343345
ELSE()

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ MegaGlest is an entertaining free (freeware and free software)
1010
and open source cross-platform 3D real-time strategy (RTS) game,
1111
where you control the armies of one of seven different factions:
1212
Tech, Magic, Egypt, Indians, Norsemen, Persian or Romans. The
13-
game is setup in one of 17 naturally looking settings, which
14-
-like the unit models- are crafted with great appreciation for
13+
game is played in one of 17 naturally looking settings, which,
14+
like the unit models, are crafted with great attention to
1515
detail. A lot of additional game data can be downloaded from
1616
within the game at no cost.
1717

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

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

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

30-
go to the [Main Repository](https://github.com/MegaGlest/megaglest-source)
31-
( e.g. from the fork ... )
29+
[Git Workflow](https://github.com/MegaGlest/megaglest-source/wiki/Git-How-To)
30+
31+
32+
33+
Return to the main (upstream) repository [**here**](https://github.com/MegaGlest/megaglest-source)

data/glest_game

Submodule glest_game updated 643 files

docs/CHANGELOG.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ MEGAGLEST CHANGELOG
44
To see a timeline of detail changes please visit:
55
https://github.com/MegaGlest/megaglest-source/commits/master
66

7+
v3.13.0
8+
- important sounds like "attack alarm" are always played
9+
- display build/morph/upgrade time
10+
- new AI tag <ai-build-size> for units(buildings) which allows fake size for buildings
11+
while placing them
12+
- much better error handling and messages especially for modders and xml-related problems
13+
- fix unwanted double event for some keys ( like alt+enter )
14+
- map filter option for game setup on headless server
15+
- option to select/command multiple buildings of same type ( uniform-selection )
16+
- major cross platform OOS fix which especially showed up quite often when playing without
17+
fog of war
18+
- you must prove basic game knowledge before you can play online by winning a special scenario
19+
- less visible parts of black squares while rendering cliffs
20+
- possibility to let units spawn units on death
21+
- improved AI behavior per faction ( mostly magic )
22+
723
v3.12.0
824
- MegaGlest uses SDL2 now
925
- glowing meshes. ( models can glow like particles do )
@@ -16,12 +32,12 @@ v3.12.0
1632
v3.11.1
1733
- no more false clicks when commanding via mini map
1834
- map editor has a more useful and powerful map height randomizer
19-
- map editor saves all maps with .mgm ending by default.
35+
- map editor saves all maps with .mgm ending by default
2036
- fixed map editor ( several linux distributions had trouble )
2137
- for missing tilesets and techs optional download from mod center instead of server. (bugfix)
2238
- healthbar default set to "if needed"
2339
- nicer tilesets as defaults
24-
- improved camera startposition on game start ( main building in center ).
40+
- improved camera startposition on game start ( main building in center )
2541
- attackBoosts: Ep + Hp regeneration is shown in description
2642
- MegaGlest can be build easier on MacOS ( sadly noone was willing to test )
2743

0 commit comments

Comments
 (0)