diff --git a/.gitignore b/.gitignore index 8f43f9877..e88ce405a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ *.layout *.pro.user *.pro.user.* +*.swp +*.h.gch +*~ /CMakeLists.txt.user CMakeCache.txt CMakeFiles @@ -28,3 +31,8 @@ ui_*.h /CPackSourceConfig.cmake build-* CMakeLists.txt.user.* +Doxyfile +doc/* +VCMI_VS11.sdf +*.ipch +VCMI_VS11.opensdf diff --git a/.travis.linux b/.travis.linux new file mode 100644 index 000000000..fa0a8c70e --- /dev/null +++ b/.travis.linux @@ -0,0 +1,26 @@ +#!/bin/sh + +#new Clang +sudo add-apt-repository --yes ppa:h-rayflood/llvm + +#new SDL2 +sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots + +#new Qt +sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty + +#new CMake +sudo add-apt-repository --yes ppa:george-edison55/cmake-3.x + +sudo apt-get update -qq + +sudo apt-get install -qq $SUPPORT +sudo apt-get install -qq $PACKAGE +sudo apt-get install -qq cmake libboost1.54-all-dev zlib1g-dev +sudo apt-get install -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev +sudo apt-get install -qq libavformat-dev libswscale-dev +sudo apt-get install -qq qt57declarative + +#setup compiler +source /opt/qt57/bin/qt57-env.sh +export CC=${REAL_CC} CXX=${REAL_CXX} \ No newline at end of file diff --git a/.travis.osx b/.travis.osx new file mode 100644 index 000000000..768c5c872 --- /dev/null +++ b/.travis.osx @@ -0,0 +1,17 @@ +#!/bin/sh + +# https://gist.github.com/vmarkovtsev/3f2dd98e56cb63098027 + +brew unlink boost +brew install boost smpeg2 innoextract libpng freetype sdl2 sdl2_ttf sdl2_image qt5 ffmpeg +brew install sdl2_mixer --with-smpeg2 +sudo sed -i.bak 's/106200/106900/g' /usr/local/Cellar/cmake/*/share/cmake/Modules/FindBoost.cmake + +export CMAKE_PREFIX_PATH="/usr/local/opt/qt5:$CMAKE_PREFIX_PATH" + +sparkle_version=$(curl -L https://github.com/sparkle-project/Sparkle/releases/latest | grep '' | sed -E 's|^.*([1-9]\.[0-9]+\.[0-9]+).*$|\1|g') +wget https://github.com/sparkle-project/Sparkle/releases/download/$sparkle_version/Sparkle-$sparkle_version.tar.bz2 +mkdir sparkle && cd sparkle +tar -xf ../Sparkle-*.tar.bz2 +sudo mv Sparkle.framework /Library/Frameworks/ +cd .. && rm -rf sparkle \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 699701e7c..3e870b9aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,39 +1,22 @@ language: cpp +os: + - linux + - osx +dist: trusty +sudo: required before_install: - #new boost - - sudo add-apt-repository --yes ppa:boost-latest/ppa - #new GCC - - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test - #new Clang - - sudo add-apt-repository --yes ppa:h-rayflood/llvm - #new SDL2 - - sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots - #new Qt - - sudo add-apt-repository --yes ppa:beineri/opt-qt532 - #new CMake - - sudo add-apt-repository --yes ppa:andykimpe/cmake - - - sudo apt-get update -qq - - - sudo apt-get install -qq $SUPPORT - - sudo apt-get install -qq $PACKAGE - - sudo apt-get install -qq cmake libboost1.55-all-dev zlib1g-dev - - sudo apt-get install -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev - - sudo apt-get install -qq libavformat-dev libswscale-dev - - sudo apt-get install -qq qt53declarative - - #setup compiler - - source /opt/qt53/bin/qt53-env.sh - - export CC=${REAL_CC} CXX=${REAL_CXX} + - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then . .travis.linux; fi + - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then . .travis.osx; fi before_script: - mkdir build - cd build - - cmake .. + - cmake -G "Unix Makefiles" .. script: - - make + - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cd ..; xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release CONFIGURATION_BUILD_DIR=..; cd build; fi + - make -j2 env: - ignore=this @@ -42,16 +25,19 @@ matrix: exclude: - env: ignore=this include: - - compiler: clang # fails all the time - missing packages? - env: REAL_CC=clang-3.2 REAL_CXX=clang++-3.2 PACKAGE=clang-3.2 SUPPORT=g++-4.8 - - compiler: clang - env: REAL_CC=clang-3.3 REAL_CXX=clang++-3.3 PACKAGE=clang-3.3 SUPPORT=g++-4.8 - - compiler: clang - env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=g++-4.8 - #- compiler: gcc # fails due to running out of memory - vcmi need too much of it for successfull compilation - # env: REAL_CC=gcc-4.7 REAL_CXX=g++-4.7 PACKAGE=g++-4.7 SUPPORT= - #- compiler: gcc # same as 4.7 - # env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT= + - os: linux + compiler: clang + env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=libstdc++-4.8-dev + - os: linux + compiler: clang + env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PACKAGE=clang-3.5 SUPPORT=libstdc++-4.8-dev + - os: linux + compiler: clang + env: REAL_CC=clang-3.6 REAL_CXX=clang++-3.6 PACKAGE=clang-3.6 SUPPORT=libstdc++-4.8-dev + - os: linux + compiler: gcc + env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT= + - os: osx notifications: email: diff --git a/AI/BattleAI/BattleAI.cbp b/AI/BattleAI/BattleAI.cbp index 990a0d760..30f218952 100644 --- a/AI/BattleAI/BattleAI.cbp +++ b/AI/BattleAI/BattleAI.cbp @@ -6,43 +6,23 @@