diff --git a/.travis-before_install.sh b/.travis-before_install.sh index 97d56f4f..ae05473d 100755 --- a/.travis-before_install.sh +++ b/.travis-before_install.sh @@ -1,12 +1,97 @@ -#!/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" +Compiler_version_grep="$(echo "$Compiler_version" | sed 's/\./\\./g')" -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 -) +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 diff --git a/.travis.yml b/.travis.yml index 986336c6..992a8f85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: LLVM_VERSION="native" # broken compiler - - os: osx - compiler: gcc # unsupported compiler - - os: osx + 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="3.7" # missing compiler by brew - #allow_failures: - # - os: osx + env: Tr_Compiler_Version="default" + dist: trusty # broken compiler on 12.04 + - os: osx + #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 + # 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 @@ -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: @@ -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}" diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c9c33b..e23a5729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 @@ -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}]") @@ -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() @@ -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() diff --git a/README.md b/README.md index 9f43ee6a..655c8686 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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) + +[Git Workflow](https://github.com/MegaGlest/megaglest-source/wiki/Git-How-To) -go to the [Main Repository](https://github.com/MegaGlest/megaglest-source) -( e.g. from the fork ... ) + +Return to the main (upstream) repository [**here**](https://github.com/MegaGlest/megaglest-source) diff --git a/data/glest_game b/data/glest_game index c256b691..2bafae40 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit c256b69196d8aae7f00b833e75d6acdcb73953b0 +Subproject commit 2bafae40da1a8c358920970bff46b08b0e8daf90 diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index f505ea6f..4f64119c 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -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 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 ) @@ -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 ) diff --git a/docs/README.compiling-linux.txt b/docs/README.compiling-linux.txt index 7c63a7a8..a323a4b0 100644 --- a/docs/README.compiling-linux.txt +++ b/docs/README.compiling-linux.txt @@ -5,33 +5,28 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Build instructions for Linux -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Architecture +~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Architecture ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Developed on Linux with glibc, little endian CPU. While MacIntel builds exist (for some versions of the game), MegaGlest does not currently work on big endian CPUs like PPC (though some unfinished patches for vanilla Glest float around on the forums, e.g. http://forum.megaglest.org/?topic=1426#). -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~ 2. Building and Installation ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -2. Building and Installation +--- 2.1 Prerequesites --- -2.1 Prerequesites +Compiling MegaGlest requires the following dependencies to be installed: -The game depends on some tools and libraries to be present, before you can -start compiling it: - -* Standard GNU compiler and additional tools (g++ version 3.2 or later is +* Standard GNU compiler and additional tools (g++ version 4.6.3 or later is required at the moment) -* Kitware CMake 2.8 or later (used as build tool) +* Kitware CMake 2.8.2 or later (used as build tool) * X11 libraries + headers http://x.org/ -* SDL 1.2.5 or later +* SDL 2.0.0 or later http://libsdl.org/ * OpenGL @@ -46,9 +41,6 @@ start compiling it: * wxWidgets http://wxwidgets.org/ -* Xerces-C - http://xerces.apache.org/xerces-c/ - * OpenAL http://openal.org/ @@ -81,17 +73,10 @@ start compiling it: * libdl -NOTE: We have produced a script that tries to install build dependencies on many -Linux distros. The script is located in mk/linux/setupBuildDeps.sh +NOTE: A script which tries to install build dependencies on many Linux distros +is located in mk/linux/setupBuildDeps.sh -If CMake reports that it cannot find some of the libraries, make sure that you -also have the ...-dev(el) packages installed that some distributions provide. - -At this point we would like to thank all the authors of these helpful libraries -who made our development easy and straight forward. - - -2.2 Building +--- 2.2 Building --- To build the game simply invoke the build script: @@ -100,93 +85,90 @@ To build the game simply invoke the build script: This script manually calls cmake with some optional parameters. Feel free to examine it and build manually using cmake. -2.3 Installation +--- 2.3 Installation -- We provide MojoSetup based installers for Linux and NSIS based installers for Windows. By default, the Linux installers install to your home directory. The -Windows installers install to %ProgramFiles%, so to the systems' global scope. +Windows installers install to %ProgramFiles% (global system scope). There are also community maintained packages available for several Linux and BSD distributions. Please see the website, forums and wiki for details. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~ 3. Troubleshooting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3. Troubleshooting +--- General --- +* Make sure both the hardware and software of your system match the requirements +* If you cannot find what you are looking for on here please check the FAQs + (https://docs.megaglest.org/MG/FAQ) before contacting the developers. -Some hints for troubleshooting. +--- Compiling --- +* If CMake reports that it cannot find some of the libraries, make sure that + the relevant ...-dev(el) packages are also installed (distro-dependent). -In General: -* Make sure both hard- and software of your system match the requirements -* Sound is played through OpenAL - you might need to take a look at your - configuration: http://supertux.lethargik.org/wiki/OpenAL_Configuration - -Compiling: -* If CMake fails make sure you have read all of section 2.1 above. - -Sound/Audio errors when starting: +--- Sound/Audio --- * If the game doesn't start because of audio/sound errors: Make sure no other application is using your soundcard. Typical problems are the Gnome/KDE sound dameons esd and artsd. You can kill these daemons with - killall esd ; killall artsd -* If this doesn't solve your sound problems try to get an updated OpenAL from + the following commands: + # killall esd ; killall artsd + +* If this doesn't solve the sound problems, get an updated OpenAL from http://openal.org or a newer repository provided by your distribution. -The game complains about OpenGL 1.3 not available, is missing OpenGL extensions -or works very slowly: -* Look at glxinfo and make sure the system is using the drivers you want to - use. If you have a NVIDIA or AMD/ATI graphics card then consider using the - proprietary drivers (where available), which usually provide much better +* Sound is played through OpenAL - double-check the OpenAL system + configuration: http://supertux.lethargik.org/wiki/OpenAL_Configuration + +--- OpenGL --- +* If the game produces error messages regarding OpenGL or OpenGL extensions + being unavailable, look at glxinfo and make sure the system is using the + drivers you want to use. If you have a NVIDIA or AMD/ATI graphics card then + consider using the proprietary drivers, which may provide better performance than the open source drivers most distributions use by default. Most Intel graphics chips use an open source driver on Linux, based on Mesa ("glxinfo | grep -i mesa"). This hardware is much slower than any dedicated graphics cards produced during the past few years. The same holds true for - AMD APUs, the graphics chips embedded into AMD processors. + AMD APUs (the graphics chips embedded into AMD processors). -The game crashes: +--- Crashing --- * Check the forums at http://forums.megaglest.org/ -* It would be nice if you could report any crashes and freezes that are not yet - described on the forums, preferably with a gdb backtrace from a debugging - enabled build (cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo) +* Please report any crashes and freezes that are not yet described on the forums, + preferably with a gdb backtrace from a debugging enabled build + (cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -4. More information +~~~~~~~~~~~~~~~~~~~~~~~~~~ 4. More information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Website http://megaglest.org/ * Wiki - http://wiki.megaglest.org/ + https://docs.megaglest.org/Main_Page * Forums - http://forum.megaglest.org/ + http://forums.megaglest.org/ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5. Contact + Credits ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* MegaGlest is developed by: + Titus Tscharntke (info@titusgames.de) + Mark Vejvoda (www.soft-haus.com - mark_vejvoda@hotmail.com) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* General contact: + contact@megaglest.org -5. Contact + Credits +* MegaGlest is a fork of Glest: + http://glest.org/ -MegaGlest is developed by: - Titus Tscharntke (info@titusgames.de) - Mark Vejvoda (www.soft-haus.com - mark_vejvoda@hotmail.com) - -General contact: - contact@megaglest.org - -Website: - http://megaglest.org - -MegaGlest is a fork of Glest: - http://glest.org/ - -Linux port by: - Matthias Braun with help from Karl Robillard - - -Please also refer to the copyright file. +* Linux port by: + Matthias Braun + + + with help from + + Karl Robillard + +*** Please also refer to the copyright file. *** On Debian GNU/Linux systems please find license information in: /usr/share/common-licenses diff --git a/docs/README.compiling-windows.txt b/docs/README.compiling-windows.txt index b568375c..4e7e070a 100644 --- a/docs/README.compiling-windows.txt +++ b/docs/README.compiling-windows.txt @@ -4,85 +4,84 @@ by Titus Tscharntke and Mark Vejvoda ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Build instructions for Windows + Build Instructions for Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. Architecture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Architecture ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Developed on Windows with Microsoft Visual C++ 2010 Express (free version), +Developed on Windows with Microsoft Visual Studio Community 2015, little endian CPU. Compiling using the mingw32 toolset is experimental, which also allows for cross compiling. On Debian GNU/Linux systems please find license information in: /usr/share/common-licenses +Also see Build Instructions for Linux -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~ 2. Building and Installation ~~~~~~~~~~~~~~~~~~~~~~~~ -2. Building and Installation - -2.1 Prerequesites +--- 2.1 Prerequesites --- To build the game, the following tools and libraries must be present: -* Microsoft Visual C++ Express 2010 -OR +- Pick 1: +* Microsoft Visual Studio Community 2015 + https://www.microsoft.com/en-us/download/details.aspx?id=48146 + (Experimental Microsoft Visual C++ Express 2012 projects also exist in the vc2012 + folder) * mingw32 - -* Experiemtnal Microsoft Visual C++ Express 2012 projects also exist in the vc2012 - folder - -* MegaGlest Windows 32 bit dependencies for building with VC++: - https://github.com/MegaGlest/megaglest-source/releases/download/3.2.3/windows_deps.7z -OR + http://mingw.org/ + +- Pick 1: +* MegaGlest dependencies for building with VC++, which which will be downloaded + automatically in 'Option A' (see below) * MegaGlest Windows 32 bit dependencies for building with mingw: https://github.com/MegaGlest/megaglest-source/releases/download/3.2.3/win32_deps_mingw.7z -These include: +- These include: * Xerces-C http://xerces.apache.org/xerces-c/ * wxWidgets http://wxwidgets.org/ -And many more. - -* For a more verbose list, please inspect the archive contents and refer to the +* And many more. For a more verbose list, please inspect the archive contents and refer to the Linux build instructions. -2.2 Building +--- 2.2 Building --- To build and install the game proceed as follows: -Option A) (recommended) Automated build on the command line: +*** Option A ~ (recommended) Automated build on the command line: 1. Open a command prompt and navigate to the root folder where you have acquired the source code. 2. cd mk\windoze -3. build-mg-2010.bat (build-mg-2012.bat for vc 2012) +3. build-mg-2015.bat (or build-mg32bit-2015.bat for 32 bit build) 4. megaglest.exe --version 5. megaglest.exe -Option B) Using VC++ IDE: +*** Option B ~ Using VC++ IDE: -1. Download the dependencies archive listed above and decompress its contents - into the 'source' directory (where you see glest_game, g3d_viewer, etc). - This should create a subdirectory called "win32_deps" with many files and +1. Download the dependencies archive (which one and from where you can find + out in the "code" of build-...bat script from 'Option A' approach, some line + with "wget.exe") and decompress its contents into the 'source' directory. This + should create a subdirectory called "windows_deps..." with many files and subdirectories in it. -2. Start the Visual C++ 2010 IDE and open the solution file: - \mk\windoze\Glest-2010.sln +2. Start the Visual C++ 2015 IDE and open the solution file: + \mk\windoze\Glest_vc2015.sln 3. Right Click on the top level 'Glest' node in Solution Explorer and select - 'Rebuild All'. + 'Rebuild All' (choose release mode or release with debug info). -If you had no errors all binaries will be created in \data\glest_game. -Before running MegaGlest you must run CopyWindowsRuntimeDlls_2010.bat. -You should now be able to just run megaglest.exe. +Note: If you had no errors all binaries will be created. + Before running MegaGlest you must run CopyWindowsRuntimeDlls_2015.bat. + You should now be able to just run megaglest.exe. -2.3 Installation +--- 2.3 Installation --- We provide NSIS based installation packages. By default, these will create a system-wide installation below %ProgramFiles% and setup Desktop icons for @@ -90,70 +89,64 @@ simplified access. User specific configuration will be stored within the directory tree the %AppData% environment variable points to. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3. Troubleshooting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -3. Troubleshooting +--- General --- +* Make sure that the hardware and software of your system match the + requirements -Some hints for troubleshooting. - -In General: -* Make sure both hard- and software of your system match the requirements -* Sound is played through OpenAL - you might need to take a look at your - configuration: http://supertux.lethargik.org/wiki/OpenAL_Configuration - -Compiling: +* If you cannot find what you are looking for on here please check the FAQs + (https://docs.megaglest.org/MG/FAQ) before contacting. + +--- Compiling --- * If configure fails make sure you have read the Building section above -Sound/Audio errors when starting: +--- Sound/Audio errors when starting --- * If the game doesn't start because of audio/sound errors: Make sure no other application is using your soundcard. * If this doesn't solve your sound problems try to get an updated OpenAL from http://openal.org +* Sound is played through OpenAL - you might need to take a look at your + configuration: http://supertux.lethargik.org/wiki/OpenAL_Configuration -The game complains about OpenGL 1.3 not available, is missing OpenGL extensions -or works very slowly: +--- The game complains that OpenGL 1.3: is not available, is missing OpenGL + extensions, or works very slowly --- * Try to get updated graphics drivers. -The game crashes: +-- The game crashes --- * Check the forums at http://forums.megaglest.org/ -* It would be nice if you could report any other crashes and freezes that are - not yet described on the forums, preferably with a backtrace from a - debugging enabled build - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -4. More information +* Please report any other crashes and freezes that are not yet described on + the forums, preferably with a backtrace from a debugging enabled build + +~~~~~~~~~~~~~~~~~~~~~~~~~~ 4. More information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Website http://megaglest.org/ * Wiki - http://wiki.megaglest.org/ + https://docs.megaglest.org/Main_Page * Forums http://forums.megaglest.org/ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5. Contact + Credits ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* MegaGlest is developed by: + Titus Tscharntke (info@titusgames.de) + Mark Vejvoda (www.soft-haus.com - mark_vejvoda@hotmail.com) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* General contact: + contact@megaglest.org -5. Contact + Credits +* MegaGlest is a fork of Glest: + http://glest.org/ -MegaGlest is developed by: - Titus Tscharntke (info@titusgames.de) - Mark Vejvoda (www.soft-haus.com - mark_vejvoda@hotmail.com) +* Linux port by: + Matthias Braun + + + with help from + + Karl Robillard + -General contact: - contact@megaglest.org - -Website: - http://megaglest.org - -MegaGlest is a fork of Glest: - http://glest.org/ - -Linux port by: - Matthias Braun with help from Karl Robillard - - -Please also refer to the copyright file. +*** Please also refer to the copyright file. *** diff --git a/docs/README.release-management.txt b/docs/README.release-management.txt index 75014c07..d7f0baeb 100644 --- a/docs/README.release-management.txt +++ b/docs/README.release-management.txt @@ -33,8 +33,8 @@ To build this archive open a terminal and from the mk/linux folder run: This will produce megaglest-source-.tar.xz in the release subfolder #2. The embedded source archive: -This archive contains 3rd party source code for binary compilation of the application and -tools (which is often already included in Linux distros) +This archive contains 3rd party source code for binary (and data) compilation of the +application and tools (which is often already included in Linux distros) The naming convention for the source archive is: megaglest-source-embedded-.tar.xz @@ -100,37 +100,22 @@ Linux Installer(s): mojosetup on the platform that is building the installer. For either 32 or 64 bit Linux installers open a terminal and navigate to: +mk/linux/tools-for-standalone-client/installer -mk/linux/mojosetup - -mkdir build -cd build -cmake ../ -make -cd ../ - ------------------------ --- deprecation start -- -NOTE this part is now deprecated as it is handled by the synch script above -but the info is left here for education - -#2 Navigate into the megaglest-installer subfolder and modify / save changes: +#2 Occasionally navigate into the 'scripts' subfolder and modify / save changes: - config.lua local GAME_INSTALL_SIZE = 680000000; -local GAME_VERSION = "3.6.0"; --- deprecation end -- ---------------------- -Now in a terminal session from inside the megaglest-installer folder run: + ------------------------ +Now in a terminal session from inside the 'installer' folder run: ./make.sh When complete this will produce the platform specific installer in the same -folder called: +folder called: -MegaGlest-Installer__.run +MegaGlest-Installer___.run -This is a native binary installer that wil install MegaGlest on the same +This is a native binary installer that wil install MegaGlest on the same platform as was sued to build it. (ie: 32 or 64 bit Linux) - diff --git a/docs/README.txt b/docs/README.txt index 3d4a7a37..e4484057 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -24,7 +24,7 @@ 1. System requirements Hardware requirements: -* >= 6th generation x86 CPU with 1.5 GHz or better +* >= 6th generation x86 CPU with 2.0 GHz or better (modern CPU series with at least two cores of at least 1.5 Ghz recommended) * 1.5 GB RAM (2.0 GB RAM recommended) @@ -90,7 +90,7 @@ the administrative user (root) or via sudo, but as a normal (restricted) user. The graphical installer will show up and display the MegaGlest license. Install the game into a directory below your home directory (the default location of -~/.megaglest is fine) or any location of your choice (within the boundaries of +~/megaglest is fine) or any location of your choice (within the boundaries of where your Linux user may write to). Once the installer completes, a MegaGlest starter/shortcut will show up on your window managers' application menu. @@ -216,8 +216,8 @@ network slots and the other players have to join. The best ways to find people to play a multi-player game are: a) using the Internet Game menu -b) scheduling a game on the Glest forums -c) finding other players on the #megaglest IRC channel on irc.freenode.net. +b) scheduling a game on the MegaGlest forums +c) finding other players on the #megaglest-lobby IRC channel on irc.freenode.net. For LAN play, clients may click the 'Find LAN games' menu item to find servers with an open network slot on the local network (this uses UDP broadcasting). diff --git a/mk/cmake/Modules/FindOGG.cmake b/mk/cmake/Modules/FindOGG.cmake index 7e2628ad..83d5a965 100644 --- a/mk/cmake/Modules/FindOGG.cmake +++ b/mk/cmake/Modules/FindOGG.cmake @@ -25,7 +25,7 @@ ELSE() FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis) ENDIF() -#on macosx the vorbisfile library is part of the vorbisone... +#on macos the vorbisfile library is part of the vorbisone... #IF(NOT APPLE) # comment above is full of lies diff --git a/mk/linux/.gitignore b/mk/linux/.gitignore index 5fa5b59b..8ed774cf 100644 --- a/mk/linux/.gitignore +++ b/mk/linux/.gitignore @@ -6,6 +6,7 @@ core core.bak +core.1 /build/ /release/ diff --git a/mk/linux/build-mg.sh b/mk/linux/build-mg.sh index 867d0a7d..7429baf7 100755 --- a/mk/linux/build-mg.sh +++ b/mk/linux/build-mg.sh @@ -20,12 +20,13 @@ MAKE_ONLY=0 CLANG_FORCED=0 WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=ON" FORCE_EMBEDDED_LIBS=0 +GCC_FORCED_VERSION=0 LUA_FORCED_VERSION=0 FORCE_32BIT_CROSS_COMPILE=0 COMPILATION_WITHOUT=0 BUILD_MEGAGLEST_TESTS="ON" -while getopts "c:defhl:mnwx" option; do +while getopts "c:defg:hl:mnwx" option; do case "${option}" in c) CPU_COUNT=${OPTARG} @@ -43,14 +44,19 @@ while getopts "c:defhl:mnwx" option; do CLANG_FORCED=1 # echo "${option} value: ${OPTARG}" ;; + g) + GCC_FORCED_VERSION=${OPTARG} + echo "${option} value: ${OPTARG} GCC_FORCED_VERSION [${GCC_FORCED_VERSION}]" + ;; h) echo "Usage: $0