From f4cc5d0399fd4e38ace958d5a6cb6204c730b5d8 Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 25 Aug 2016 21:17:40 +0900 Subject: [PATCH 01/22] Sometimes play 1st-person weapon idle to Stop key --- apps/openmw/mwmechanics/character.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 637c24300..7be10a581 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -471,6 +471,7 @@ void CharacterController::refreshIdleAnims(const WeaponInfo* weap, CharacterStat if(force || idle != mIdleState) { mIdleState = idle; + size_t numLoops = ~0ul; std::string idle; MWRender::Animation::AnimPriority idlePriority (Priority_Default); @@ -494,14 +495,15 @@ void CharacterController::refreshIdleAnims(const WeaponInfo* weap, CharacterStat idle += weap->shortgroup; if(!mAnimation->hasAnimation(idle)) idle = "idle"; - } + numLoops = 1 + Misc::Rng::rollDice(4); + } } mAnimation->disable(mCurrentIdle); mCurrentIdle = idle; if(!mCurrentIdle.empty()) mAnimation->play(mCurrentIdle, idlePriority, MWRender::Animation::BlendMask_All, false, - 1.0f, "start", "stop", 0.0f, ~0ul, true); + 1.0f, "start", "stop", 0.0f, numLoops, true); } } From 6190ff1f0d405da5a15f8f4a94d76edf496ef5ce Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 25 Aug 2016 21:35:03 +0900 Subject: [PATCH 02/22] Update idle if current idle finishes playing --- apps/openmw/mwmechanics/character.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 7be10a581..ed590817c 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -468,7 +468,8 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character void CharacterController::refreshIdleAnims(const WeaponInfo* weap, CharacterState idle, bool force) { - if(force || idle != mIdleState) + if(force || idle != mIdleState || + ((idle == mIdleState) && !mAnimation->isPlaying(mCurrentIdle) && mAnimQueue.empty())) { mIdleState = idle; size_t numLoops = ~0ul; From 67bd882bc784dfe258d370535010c38cd0bdeb64 Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 25 Aug 2016 22:19:49 +0900 Subject: [PATCH 03/22] Disable current idle when an action is taken --- apps/openmw/mwmechanics/character.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index ed590817c..1819c36ce 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -311,12 +311,15 @@ void CharacterController::refreshHitRecoilAnims() mAnimation->disable(mCurrentHit); mAnimation->play(mCurrentHit, Priority_Knockdown, MWRender::Animation::BlendMask_All, true, 1, "loop stop", "stop", 0.0f, 0); } + if (mHitState != CharState_None) + mIdleState = CharState_None; } void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState jump, bool force) { if(force || jump != mJumpState) { + mIdleState = CharState_None; bool startAtLoop = (jump == mJumpState); mJumpState = jump; @@ -359,6 +362,7 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character { if(force || movement != mMovementState) { + mIdleState = CharState_None; mMovementState = movement; std::string movementAnimName; @@ -1197,6 +1201,7 @@ bool CharacterController::updateWeaponState() bool animPlaying; if(mAttackingOrSpell) { + mIdleState = CharState_None; if(mUpperBodyState == UpperCharState_WeapEquiped && (mHitState == CharState_None || mHitState == CharState_Block)) { MWBase::Environment::get().getWorld()->breakInvisibility(mPtr); From 9e1bfde46f3d7a1363f7fe2fea593ab4531ccdad Mon Sep 17 00:00:00 2001 From: Allofich Date: Thu, 25 Aug 2016 23:42:24 +0900 Subject: [PATCH 04/22] Add comment --- apps/openmw/mwmechanics/character.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 1819c36ce..38fec4e4f 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -500,7 +500,10 @@ void CharacterController::refreshIdleAnims(const WeaponInfo* weap, CharacterStat idle += weap->shortgroup; if(!mAnimation->hasAnimation(idle)) idle = "idle"; - numLoops = 1 + Misc::Rng::rollDice(4); + + // play until the Loop Stop key 2 to 5 times, then play until the Stop key + // this replicates original engine behavior for the "Idle1h" 1st-person animation + numLoops = 1 + Misc::Rng::rollDice(4); } } From c89293770ff9d4a3193df9eba032a78b987aea31 Mon Sep 17 00:00:00 2001 From: Allofich Date: Sun, 28 Aug 2016 21:25:09 +0900 Subject: [PATCH 05/22] Link Clang paths --- CI/before_install.linux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CI/before_install.linux.sh b/CI/before_install.linux.sh index cbc293dab..2b0e73110 100755 --- a/CI/before_install.linux.sh +++ b/CI/before_install.linux.sh @@ -1,4 +1,6 @@ #!/bin/sh +sudo ln -s /usr/bin/clang-3.6 /usr/local/bin/clang +sudo ln -s /usr/bin/clang++-3.6 /usr/local/bin/clang++ # build libgtest & libgtest_main sudo mkdir /usr/src/gtest/build From dd5b6a46f54f115d72bb12975934f9ec930496e2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:42:48 +0200 Subject: [PATCH 06/22] Visual Studio 2015 support --- CI/before_script.msvc.sh | 391 +++++++++++++++++++++++---------------- CI/build.msvc.sh | 56 ++++-- CMakeLists.txt | 10 + appveyor.yml | 45 +++-- 4 files changed, 310 insertions(+), 192 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 6ed4365a4..72c3e983a 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -1,5 +1,20 @@ #!/bin/bash +set -euo pipefail + +APPVEYOR="" +CI="" + +VERBOSE="" +STRIP="" +SKIP_DOWNLOAD="" +SKIP_EXTRACT="" +KEEP="" +UNITY_BUILD="" +VS_VERSION="" +PLATFORM="" +CONFIGURATION="" + while [ $# -gt 0 ]; do ARGSTR=$1 shift @@ -16,10 +31,6 @@ while [ $# -gt 0 ]; do V ) VERBOSE=true ;; - v ) - VS_VERSION=$1 - shift ;; - d ) SKIP_DOWNLOAD=true ;; @@ -32,6 +43,10 @@ while [ $# -gt 0 ]; do u ) UNITY_BUILD=true ;; + v ) + VS_VERSION=$1 + shift ;; + p ) PLATFORM=$1 shift ;; @@ -78,9 +93,6 @@ done if [ -z $VERBOSE ]; then STRIP="> /dev/null 2>&1" fi -if [ -z $VS_VERSION ]; then - VS_VERSION="2013" -fi if [ -z $APPVEYOR ]; then echo "Running prebuild outside of Appveyor." @@ -90,7 +102,7 @@ if [ -z $APPVEYOR ]; then else echo "Running prebuild in Appveyor." - cd $APPVEYOR_BUILD_FOLDER + cd ${APPVEYOR_BUILD_FOLDER:-} VERSION="$(cat README.md | grep Version: | awk '{ print $3; }')-$(git rev-parse --short HEAD)" appveyor UpdateBuild -Version "$VERSION" > /dev/null & fi @@ -192,36 +204,45 @@ if [ -z $CONFIGURATION ]; then CONFIGURATION="Debug" fi +if [ -z $VS_VERSION ]; then + VS_VERSION="2013" +fi + case $VS_VERSION in - 14|2015 ) + 14|14.0|2015 ) GENERATOR="Visual Studio 14 2015" XP_TOOLSET="v140_xp" + TOOLSET="v140" + MSVC_VER="14" + MSVC_YEAR="2015" ;; -# 12|2013| - * ) + 12|12.0|2013 ) GENERATOR="Visual Studio 12 2013" XP_TOOLSET="v120_xp" + TOOLSET="v120" + MSVC_VER="12" + MSVC_YEAR="2013" ;; esac case $PLATFORM in x64|x86_64|x86-64|win64|Win64 ) - ARCHNAME=x86-64 - ARCHSUFFIX=64 - BITS=64 + ARCHNAME="x86-64" + ARCHSUFFIX="64" + BITS="64" BASE_OPTS="-G\"$GENERATOR Win64\"" add_cmake_opts "-G\"$GENERATOR Win64\"" ;; x32|x86|i686|i386|win32|Win32 ) - ARCHNAME=x86 - ARCHSUFFIX=86 - BITS=32 + ARCHNAME="x86" + ARCHSUFFIX="86" + BITS="32" - BASE_OPTS="-G\"$GENERATOR\" -T$XP_TOOLSET" - add_cmake_opts "-G\"$GENERATOR\"" -T$XP_TOOLSET + BASE_OPTS="-G\"$GENERATOR\"" + add_cmake_opts "-G\"$GENERATOR\"" ;; * ) @@ -230,28 +251,31 @@ case $PLATFORM in ;; esac -if ! [ -z $UNITY_BUILD ]; then - add_cmake_opts "-DOPENMW_UNITY_BUILD=True" -fi - case $CONFIGURATION in debug|Debug|DEBUG ) CONFIGURATION=Debug + BUILD_CONFIG=Debug ;; release|Release|RELEASE ) CONFIGURATION=Release + BUILD_CONFIG=Release ;; relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO ) - CONFIGURATION=RelWithDebInfo + CONFIGURATION=Release + BUILD_CONFIG=RelWithDebInfo ;; esac +if ! [ -z $UNITY_BUILD ]; then + add_cmake_opts "-DOPENMW_UNITY_BUILD=True" +fi + echo -echo "==========================" -echo "Starting prebuild on win$BITS" -echo "==========================" +echo "===================================" +echo "Starting prebuild on MSVC${MSVC_YEAR} WIN${BITS}" +echo "===================================" echo # cd OpenMW/AppVeyor-test @@ -266,105 +290,127 @@ if [ -z $SKIP_DOWNLOAD ]; then # Boost if [ -z $APPVEYOR ]; then - download "Boost 1.58.0" \ - http://sourceforge.net/projects/boost/files/boost-binaries/1.58.0/boost_1_58_0-msvc-12.0-$BITS.exe \ - boost-1.58.0-win$BITS.exe + download "Boost 1.61.0" \ + "http://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/boost_1_61_0-msvc-${MSVC_VER}.0-${BITS}.exe" \ + "boost-1.61.0-msvc${MSVC_YEAR}-win${BITS}.exe" fi # Bullet - download "Bullet 2.83.5" \ - http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.5-win$BITS.7z \ - Bullet-2.83.5-win$BITS.7z + download "Bullet 2.83.7" \ + "http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.7-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "Bullet-2.83.7-msvc${MSVC_YEAR}-win${BITS}.7z" # FFmpeg - download "FFmpeg 2.5.2" \ - http://ffmpeg.zeranoe.com/builds/win$BITS/shared/ffmpeg-2.5.2-win$BITS-shared.7z \ - ffmpeg$BITS-2.5.2.7z \ - http://ffmpeg.zeranoe.com/builds/win$BITS/dev/ffmpeg-2.5.2-win$BITS-dev.7z \ - ffmpeg$BITS-2.5.2-dev.7z + download "FFmpeg 3.0.1" \ + "http://ffmpeg.zeranoe.com/builds/win${BITS}/shared/ffmpeg-3.0.1-win${BITS}-shared.7z" \ + "ffmpeg-3.0.1-win${BITS}.7z" \ + "http://ffmpeg.zeranoe.com/builds/win${BITS}/dev/ffmpeg-3.0.1-win${BITS}-dev.7z" \ + "ffmpeg-3.0.1-dev-win${BITS}.7z" # MyGUI - download "MyGUI 3.2.2" \ - http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-win$BITS.7z \ - MyGUI-3.2.2-win$BITS.7z + download "MyGUI 3.2.3-git" \ + "http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z" # OpenAL - download "OpenAL-Soft 1.16.0" \ - http://kcat.strangesoft.net/openal-binaries/openal-soft-1.16.0-bin.zip \ - OpenAL-Soft-1.16.0.zip + download "OpenAL-Soft 1.17.2" \ + "http://kcat.strangesoft.net/openal-binaries/openal-soft-1.17.2-bin.zip" \ + "OpenAL-Soft-1.17.2.zip" # OSG - download "OpenSceneGraph 3.3.8" \ - http://www.lysator.liu.se/~ace/OpenMW/deps/OSG-3.3.8-win$BITS.7z \ - OSG-3.3.8-win$BITS.7z + download "OpenSceneGraph 3.4.0-scrawl" \ + "http://www.lysator.liu.se/~ace/OpenMW/deps/OSG-3.4.0-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" \ + "OSG-3.4.0-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" # Qt if [ -z $APPVEYOR ]; then - download "Qt 4.8.6" \ - http://sourceforge.net/projects/qt64ng/files/qt/$ARCHNAME/4.8.6/msvc2013/qt-4.8.6-x$ARCHSUFFIX-msvc2013.7z \ - qt$BITS-4.8.6.7z + if [ $BITS == "64" ]; then + QT_SUFFIX="_64" + else + QT_SUFFIX="" + fi + + download "Qt 5.7.2" \ + "http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-windows-x86-msvc${MSVC_YEAR}${QT_SUFFIX}-5.7.0.exe" \ + "qt-5.7.0-msvc${MSVC_YEAR}-win${BITS}.exe" \ + "http://www.lysator.liu.se/~ace/OpenMW/deps/qt-5-install.qs" \ + "qt-5-install.qs" fi # SDL2 - download "SDL 2.0.3" \ - https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip \ - SDL2-2.0.3.zip + download "SDL 2.0.4" \ + "https://www.libsdl.org/release/SDL2-devel-2.0.4-VC.zip" \ + "SDL2-2.0.4.zip" fi cd .. #/.. # Set up dependencies +BUILD_DIR="MSVC${MSVC_YEAR}_${BITS}" if [ -z $KEEP ]; then echo - printf "Preparing build directory... " + echo "(Re)Creating build directory." - rm -rf Build_$BITS - mkdir -p Build_$BITS/deps - - echo Done. + rm -rf "$BUILD_DIR" fi -mkdir -p Build_$BITS/deps -cd Build_$BITS/deps + +mkdir -p "${BUILD_DIR}/deps" +cd "${BUILD_DIR}/deps" DEPS_INSTALL=`pwd` cd $DEPS echo -echo "Extracting dependencies..." +echo "Extracting dependencies, this might take a while..." +echo "---------------------------------------------------" +echo # Boost -printf "Boost 1.58.0... " +if [ -z $APPVEYOR ]; then + printf "Boost 1.61.0... " +else + if [ $MSVC_VER -eq 12 ]; then + printf "Boost 1.58.0 AppVeyor... " + else + printf "Boost 1.60.0 AppVeyor... " + fi +fi { if [ -z $APPVEYOR ]; then cd $DEPS_INSTALL - BOOST_SDK="`real_pwd`/Boost" + BOOST_SDK="$(real_pwd)/Boost" - if [ -d Boost ] && grep "BOOST_VERSION 105800" Boost/boost/version.hpp > /dev/null; then + if [ -d Boost ] && grep "BOOST_VERSION 106100" Boost/boost/version.hpp > /dev/null; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf Boost - $DEPS/boost-1.58.0-win$BITS.exe //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent + "${DEPS}/boost-1.61.0-msvc${MSVC_YEAR}-win${BITS}.exe" //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent fi add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + -DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.0" echo Done. else # Appveyor unstable has all the boost we need already - BOOST_SDK="c:/Libraries/boost" + if [ $MSVC_VER -eq 12 ]; then + BOOST_SDK="c:/Libraries/boost_1_58_0" + else + BOOST_SDK="c:/Libraries/boost_1_60_0" + fi add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib${BITS}-msvc-${MSVC_VER}.0" - echo AppVeyor. + echo Done. fi } cd $DEPS +echo # Bullet -printf "Bullet 2.83.5... " +printf "Bullet 2.83.7... " { cd $DEPS_INSTALL @@ -372,36 +418,37 @@ printf "Bullet 2.83.5... " printf "Exists. (No version checking) " elif [ -z $SKIP_EXTRACT ]; then rm -rf Bullet - eval 7z x -y $DEPS/Bullet-2.83.5-win$BITS.7z $STRIP - mv Bullet-2.83.5-win$BITS Bullet + eval 7z x -y "${DEPS}/Bullet-2.83.7-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP + mv "Bullet-2.83.7-msvc${MSVC_YEAR}-win${BITS}" Bullet fi - export BULLET_ROOT="`real_pwd`/Bullet" + export BULLET_ROOT="$(real_pwd)/Bullet" echo Done. } cd $DEPS +echo # FFmpeg -printf "FFmpeg 2.5.2... " +printf "FFmpeg 3.0.1... " { cd $DEPS_INSTALL - if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" FFmpeg/README.txt > /dev/null; then + if [ -d FFmpeg ] && grep "FFmpeg version: 3.0.1" FFmpeg/README.txt > /dev/null; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf FFmpeg - eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2.7z $STRIP - eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2-dev.7z $STRIP + eval 7z x -y "${DEPS}/ffmpeg-3.0.1-win${BITS}.7z" $STRIP + eval 7z x -y "${DEPS}/ffmpeg-3.0.1-dev-win${BITS}.7z" $STRIP - mv ffmpeg-2.5.2-win$BITS-shared FFmpeg - cp -r ffmpeg-2.5.2-win$BITS-dev/* FFmpeg/ - rm -rf ffmpeg-2.5.2-win$BITS-dev + mv "ffmpeg-3.0.1-win${BITS}-shared" FFmpeg + cp -r "ffmpeg-3.0.1-win${BITS}-dev/"* FFmpeg/ + rm -rf "ffmpeg-3.0.1-win${BITS}-dev" fi - export FFMPEG_HOME="`real_pwd`/FFmpeg" - add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll + export FFMPEG_HOME="$(real_pwd)/FFmpeg" + add_runtime_dlls "$(pwd)/FFmpeg/bin/"{avcodec-57,avformat-57,avutil-55,swresample-2,swscale-4}.dll if [ $BITS -eq 32 ]; then add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" @@ -410,36 +457,38 @@ printf "FFmpeg 2.5.2... " echo Done. } cd $DEPS +echo # MyGUI -printf "MyGUI 3.2.2... " +printf "MyGUI 3.2.3-git... " { cd $DEPS_INSTALL if [ -d MyGUI ] && \ grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \ grep "MYGUI_VERSION_MINOR 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \ - grep "MYGUI_VERSION_PATCH 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null + grep "MYGUI_VERSION_PATCH 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf MyGUI - eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP - mv MyGUI-3.2.2-win$BITS MyGUI + eval 7z x -y "${DEPS}/MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP + mv "MyGUI-3.2.3-git-msvc${MSVC_YEAR}-win${BITS}" MyGUI fi - export MYGUI_HOME="`real_pwd`/MyGUI" + export MYGUI_HOME="$(real_pwd)/MyGUI" if [ $CONFIGURATION == "Debug" ]; then SUFFIX="_d" else SUFFIX="" fi - add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll + add_runtime_dlls "$(pwd)/MyGUI/bin/${CONFIGURATION}/MyGUIEngine${SUFFIX}.dll" echo Done. } cd $DEPS +echo # OpenAL printf "OpenAL-Soft 1.16.0... " @@ -451,7 +500,7 @@ printf "OpenAL-Soft 1.16.0... " eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP fi - OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" + OPENAL_SDK="$(real_pwd)/openal-soft-1.16.0-bin" add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" @@ -459,25 +508,26 @@ printf "OpenAL-Soft 1.16.0... " echo Done. } cd $DEPS +echo # OSG -printf "OSG 3.3.8... " +printf "OSG 3.4.0-scrawl... " { cd $DEPS_INSTALL if [ -d OSG ] && \ grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \ - grep "OPENSCENEGRAPH_MINOR_VERSION 3" OSG/include/osg/Version > /dev/null && \ - grep "OPENSCENEGRAPH_PATCH_VERSION 8" OSG/include/osg/Version > /dev/null + grep "OPENSCENEGRAPH_MINOR_VERSION 4" OSG/include/osg/Version > /dev/null && \ + grep "OPENSCENEGRAPH_PATCH_VERSION 0" OSG/include/osg/Version > /dev/null then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf OSG - eval 7z x -y $DEPS/OSG-3.3.8-win$BITS.7z $STRIP - mv OSG-3.3.8-win$BITS OSG + eval 7z x -y "${DEPS}/OSG-3.4.0-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP + mv "OSG-3.4.0-scrawl-msvc${MSVC_YEAR}-win${BITS}" OSG fi - OSG_SDK="`real_pwd`/OSG" + OSG_SDK="$(real_pwd)/OSG" add_cmake_opts -DOSG_DIR="$OSG_SDK" @@ -487,82 +537,96 @@ printf "OSG 3.3.8... " SUFFIX="" fi - add_runtime_dlls `pwd`/OSG/bin/{OpenThreads,zlib}$SUFFIX.dll \ - `pwd`/OSG/bin/osg{,Animation,DB,FX,GA,Particle,Qt,Text,Util,Viewer}$SUFFIX.dll + add_runtime_dlls "$(pwd)/OSG/bin/"{OpenThreads,zlib}${SUFFIX}.dll \ + "$(pwd)/OSG/bin/osg"{,Animation,DB,FX,GA,Particle,Text,Util,Viewer}${SUFFIX}.dll - add_osg_dlls `pwd`/OSG/bin/osgPlugins-3.3.8/osgdb_{bmp,dds,gif,jpeg,png,tga}$SUFFIX.dll + add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.0/osgdb_"{bmp,dds,jpeg,png,tga}${SUFFIX}.dll echo Done. } cd $DEPS +echo # Qt if [ -z $APPVEYOR ]; then - printf "Qt 4.8.6... " + printf "Qt 5.7.0... " else - printf "Qt 5.4... " + printf "Qt 5.7 AppVeyor... " fi { + if [ $BITS -eq 64 ]; then + SUFFIX="_64" + else + SUFFIX="" + fi + if [ -z $APPVEYOR ]; then cd $DEPS_INSTALL - QT_SDK="`real_pwd`/Qt" + QT_SDK="$(real_pwd)/Qt/5.7/msvc${MSVC_YEAR}${SUFFIX}" - if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /dev/null; then + if [ -d Qt ] && head -n2 Qt/InstallationLog.txt | grep "5.7.0" > /dev/null; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then rm -rf Qt - eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP - mv qt-4.8.6-* Qt - cd Qt - eval ./qtbinpatcher.exe $STRIP + cp "${DEPS}/qt-5-install.qs" qt-install.qs + + + sed -i "s|INSTALL_DIR|$(real_pwd)/Qt|" qt-install.qs + sed -i "s/qt.VERSION.winBITS_msvcYEAR/qt.57.win${BITS}_msvc${MSVC_YEAR}${SUFFIX}/" qt-install.qs + + printf "(Installation might take a while) " + "${DEPS}/qt-5.7.0-msvc${MSVC_YEAR}-win${BITS}.exe" --script qt-install.qs --silent + + mv qt-install.qs Qt/ + + echo Done. + printf " Cleaning up extraneous data... " + rm -r "$(real_pwd)/Qt/"{Docs,Examples,Tools,vcredist,MaintenanceTool.*} fi cd $QT_SDK - add_cmake_opts -DDESIRED_QT_VERSION=4 \ - -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" - - if [ $CONFIGURATION == "Debug" ]; then - SUFFIX="d4" - else - SUFFIX="4" - fi - - add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll - - echo Done. - else - if [ $BITS -eq 32 ]; then - QT_SDK="C:/Qt/5.4/msvc2013_opengl" - else - QT_SDK="C:/Qt/5.4/msvc2013_64_opengl" - fi - add_cmake_opts -DDESIRED_QT_VERSION=5 \ -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ -DCMAKE_PREFIX_PATH="$QT_SDK" - echo AppVeyor. + if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="d" + fi + + add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL}$SUFFIX.dll + + echo Done. + else + QT_SDK="C:/Qt/5.7/msvc${MSVC_YEAR}${SUFFIX}" + + add_cmake_opts -DDESIRED_QT_VERSION=5 \ + -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ + -DCMAKE_PREFIX_PATH="$QT_SDK" + + echo Done. fi } cd $DEPS +echo # SDL2 -printf "SDL 2.0.3... " +printf "SDL 2.0.4... " { - if [ -d SDL2-2.0.3 ]; then + if [ -d SDL2-2.0.4 ]; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then - rm -rf SDL2-2.0.3 - eval 7z x -y SDL2-2.0.3.zip $STRIP + rm -rf SDL2-2.0.4 + eval 7z x -y SDL2-2.0.4.zip $STRIP fi - export SDL2DIR="`real_pwd`/SDL2-2.0.3" + export SDL2DIR="$(real_pwd)/SDL2-2.0.4" - add_runtime_dlls $SDL2DIR/lib/x$ARCHSUFFIX/SDL2.dll + add_runtime_dlls "${SDL2DIR}/lib/x${ARCHSUFFIX}/SDL2.dll" echo Done. } +echo cd $DEPS_INSTALL/.. @@ -575,12 +639,10 @@ add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_MYGUI_PLUGIN=no \ -DOPENMW_MP_BUILD=on -if [ -z $CI ]; then - echo " (Outside of CI, doing full build.)" -else +if [ ! -z $CI ]; then case $STEP in components ) - echo " Subproject: Components." + echo " Building subproject: Components." add_cmake_opts -DBUILD_ESSIMPORTER=no \ -DBUILD_LAUNCHER=no \ -DBUILD_MWINIIMPORTER=no \ @@ -588,77 +650,80 @@ else -DBUILD_OPENMW=no \ -DBUILD_WIZARD=no ;; + openmw ) - echo " Subproject: OpenMW." + echo " Building subproject: OpenMW." add_cmake_opts -DBUILD_ESSIMPORTER=no \ -DBUILD_LAUNCHER=no \ -DBUILD_MWINIIMPORTER=no \ -DBUILD_OPENCS=no \ -DBUILD_WIZARD=no ;; + opencs ) - echo " Subproject: OpenCS." + echo " Building subproject: OpenCS." add_cmake_opts -DBUILD_ESSIMPORTER=no \ -DBUILD_LAUNCHER=no \ -DBUILD_MWINIIMPORTER=no \ -DBUILD_OPENMW=no \ -DBUILD_WIZARD=no ;; + misc ) - echo " Subproject: Misc." + echo " Building subprojects: Misc." add_cmake_opts -DBUILD_OPENCS=no \ -DBUILD_OPENMW=no ;; - * ) - echo " Building everything." - ;; esac fi if [ -z $VERBOSE ]; then - printf " Configuring... " + printf "- Configuring... " else - echo " cmake .. $CMAKE_OPTS" + echo "- cmake .. $CMAKE_OPTS" fi run_cmd cmake .. $CMAKE_OPTS RET=$? if [ -z $VERBOSE ]; then - if [ $RET -eq 0 ]; then echo Done. - else echo Failed.; fi + if [ $RET -eq 0 ]; then + echo Done. + else + echo Failed. + fi fi echo # NOTE: Disable this when/if we want to run test cases if [ -z $CI ]; then - echo "Copying Runtime DLLs..." - mkdir -p $CONFIGURATION + echo "- Copying Runtime DLLs..." + mkdir -p $BUILD_CONFIG for DLL in $RUNTIME_DLLS; do echo " `basename $DLL`." - cp "$DLL" $CONFIGURATION/ + cp "$DLL" $BUILD_CONFIG/ done - echo "OSG Plugin DLLs..." - mkdir -p $CONFIGURATION/osgPlugins-3.3.8 + echo "- OSG Plugin DLLs..." + mkdir -p $BUILD_CONFIG/osgPlugins-3.4.0 for DLL in $OSG_PLUGINS; do echo " `basename $DLL`." - cp "$DLL" $CONFIGURATION/osgPlugins-3.3.8 + cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.0 done echo - echo "Copying Runtime Resources/Config Files" + echo "- Copying Runtime Resources/Config Files" - echo " gamecontrollerdb.txt" - cp $CONFIGURATION/../gamecontrollerdb.txt $CONFIGURATION/gamecontrollerdb.txt - echo " openmw.cfg" - cp $CONFIGURATION/../openmw.cfg.install $CONFIGURATION/openmw.cfg - echo " openmw-cs.cfg" - cp $CONFIGURATION/../openmw-cs.cfg $CONFIGURATION/openmw-cs.cfg - echo " settings-default.cfg" - cp $CONFIGURATION/../settings-default.cfg $CONFIGURATION/settings-default.cfg - echo " resources/" - cp -r $CONFIGURATION/../resources $CONFIGURATION/resources + echo " gamecontrollerdb.txt" + cp gamecontrollerdb.txt $BUILD_CONFIG/gamecontrollerdb.txt + echo " openmw.cfg" + cp openmw.cfg.install $BUILD_CONFIG/openmw.cfg + echo " openmw-cs.cfg" + cp openmw-cs.cfg $BUILD_CONFIG/openmw-cs.cfg + echo " settings-default.cfg" + cp settings-default.cfg $BUILD_CONFIG/settings-default.cfg + echo " resources/" + cp -r resources $BUILD_CONFIG/resources fi exit $RET diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index 731c51eda..f8d5a2f24 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -1,5 +1,13 @@ #!/bin/bash +APPVEYOR="" +CI="" + +PACKAGE="" +PLATFORM="" +CONFIGURATION="" +VS_VERSION="" + if [ -z $PLATFORM ]; then PLATFORM=`uname -m` fi @@ -8,39 +16,63 @@ if [ -z $CONFIGURATION ]; then CONFIGURATION="Debug" fi -case $PLATFORM in - x32|x86|i686|i386|win32|Win32 ) - BITS=32 - PLATFORM=Win32 +case $VS_VERSION in + 14|14.0|2015 ) + GENERATOR="Visual Studio 14 2015" + MSVC_YEAR="2015" + MSVC_VER="14.0" ;; +# 12|2013| + * ) + GENERATOR="Visual Studio 12 2013" + MSVC_YEAR="2013" + MVSC_VER="12.0" + ;; +esac + +case $PLATFORM in x64|x86_64|x86-64|win64|Win64 ) BITS=64 - PLATFORM=x64 ;; - * ) - echo "Unknown platform $PLATFORM." - exit 1 ;; + x32|x86|i686|i386|win32|Win32 ) + BITS=32 + ;; +esac + +case $CONFIGURATION in + debug|Debug|DEBUG ) + CONFIGURATION=Debug + ;; + + release|Release|RELEASE ) + CONFIGURATION=Release + ;; + + relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO ) + CONFIGURATION=RelWithDebInfo + ;; esac if [ -z $APPVEYOR ]; then - echo "Running $BITS-bit $CONFIGURATION build outside of Appveyor." + echo "Running ${BITS}-bit MSVC${MSVC_YEAR} ${CONFIGURATION} build outside of Appveyor." DIR=$(echo "$0" | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,") cd $(dirname "$DIR")/.. else - echo "Running $BITS-bit $CONFIGURATION build in Appveyor." + echo "Running ${BITS}-bit MSVC${MSVC_YEAR} ${CONFIGURATION} build in Appveyor." cd $APPVEYOR_BUILD_FOLDER fi -cd build_$BITS +BUILD_DIR="MSVC${MSVC_YEAR}_${BITS}" +cd ${BUILD_DIR} which msbuild > /dev/null if [ $? -ne 0 ]; then msbuild() { - /c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe "$@" + /c/Program\ Files\ \(x86\)/MSBuild/${MSVC_VER}/Bin/MSBuild.exe "$@" } fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f38b8b26..aef39ea11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -599,6 +599,7 @@ if (WIN32) # They're unneeded and sometimes completely retarded warnings that /Wall enables # Not going to bother commenting them as they tend to warn on every standard library file 4061 4263 4264 4266 4350 4371 4435 4514 4548 4571 4610 4619 4623 4625 4626 4628 4640 4668 4710 4711 4820 4826 4917 4946 + 5026 5027 # Warnings that are thrown on standard libraries and not OpenMW 4347 # Non-template function with same name and parameter count as template function @@ -610,8 +611,15 @@ if (WIN32) 4987 # nonstandard extension used (triggered by setjmp.h) 4996 # Function was declared deprecated + # caused by OSG + 4589 # Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced' (False warning) + # caused by boost 4191 # 'type cast' : unsafe conversion (1.56, thread_primitives.hpp, normally off) + 5031 # #pragma warning(pop): likely mismatch, popping warning state pushed in different file (config_begin.hpp, config_end.hpp) + + # caused by MyGUI + 4275 # non dll-interface class 'std::exception' used as base for dll-interface class 'MyGUI::Exception' # OpenMW specific warnings 4099 # Type mismatch, declared class or struct is defined with other type @@ -626,9 +634,11 @@ if (WIN32) 4309 # Variable overflow, trying to store 128 in a signed char for example 4351 # New behavior: elements of array 'array' will be default initialized (desired behavior) 4355 # Using 'this' in member initialization list + 4464 # relative include path contains '..' 4505 # Unreferenced local function has been removed 4701 # Potentially uninitialized local variable used 4702 # Unreachable code + 4714 # function 'QString QString::trimmed(void) &&' marked as __forceinline not inlined 4800 # Boolean optimization warning, e.g. myBool = (myInt != 0) instead of myBool = myInt ) diff --git a/appveyor.yml b/appveyor.yml index 1bc0d3ca6..7eab7a661 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,38 +6,49 @@ branches: - /openmw-.*$/ - appveyor +environment: + matrix: + - msvc: 2013 + - msvc: 2015 + platform: - Win32 -# - x64 +# - x64 -configuration: Debug - -matrix: - fast_finish: true +configuration: + - Debug +# - Release # For the Qt, Boost, CMake, etc installs -os: unstable +os: Visual Studio 2015 # We want the git revision for versioning, # so shallow clones don't work. clone_depth: 1 cache: - - C:\projects\openmw\deps\Bullet-2.83.5-win32.7z - - C:\projects\openmw\deps\Bullet-2.83.5-win64.7z - - C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z - - C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z - - C:\projects\openmw\deps\OSG-3.3.8-win32.7z - - C:\projects\openmw\deps\OSG-3.3.8-win64.7z - - C:\projects\openmw\deps\ffmpeg32-2.5.2.7z - - C:\projects\openmw\deps\ffmpeg32-2.5.2-dev.7z - - C:\projects\openmw\deps\ffmpeg64-2.5.2.7z - - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z + - C:\projects\openmw\deps\Bullet-2.83.7-msvc2013-win32.7z + - C:\projects\openmw\deps\Bullet-2.83.7-msvc2013-win64.7z + - C:\projects\openmw\deps\Bullet-2.83.7-msvc2015-win32.7z + - C:\projects\openmw\deps\Bullet-2.83.7-msvc2015-win64.7z + - C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2013-win32.7z + - C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2013-win32.7z + - C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2015-win64.7z + - C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2015-win64.7z + - C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2013-win32.7z + - C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2013-win32.7z + - C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2015-win64.7z + - C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2015-win64.7z + - C:\projects\openmw\deps\ffmpeg-3.0.1-dev-win32.7z + - C:\projects\openmw\deps\ffmpeg-3.0.1-dev-win64.7z + - C:\projects\openmw\deps\ffmpeg-3.0.1-win32.7z + - C:\projects\openmw\deps\ffmpeg-3.0.1-win64.7z + - C:\projects\openmw\deps\qt-5-install.qs clone_folder: C:\projects\openmw before_build: - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% -v %msvc% build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From 81a9258de942b5394cd6fd5dc49b265df0e50b84 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:48:00 +0200 Subject: [PATCH 07/22] Don't reset the APPVEYOR and CI variables --- CI/before_script.msvc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 72c3e983a..04f89ccd4 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -2,8 +2,8 @@ set -euo pipefail -APPVEYOR="" -CI="" +APPVEYOR=${APPVEYOR:-} +CI=${CI:-} VERBOSE="" STRIP="" From 83de1f2de918aa53392c6c6d212831dff3bcfdb1 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:52:32 +0200 Subject: [PATCH 08/22] And use the correct OpenAL version Should really have run these on a clean dir locally, but time constraints... --- CI/before_script.msvc.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 04f89ccd4..a7df33b23 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -491,16 +491,16 @@ cd $DEPS echo # OpenAL -printf "OpenAL-Soft 1.16.0... " +printf "OpenAL-Soft 1.17.2... " { - if [ -d openal-soft-1.16.0-bin ]; then + if [ -d openal-soft-1.17.2-bin ]; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then - rm -rf openal-soft-1.16.0-bin - eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP + rm -rf openal-soft-1.17.2-bin + eval 7z x -y OpenAL-Soft-1.17.2.zip $STRIP fi - OPENAL_SDK="$(real_pwd)/openal-soft-1.16.0-bin" + OPENAL_SDK="$(real_pwd)/openal-soft-1.17.2-bin" add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" From e47f4a9016ecb156c45cfaad369cdf4e634cbfec Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:54:41 +0200 Subject: [PATCH 09/22] Missing STEP variable --- CI/before_script.msvc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index a7df33b23..3d6c96174 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -4,6 +4,7 @@ set -euo pipefail APPVEYOR=${APPVEYOR:-} CI=${CI:-} +STEP=${STEP:-} VERBOSE="" STRIP="" From bc6aa86b8afabd4e4e4c8ee02dcb9f21099bee10 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:56:53 +0200 Subject: [PATCH 10/22] And escaping the printf input --- CI/before_script.msvc.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 3d6c96174..742da74c5 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -679,7 +679,7 @@ if [ ! -z $CI ]; then fi if [ -z $VERBOSE ]; then - printf "- Configuring... " + printf -- "- Configuring... " else echo "- cmake .. $CMAKE_OPTS" fi @@ -702,13 +702,13 @@ if [ -z $CI ]; then echo "- Copying Runtime DLLs..." mkdir -p $BUILD_CONFIG for DLL in $RUNTIME_DLLS; do - echo " `basename $DLL`." + echo " `basename $DLL`." cp "$DLL" $BUILD_CONFIG/ done echo "- OSG Plugin DLLs..." mkdir -p $BUILD_CONFIG/osgPlugins-3.4.0 for DLL in $OSG_PLUGINS; do - echo " `basename $DLL`." + echo " `basename $DLL`." cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.0 done echo From aa28166f2e02e0db620649f1625510da02e2285c Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 21:59:13 +0200 Subject: [PATCH 11/22] And finally fix the build path Forgot how AppVeyor runs the builds, so fixed it in the wrong place --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7eab7a661..9c179901f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,8 +51,8 @@ before_build: - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% -v %msvc% build_script: - - cmd: if %PLATFORM%==Win32 set build=Build_32 - - cmd: if %PLATFORM%==x64 set build=Build_64 + - cmd: if %PLATFORM%==Win32 set build=MSVC%msvc%_32 + - cmd: if %PLATFORM%==x64 set build=MSVC%msvc%_64 - cmd: msbuild %build%\OpenMW.sln /t:Build /p:Configuration=%configuration% /m:2 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" test: off From d781846f537743e1476899c8d224e2925f0d23a2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 23:23:44 +0200 Subject: [PATCH 12/22] Fix the /bigobj issue and some script cleanup Surprisingly specific problem I must say, 32-bit vs2015 unity builds --- CI/before_script.msvc.sh | 73 +++++++++++++++++++++------------------- CMakeLists.txt | 15 +++++++-- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 742da74c5..949e28bdb 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -118,7 +118,7 @@ run_cmd() { if [ $RET -ne 0 ]; then if [ -z $APPVEYOR ]; then - echo "Command $CMD failed, output can be found in `real_pwd`/output.log" + echo "Command $CMD failed, output can be found in $(real_pwd)/output.log" else echo echo "Command $CMD failed;" @@ -198,7 +198,7 @@ add_osg_dlls() { } if [ -z $PLATFORM ]; then - PLATFORM=`uname -m` + PLATFORM="$(uname -m)" fi if [ -z $CONFIGURATION ]; then @@ -283,7 +283,7 @@ echo mkdir -p deps cd deps -DEPS="`pwd`" +DEPS="$(pwd)" if [ -z $SKIP_DOWNLOAD ]; then echo "Downloading dependency packages." @@ -358,7 +358,7 @@ fi mkdir -p "${BUILD_DIR}/deps" cd "${BUILD_DIR}/deps" -DEPS_INSTALL=`pwd` +DEPS_INSTALL="$(pwd)" cd $DEPS echo @@ -402,7 +402,7 @@ fi BOOST_SDK="c:/Libraries/boost_1_60_0" fi add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib${BITS}-msvc-${MSVC_VER}.0" + -DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.0" echo Done. fi @@ -416,7 +416,7 @@ printf "Bullet 2.83.7... " cd $DEPS_INSTALL if [ -d Bullet ]; then - printf "Exists. (No version checking) " + printf -- "Exists. (No version checking) " elif [ -z $SKIP_EXTRACT ]; then rm -rf Bullet eval 7z x -y "${DEPS}/Bullet-2.83.7-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP @@ -503,8 +503,8 @@ printf "OpenAL-Soft 1.17.2... " OPENAL_SDK="$(real_pwd)/openal-soft-1.17.2-bin" - add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ - -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + add_cmake_opts -DOPENAL_INCLUDE_DIR="${OPENAL_SDK}/include/AL" \ + -DOPENAL_LIBRARY="${OPENAL_SD}K/libs/Win${BITS}/OpenAL32.lib" echo Done. } @@ -538,10 +538,11 @@ printf "OSG 3.4.0-scrawl... " SUFFIX="" fi - add_runtime_dlls "$(pwd)/OSG/bin/"{OpenThreads,zlib}${SUFFIX}.dll \ + add_runtime_dlls "$(pwd)/OSG/bin/"{OpenThreads,zlib,libpng*}${SUFFIX}.dll \ "$(pwd)/OSG/bin/osg"{,Animation,DB,FX,GA,Particle,Text,Util,Viewer}${SUFFIX}.dll - add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.0/osgdb_"{bmp,dds,jpeg,png,tga}${SUFFIX}.dll + add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.0/osgdb_"{bmp,dds,jpeg,osg,png,tga}${SUFFIX}.dll + add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.0/osgdb_serializers_osg"{,animation,fx,ga,particle,text,util,viewer}${SUFFIX}.dll echo Done. } @@ -575,34 +576,36 @@ fi sed -i "s|INSTALL_DIR|$(real_pwd)/Qt|" qt-install.qs sed -i "s/qt.VERSION.winBITS_msvcYEAR/qt.57.win${BITS}_msvc${MSVC_YEAR}${SUFFIX}/" qt-install.qs - printf "(Installation might take a while) " + printf -- "(Installation might take a while) " "${DEPS}/qt-5.7.0-msvc${MSVC_YEAR}-win${BITS}.exe" --script qt-install.qs --silent mv qt-install.qs Qt/ echo Done. printf " Cleaning up extraneous data... " - rm -r "$(real_pwd)/Qt/"{Docs,Examples,Tools,vcredist,MaintenanceTool.*} + rm -r "$(real_pwd)/Qt/"{Docs,Examples,Tools,vcredist,"MaintenanceTool.*"} fi cd $QT_SDK add_cmake_opts -DDESIRED_QT_VERSION=5 \ - -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ + -DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \ -DCMAKE_PREFIX_PATH="$QT_SDK" if [ $CONFIGURATION == "Debug" ]; then SUFFIX="d" + else + SUFFIX="" fi - add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL}$SUFFIX.dll + add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll echo Done. else QT_SDK="C:/Qt/5.7/msvc${MSVC_YEAR}${SUFFIX}" add_cmake_opts -DDESIRED_QT_VERSION=5 \ - -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ + -DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \ -DCMAKE_PREFIX_PATH="$QT_SDK" echo Done. @@ -678,6 +681,25 @@ if [ ! -z $CI ]; then esac fi +# NOTE: Disable this when/if we want to run test cases +if [ -z $CI ]; then + echo "- Copying Runtime DLLs..." + mkdir -p $BUILD_CONFIG + for DLL in $RUNTIME_DLLS; do + echo " $(basename $DLL)." + cp "$DLL" $BUILD_CONFIG/ + done + echo + + echo "- OSG Plugin DLLs..." + mkdir -p $BUILD_CONFIG/osgPlugins-3.4.0 + for DLL in $OSG_PLUGINS; do + echo " $(basename $DLL)." + cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.0 + done + echo +fi + if [ -z $VERBOSE ]; then printf -- "- Configuring... " else @@ -695,26 +717,8 @@ if [ -z $VERBOSE ]; then fi fi -echo - -# NOTE: Disable this when/if we want to run test cases if [ -z $CI ]; then - echo "- Copying Runtime DLLs..." - mkdir -p $BUILD_CONFIG - for DLL in $RUNTIME_DLLS; do - echo " `basename $DLL`." - cp "$DLL" $BUILD_CONFIG/ - done - echo "- OSG Plugin DLLs..." - mkdir -p $BUILD_CONFIG/osgPlugins-3.4.0 - for DLL in $OSG_PLUGINS; do - echo " `basename $DLL`." - cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.0 - done - echo - echo "- Copying Runtime Resources/Config Files" - echo " gamecontrollerdb.txt" cp gamecontrollerdb.txt $BUILD_CONFIG/gamecontrollerdb.txt echo " openmw.cfg" @@ -725,6 +729,7 @@ if [ -z $CI ]; then cp settings-default.cfg $BUILD_CONFIG/settings-default.cfg echo " resources/" cp -r resources $BUILD_CONFIG/resources + echo fi -exit $RET +exit $RET \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index aef39ea11..15fce71ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -599,7 +599,6 @@ if (WIN32) # They're unneeded and sometimes completely retarded warnings that /Wall enables # Not going to bother commenting them as they tend to warn on every standard library file 4061 4263 4264 4266 4350 4371 4435 4514 4548 4571 4610 4619 4623 4625 4626 4628 4640 4668 4710 4711 4820 4826 4917 4946 - 5026 5027 # Warnings that are thrown on standard libraries and not OpenMW 4347 # Non-template function with same name and parameter count as template function @@ -616,7 +615,6 @@ if (WIN32) # caused by boost 4191 # 'type cast' : unsafe conversion (1.56, thread_primitives.hpp, normally off) - 5031 # #pragma warning(pop): likely mismatch, popping warning state pushed in different file (config_begin.hpp, config_end.hpp) # caused by MyGUI 4275 # non dll-interface class 'std::exception' used as base for dll-interface class 'MyGUI::Exception' @@ -642,6 +640,12 @@ if (WIN32) 4800 # Boolean optimization warning, e.g. myBool = (myInt != 0) instead of myBool = myInt ) + if (MSVC_VERSION GREATER 1800) + set(WARNINGS_DISABLE ${WARNINGS_DISABLE} 5026 5027 + 5031 # #pragma warning(pop): likely mismatch, popping warning state pushed in different file (config_begin.hpp, config_end.hpp) + ) + endif() + foreach(d ${WARNINGS_DISABLE}) set(WARNINGS "${WARNINGS} /wd${d}") endforeach(d) @@ -674,7 +678,12 @@ if (WIN32) endif() if (BUILD_OPENMW) - set_target_properties(openmw PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}") + # Very specific issue this, only needed on 32-bit VS2015 during unity builds. + if (MSVC_VERSION GREATER 1800 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND OPENMW_UNITY_BUILD) + set_target_properties(openmw PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD} /bigobj") + else() + set_target_properties(openmw PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}") + endif() endif() if (BUILD_WIZARD) From 6abc3c04bd81d57abb453378e77490f00b73df3c Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 28 Aug 2016 23:26:02 +0200 Subject: [PATCH 13/22] One letter wrong, oops --- CI/before_script.msvc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 949e28bdb..935100c78 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -504,7 +504,7 @@ printf "OpenAL-Soft 1.17.2... " OPENAL_SDK="$(real_pwd)/openal-soft-1.17.2-bin" add_cmake_opts -DOPENAL_INCLUDE_DIR="${OPENAL_SDK}/include/AL" \ - -DOPENAL_LIBRARY="${OPENAL_SD}K/libs/Win${BITS}/OpenAL32.lib" + -DOPENAL_LIBRARY="${OPENAL_SDK}/libs/Win${BITS}/OpenAL32.lib" echo Done. } From 61d97297673557c6e29c5ebb02a9de26f6dd7740 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 29 Aug 2016 00:29:30 +0200 Subject: [PATCH 14/22] A final bit of script cleanup and caching --- CI/before_script.msvc.sh | 2 +- appveyor.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 935100c78..98454a4b9 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -583,7 +583,7 @@ fi echo Done. printf " Cleaning up extraneous data... " - rm -r "$(real_pwd)/Qt/"{Docs,Examples,Tools,vcredist,"MaintenanceTool.*"} + rm -r "$(real_pwd)/Qt/"{dist,Docs,Examples,Tools,vcredist,components.xml,MaintenanceTool.dat,MaintenanceTool.exe,MaintenanceTool.ini,network.xml,qt-install.qs} fi cd $QT_SDK diff --git a/appveyor.yml b/appveyor.yml index 9c179901f..e959792f5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,7 +43,8 @@ cache: - C:\projects\openmw\deps\ffmpeg-3.0.1-dev-win64.7z - C:\projects\openmw\deps\ffmpeg-3.0.1-win32.7z - C:\projects\openmw\deps\ffmpeg-3.0.1-win64.7z - - C:\projects\openmw\deps\qt-5-install.qs + - C:\projects\openmw\deps\OpenAL-Soft-1.17.2.zip + - C:\projects\openmw\deps\SDL2-2.0.4.zip clone_folder: C:\projects\openmw From c93f7b90c54f30d16f506ed09bb98be757cf272d Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 29 Aug 2016 00:37:20 +0200 Subject: [PATCH 15/22] Disable the version changing on AppVeyor Apparently it breaks the build detail links on GitHub, not really acceptable that. --- CI/before_script.msvc.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 98454a4b9..acf85d984 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -103,9 +103,7 @@ if [ -z $APPVEYOR ]; then else echo "Running prebuild in Appveyor." - cd ${APPVEYOR_BUILD_FOLDER:-} - VERSION="$(cat README.md | grep Version: | awk '{ print $3; }')-$(git rev-parse --short HEAD)" - appveyor UpdateBuild -Version "$VERSION" > /dev/null & + cd "$APPVEYOR_BUILD_FOLDER" fi run_cmd() { From bcaf160eab972421abbd1e83bcb97cef61a13b5e Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 29 Aug 2016 07:07:50 +0200 Subject: [PATCH 16/22] Add some missing Qt DLLs --- CI/before_script.msvc.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index acf85d984..61343c104 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -195,6 +195,11 @@ add_osg_dlls() { OSG_PLUGINS="$OSG_PLUGINS $@" } +QT_PLATFORMS="" +add_qt_platform_dlls() { + QT_PLATFORMS="$QT_PLATFORMS $@" +} + if [ -z $PLATFORM ]; then PLATFORM="$(uname -m)" fi @@ -596,7 +601,9 @@ fi SUFFIX="" fi - add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll + add_runtime_dlls "$(pwd)/bin/lib"{EGL,GLESv2}${SUFFIX}.dll \ + "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll + add_qt_platform_dlls "$(pwd)/plugins/platforms/qwindows${SUFFIX}.dll" echo Done. else @@ -696,6 +703,14 @@ if [ -z $CI ]; then cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.0 done echo + + echo "- Qt Platform DLLs..." + mkdir -p ${BUILD_CONFIG}/platforms + for DLL in $QT_PLATFORMS; do + echo " $(basename $DLL)" + cp "$DLL" "${BUILD_CONFIG}/platforms" + done + echo fi if [ -z $VERBOSE ]; then From a5da3a269eba5770a75fe14382c512492d3037ed Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 29 Aug 2016 12:20:00 +0200 Subject: [PATCH 17/22] Fix shadowing warnings --- components/compiler/scanner.cpp | 12 ++++++------ components/esm/inventorystate.cpp | 6 +++--- components/interpreter/interpreter.cpp | 4 ++-- components/interpreter/miscopcodes.hpp | 2 +- components/nifosg/nifloader.cpp | 8 ++++---- components/shader/shadervisitor.cpp | 18 +++++++++--------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index b370f74a1..720fde9f1 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -260,7 +260,7 @@ namespace Compiler return true; } - static const char *keywords[] = + static const char *sKeywords[] = { "begin", "end", "short", "long", "float", @@ -306,11 +306,11 @@ namespace Compiler std::string lowerCase = Misc::StringUtils::lowerCase(name); - for (; keywords[i]; ++i) - if (lowerCase==keywords[i]) + for (; sKeywords[i]; ++i) + if (lowerCase==sKeywords[i]) break; - if (keywords[i]) + if (sKeywords[i]) { cont = parser.parseKeyword (i, loc, *this); return true; @@ -618,8 +618,8 @@ namespace Compiler void Scanner::listKeywords (std::vector& keywords) { - for (int i=0; Compiler::keywords[i]; ++i) - keywords.push_back (Compiler::keywords[i]); + for (int i=0; Compiler::sKeywords[i]; ++i) + keywords.push_back (Compiler::sKeywords[i]); if (mExtensions) mExtensions->listKeywords (keywords); diff --git a/components/esm/inventorystate.cpp b/components/esm/inventorystate.cpp index b24128ec3..73db72b00 100644 --- a/components/esm/inventorystate.cpp +++ b/components/esm/inventorystate.cpp @@ -65,11 +65,11 @@ void ESM::InventoryState::load (ESMReader &esm) while (esm.isNextSub("EQUI")) { esm.getSubHeader(); - int index; - esm.getT(index); + int equipIndex; + esm.getT(equipIndex); int slot; esm.getT(slot); - mEquipmentSlots[index] = slot; + mEquipmentSlots[equipIndex] = slot; } mSelectedEnchantItem = -1; diff --git a/components/interpreter/interpreter.cpp b/components/interpreter/interpreter.cpp index 1892e4a6f..e77a0bb72 100644 --- a/components/interpreter/interpreter.cpp +++ b/components/interpreter/interpreter.cpp @@ -241,9 +241,9 @@ namespace Interpreter while (mRuntime.getPC()>=0 && mRuntime.getPC()recType == Nif::RC_NiUVController) { - const Nif::NiUVController *uvctrl = static_cast(ctrl.getPtr()); + const Nif::NiUVController *niuvctrl = static_cast(ctrl.getPtr()); std::set texUnits; for (unsigned int i=0; i ctrl = new UVController(uvctrl->data.getPtr(), texUnits); - setupController(uvctrl, ctrl, animflags); - composite->addController(ctrl); + osg::ref_ptr uvctrl = new UVController(niuvctrl->data.getPtr(), texUnits); + setupController(niuvctrl, uvctrl, animflags); + composite->addController(uvctrl); } else if (ctrl->recType == Nif::RC_NiVisController) { diff --git a/components/shader/shadervisitor.cpp b/components/shader/shadervisitor.cpp index dbba721c2..041b568df 100644 --- a/components/shader/shadervisitor.cpp +++ b/components/shader/shadervisitor.cpp @@ -154,11 +154,11 @@ namespace Shader if (mAutoUseNormalMaps && diffuseMap != NULL && normalMap == NULL) { - std::string normalMap = diffuseMap->getImage(0)->getFileName(); + std::string normalMapFileName = diffuseMap->getImage(0)->getFileName(); osg::ref_ptr image; bool normalHeight = false; - std::string normalHeightMap = normalMap; + std::string normalHeightMap = normalMapFileName; boost::replace_last(normalHeightMap, ".", mNormalHeightMapPattern + "."); if (mImageManager.getVFS()->exists(normalHeightMap)) { @@ -167,10 +167,10 @@ namespace Shader } else { - boost::replace_last(normalMap, ".", mNormalMapPattern + "."); - if (mImageManager.getVFS()->exists(normalMap)) + boost::replace_last(normalMapFileName, ".", mNormalMapPattern + "."); + if (mImageManager.getVFS()->exists(normalMapFileName)) { - image = mImageManager.getImage(normalMap); + image = mImageManager.getImage(normalMapFileName); } } @@ -196,11 +196,11 @@ namespace Shader } if (mAutoUseSpecularMaps && diffuseMap != NULL && specularMap == NULL) { - std::string specularMap = diffuseMap->getImage(0)->getFileName(); - boost::replace_last(specularMap, ".", mSpecularMapPattern + "."); - if (mImageManager.getVFS()->exists(specularMap)) + std::string specularMapFileName = diffuseMap->getImage(0)->getFileName(); + boost::replace_last(specularMapFileName, ".", mSpecularMapPattern + "."); + if (mImageManager.getVFS()->exists(specularMapFileName)) { - osg::ref_ptr specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMap))); + osg::ref_ptr specularMapTex (new osg::Texture2D(mImageManager.getImage(specularMapFileName))); specularMapTex->setWrap(osg::Texture::WRAP_S, diffuseMap->getWrap(osg::Texture::WRAP_S)); specularMapTex->setWrap(osg::Texture::WRAP_T, diffuseMap->getWrap(osg::Texture::WRAP_T)); specularMapTex->setFilter(osg::Texture::MIN_FILTER, diffuseMap->getFilter(osg::Texture::MIN_FILTER)); From 4322e76cb6de6759bd7d31d382fe1cb602666e13 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 29 Aug 2016 12:38:24 +0200 Subject: [PATCH 18/22] Fix shadowing warnings --- components/fontloader/fontloader.cpp | 4 ++-- components/interpreter/defines.cpp | 2 +- components/terrain/buffercache.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index b66fbbb20..aa92a01c6 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -58,7 +58,7 @@ namespace } for (size_t j = 0; j < numbytes; ++j) { - unsigned char ch = utf8[i++]; + ch = utf8[i++]; if (ch < 0x80 || ch > 0xBF) throw std::logic_error("not a UTF-8 string"); unicode <<= 6; @@ -374,7 +374,7 @@ namespace Gui if (it->first != i) continue; - MyGUI::xml::ElementPtr code = codes->createChild("Code"); + code = codes->createChild("Code"); code->addAttribute("index", it->second); code->addAttribute("coord", MyGUI::utility::toString(x1) + " " + MyGUI::utility::toString(y1) + " " diff --git a/components/interpreter/defines.cpp b/components/interpreter/defines.cpp index fafaf1fef..912a5e1d9 100644 --- a/components/interpreter/defines.cpp +++ b/components/interpreter/defines.cpp @@ -172,7 +172,7 @@ namespace Interpreter{ for(unsigned int j = 0; j < globals.size(); j++){ if(globals[j].length() > temp.length()){ // Just in case there's a global with a huuuge name - std::string temp = text.substr(i+1, globals[j].length()); + temp = text.substr(i+1, globals[j].length()); transform(temp.begin(), temp.end(), temp.begin(), ::tolower); } diff --git a/components/terrain/buffercache.cpp b/components/terrain/buffercache.cpp index a72dac026..40ca1efca 100644 --- a/components/terrain/buffercache.cpp +++ b/components/terrain/buffercache.cpp @@ -124,7 +124,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int // West size_t col = 0; outerStep = size_t(1) << (lodDeltas[Terrain::West] + lodLevel); - for (size_t row = 0; row < verts-1; row += outerStep) + for (row = 0; row < verts-1; row += outerStep) { indices->push_back(verts*col+row+outerStep); indices->push_back(verts*col+row); @@ -148,7 +148,7 @@ osg::ref_ptr createIndexBuffer(unsigned int flags, unsigned int // East col = verts-1; outerStep = size_t(1) << (lodDeltas[Terrain::East] + lodLevel); - for (size_t row = 0; row < verts-1; row += outerStep) + for (row = 0; row < verts-1; row += outerStep) { indices->push_back(verts*col+row); indices->push_back(verts*col+row+outerStep); From c9d4ff35c494bc088be9f07d70f0f40180eb952b Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 29 Aug 2016 18:40:40 +0200 Subject: [PATCH 19/22] Install Qt5 platform DLLs on Windows --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15fce71ca..e028844c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -441,7 +441,10 @@ if(WIN32) INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/Release/Plugin_MyGUI_OpenMW_Resources.dll" DESTINATION ".") ENDIF(BUILD_MYGUI_PLUGIN) - INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ".") + INSTALL(DIRECTORY + "${OpenMW_BINARY_DIR}/Release/platforms" + "${OpenMW_BINARY_DIR}/resources" + DESTINATION ".") FILE(GLOB plugin_dir "${OpenMW_BINARY_DIR}/Release/osgPlugins-*") INSTALL(DIRECTORY ${plugin_dir} DESTINATION ".") From b944c8716ed8ecc863fdd4cb8473c98ff6d46f76 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 30 Aug 2016 19:00:27 +0200 Subject: [PATCH 20/22] bump OSG to 3.4 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3641459de..d6b939ab9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ addons: # Audio & Video libsdl2-dev, libqt4-dev, libopenal-dev, # The other from OpenMW ppa - libbullet-dev, libswresample-dev, libopenscenegraph-dev, libmygui-dev + libbullet-dev, libswresample-dev, libopenscenegraph-3.4-dev, libmygui-dev ] coverity_scan: @@ -42,7 +42,7 @@ addons: description: "" notification_email: scrawl@baseoftrash.de build_command_prepend: "cmake . -DBUILD_UNITTESTS=FALSE" - build_command: "make -j2" + build_command: "make -j3" branch_pattern: coverity_scan matrix: include: From b67d7ec1e0ac2e4990f5212aba032ddd8867554f Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 30 Aug 2016 19:12:18 +0200 Subject: [PATCH 21/22] apparently the lib needs to go in as well --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6b939ab9..fe72a4c10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ addons: libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, # Audio & Video libsdl2-dev, libqt4-dev, libopenal-dev, - # The other from OpenMW ppa - libbullet-dev, libswresample-dev, libopenscenegraph-3.4-dev, libmygui-dev + # The other ones from OpenMW ppa + libbullet-dev, libswresample-dev, libopenscenegraph-3.4-130, libopenscenegraph-3.4-dev, libmygui-dev ] coverity_scan: From b39516466f1c91738e79e7c1f07566dd7664642c Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 30 Aug 2016 20:09:28 +0200 Subject: [PATCH 22/22] lib was unnecessary, deps for travis included openthreads20 which is now built on ppa with osg-3.4 package. translation: fixed on ppa side --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe72a4c10..574fe1ba8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ addons: # Audio & Video libsdl2-dev, libqt4-dev, libopenal-dev, # The other ones from OpenMW ppa - libbullet-dev, libswresample-dev, libopenscenegraph-3.4-130, libopenscenegraph-3.4-dev, libmygui-dev + libbullet-dev, libswresample-dev, libopenscenegraph-3.4-dev, libmygui-dev ] coverity_scan: