From 956234cde999034c5e0a7af27d43818d4252b660 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 2 Jun 2015 23:11:09 +0200 Subject: [PATCH 01/42] Add preliminary appveyor data --- CI/before_script.msvc.sh | 331 +++++++++++++++++++++++++++++++++++++++ CI/build.msvc.sh | 22 +++ appveyor.yml | 20 +++ 3 files changed, 373 insertions(+) create mode 100644 CI/before_script.msvc.sh create mode 100644 CI/build.msvc.sh create mode 100644 appveyor.yml diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh new file mode 100644 index 000000000..9f94d5f31 --- /dev/null +++ b/CI/before_script.msvc.sh @@ -0,0 +1,331 @@ +#!/bin/bash + +while [ $# -gt 0 ]; do + ARG=$1 + shift + + case $ARG in + -v ) + VERBOSE=true ;; + + x86|i686|win32 ) + platform=i686 ;; + + x64_64|x64|win64 ) + platform=x86_64 ;; + + * ) + echo "Unknown arg $ARG." ;; + esac +done + +if [ -z $VERBOSE ]; then + STRIP="> /dev/null 2>&1" +fi + +cd $(dirname $0)/.. +which appveyor > /dev/null +if [ $? -eq 0 ]; then + VERSION="$(cat README.md | grep Version: | awk '{ print $3; }')-$(git rev-parse --short HEAD)" + appveyor UpdateBuild -Version "$VERSION" +fi + +download() { + if ! [ -f $2 ]; then + printf " Downloading $2... " + + if [ -z $VERBOSE ]; then + curl --silent --retry 10 -kLy 5 -o $2 $1 + RET=$? + else + curl --retry 10 -kLy 5 -o $2 $1 + RET=$? + fi + + if [ $RET -ne 0 ]; then + echo "Failed!" + else + echo "Done" + fi + + return $RET + else + echo " $2 exists, skipping." + fi + + return 0 +} + +real_pwd() { + pwd | sed "s,/\(.\),\1:," +} + +msbuild() { + /c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe $@ +} + +CMAKE_OPTS="" +add_cmake_opts() { + CMAKE_OPTS="$CMAKE_OPTS $@" +} + +if [ -z "$ARCH" ]; then + if [ -z "$platform" ]; then + ARCH=`uname -m` + else + ARCH="$platform" + fi +fi + +if [ $ARCH == x86_64 ]; then + ARCHNAME=x86-64 + ARCHSUFFIX=64 + BITS=64 + + BASE_OPTS="-G\"Visual Studio 12 2013 Win64\"" + add_cmake_opts "-G\"Visual Studio 12 2013 Win64\"" +else + ARCHNAME=x86 + ARCHSUFFIX=86 + BITS=32 + + BASE_OPTS="-G\"Visual Studio 12 2013\" -Tv120_xp" + add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp +fi + +mkdir -p deps +cd deps + +DEPS="`pwd`" + +echo "Downloading dependency packages." +echo + +# Boost +echo "Boost 1.58.0..." +download 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 +echo + +# Bullet +echo "Bullet 2.83.4..." +download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.zip +echo + +# FFmpeg +echo "FFmpeg 2.5.2..." +download http://ffmpeg.zeranoe.com/builds/win$BITS/shared/ffmpeg-2.5.2-win$BITS-shared.7z ffmpeg$BITS-2.5.2.7z +download http://ffmpeg.zeranoe.com/builds/win$BITS/dev/ffmpeg-2.5.2-win$BITS-dev.7z ffmpeg$BITS-2.5.2-dev.7z +echo + +# MyGUI +echo "MyGUI 3.2.2..." +download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/MyGUI-3.2.2-win$BITS.7z MyGUI-3.2.2-win$BITS.7z +echo + +# Ogre +echo "Ogre 1.9..." +download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Ogre-1.9-win$BITS.7z Ogre-1.9-win$BITS.7z +echo + +# OpenAL +echo "OpenAL-Soft 1.16.0..." +download http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip OpenAL-Soft-1.16.0.zip +echo + +# Qt +echo "Qt 4.8.6..." +download 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 +echo + +# SDL2 +echo "SDL 2.0.3 binaries..." +download https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip SDL2-2.0.3.zip +echo + +cd .. + +# Set up dependencies +rm -rf build_$BITS +mkdir -p build_$BITS/deps +cd deps + +echo +echo "Extracting dependencies..." +echo + +# Boost +printf "Boost 1.58.0... " +cd ../build_$BITS/deps + +BOOST_SDK="`real_pwd`/Boost" + +$DEPS/boost_1_58_0-msvc-12.0-$BITS.exe //dir="$BOOST_SDK" //verysilent + +add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + +cd $DEPS + +echo Done. +echo + +# Bullet +printf "Bullet 2.83.4... " +cd ../build_$BITS/deps + +eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP +mv Bullet-2.83.4-win$BITS Bullet + +BULLET_SDK="`real_pwd`/Bullet" +add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include" \ + -DBULLET_COLLISION_LIBRARY="$BULLET_SDK/lib/BulletCollision.lib" \ + -DBULLET_COLLISION_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletCollision_Debug.lib" \ + -DBULLET_DYNAMICS_LIBRARY="$BULLET_SDK/lib/BulletDynamics.lib" \ + -DBULLET_DYNAMICS_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletDynamics_Debug.lib" \ + -DBULLET_MATH_LIBRARY="$BULLET_SDK/lib/LinearMath.lib" \ + -DBULLET_MATH_LIBRARY_DEBUG="$BULLET_SDK/lib/LinearMath_Debug.lib" + +cd $DEPS + +echo Done. +echo + +# FFmpeg +printf "FFmpeg 2.5.2... " +cd ../build_$BITS/deps + +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 + +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 + +FFMPEG_SDK="`real_pwd`/FFmpeg" +add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVCODEC_LIBRARIES="$FFMPEG_SDK/lib/avcodec.lib" \ + -DAVDEVICE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVDEVICE_LIBRARIES="$FFMPEG_SDK/lib/avdevice.lib" \ + -DAVFORMAT_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVFORMAT_LIBRARIES="$FFMPEG_SDK/lib/avformat.lib" \ + -DAVUTIL_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVUTIL_LIBRARIES="$FFMPEG_SDK/lib/avutil.lib" \ + -DPOSTPROC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DPOSTPROC_LIBRARIES="$FFMPEG_SDK/lib/postproc.lib" \ + -DSWRESAMPLE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DSWRESAMPLE_LIBRARIES="$FFMPEG_SDK/lib/swresample.lib" \ + -DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib" + +if [ $BITS -eq 32 ]; then + add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" +fi + +cd $DEPS + +echo Done. +echo + +# Ogre +printf "Ogre 1.9... " +cd ../build_$BITS/deps + +eval 7z x -y $DEPS/Ogre-1.9-win$BITS.7z $STRIP +mv Ogre-1.9-win$BITS Ogre + +OGRE_SDK="`real_pwd`/Ogre" + +add_cmake_opts -DOGRE_SDK="$OGRE_SDK" + +cd $DEPS + +echo Done. +echo + +# MyGUI +printf "MyGUI 3.2.2... " +cd ../build_$BITS/deps + +eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP +mv MyGUI-3.2.2-win$BITS MyGUI + +MYGUI_SDK="`real_pwd`/MyGUI" + +add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ + -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ + -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ + -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.hpp" + +cd $DEPS + +echo Done. +echo + +# OpenAL +printf "OpenAL-Soft 1.16.0... " +eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP + +OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" + +add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \ + -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + +echo Done. +echo + +# Qt +printf "Qt 4.8.6 binaries... " +cd ../build_$BITS/deps + +eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP +mv qt-4.8.6-* Qt + +QT_SDK="`real_pwd`/Qt" + +cd $QT_SDK +eval qtbinpatcher.exe $STRIP + +add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" + +cd $DEPS + +echo Done. +echo + +# SDL2 +printf "SDL 2.0.3 binaries... " +eval 7z x -y SDL2-2.0.3.zip $STRIP + +SDL_SDK="`real_pwd`/SDL2-2.0.3" +add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ + -DSDL2MAIN_LIBRARY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2main.lib" \ + -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ + -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" + +cd $DEPS + +echo Done. +echo + +cd ../build_$BITS + +echo "Building OpenMW." + +add_cmake_opts -DBUILD_BSATOOL=no \ + -DBUILD_ESMTOOL=no \ + -DBUILD_MYGUI_PLUGIN=no + +if [ -z $VERBOSE ]; then + printf " Configuring... " +else + echo " cmake .. $CMAKE_OPTS" +fi + +eval cmake .. $CMAKE_OPTS $STRIP +RET=$? + +if [ -z $VERBOSE ]; then echo Done.; fi + +echo + +exit $RET \ No newline at end of file diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh new file mode 100644 index 000000000..101aa8827 --- /dev/null +++ b/CI/build.msvc.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +while [ $# -gt 0 ]; do + ARG=$1 + shift + + case $ARG in + x86|i686|win32 ) + BITS=32 ;; + + x64_64|x64|win64 ) + BITS=64 ;; + + * ) + echo "Unknown arg $ARG." + exit 1 ;; + esac +done + +cd $(dirname $0)/../build_$BITS + +msbuild OpenMW.sln //t:Build //p:Configuration=Release //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..3bb773d28 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,20 @@ +version: "{build}" + +platform: + - Win32 + - x64 + +matrix: + fast_finish: true + +init: + - cmd: cmake --version + - cmd: msbuild /version + +clone_folder: C:\projects\openmw + +build: + - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% + +before_build: + - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% From db521cddadc51875dcc43ab1108506fc04668ac4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 2 Jun 2015 23:23:03 +0200 Subject: [PATCH 02/42] Needs to be spaces and not tabs --- appveyor.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3bb773d28..399be0c38 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,20 +1,20 @@ version: "{build}" platform: - - Win32 - - x64 + - Win32 + - x64 matrix: - fast_finish: true + fast_finish: true init: - - cmd: cmake --version - - cmd: msbuild /version + - cmd: cmake --version + - cmd: msbuild /version clone_folder: C:\projects\openmw build: - - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% + - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% before_build: - - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% + - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% From cd4042109a5046707dfa1f07d93e41f9a34d569b Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 2 Jun 2015 23:29:47 +0200 Subject: [PATCH 03/42] Fix the script issues --- CI/build.msvc.sh | 25 ++++++++++--------------- appveyor.yml | 8 ++++++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index 101aa8827..b19325689 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -1,22 +1,17 @@ #!/bin/bash -while [ $# -gt 0 ]; do - ARG=$1 - shift +case $1 in + x86|i686|win32 ) + BITS=32 ;; - case $ARG in - x86|i686|win32 ) - BITS=32 ;; + x64_64|x64|win64 ) + BITS=64 ;; - x64_64|x64|win64 ) - BITS=64 ;; - - * ) - echo "Unknown arg $ARG." - exit 1 ;; - esac -done + * ) + echo "Unknown platform $ARG." + exit 1 ;; +esac cd $(dirname $0)/../build_$BITS -msbuild OpenMW.sln //t:Build //p:Configuration=Release //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +msbuild OpenMW.sln //t:Build //p:Configuration=$2 //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" diff --git a/appveyor.yml b/appveyor.yml index 399be0c38..896c0b464 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,10 @@ platform: - Win32 - x64 +configuration: + - Debug + - Release + matrix: fast_finish: true @@ -13,8 +17,8 @@ init: clone_folder: C:\projects\openmw -build: - - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% +build_script: + - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% %configuration% before_build: - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% From d7494128a2edd645fa2b4e7bd9a30964a2b3decf Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 2 Jun 2015 23:50:52 +0200 Subject: [PATCH 04/42] More script fixes --- CI/before_script.msvc.sh | 67 ++++++++++++++++++++++++---------------- CI/build.msvc.sh | 10 +++--- appveyor.yml | 20 ++++++++++-- 3 files changed, 64 insertions(+), 33 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 9f94d5f31..8c44a5b9e 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -8,14 +8,9 @@ while [ $# -gt 0 ]; do -v ) VERBOSE=true ;; - x86|i686|win32 ) - platform=i686 ;; - - x64_64|x64|win64 ) - platform=x86_64 ;; - * ) - echo "Unknown arg $ARG." ;; + echo "Unknown arg $ARG." + exit 1 ;; esac done @@ -23,9 +18,14 @@ if [ -z $VERBOSE ]; then STRIP="> /dev/null 2>&1" fi -cd $(dirname $0)/.. -which appveyor > /dev/null -if [ $? -eq 0 ]; then +if [ -z $APPVEYOR ]; then + echo "Running prebuild outside of Appveyor." + + cd $(dirname $0)/.. +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" fi @@ -70,28 +70,43 @@ add_cmake_opts() { } if [ -z "$ARCH" ]; then - if [ -z "$platform" ]; then + if [ -z "$PLATFORM" ]; then ARCH=`uname -m` else - ARCH="$platform" + ARCH="$PLATFORM" fi fi -if [ $ARCH == x86_64 ]; then - ARCHNAME=x86-64 - ARCHSUFFIX=64 - BITS=64 +case $PLATFORM in + x64|x86_64|x86-64|win64|Win64 ) + ARCHNAME=x86-64 + ARCHSUFFIX=64 + BITS=64 - BASE_OPTS="-G\"Visual Studio 12 2013 Win64\"" - add_cmake_opts "-G\"Visual Studio 12 2013 Win64\"" -else - ARCHNAME=x86 - ARCHSUFFIX=86 - BITS=32 + BASE_OPTS="-G\"Visual Studio 12 2013 Win64\"" + add_cmake_opts "-G\"Visual Studio 12 2013 Win64\"" + ;; - BASE_OPTS="-G\"Visual Studio 12 2013\" -Tv120_xp" - add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp -fi + x32|x86|i686|i386|win32|Win32 ) + ARCHNAME=x86 + ARCHSUFFIX=86 + BITS=32 + + BASE_OPTS="-G\"Visual Studio 12 2013\" -Tv120_xp" + add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp + ;; + + * ) + echo "Unknown platform $PLATFORM." + exit 1 + ;; +esac + +echo +echo "==========================" +echo "Starting prebuild on win$BITS" +echo "==========================" +echo mkdir -p deps cd deps @@ -108,7 +123,7 @@ echo # Bullet echo "Bullet 2.83.4..." -download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.zip +download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.7z echo # FFmpeg diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index b19325689..34ce3d062 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -1,17 +1,17 @@ #!/bin/bash -case $1 in - x86|i686|win32 ) +case $PLATFORM in + x32|x86|i686|i386|win32|Win32 ) BITS=32 ;; - x64_64|x64|win64 ) + x64|x86_64|x86-64|win64|Win64 ) BITS=64 ;; * ) - echo "Unknown platform $ARG." + echo "Unknown platform $PLATFORM." exit 1 ;; esac cd $(dirname $0)/../build_$BITS -msbuild OpenMW.sln //t:Build //p:Configuration=$2 //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" diff --git a/appveyor.yml b/appveyor.yml index 896c0b464..f466b2b82 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,14 +11,30 @@ configuration: matrix: fast_finish: true +cache: + - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\Ogre-1.9-win32.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\Ogre-1.9-win64.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\ffmpeg32-2.5.2.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\ffmpeg64-2.5.2.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\OpenAL-Soft-1.16.0.zip -> CI/before_script.msvc.sh + - C:\projects\openmw\deps\SDL2-2.0.3.zip -> CI/before_script.msvc.sh + init: + - cmd: bash --version - cmd: cmake --version - cmd: msbuild /version + - cmd: echo. clone_folder: C:\projects\openmw build_script: - - cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% %configuration% + - cmd: sh C:\projects\openmw\CI\build.msvc.sh before_build: - - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% + - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh From 6993fbaece237f6e0a9d49419e0fd6c31241126a Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 2 Jun 2015 23:52:34 +0200 Subject: [PATCH 05/42] And yet more issues slip past --- 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 8c44a5b9e..ca4479dea 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -174,7 +174,7 @@ cd ../build_$BITS/deps BOOST_SDK="`real_pwd`/Boost" -$DEPS/boost_1_58_0-msvc-12.0-$BITS.exe //dir="$BOOST_SDK" //verysilent +$DEPS/boost-1.58.0-win$BITS.exe //dir="$BOOST_SDK" //verysilent add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" From 0a1454d5ecbba634cb2256dee0611e31a988786a Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 00:51:22 +0200 Subject: [PATCH 06/42] Final fixes, moving to Appveyor unstable for boost --- CI/before_script.msvc.sh | 72 +++++++++++++++++++++++++++++++--------- appveyor.yml | 6 ++-- 2 files changed, 60 insertions(+), 18 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index ca4479dea..3bd9c490f 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -21,7 +21,8 @@ fi if [ -z $APPVEYOR ]; then echo "Running prebuild outside of Appveyor." - cd $(dirname $0)/.. + DIR=$(echo "$0" | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,") + cd $(dirname "$DIR") else echo "Running prebuild in Appveyor." @@ -30,6 +31,33 @@ else appveyor UpdateBuild -Version "$VERSION" fi +run_cmd() { + CMD="$1" + shift + + if [ -z $VERBOSE ]; then + eval $CMD $@ > output.log 2>&1 + RET=$? + + if [ $RET -ne 0 ]; then + if [ -z $APPVEYOR ]; then + echo "Command $CMD failed, output can be found in `real_pwd`/output.log" + exit $RET + else + appveyor PushArtifact output.log -DeploymentName $CMD-output.log + appveyor AddMessage "Command $CMD failed ($RET), output has been pushed as an artifact." -Category Error + fi + else + rm output.log + fi + + return $RET + else + eval $CMD $@ + return $? + fi +} + download() { if ! [ -f $2 ]; then printf " Downloading $2... " @@ -117,9 +145,11 @@ echo "Downloading dependency packages." echo # Boost -echo "Boost 1.58.0..." -download 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 -echo +if [ -z $APPVEYOR ]; then + echo "Boost 1.58.0..." + download 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 + echo +fi # Bullet echo "Bullet 2.83.4..." @@ -169,20 +199,27 @@ echo "Extracting dependencies..." echo # Boost -printf "Boost 1.58.0... " -cd ../build_$BITS/deps +if [ -z $APPVEYOR ]; then + printf "Boost 1.58.0... " + cd ../build_$BITS/deps -BOOST_SDK="`real_pwd`/Boost" + BOOST_SDK="`real_pwd`/Boost" -$DEPS/boost-1.58.0-win$BITS.exe //dir="$BOOST_SDK" //verysilent + $DEPS/boost-1.58.0-win$BITS.exe //dir="$BOOST_SDK" //verysilent -add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" -cd $DEPS + cd $DEPS -echo Done. -echo + echo Done. + echo +else + # Appveyor unstable has all the boost we need already + BOOST_SDK="c:/Libraries/boost" + add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" +fi # Bullet printf "Bullet 2.83.4... " @@ -269,7 +306,7 @@ MYGUI_SDK="`real_pwd`/MyGUI" add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ - -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.hpp" + -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" cd $DEPS @@ -336,10 +373,13 @@ else echo " cmake .. $CMAKE_OPTS" fi -eval cmake .. $CMAKE_OPTS $STRIP +run_cmd cmake .. $CMAKE_OPTS RET=$? -if [ -z $VERBOSE ]; then echo Done.; fi +if [ -z $VERBOSE ]; then + if [ $RET -eq 0 ]; then echo Done.; fi + else echo Failed!; fi +fi echo diff --git a/appveyor.yml b/appveyor.yml index f466b2b82..890b9684b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,8 @@ configuration: matrix: fast_finish: true +os: unstable + cache: - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh - C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh @@ -34,7 +36,7 @@ init: clone_folder: C:\projects\openmw build_script: - - cmd: sh C:\projects\openmw\CI\build.msvc.sh + - cmd: bash --login C:\projects\openmw\CI\build.msvc.sh before_build: - - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh + - cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh From ba9b21bc296f25d5dd1d951badd44544fd195ee7 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 01:18:10 +0200 Subject: [PATCH 07/42] Moving dependencies to a better place --- CI/before_script.msvc.sh | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 3bd9c490f..56d56762f 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -44,8 +44,10 @@ run_cmd() { echo "Command $CMD failed, output can be found in `real_pwd`/output.log" exit $RET else - appveyor PushArtifact output.log -DeploymentName $CMD-output.log - appveyor AddMessage "Command $CMD failed ($RET), output has been pushed as an artifact." -Category Error + 7z a output.7z output.log > /dev/null 2>&1 + + appveyor PushArtifact output.7z -DeploymentName $CMD-output.7z + appveyor AddMessage "Command $CMD failed (code $RET), output has been pushed as an artifact." -Category Error fi else rm output.log @@ -153,7 +155,7 @@ fi # Bullet echo "Bullet 2.83.4..." -download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.7z +download http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.7z echo # FFmpeg @@ -164,12 +166,12 @@ echo # MyGUI echo "MyGUI 3.2.2..." -download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/MyGUI-3.2.2-win$BITS.7z MyGUI-3.2.2-win$BITS.7z +download http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-win$BITS.7z MyGUI-3.2.2-win$BITS.7z echo # Ogre echo "Ogre 1.9..." -download https://gist.github.com/ace13/dc6aad628d48338d590e/raw/Ogre-1.9-win$BITS.7z Ogre-1.9-win$BITS.7z +download http://www.lysator.liu.se/~ace/OpenMW/deps/Ogre-1.9-win$BITS.7z Ogre-1.9-win$BITS.7z echo # OpenAL @@ -196,7 +198,6 @@ cd deps echo echo "Extracting dependencies..." -echo # Boost if [ -z $APPVEYOR ]; then @@ -213,7 +214,6 @@ if [ -z $APPVEYOR ]; then cd $DEPS echo Done. - echo else # Appveyor unstable has all the boost we need already BOOST_SDK="c:/Libraries/boost" @@ -240,7 +240,6 @@ add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include" \ cd $DEPS echo Done. -echo # FFmpeg printf "FFmpeg 2.5.2... " @@ -276,7 +275,6 @@ fi cd $DEPS echo Done. -echo # Ogre printf "Ogre 1.9... " @@ -292,7 +290,6 @@ add_cmake_opts -DOGRE_SDK="$OGRE_SDK" cd $DEPS echo Done. -echo # MyGUI printf "MyGUI 3.2.2... " @@ -311,7 +308,6 @@ add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ cd $DEPS echo Done. -echo # OpenAL printf "OpenAL-Soft 1.16.0... " @@ -323,10 +319,9 @@ add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \ -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" echo Done. -echo # Qt -printf "Qt 4.8.6 binaries... " +printf "Qt 4.8.6... " cd ../build_$BITS/deps eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP @@ -342,10 +337,9 @@ add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" cd $DEPS echo Done. -echo # SDL2 -printf "SDL 2.0.3 binaries... " +printf "SDL 2.0.3... " eval 7z x -y SDL2-2.0.3.zip $STRIP SDL_SDK="`real_pwd`/SDL2-2.0.3" @@ -361,7 +355,7 @@ echo cd ../build_$BITS -echo "Building OpenMW." +echo "Building OpenMW..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ @@ -377,8 +371,8 @@ run_cmd cmake .. $CMAKE_OPTS RET=$? if [ -z $VERBOSE ]; then - if [ $RET -eq 0 ]; then echo Done.; fi - else echo Failed!; fi + if [ $RET -eq 0 ]; then echo Done. + else echo Failed.; fi fi echo From 20b7c7b46cf3ada8aa888c51f250cf991bb6a090 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 01:41:45 +0200 Subject: [PATCH 08/42] Hopefully the last fixes, build should run --- CI/before_script.msvc.sh | 16 ++++++++-------- CI/build.msvc.sh | 21 ++++++++++++++++++++- appveyor.yml | 2 ++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 56d56762f..cd4190ea9 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -22,7 +22,7 @@ if [ -z $APPVEYOR ]; then echo "Running prebuild outside of Appveyor." DIR=$(echo "$0" | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,") - cd $(dirname "$DIR") + cd $(dirname "$DIR")/.. else echo "Running prebuild in Appveyor." @@ -99,12 +99,12 @@ add_cmake_opts() { CMAKE_OPTS="$CMAKE_OPTS $@" } -if [ -z "$ARCH" ]; then - if [ -z "$PLATFORM" ]; then - ARCH=`uname -m` - else - ARCH="$PLATFORM" - fi +if [ -z $PLATFORM ]; then + PLATFORM=`uname -m` +fi + +if [ -z $CONFIGURATION ]; then + CONFIGURATION="Debug" fi case $PLATFORM in @@ -206,7 +206,7 @@ if [ -z $APPVEYOR ]; then BOOST_SDK="`real_pwd`/Boost" - $DEPS/boost-1.58.0-win$BITS.exe //dir="$BOOST_SDK" //verysilent + $DEPS/boost-1.58.0-win$BITS.exe //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index 34ce3d062..57f4f6c1d 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -1,5 +1,13 @@ #!/bin/bash +if [ -z $PLATFORM ]; then + PLATFORM=`uname -m` +fi + +if [ -z $CONFIGURATION ]; then + CONFIGURATION="Debug" +fi + case $PLATFORM in x32|x86|i686|i386|win32|Win32 ) BITS=32 ;; @@ -12,6 +20,17 @@ case $PLATFORM in exit 1 ;; esac -cd $(dirname $0)/../build_$BITS +if [ -z $APPVEYOR ]; then + echo "Running $BITS-bit $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." + + cd $APPVEYOR_BUILD_FOLDER +fi + +cd build_$BITS msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" diff --git a/appveyor.yml b/appveyor.yml index 890b9684b..3f8b27e22 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,6 +13,8 @@ matrix: os: unstable +shallow_clone: true + cache: - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh - C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh From 108c2719a85ca915bfe90a67a854fe18cad83fad Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 02:04:31 +0200 Subject: [PATCH 09/42] And yet I forgot about msbuild, should work now --- CI/before_script.msvc.sh | 6 +----- CI/build.msvc.sh | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index cd4190ea9..cefc06fe9 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -46,7 +46,7 @@ run_cmd() { else 7z a output.7z output.log > /dev/null 2>&1 - appveyor PushArtifact output.7z -DeploymentName $CMD-output.7z + appveyor PushArtifact output.7z -FileName $CMD-output.7z appveyor AddMessage "Command $CMD failed (code $RET), output has been pushed as an artifact." -Category Error fi else @@ -90,10 +90,6 @@ real_pwd() { pwd | sed "s,/\(.\),\1:," } -msbuild() { - /c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe $@ -} - CMAKE_OPTS="" add_cmake_opts() { CMAKE_OPTS="$CMAKE_OPTS $@" diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index 57f4f6c1d..b17e7b94c 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -33,4 +33,11 @@ fi cd build_$BITS +which msbuild > /dev/null +if [ $? -ne 0 ]; then + msbuild() { + /c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe "$@" + } +fi + msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" From 3425e9b1d14806cae73d7bc6256c65af55b0206b Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 02:34:45 +0200 Subject: [PATCH 10/42] And done. Switched to a slight less shallow clone too, for better versioning --- CI/before_script.msvc.sh | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index cefc06fe9..36f8213d4 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -225,7 +225,7 @@ eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP mv Bullet-2.83.4-win$BITS Bullet BULLET_SDK="`real_pwd`/Bullet" -add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include" \ +add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include/bullet" \ -DBULLET_COLLISION_LIBRARY="$BULLET_SDK/lib/BulletCollision.lib" \ -DBULLET_COLLISION_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletCollision_Debug.lib" \ -DBULLET_DYNAMICS_LIBRARY="$BULLET_SDK/lib/BulletDynamics.lib" \ diff --git a/appveyor.yml b/appveyor.yml index 3f8b27e22..e46dd3dd8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ matrix: os: unstable -shallow_clone: true +clone_depth: 5 cache: - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh From e49cf2888de2c8a0ef5e3189afbeda0d674d04c9 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 10:15:28 +0200 Subject: [PATCH 11/42] Let's disable everything except OpenMW itself Just to check if it's at all possible to use AppVeyor --- CI/before_script.msvc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 36f8213d4..66f74520c 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -355,7 +355,12 @@ echo "Building OpenMW..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ - -DBUILD_MYGUI_PLUGIN=no + -DBUILD_MYGUI_PLUGIN=no \ + -DBUILD_OPENCS=no \ + -DBUILD_WIZARD=no \ + -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no if [ -z $VERBOSE ]; then printf " Configuring... " @@ -373,4 +378,4 @@ fi echo -exit $RET \ No newline at end of file +exit $RET From 4f2cd1711944b12d6a90d9a54332d91d0ec96c40 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 8 Jun 2015 02:14:20 +0200 Subject: [PATCH 12/42] Let's get some OSG builds going --- CI/before_script.msvc.sh | 250 +++++++++++++++++++++++---------------- CMakeLists.txt | 3 + 2 files changed, 153 insertions(+), 100 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 36f8213d4..a12c17038 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -8,6 +8,15 @@ while [ $# -gt 0 ]; do -v ) VERBOSE=true ;; + -d ) + SKIP_DOWNLOAD=true ;; + + -e ) + SKIP_EXTRACT=true ;; + + -k ) + KEEP=true ;; + * ) echo "Unknown arg $ARG." exit 1 ;; @@ -61,29 +70,46 @@ run_cmd() { } download() { - if ! [ -f $2 ]; then - printf " Downloading $2... " + if [ $# -lt 3 ]; then + echo "Invalid parameters to download." + return 1 + fi - if [ -z $VERBOSE ]; then - curl --silent --retry 10 -kLy 5 -o $2 $1 - RET=$? - else - curl --retry 10 -kLy 5 -o $2 $1 - RET=$? - fi + NAME=$1 + shift - if [ $RET -ne 0 ]; then - echo "Failed!" + echo "$NAME..." + + while [ $# -gt 1 ]; do + URL=$1 + FILE=$2 + shift + shift + + if ! [ -f $FILE ]; then + printf " Downloading $FILE... " + + if [ -z $VERBOSE ]; then + curl --silent --retry 10 -kLy 5 -o $FILE $URL + RET=$? + else + curl --retry 10 -kLy 5 -o $FILE $URL + RET=$? + fi + + if [ $RET -ne 0 ]; then + echo "Failed!" + else + echo "Done." + fi else - echo "Done" + echo " $FILE exists, skipping." fi + done - return $RET - else - echo " $2 exists, skipping." + if [ $# -ne 0 ]; then + echo "Missing parameter." fi - - return 0 } real_pwd() { @@ -134,63 +160,71 @@ echo "Starting prebuild on win$BITS" echo "==========================" echo +# cd OpenMW/AppVeyor-test mkdir -p deps cd deps DEPS="`pwd`" -echo "Downloading dependency packages." -echo - -# Boost -if [ -z $APPVEYOR ]; then - echo "Boost 1.58.0..." - download 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 +if [ -z $SKIP_DOWNLOAD ]; then + echo "Downloading dependency packages." echo -fi - -# Bullet -echo "Bullet 2.83.4..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.7z -echo - -# FFmpeg -echo "FFmpeg 2.5.2..." -download http://ffmpeg.zeranoe.com/builds/win$BITS/shared/ffmpeg-2.5.2-win$BITS-shared.7z ffmpeg$BITS-2.5.2.7z -download http://ffmpeg.zeranoe.com/builds/win$BITS/dev/ffmpeg-2.5.2-win$BITS-dev.7z ffmpeg$BITS-2.5.2-dev.7z -echo - -# MyGUI -echo "MyGUI 3.2.2..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-win$BITS.7z MyGUI-3.2.2-win$BITS.7z -echo - -# Ogre -echo "Ogre 1.9..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/Ogre-1.9-win$BITS.7z Ogre-1.9-win$BITS.7z -echo - -# OpenAL -echo "OpenAL-Soft 1.16.0..." -download http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip OpenAL-Soft-1.16.0.zip -echo -# Qt -echo "Qt 4.8.6..." -download 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 -echo + # 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 + fi -# SDL2 -echo "SDL 2.0.3 binaries..." -download https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip SDL2-2.0.3.zip -echo + # Bullet + download "Bullet 2.83.4" \ + http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z \ + Bullet-2.83.4-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 + + # 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 + + # OpenAL + download "OpenAL-Soft 1.16.0" \ + http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip \ + OpenAL-Soft-1.16.0.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 + + # Qt + 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 + + # SDL2 + download "SDL 2.0.3" \ + https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip \ + SDL2-2.0.3.zip +fi -cd .. +cd .. #/.. # Set up dependencies -rm -rf build_$BITS -mkdir -p build_$BITS/deps -cd deps +if [ -z $KEEP ]; then + rm -rf OSG_$BITS + mkdir -p OSG_$BITS/deps +fi +cd OSG_$BITS/deps + +DEPS_INSTALL=`pwd` echo echo "Extracting dependencies..." @@ -198,11 +232,13 @@ echo "Extracting dependencies..." # Boost if [ -z $APPVEYOR ]; then printf "Boost 1.58.0... " - cd ../build_$BITS/deps + cd $DEPS_INSTALL BOOST_SDK="`real_pwd`/Boost" - $DEPS/boost-1.58.0-win$BITS.exe //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent + if [ -z $SKIP_EXTRACT ]; then + $DEPS/boost-1.58.0-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" @@ -219,10 +255,12 @@ fi # Bullet printf "Bullet 2.83.4... " -cd ../build_$BITS/deps +cd $DEPS_INSTALL -eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP -mv Bullet-2.83.4-win$BITS Bullet +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP + mv Bullet-2.83.4-win$BITS Bullet +fi BULLET_SDK="`real_pwd`/Bullet" add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include/bullet" \ @@ -239,14 +277,16 @@ echo Done. # FFmpeg printf "FFmpeg 2.5.2... " -cd ../build_$BITS/deps +cd $DEPS_INSTALL -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 +if [ -z $SKIP_EXTRACT ]; then + 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 -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-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 +fi FFMPEG_SDK="`real_pwd`/FFmpeg" add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ @@ -272,33 +312,19 @@ cd $DEPS echo Done. -# Ogre -printf "Ogre 1.9... " -cd ../build_$BITS/deps - -eval 7z x -y $DEPS/Ogre-1.9-win$BITS.7z $STRIP -mv Ogre-1.9-win$BITS Ogre - -OGRE_SDK="`real_pwd`/Ogre" - -add_cmake_opts -DOGRE_SDK="$OGRE_SDK" - -cd $DEPS - -echo Done. - # MyGUI printf "MyGUI 3.2.2... " -cd ../build_$BITS/deps +cd $DEPS_INSTALL -eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP -mv MyGUI-3.2.2-win$BITS MyGUI +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP + mv MyGUI-3.2.2-win$BITS MyGUI +fi MYGUI_SDK="`real_pwd`/MyGUI" add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ - -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ - -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ + -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" cd $DEPS @@ -307,7 +333,9 @@ echo Done. # OpenAL printf "OpenAL-Soft 1.16.0... " -eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP +fi OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" @@ -316,12 +344,31 @@ add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \ echo Done. +# OSG +printf "OSG 3.3.8... " +cd $DEPS_INSTALL + +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y $DEPS/OSG-3.3.8-win$BITS.7z $STRIP + mv OSG-3.3.8-win$BITS OSG +fi + +OSG_SDK="`real_pwd`/OSG" + +add_cmake_opts -DOSG_DIR="$OSG_SDK" + +cd $DEPS + +echo Done. + # Qt printf "Qt 4.8.6... " -cd ../build_$BITS/deps +cd $DEPS_INSTALL -eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP -mv qt-4.8.6-* Qt +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP + mv qt-4.8.6-* Qt +fi QT_SDK="`real_pwd`/Qt" @@ -336,7 +383,10 @@ echo Done. # SDL2 printf "SDL 2.0.3... " -eval 7z x -y SDL2-2.0.3.zip $STRIP + +if [ -z $SKIP_EXTRACT ]; then + eval 7z x -y SDL2-2.0.3.zip $STRIP +fi SDL_SDK="`real_pwd`/SDL2-2.0.3" add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ @@ -349,7 +399,7 @@ cd $DEPS echo Done. echo -cd ../build_$BITS +cd $DEPS_INSTALL/.. echo "Building OpenMW..." diff --git a/CMakeLists.txt b/CMakeLists.txt index 77b054ff5..f98838452 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,6 +138,9 @@ if (WIN32) # Suppress WinMain(), provided by SDL add_definitions(-DSDL_MAIN_HANDLED) + + # Get rid of useless crud from windows.h + add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) endif() # Dependencies From c71bbd02bfccb1507d984e36127eaf54acd3205e Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 8 Jun 2015 02:26:23 +0200 Subject: [PATCH 13/42] Finish up the OSG build scripts and configuration Sadly it seems like Appveyor can't build OpenMW without timing out yet. More build-time improvements are in order --- CI/before_script.msvc.sh | 186 ++++++++++++++++++++++++++++++++++----- CI/build.msvc.sh | 18 +++- CMakeLists.txt | 3 - appveyor.yml | 31 +++---- 4 files changed, 197 insertions(+), 41 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index a12c17038..367a402a0 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -121,6 +121,11 @@ add_cmake_opts() { CMAKE_OPTS="$CMAKE_OPTS $@" } +RUNTIME_DLLS="" +add_runtime_dlls() { + RUNTIME_DLLS="$RUNTIME_DLLS $@" +} + if [ -z $PLATFORM ]; then PLATFORM=`uname -m` fi @@ -154,6 +159,20 @@ case $PLATFORM in ;; esac +case $CONFIGURATION in + debug|Debug|DEBUG ) + CONFIGURATION=Debug + ;; + + release|Release|RELEASE ) + CONFIGURATION=Release + ;; + + relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO ) + CONFIGURATION=RelWithDebInfo + ;; +esac + echo echo "==========================" echo "Starting prebuild on win$BITS" @@ -178,9 +197,9 @@ if [ -z $SKIP_DOWNLOAD ]; then fi # Bullet - download "Bullet 2.83.4" \ - http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z \ - Bullet-2.83.4-win$BITS.7z + 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 # FFmpeg download "FFmpeg 2.5.2" \ @@ -219,10 +238,16 @@ cd .. #/.. # Set up dependencies if [ -z $KEEP ]; then - rm -rf OSG_$BITS - mkdir -p OSG_$BITS/deps + echo + printf "Preparing build directory... " + + rm -rf Build_$BITS + mkdir -p Build_$BITS/deps + + echo Done. fi -cd OSG_$BITS/deps +mkdir -p Build_$BITS/deps +cd Build_$BITS/deps DEPS_INSTALL=`pwd` @@ -236,7 +261,10 @@ if [ -z $APPVEYOR ]; then BOOST_SDK="`real_pwd`/Boost" - if [ -z $SKIP_EXTRACT ]; then + if [ -d Boost ] && grep "BOOST_VERSION 105800" 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 fi @@ -254,12 +282,15 @@ else fi # Bullet -printf "Bullet 2.83.4... " +printf "Bullet 2.83.5... " cd $DEPS_INSTALL -if [ -z $SKIP_EXTRACT ]; then - eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP - mv Bullet-2.83.4-win$BITS Bullet +if [ -d Bullet ]; then + 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 fi BULLET_SDK="`real_pwd`/Bullet" @@ -279,7 +310,11 @@ echo Done. printf "FFmpeg 2.5.2... " cd $DEPS_INSTALL -if [ -z $SKIP_EXTRACT ]; then +if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" 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 @@ -304,6 +339,8 @@ add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ -DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ -DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib" +add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll + if [ $BITS -eq 32 ]; then add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" fi @@ -316,7 +353,14 @@ echo Done. printf "MyGUI 3.2.2... " cd $DEPS_INSTALL -if [ -z $SKIP_EXTRACT ]; then +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 +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 fi @@ -327,28 +371,47 @@ add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" +if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="_d" +else + SUFFIX="" +fi +add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll + cd $DEPS echo Done. # OpenAL printf "OpenAL-Soft 1.16.0... " -if [ -z $SKIP_EXTRACT ]; then +if [ -d openal-soft-1.16.0-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 fi OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" -add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \ +add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + + echo Done. # OSG printf "OSG 3.3.8... " cd $DEPS_INSTALL -if [ -z $SKIP_EXTRACT ]; then +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 +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 fi @@ -357,6 +420,21 @@ OSG_SDK="`real_pwd`/OSG" add_cmake_opts -DOSG_DIR="$OSG_SDK" +if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="d" +else + 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 + +OSG_PLUGINS="" +add_osg_dlls() { + OSG_PLUGINS="$OSG_PLUGINS $@" +} + +add_osg_dlls `pwd`/OSG/bin/osgPlugins-3.3.8/osgdb_{bmp,dds,gif,jpeg,png,tga}$SUFFIX.dll + cd $DEPS echo Done. @@ -365,7 +443,10 @@ echo Done. printf "Qt 4.8.6... " cd $DEPS_INSTALL -if [ -z $SKIP_EXTRACT ]; then +if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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 fi @@ -377,6 +458,13 @@ eval qtbinpatcher.exe $STRIP add_cmake_opts -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 + cd $DEPS echo Done. @@ -384,7 +472,10 @@ echo Done. # SDL2 printf "SDL 2.0.3... " -if [ -z $SKIP_EXTRACT ]; then +if [ -d SDL2-2.0.3 ]; then + printf "Exists. " +elif [ -z $SKIP_EXTRACT ]; then + rm -rf SDL2-2.0.3 eval 7z x -y SDL2-2.0.3.zip $STRIP fi @@ -394,6 +485,8 @@ add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" +add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll + cd $DEPS echo Done. @@ -401,11 +494,50 @@ echo cd $DEPS_INSTALL/.. -echo "Building OpenMW..." +echo "Setting up OpenMW build..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ - -DBUILD_MYGUI_PLUGIN=no + -DBUILD_MYGUI_PLUGIN=no \ + -DOPENMW_MP_BUILD=yes + +if [ -z $APPVEYOR ]; then + echo " (Outside of AppVeyor, doing full build.)" +else + case $STEP in + components ) + echo " Subproject: Components." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENCS=no \ + -DBUILD_OPENMW=no \ + -DBUILD_WIZARD=no + rm -rf components + ;; + openmw ) + echo " Subproject: OpenMW." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENCS=no \ + -DBUILD_WIZARD=no + ;; + opencs ) + echo " Subproject: OpenCS." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENMW=no \ + -DBUILD_WIZARD=no + ;; + misc ) + echo " Subproject: Misc." + add_cmake_opts -DBUILD_OPENCS=no \ + -DBUILD_OPENMW=no + ;; + esac +fi if [ -z $VERBOSE ]; then printf " Configuring... " @@ -423,4 +555,18 @@ fi echo +echo "Copying Runtime DLLs..." +mkdir -p $CONFIGURATION +for DLL in $RUNTIME_DLLS; do + echo " `basename $DLL`." + cp "$DLL" $CONFIGURATION/ +done +echo "OSG Plugin DLLs..." +mkdir -p $CONFIGURATION/osgPlugins-3.3.8 +for DLL in $OSG_PLUGINS; do + echo " `basename $DLL`." + cp "$DLL" $CONFIGURATION/osgPlugins-3.3.8 +done +echo + exit $RET \ No newline at end of file diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index b17e7b94c..d426ef90d 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -10,10 +10,14 @@ fi case $PLATFORM in x32|x86|i686|i386|win32|Win32 ) - BITS=32 ;; + BITS=32 + PLATFORM=Win32 + ;; x64|x86_64|x86-64|win64|Win64 ) - BITS=64 ;; + BITS=64 + PLATFORM=x64 + ;; * ) echo "Unknown platform $PLATFORM." @@ -40,4 +44,12 @@ if [ $? -ne 0 ]; then } fi -msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +if [ -z $APPVEYOR ]; then + msbuild OpenMW.sln //t:Build //m:8 +else + msbuild OpenMW.sln //t:Build //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +fi + +if [ ! -z $PACKAGE ]; then + msbuild PACKAGE.vcxproj //t:Build //m:8 +fi \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index f98838452..77b054ff5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,9 +138,6 @@ if (WIN32) # Suppress WinMain(), provided by SDL add_definitions(-DSDL_MAIN_HANDLED) - - # Get rid of useless crud from windows.h - add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) endif() # Dependencies diff --git a/appveyor.yml b/appveyor.yml index e46dd3dd8..a229a2212 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,28 +6,27 @@ platform: configuration: - Debug - - Release + +environment: + matrix: + - STEP: openmw + - STEP: opencs + - STEP: misc matrix: fast_finish: true os: unstable -clone_depth: 5 +clone_depth: 1 cache: - - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Ogre-1.9-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Ogre-1.9-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg32-2.5.2.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\OpenAL-Soft-1.16.0.zip -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\SDL2-2.0.3.zip -> CI/before_script.msvc.sh + - 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 init: - cmd: bash --version @@ -41,4 +40,6 @@ build_script: - cmd: bash --login C:\projects\openmw\CI\build.msvc.sh before_build: - - cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh + - cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh -k + +test: off From a1e29162bdb6da9069394c439a90a7e96cfa4e01 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 24 Jun 2015 15:54:00 +0200 Subject: [PATCH 14/42] Bring Ogre pre-build script up to OSG standard --- CI/before_script.msvc.sh | 385 ++++++++++++++++++++++++++++----------- 1 file changed, 280 insertions(+), 105 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 66f74520c..ae74146bc 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -8,6 +8,15 @@ while [ $# -gt 0 ]; do -v ) VERBOSE=true ;; + -d ) + SKIP_DOWNLOAD=true ;; + + -e ) + SKIP_EXTRACT=true ;; + + -k ) + KEEP=true ;; + * ) echo "Unknown arg $ARG." exit 1 ;; @@ -61,29 +70,46 @@ run_cmd() { } download() { - if ! [ -f $2 ]; then - printf " Downloading $2... " + if [ $# -lt 3 ]; then + echo "Invalid parameters to download." + return 1 + fi - if [ -z $VERBOSE ]; then - curl --silent --retry 10 -kLy 5 -o $2 $1 - RET=$? - else - curl --retry 10 -kLy 5 -o $2 $1 - RET=$? - fi + NAME=$1 + shift - if [ $RET -ne 0 ]; then - echo "Failed!" + echo "$NAME..." + + while [ $# -gt 1 ]; do + URL=$1 + FILE=$2 + shift + shift + + if ! [ -f $FILE ]; then + printf " Downloading $FILE... " + + if [ -z $VERBOSE ]; then + curl --silent --retry 10 -kLy 5 -o $FILE $URL + RET=$? + else + curl --retry 10 -kLy 5 -o $FILE $URL + RET=$? + fi + + if [ $RET -ne 0 ]; then + echo "Failed!" + else + echo "Done." + fi else - echo "Done" + echo " $FILE exists, skipping." fi + done - return $RET - else - echo " $2 exists, skipping." + if [ $# -ne 0 ]; then + echo "Missing parameter." fi - - return 0 } real_pwd() { @@ -95,6 +121,11 @@ add_cmake_opts() { CMAKE_OPTS="$CMAKE_OPTS $@" } +RUNTIME_DLLS="" +add_runtime_dlls() { + RUNTIME_DLLS="$RUNTIME_DLLS $@" +} + if [ -z $PLATFORM ]; then PLATFORM=`uname -m` fi @@ -128,6 +159,21 @@ case $PLATFORM in ;; esac + +case $CONFIGURATION in + debug|Debug|DEBUG ) + CONFIGURATION=Debug + ;; + + release|Release|RELEASE ) + CONFIGURATION=Release + ;; + + relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO ) + CONFIGURATION=RelWithDebInfo + ;; +esac + echo echo "==========================" echo "Starting prebuild on win$BITS" @@ -139,58 +185,71 @@ cd deps DEPS="`pwd`" -echo "Downloading dependency packages." -echo - -# Boost -if [ -z $APPVEYOR ]; then - echo "Boost 1.58.0..." - download 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 +if [ -z $SKIP_DOWNLOAD ]; then + echo "Downloading dependency packages." echo -fi - -# Bullet -echo "Bullet 2.83.4..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z Bullet-2.83.4-win$BITS.7z -echo - -# FFmpeg -echo "FFmpeg 2.5.2..." -download http://ffmpeg.zeranoe.com/builds/win$BITS/shared/ffmpeg-2.5.2-win$BITS-shared.7z ffmpeg$BITS-2.5.2.7z -download http://ffmpeg.zeranoe.com/builds/win$BITS/dev/ffmpeg-2.5.2-win$BITS-dev.7z ffmpeg$BITS-2.5.2-dev.7z -echo -# MyGUI -echo "MyGUI 3.2.2..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/MyGUI-3.2.2-win$BITS.7z MyGUI-3.2.2-win$BITS.7z -echo + # 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 + fi -# Ogre -echo "Ogre 1.9..." -download http://www.lysator.liu.se/~ace/OpenMW/deps/Ogre-1.9-win$BITS.7z Ogre-1.9-win$BITS.7z -echo + # 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 + + # 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 + + # 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 + + # OpenAL + download "OpenAL-Soft 1.16.0" \ + http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip \ + OpenAL-Soft-1.16.0.zip + + # Ogre + download "Ogre 1.9" \ + http://www.lysator.liu.se/~ace/OpenMW/deps/Ogre-1.9-win$BITS.7z \ + Ogre-1.9-win$BITS.7z + + # Qt + 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 + + # SDL2 + download "SDL 2.0.3" \ + https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip \ + SDL2-2.0.3.zip +fi -# OpenAL -echo "OpenAL-Soft 1.16.0..." -download http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip OpenAL-Soft-1.16.0.zip -echo +cd .. -# Qt -echo "Qt 4.8.6..." -download 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 -echo +# Set up dependencies +if [ -z $KEEP ]; then + echo + printf "Preparing build directory... " -# SDL2 -echo "SDL 2.0.3 binaries..." -download https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip SDL2-2.0.3.zip -echo + rm -rf Build_$BITS + mkdir -p Build_$BITS/deps -cd .. + echo Done. +fi +mkdir -p Build_$BITS/deps +cd Build_$BITS/deps -# Set up dependencies -rm -rf build_$BITS -mkdir -p build_$BITS/deps -cd deps +DEPS_INSTALL=`pwd` echo echo "Extracting dependencies..." @@ -198,11 +257,16 @@ echo "Extracting dependencies..." # Boost if [ -z $APPVEYOR ]; then printf "Boost 1.58.0... " - cd ../build_$BITS/deps + cd $DEPS_INSTALL BOOST_SDK="`real_pwd`/Boost" - $DEPS/boost-1.58.0-win$BITS.exe //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent + if [ -d Boost ] && grep "BOOST_VERSION 105800" 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 + fi add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" @@ -218,11 +282,16 @@ else fi # Bullet -printf "Bullet 2.83.4... " -cd ../build_$BITS/deps - -eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP -mv Bullet-2.83.4-win$BITS Bullet +printf "Bullet 2.83.5... " +cd $DEPS_INSTALL + +if [ -d Bullet ]; then + 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 +fi BULLET_SDK="`real_pwd`/Bullet" add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include/bullet" \ @@ -239,14 +308,20 @@ echo Done. # FFmpeg printf "FFmpeg 2.5.2... " -cd ../build_$BITS/deps +cd $DEPS_INSTALL + +if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" 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$BITS-2.5.2.7z $STRIP + eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2-dev.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-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 +fi FFMPEG_SDK="`real_pwd`/FFmpeg" add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ @@ -264,6 +339,8 @@ add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ -DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ -DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib" +add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll + if [ $BITS -eq 32 ]; then add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" fi @@ -272,34 +349,64 @@ cd $DEPS echo Done. -# Ogre -printf "Ogre 1.9... " -cd ../build_$BITS/deps +# MyGUI +printf "MyGUI 3.2.2... " +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 +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 +fi -eval 7z x -y $DEPS/Ogre-1.9-win$BITS.7z $STRIP -mv Ogre-1.9-win$BITS Ogre +MYGUI_SDK="`real_pwd`/MyGUI" -OGRE_SDK="`real_pwd`/Ogre" +add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ + -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ + -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ + -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" -add_cmake_opts -DOGRE_SDK="$OGRE_SDK" +if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="_d" +else + SUFFIX="" +fi +add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll cd $DEPS echo Done. -# MyGUI -printf "MyGUI 3.2.2... " -cd ../build_$BITS/deps +# Ogre +printf "Ogre 1.9... " +cd $DEPS_INSTALL + +if [ -d Ogre ]; then + printf "Exists. (No version check) " +elif [ -z $SKIP_EXTRACT ]; then + rm -rf Ogre + eval 7z x -y $DEPS/Ogre-1.9-win$BITS.7z $STRIP + mv Ogre-1.9-win$BITS Ogre +fi -eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP -mv MyGUI-3.2.2-win$BITS MyGUI +OGRE_SDK="`real_pwd`/Ogre" -MYGUI_SDK="`real_pwd`/MyGUI" +add_cmake_opts -DOGRE_SDK="$OGRE_SDK" -add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ - -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ - -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ - -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" +if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="_d" +else + SUFFIX="" +fi + +add_runtime_dlls `pwd`/Ogre/bin/$CONFIGURATION/cg.dll \ + `pwd`/Ogre/bin/$CONFIGURATION/{OgreMain,OgreOverlay,Plugin_CgProgramManager,Plugin_ParticleFX,RenderSystem_Direct3D9,RenderSystem_GL}$SUFFIX.dll cd $DEPS @@ -307,21 +414,33 @@ echo Done. # OpenAL printf "OpenAL-Soft 1.16.0... " -eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP +if [ -d openal-soft-1.16.0-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 +fi OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" -add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \ +add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + + echo Done. # Qt printf "Qt 4.8.6... " -cd ../build_$BITS/deps - -eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP -mv qt-4.8.6-* Qt +cd $DEPS_INSTALL + +if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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 +fi QT_SDK="`real_pwd`/Qt" @@ -330,13 +449,26 @@ eval qtbinpatcher.exe $STRIP add_cmake_opts -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 + cd $DEPS echo Done. # SDL2 printf "SDL 2.0.3... " -eval 7z x -y SDL2-2.0.3.zip $STRIP + +if [ -d SDL2-2.0.3 ]; then + printf "Exists. " +elif [ -z $SKIP_EXTRACT ]; then + rm -rf SDL2-2.0.3 + eval 7z x -y SDL2-2.0.3.zip $STRIP +fi SDL_SDK="`real_pwd`/SDL2-2.0.3" add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ @@ -344,23 +476,59 @@ add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" +add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll + cd $DEPS echo Done. echo -cd ../build_$BITS +cd $DEPS_INSTALL/.. -echo "Building OpenMW..." +echo "Setting up OpenMW build..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ -DBUILD_MYGUI_PLUGIN=no \ - -DBUILD_OPENCS=no \ - -DBUILD_WIZARD=no \ - -DBUILD_ESSIMPORTER=no \ - -DBUILD_LAUNCHER=no \ - -DBUILD_MWINIIMPORTER=no + -DOPENMW_MP_BUILD=yes + +if [ -z $APPVEYOR ]; then + echo " (Outside of AppVeyor, doing full build.)" +else + case $STEP in + components ) + echo " Subproject: Components." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENCS=no \ + -DBUILD_OPENMW=no \ + -DBUILD_WIZARD=no + rm -rf components + ;; + openmw ) + echo " Subproject: OpenMW." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENCS=no \ + -DBUILD_WIZARD=no + ;; + opencs ) + echo " Subproject: OpenCS." + add_cmake_opts -DBUILD_ESSIMPORTER=no \ + -DBUILD_LAUNCHER=no \ + -DBUILD_MWINIIMPORTER=no \ + -DBUILD_OPENMW=no \ + -DBUILD_WIZARD=no + ;; + misc ) + echo " Subproject: Misc." + add_cmake_opts -DBUILD_OPENCS=no \ + -DBUILD_OPENMW=no + ;; + esac +fi if [ -z $VERBOSE ]; then printf " Configuring... " @@ -378,4 +546,11 @@ fi echo +echo "Copying Runtime DLLs..." +mkdir -p $CONFIGURATION +for DLL in $RUNTIME_DLLS; do + echo " `basename $DLL`." + cp "$DLL" $CONFIGURATION/ +done + exit $RET From 9b09c7bbb0e666aa29c40cfa74db0b2cd654cba0 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 25 Jun 2015 09:02:30 +0200 Subject: [PATCH 15/42] Test the pre-existing Qt 5.4.1 install on Appveyor --- CI/before_script.msvc.sh | 83 +++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 31 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index ae74146bc..f3db64020 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -224,9 +224,11 @@ if [ -z $SKIP_DOWNLOAD ]; then Ogre-1.9-win$BITS.7z # Qt - 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 [ -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 + fi # SDL2 download "SDL 2.0.3" \ @@ -281,6 +283,7 @@ else -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" fi + # Bullet printf "Bullet 2.83.5... " cd $DEPS_INSTALL @@ -306,6 +309,7 @@ cd $DEPS echo Done. + # FFmpeg printf "FFmpeg 2.5.2... " cd $DEPS_INSTALL @@ -349,6 +353,7 @@ cd $DEPS echo Done. + # MyGUI printf "MyGUI 3.2.2... " cd $DEPS_INSTALL @@ -383,6 +388,7 @@ cd $DEPS echo Done. + # Ogre printf "Ogre 1.9... " cd $DEPS_INSTALL @@ -412,6 +418,7 @@ cd $DEPS echo Done. + # OpenAL printf "OpenAL-Soft 1.16.0... " if [ -d openal-soft-1.16.0-bin ]; then @@ -426,39 +433,51 @@ 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" - - echo Done. + # Qt -printf "Qt 4.8.6... " -cd $DEPS_INSTALL +if [ -z $APPVEYOR ]; then + printf "Qt 4.8.6... " + cd $DEPS_INSTALL -if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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 -fi + if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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 + fi -QT_SDK="`real_pwd`/Qt" + QT_SDK="`real_pwd`/Qt" -cd $QT_SDK -eval qtbinpatcher.exe $STRIP + cd $QT_SDK + eval qtbinpatcher.exe $STRIP -add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" + add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" -if [ $CONFIGURATION == "Debug" ]; then - SUFFIX="d4" + if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="d4" + else + SUFFIX="4" + fi + add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll + + cd $DEPS + + echo Done. else - SUFFIX="4" -fi -add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll + echo "Using Appveyor Qt 5 version." + if [ $PLATFORM == "win32" ]; then + QT_SDK="C:/Qt/5.4/msvc2013_opengl" + else + QT_SDK="C:/Qt/5.4/msvc2013_64_opengl" + fi -cd $DEPS + add_cmake_opts -DDESIRED_QT_VERSION=4 \ + -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" +fi -echo Done. # SDL2 printf "SDL 2.0.3... " @@ -546,11 +565,13 @@ fi echo -echo "Copying Runtime DLLs..." -mkdir -p $CONFIGURATION -for DLL in $RUNTIME_DLLS; do - echo " `basename $DLL`." - cp "$DLL" $CONFIGURATION/ -done +if [ -z $APPVEYOR ]; then + echo "Copying Runtime DLLs..." + mkdir -p $CONFIGURATION + for DLL in $RUNTIME_DLLS; do + echo " `basename $DLL`." + cp "$DLL" $CONFIGURATION/ + done +fi exit $RET From b93cba9a698e353f0da6d19fed41fcb7bdf773a2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 25 Jun 2015 18:16:59 +0200 Subject: [PATCH 16/42] Push messages properly --- CI/before_script.msvc.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index f3db64020..2652e9898 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -51,12 +51,9 @@ run_cmd() { if [ $RET -ne 0 ]; then if [ -z $APPVEYOR ]; then echo "Command $CMD failed, output can be found in `real_pwd`/output.log" - exit $RET else - 7z a output.7z output.log > /dev/null 2>&1 - - appveyor PushArtifact output.7z -FileName $CMD-output.7z - appveyor AddMessage "Command $CMD failed (code $RET), output has been pushed as an artifact." -Category Error + appveyor AddMessage "Command $CMD failed." -Category Error -Details "$CMD $@" + while read in; do appveyor AddMessage "$in" -Category Error; done < output.log fi else rm output.log From 331d87d738f7a23c577b7955a7a72c13e8a9554f Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 25 Jun 2015 19:19:04 +0200 Subject: [PATCH 17/42] Bring over some more OSG changes to the Appveyor scripts, and properly use Qt --- CI/before_script.msvc.sh | 13 +++++++------ appveyor.yml | 27 +++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 2652e9898..06b14f2fe 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -52,8 +52,9 @@ run_cmd() { if [ -z $APPVEYOR ]; then echo "Command $CMD failed, output can be found in `real_pwd`/output.log" else - appveyor AddMessage "Command $CMD failed." -Category Error -Details "$CMD $@" - while read in; do appveyor AddMessage "$in" -Category Error; done < output.log + echo + echo "Command $CMD failed;" + cat output.log fi else rm output.log @@ -451,7 +452,8 @@ if [ -z $APPVEYOR ]; then cd $QT_SDK eval qtbinpatcher.exe $STRIP - add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" + add_cmake_opts -DDESIRED_QT_VERSION=4 \ + -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" if [ $CONFIGURATION == "Debug" ]; then SUFFIX="d4" @@ -471,7 +473,7 @@ else QT_SDK="C:/Qt/5.4/msvc2013_64_opengl" fi - add_cmake_opts -DDESIRED_QT_VERSION=4 \ + add_cmake_opts -DDESIRED_QT_VERSION=5 \ -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" fi @@ -505,8 +507,7 @@ echo "Setting up OpenMW build..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ - -DBUILD_MYGUI_PLUGIN=no \ - -DOPENMW_MP_BUILD=yes + -DBUILD_MYGUI_PLUGIN=no if [ -z $APPVEYOR ]; then echo " (Outside of AppVeyor, doing full build.)" diff --git a/appveyor.yml b/appveyor.yml index e46dd3dd8..a71df2155 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,28 +6,25 @@ platform: configuration: - Debug - - Release + +environment: + matrix: + - STEP: openmw + - STEP: opencs + - STEP: misc matrix: fast_finish: true os: unstable -clone_depth: 5 +clone_depth: 1 cache: - - C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Ogre-1.9-win32.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\Ogre-1.9-win64.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg32-2.5.2.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\OpenAL-Soft-1.16.0.zip -> CI/before_script.msvc.sh - - C:\projects\openmw\deps\SDL2-2.0.3.zip -> CI/before_script.msvc.sh + - 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 init: - cmd: bash --version @@ -42,3 +39,5 @@ build_script: before_build: - cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh + +test: off From 8c6ba01c0846ef28759b1090a692ca322acdd966 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 6 Jul 2015 10:59:40 +0200 Subject: [PATCH 18/42] Fix a few merge issues --- CI/before_script.msvc.sh | 46 +++++----------------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index c5c15008c..a53b6d795 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -222,9 +222,11 @@ if [ -z $SKIP_DOWNLOAD ]; then OSG-3.3.8-win$BITS.7z # Qt - 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 [ -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 + fi # SDL2 download "SDL 2.0.3" \ @@ -557,44 +559,6 @@ else esac fi -if [ -z $APPVEYOR ]; then - echo " (Outside of AppVeyor, doing full build.)" -else - case $STEP in - components ) - echo " Subproject: Components." - add_cmake_opts -DBUILD_ESSIMPORTER=no \ - -DBUILD_LAUNCHER=no \ - -DBUILD_MWINIIMPORTER=no \ - -DBUILD_OPENCS=no \ - -DBUILD_OPENMW=no \ - -DBUILD_WIZARD=no - rm -rf components - ;; - openmw ) - echo " Subproject: OpenMW." - add_cmake_opts -DBUILD_ESSIMPORTER=no \ - -DBUILD_LAUNCHER=no \ - -DBUILD_MWINIIMPORTER=no \ - -DBUILD_OPENCS=no \ - -DBUILD_WIZARD=no - ;; - opencs ) - echo " Subproject: OpenCS." - add_cmake_opts -DBUILD_ESSIMPORTER=no \ - -DBUILD_LAUNCHER=no \ - -DBUILD_MWINIIMPORTER=no \ - -DBUILD_OPENMW=no \ - -DBUILD_WIZARD=no - ;; - misc ) - echo " Subproject: Misc." - add_cmake_opts -DBUILD_OPENCS=no \ - -DBUILD_OPENMW=no - ;; - esac -fi - if [ -z $VERBOSE ]; then printf " Configuring... " else From ad47fb7b518db892c70e769c2f58933a572f926f Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 7 Jul 2015 15:50:40 +0200 Subject: [PATCH 19/42] Fix build script --- CI/before_script.msvc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 06b14f2fe..7c544ad54 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -474,7 +474,8 @@ else fi 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" fi @@ -507,7 +508,8 @@ echo "Setting up OpenMW build..." add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_ESMTOOL=no \ - -DBUILD_MYGUI_PLUGIN=no + -DBUILD_MYGUI_PLUGIN=no \ + -DOPENMW_MP_BUILD=on if [ -z $APPVEYOR ]; then echo " (Outside of AppVeyor, doing full build.)" From f8485211a1ea5c00310fdbf7bd7ad0fa5dcd32d6 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 7 Jul 2015 15:54:03 +0200 Subject: [PATCH 20/42] Fix merge issue --- CI/before_script.msvc.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index a25e238d0..6543df4d3 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -222,9 +222,11 @@ if [ -z $SKIP_DOWNLOAD ]; then OSG-3.3.8-win$BITS.7z # Qt - 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 [ -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 + fi # SDL2 download "SDL 2.0.3" \ From a831e89a43cc72c1bd8ffefb7570a7c73be45c38 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 7 Jul 2015 16:21:56 +0200 Subject: [PATCH 21/42] Fix MyGUI include dir, and properly return error codes --- CI/before_script.msvc.sh | 3 +-- CI/build.msvc.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 6543df4d3..0d72806fb 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -372,8 +372,7 @@ fi MYGUI_SDK="`real_pwd`/MyGUI" add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ - -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include" \ - -DMYGUI_PLATFORM_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ + -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" if [ $CONFIGURATION == "Debug" ]; then diff --git a/CI/build.msvc.sh b/CI/build.msvc.sh index d426ef90d..731c51eda 100644 --- a/CI/build.msvc.sh +++ b/CI/build.msvc.sh @@ -50,6 +50,10 @@ else msbuild OpenMW.sln //t:Build //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" fi -if [ ! -z $PACKAGE ]; then +RET=$? +if [ $RET -eq 0 ] && [ ! -z $PACKAGE ]; then msbuild PACKAGE.vcxproj //t:Build //m:8 -fi \ No newline at end of file + RET=$? +fi + +exit $RET From 27a4af26abdb65e32eed89af1f2ca3d8b6cedc61 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 12 Jul 2015 00:45:42 +0200 Subject: [PATCH 22/42] Cleaning up AppVeyor scripts --- CI/before_script.msvc.sh | 401 ++++++++++++++++++++------------------- appveyor.yml | 31 +-- 2 files changed, 221 insertions(+), 211 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 0d72806fb..d23e3013f 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -124,6 +124,11 @@ add_runtime_dlls() { RUNTIME_DLLS="$RUNTIME_DLLS $@" } +OSG_PLUGINS="" +add_osg_dlls() { + OSG_PLUGINS="$OSG_PLUGINS $@" +} + if [ -z $PLATFORM ]; then PLATFORM=`uname -m` fi @@ -250,270 +255,274 @@ mkdir -p Build_$BITS/deps cd Build_$BITS/deps DEPS_INSTALL=`pwd` +cd $DEPS echo echo "Extracting dependencies..." # Boost -if [ -z $APPVEYOR ]; then - printf "Boost 1.58.0... " - cd $DEPS_INSTALL +printf "Boost 1.58.0... " +{ + 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 - 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 - fi - - add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + if [ -d Boost ] && grep "BOOST_VERSION 105800" 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 + fi - cd $DEPS + add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" - echo Done. -else - # Appveyor unstable has all the boost we need already - BOOST_SDK="c:/Libraries/boost" - add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ - -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" -fi + echo Done. + else + # Appveyor unstable has all the boost we need already + BOOST_SDK="c:/Libraries/boost" + add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \ + -DBOOST_LIBRARYDIR="$BOOST_SDK/lib$BITS-msvc-12.0" + echo AppVeyor. + fi +} +cd $DEPS # Bullet printf "Bullet 2.83.5... " -cd $DEPS_INSTALL - -if [ -d Bullet ]; then - 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 -fi - -BULLET_SDK="`real_pwd`/Bullet" -add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include/bullet" \ - -DBULLET_COLLISION_LIBRARY="$BULLET_SDK/lib/BulletCollision.lib" \ - -DBULLET_COLLISION_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletCollision_Debug.lib" \ - -DBULLET_DYNAMICS_LIBRARY="$BULLET_SDK/lib/BulletDynamics.lib" \ - -DBULLET_DYNAMICS_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletDynamics_Debug.lib" \ - -DBULLET_MATH_LIBRARY="$BULLET_SDK/lib/LinearMath.lib" \ - -DBULLET_MATH_LIBRARY_DEBUG="$BULLET_SDK/lib/LinearMath_Debug.lib" +{ + cd $DEPS_INSTALL -cd $DEPS + if [ -d Bullet ]; then + 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 + fi -echo Done. + BULLET_SDK="`real_pwd`/Bullet" + add_cmake_opts -DBULLET_INCLUDE_DIR="$BULLET_SDK/include/bullet" \ + -DBULLET_COLLISION_LIBRARY="$BULLET_SDK/lib/BulletCollision.lib" \ + -DBULLET_COLLISION_LIBRARY_DEBUG="$BULLET_SDK/lib/BulletCollision_Debug.lib" \ + -DBULLET_MATH_LIBRARY="$BULLET_SDK/lib/LinearMath.lib" \ + -DBULLET_MATH_LIBRARY_DEBUG="$BULLET_SDK/lib/LinearMath_Debug.lib" + echo Done. +} +cd $DEPS # FFmpeg printf "FFmpeg 2.5.2... " -cd $DEPS_INSTALL +{ + cd $DEPS_INSTALL -if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" FFmpeg/README.txt > /dev/null; then - printf "Exists. " -elif [ -z $SKIP_EXTRACT ]; then - rm -rf FFmpeg + if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" 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$BITS-2.5.2.7z $STRIP + eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2-dev.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 -fi + 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 + fi -FFMPEG_SDK="`real_pwd`/FFmpeg" -add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DAVCODEC_LIBRARIES="$FFMPEG_SDK/lib/avcodec.lib" \ - -DAVDEVICE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DAVDEVICE_LIBRARIES="$FFMPEG_SDK/lib/avdevice.lib" \ - -DAVFORMAT_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DAVFORMAT_LIBRARIES="$FFMPEG_SDK/lib/avformat.lib" \ - -DAVUTIL_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DAVUTIL_LIBRARIES="$FFMPEG_SDK/lib/avutil.lib" \ - -DPOSTPROC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DPOSTPROC_LIBRARIES="$FFMPEG_SDK/lib/postproc.lib" \ - -DSWRESAMPLE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DSWRESAMPLE_LIBRARIES="$FFMPEG_SDK/lib/swresample.lib" \ - -DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ - -DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib" - -add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll - -if [ $BITS -eq 32 ]; then - add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" -fi + FFMPEG_SDK="`real_pwd`/FFmpeg" + add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVCODEC_LIBRARIES="$FFMPEG_SDK/lib/avcodec.lib" \ + -DAVDEVICE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVDEVICE_LIBRARIES="$FFMPEG_SDK/lib/avdevice.lib" \ + -DAVFORMAT_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVFORMAT_LIBRARIES="$FFMPEG_SDK/lib/avformat.lib" \ + -DAVUTIL_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DAVUTIL_LIBRARIES="$FFMPEG_SDK/lib/avutil.lib" \ + -DPOSTPROC_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DPOSTPROC_LIBRARIES="$FFMPEG_SDK/lib/postproc.lib" \ + -DSWRESAMPLE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DSWRESAMPLE_LIBRARIES="$FFMPEG_SDK/lib/swresample.lib" \ + -DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \ + -DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib" + + add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll + + if [ $BITS -eq 32 ]; then + add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\"" + fi + echo Done. +} cd $DEPS -echo Done. - - # MyGUI printf "MyGUI 3.2.2... " -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 -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 -fi - -MYGUI_SDK="`real_pwd`/MyGUI" +{ + cd $DEPS_INSTALL -add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ - -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ - -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" + 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 + 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 + fi -if [ $CONFIGURATION == "Debug" ]; then - SUFFIX="_d" -else - SUFFIX="" -fi -add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll + MYGUI_SDK="`real_pwd`/MyGUI" -cd $DEPS + add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \ + -DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \ + -DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h" -echo Done. + if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="_d" + else + SUFFIX="" + fi + add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll + echo Done. +} +cd $DEPS # OpenAL printf "OpenAL-Soft 1.16.0... " -if [ -d openal-soft-1.16.0-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 -fi - -OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" +{ + if [ -d openal-soft-1.16.0-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 + fi -add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ - -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin" -echo Done. + add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \ + -DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib" + echo Done. +} +cd $DEPS # OSG printf "OSG 3.3.8... " -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 -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 -fi - -OSG_SDK="`real_pwd`/OSG" +{ + cd $DEPS_INSTALL -add_cmake_opts -DOSG_DIR="$OSG_SDK" + 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 + 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 + fi -if [ $CONFIGURATION == "Debug" ]; then - SUFFIX="d" -else - 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 + OSG_SDK="`real_pwd`/OSG" -OSG_PLUGINS="" -add_osg_dlls() { - OSG_PLUGINS="$OSG_PLUGINS $@" -} + add_cmake_opts -DOSG_DIR="$OSG_SDK" -add_osg_dlls `pwd`/OSG/bin/osgPlugins-3.3.8/osgdb_{bmp,dds,gif,jpeg,png,tga}$SUFFIX.dll + if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="d" + else + SUFFIX="" + fi -cd $DEPS + 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 -echo Done. + add_osg_dlls `pwd`/OSG/bin/osgPlugins-3.3.8/osgdb_{bmp,dds,gif,jpeg,png,tga}$SUFFIX.dll + echo Done. +} +cd $DEPS # Qt if [ -z $APPVEYOR ]; then printf "Qt 4.8.6... " - cd $DEPS_INSTALL +else + printf "Qt 5.4... " +fi +{ + if [ -z $APPVEYOR ]; then + cd $DEPS_INSTALL + QT_SDK="`real_pwd`/Qt" + + if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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_SDK + eval qtbinpatcher.exe $STRIP + ) + fi - if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /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 - fi + cd $QT_SDK - QT_SDK="`real_pwd`/Qt" + add_cmake_opts -DDESIRED_QT_VERSION=4 \ + -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" - cd $QT_SDK - eval qtbinpatcher.exe $STRIP + if [ $CONFIGURATION == "Debug" ]; then + SUFFIX="d4" + else + SUFFIX="4" + fi - add_cmake_opts -DDESIRED_QT_VERSION=4 \ - -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" + add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll - if [ $CONFIGURATION == "Debug" ]; then - SUFFIX="d4" + echo Done. else - SUFFIX="4" - fi - add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll - - cd $DEPS + if [ $BITS -eq 32 ]; then + QT_SDK="C:/Qt/5.4/msvc2013_opengl" + else + QT_SDK="C:/Qt/5.4/msvc2013_64_opengl" + fi - echo Done. -else - echo "Using Appveyor Qt 5 version." - if [ $PLATFORM == "win32" ]; then - QT_SDK="C:/Qt/5.4/msvc2013_opengl" - else - QT_SDK="C:/Qt/5.4/msvc2013_64_opengl" + add_cmake_opts -DDESIRED_QT_VERSION=5 \ + -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ + -DCMAKE_PREFIX_PATH="$QT_SDK" fi - - add_cmake_opts -DDESIRED_QT_VERSION=5 \ - -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ - -DCMAKE_PREFIX_PATH="$QT_SDK" -fi - +} +cd $DEPS # SDL2 printf "SDL 2.0.3... " +{ + if [ -d SDL2-2.0.3 ]; then + printf "Exists. " + elif [ -z $SKIP_EXTRACT ]; then + rm -rf SDL2-2.0.3 + eval 7z x -y SDL2-2.0.3.zip $STRIP + fi -if [ -d SDL2-2.0.3 ]; then - printf "Exists. " -elif [ -z $SKIP_EXTRACT ]; then - rm -rf SDL2-2.0.3 - eval 7z x -y SDL2-2.0.3.zip $STRIP -fi - -SDL_SDK="`real_pwd`/SDL2-2.0.3" -add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ - -DSDL2MAIN_LIBRARY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2main.lib" \ - -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ - -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" + SDL_SDK="`real_pwd`/SDL2-2.0.3" + add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ + -DSDL2MAIN_LIBRARY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2main.lib" \ + -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" -add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll + add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll -cd $DEPS + echo Done. +} -echo Done. -echo cd $DEPS_INSTALL/.. +echo echo "Setting up OpenMW build..." add_cmake_opts -DBUILD_BSATOOL=no \ @@ -521,8 +530,8 @@ add_cmake_opts -DBUILD_BSATOOL=no \ -DBUILD_MYGUI_PLUGIN=no \ -DOPENMW_MP_BUILD=on -if [ -z $APPVEYOR ]; then - echo " (Outside of AppVeyor, doing full build.)" +if [ -z $CI ]; then + echo " (Outside of CI, doing full build.)" else case $STEP in components ) @@ -533,7 +542,6 @@ else -DBUILD_OPENCS=no \ -DBUILD_OPENMW=no \ -DBUILD_WIZARD=no - rm -rf components ;; openmw ) echo " Subproject: OpenMW." @@ -575,7 +583,8 @@ fi echo -if [ -z $APPVEYOR ]; then +# NOTE: Disable this when/if we want to run test cases +if [ -z $CI ]; then echo "Copying Runtime DLLs..." mkdir -p $CONFIGURATION for DLL in $RUNTIME_DLLS; do diff --git a/appveyor.yml b/appveyor.yml index 926aaff68..d5ad13430 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,17 +1,22 @@ version: "{build}" +branches: + only: + - appveyor + platform: - Win32 - x64 -configuration: - - Debug +configuration: Debug environment: matrix: - - STEP: openmw - - STEP: opencs - - STEP: misc + - STEP: misc +# - STEP: components # misc builds this too +# Build takes too long for these, ignore for now +# - STEP: openmw +# - STEP: opencs matrix: fast_finish: true @@ -32,18 +37,14 @@ cache: - C:\projects\openmw\deps\ffmpeg64-2.5.2.7z - C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -init: - - cmd: bash --version - - cmd: cmake --version - - cmd: msbuild /version - - cmd: echo. - clone_folder: C:\projects\openmw -build_script: - - cmd: bash --login C:\projects\openmw\CI\build.msvc.sh - before_build: - - cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh + +build_script: + - cmd: if %PLATFORM%==Win32 set build=Build_32 + - cmd: if %PLATFORM%==x64 set build=Build_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 90af7060ea2c5a17e0fdbcf00d7e926a0e232a86 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 14 Jul 2015 16:26:32 +0200 Subject: [PATCH 23/42] Forgot an echo --- CI/before_script.msvc.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index d23e3013f..cd47cbf8d 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -495,6 +495,8 @@ fi add_cmake_opts -DDESIRED_QT_VERSION=5 \ -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe" \ -DCMAKE_PREFIX_PATH="$QT_SDK" + + echo AppVeyor. fi } cd $DEPS From fec08ef73e286e3749b67b9fa768e7e773a180b0 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Sep 2015 15:29:08 +0200 Subject: [PATCH 24/42] Run unity build --- CI/before_script.msvc.sh | 7 +++++++ appveyor.yml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index cd47cbf8d..756653fe9 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -16,6 +16,9 @@ while [ $# -gt 0 ]; do -k ) KEEP=true ;; + + -u ) + UNITY_BUILD=true ;; * ) echo "Unknown arg $ARG." @@ -162,6 +165,10 @@ 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 diff --git a/appveyor.yml b/appveyor.yml index d5ad13430..e89a54e3b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,7 @@ environment: - STEP: misc # - STEP: components # misc builds this too # Build takes too long for these, ignore for now -# - STEP: openmw + - STEP: openmw # - STEP: opencs matrix: @@ -40,7 +40,7 @@ cache: clone_folder: C:\projects\openmw before_build: - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From 33175b44b827601c070776891a679eda617cf8b0 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Sep 2015 16:02:03 +0200 Subject: [PATCH 25/42] Disable SDL main library --- 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 756653fe9..bc8965066 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -520,8 +520,8 @@ printf "SDL 2.0.3... " SDL_SDK="`real_pwd`/SDL2-2.0.3" add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ - -DSDL2MAIN_LIBRARY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2main.lib" \ - -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" + -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ + -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll From 7df115d61bade2750fb22a1e0eaeb473d07aebbd Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Sep 2015 16:21:40 +0200 Subject: [PATCH 26/42] Just run OpenMW builds for now --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e89a54e3b..ea508abd6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ configuration: Debug environment: matrix: - - STEP: misc +# - STEP: misc # - STEP: components # misc builds this too # Build takes too long for these, ignore for now - STEP: openmw From 2e174fd1b5981103fc317bcca83a06748c6b02c1 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Sep 2015 19:59:17 +0200 Subject: [PATCH 27/42] Readd SDL2 main --- 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 bc8965066..756653fe9 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -520,8 +520,8 @@ printf "SDL 2.0.3... " SDL_SDK="`real_pwd`/SDL2-2.0.3" add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \ - -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \ - -DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" + -DSDL2MAIN_LIBRARY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2main.lib" \ + -DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll From 4ddb2feebb1b9a3fb5fc813047ab110c99605ac4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 28 Oct 2015 17:35:16 +0100 Subject: [PATCH 28/42] Let's try building everything, see how far we get --- CI/before_script.msvc.sh | 3 +++ appveyor.yml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 756653fe9..37905fc4c 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -573,6 +573,9 @@ else add_cmake_opts -DBUILD_OPENCS=no \ -DBUILD_OPENMW=no ;; + * ) + echo " Building everything." + ;; esac fi diff --git a/appveyor.yml b/appveyor.yml index ea508abd6..651f41783 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,12 +10,12 @@ platform: configuration: Debug -environment: - matrix: +#environment: +# matrix: # - STEP: misc # - STEP: components # misc builds this too # Build takes too long for these, ignore for now - - STEP: openmw +# - STEP: openmw # - STEP: opencs matrix: From f3187b17c83d0196b2b580b0122a938743f28770 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 23 Dec 2015 18:38:53 +0100 Subject: [PATCH 29/42] Update OpenAL soft link, get qtbinpatcher to run --- CI/before_script.msvc.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 37905fc4c..50fd13e4e 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -225,7 +225,7 @@ if [ -z $SKIP_DOWNLOAD ]; then # OpenAL download "OpenAL-Soft 1.16.0" \ - http://kcat.strangesoft.net/openal-soft-1.16.0-bin.zip \ + http://kcat.strangesoft.net/openal-binaries/openal-soft-1.16.0-bin.zip \ OpenAL-Soft-1.16.0.zip # OSG @@ -472,10 +472,8 @@ fi rm -rf Qt eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP mv qt-4.8.6-* Qt - ( - cd $QT_SDK - eval qtbinpatcher.exe $STRIP - ) + cd Qt + eval ./qtbinpatcher.exe $STRIP fi cd $QT_SDK From 5743c839a8bd40fa9336c7dacdaae4c59b1ef7ee Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 23 Dec 2015 18:51:04 +0100 Subject: [PATCH 30/42] Why is this breaking on AppVeyor? --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 651f41783..be8f2b12b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ cache: clone_folder: C:\projects\openmw before_build: - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -v build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From c226d015aca698cb8ac95f8ee6571f36c2946248 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 23 Dec 2015 18:59:41 +0100 Subject: [PATCH 31/42] AppVeyor doesn't pass the platform env variable? --- CI/before_script.msvc.sh | 2 +- appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 50fd13e4e..3cb024dda 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -40,7 +40,7 @@ else cd $APPVEYOR_BUILD_FOLDER VERSION="$(cat README.md | grep Version: | awk '{ print $3; }')-$(git rev-parse --short HEAD)" - appveyor UpdateBuild -Version "$VERSION" + appveyor UpdateBuild -Version "$VERSION" > /dev/null & fi run_cmd() { diff --git a/appveyor.yml b/appveyor.yml index be8f2b12b..b137d4850 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ cache: clone_folder: C:\projects\openmw before_build: - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -v + - cmd: sh PLATFORM=%PLATFORM% %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From c8145a1b917d81639577cfb7c6018d0d786b7b73 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 23 Dec 2015 19:32:43 +0100 Subject: [PATCH 32/42] Let's see if we can't get AppVeyor to work --- CI/before_script.msvc.sh | 8 ++++++++ appveyor.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 3cb024dda..51734ceb3 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -20,6 +20,14 @@ while [ $# -gt 0 ]; do -u ) UNITY_BUILD=true ;; + -p ) + PLATFORM=$1 + shift ;; + + -c ) + CONFIGURATION=$1 + shift ;; + * ) echo "Unknown arg $ARG." exit 1 ;; diff --git a/appveyor.yml b/appveyor.yml index b137d4850..46241bf29 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,7 +40,7 @@ cache: clone_folder: C:\projects\openmw before_build: - - cmd: sh PLATFORM=%PLATFORM% %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From 1dbc1e67d8cd4f2807792bac7aa3e83d5fa274b3 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 02:41:35 +0100 Subject: [PATCH 33/42] Possible Qt5 link fix for AppVeyor --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e966a163..d75d044b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,8 +99,8 @@ if (WIN32) option(USE_DEBUG_CONSOLE "whether a debug console should be enabled for debug builds, if false debug output is redirected to Visual Studio output" ON) endif() -# We probably support older versions than this. -cmake_minimum_required(VERSION 2.6) +# To make Qt5 happy and allow linking QtMain on Windows. +cmake_minimum_required(VERSION 2.8.11) # Sound setup unset(FFMPEG_LIBRARIES CACHE) From 2142d0d2d65c40155be00e49578eea5e60a25080 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 02:48:00 +0100 Subject: [PATCH 34/42] Make Qt5 happy --- apps/launcher/CMakeLists.txt | 3 --- apps/opencs/CMakeLists.txt | 3 --- apps/wizard/CMakeLists.txt | 3 --- 3 files changed, 9 deletions(-) diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index 274239fb0..4d2dc6ac4 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -103,9 +103,6 @@ if (DESIRED_QT_VERSION MATCHES 4) endif(WIN32) else() qt5_use_modules(openmw-launcher Widgets Core) - if (WIN32) - target_link_libraries(Qt5::WinMain) - endif() endif() if (BUILD_WITH_CODE_COVERAGE) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 6af04e8fc..a8ed68328 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -224,9 +224,6 @@ if (DESIRED_QT_VERSION MATCHES 4) endif() else() qt5_use_modules(openmw-cs Widgets Core Network OpenGL) - if (WIN32) - target_link_libraries(Qt5::WinMain) - endif() endif() if (WIN32) diff --git a/apps/wizard/CMakeLists.txt b/apps/wizard/CMakeLists.txt index 89438640c..4be5fb2b7 100644 --- a/apps/wizard/CMakeLists.txt +++ b/apps/wizard/CMakeLists.txt @@ -129,9 +129,6 @@ if (DESIRED_QT_VERSION MATCHES 4) endif() else() qt5_use_modules(openmw-wizard Widgets Core) - if (WIN32) - target_link_libraries(Qt5::WinMain) - endif() endif() if (OPENMW_USE_UNSHIELD) From 93ee8f1991beeeb8a1822164df502f2cf940001e Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 11:33:59 +0100 Subject: [PATCH 35/42] Allow for earlier CMake on Qt4 --- CMakeLists.txt | 57 +++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 906c87db2..509988fef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,8 +111,37 @@ if (WIN32) option(USE_DEBUG_CONSOLE "whether a debug console should be enabled for debug builds, if false debug output is redirected to Visual Studio output" ON) endif() -# To make Qt5 happy and allow linking QtMain on Windows. -cmake_minimum_required(VERSION 2.8.11) +if (NOT BUILD_LAUNCHER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD) + set(USE_QT FALSE) +else() + set(USE_QT TRUE) +endif() + +# Dependencies +if (USE_QT) + set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)") + set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5) + message(STATUS "Using Qt${DESIRED_QT_VERSION}") + + if (DESIRED_QT_VERSION MATCHES 4) + find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtNetwork QtOpenGL) + else() + find_package(Qt5Widgets REQUIRED) + find_package(Qt5Core REQUIRED) + find_package(Qt5Network REQUIRED) + find_package(Qt5OpenGL REQUIRED) + # Instruct CMake to run moc automatically when needed. + #set(CMAKE_AUTOMOC ON) + endif() +endif() + +if (USE_QT AND DESIRED_QT_VERSION MATCHES 5) + # 2.8.11+ is required to make Qt5 happy and allow linking QtMain on Windows. + cmake_minimum_required(VERSION 2.8.11) +else() + # We probably support older versions than this. + cmake_minimum_required(VERSION 2.6) +endif() # Sound setup unset(FFMPEG_LIBRARIES CACHE) @@ -167,30 +196,6 @@ if (OPENGL_ES) add_definitions(-DOPENGL_ES) endif(OPENGL_ES) -if (NOT BUILD_LAUNCHER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD) - set(USE_QT FALSE) -else() - set(USE_QT TRUE) -endif() - -# Dependencies -if (USE_QT) - set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)") - set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5) - message(STATUS "Using Qt${DESIRED_QT_VERSION}") - - if (DESIRED_QT_VERSION MATCHES 4) - find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtNetwork QtOpenGL) - else() - find_package(Qt5Widgets REQUIRED) - find_package(Qt5Core REQUIRED) - find_package(Qt5Network REQUIRED) - find_package(Qt5OpenGL REQUIRED) - # Instruct CMake to run moc automatically when needed. - #set(CMAKE_AUTOMOC ON) - endif() -endif() - # Fix for not visible pthreads functions for linker with glibc 2.15 if (UNIX AND NOT APPLE) find_package (Threads) From 09ec622f66d0d4e970c8a32165161d7aa4acdb94 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 11:42:12 +0100 Subject: [PATCH 36/42] Remove unused environment, only do 32-bit --- appveyor.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 46241bf29..631cae63a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,18 +6,10 @@ branches: platform: - Win32 - - x64 +# - x64 configuration: Debug -#environment: -# matrix: -# - STEP: misc -# - STEP: components # misc builds this too -# Build takes too long for these, ignore for now -# - STEP: openmw -# - STEP: opencs - matrix: fast_finish: true From f422fe49f8b2f07bec6e4fcd9950fd15ac9bb7f3 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 18:27:57 +0100 Subject: [PATCH 37/42] Slight improvement to the build setup --- CI/before_script.msvc.sh | 121 ++++++++++++++++++++++++++++----------- appveyor.yml | 3 +- 2 files changed, 91 insertions(+), 33 deletions(-) mode change 100644 => 100755 CI/before_script.msvc.sh diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh old mode 100644 new mode 100755 index 51734ceb3..5aa8d3e9d --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -1,42 +1,86 @@ #!/bin/bash while [ $# -gt 0 ]; do - ARG=$1 + ARGSTR=$1 shift - case $ARG in - -v ) - VERBOSE=true ;; - - -d ) - SKIP_DOWNLOAD=true ;; - - -e ) - SKIP_EXTRACT=true ;; - - -k ) - KEEP=true ;; - - -u ) - UNITY_BUILD=true ;; - - -p ) - PLATFORM=$1 - shift ;; - - -c ) - CONFIGURATION=$1 - shift ;; + if [ ${ARGSTR:0:1} != "-" ]; then + echo "Unknown argument $ARGSTR" + echo "Try '$0 -h'" + exit 1 + fi - * ) - echo "Unknown arg $ARG." - exit 1 ;; - esac + for (( i=1; i<${#ARGSTR}; i++ )); do + ARG=${ARGSTR:$i:1} + case $ARG in + V ) + VERBOSE=true ;; + + v ) + VS_VERSION=$1 + shift ;; + + d ) + SKIP_DOWNLOAD=true ;; + + e ) + SKIP_EXTRACT=true ;; + + k ) + KEEP=true ;; + + u ) + UNITY_BUILD=true ;; + + p ) + PLATFORM=$1 + shift ;; + + c ) + CONFIGURATION=$1 + shift ;; + + h ) + cat < + Set the configuration, can also be set with environment variable CONFIGURATION. + -d + Skip checking the downloads. + -e + Skip extracting dependencies. + -h + Show this message. + -k + Keep the old build directory, default is to delete it. + -p + Set the build platform, can also be set with environment variable PLATFORM. + -u + Configure for unity builds. + -v <2013/2015> + Choose the Visual Studio version to use. + -V + Run verbosely +EOF + exit 0 + ;; + + * ) + echo "Unknown argument $ARG." + echo "Try '$0 -h'" + exit 1 ;; + esac + done 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." @@ -148,14 +192,27 @@ if [ -z $CONFIGURATION ]; then CONFIGURATION="Debug" fi +case $VS_VERSION in + 14|2015 ) + GENERATOR="Visual Studio 14 2015" + XP_TOOLSET="v140_xp" + ;; + +# 12|2013| + * ) + GENERATOR="Visual Studio 12 2013" + XP_TOOLSET="v120_xp" + ;; +esac + case $PLATFORM in x64|x86_64|x86-64|win64|Win64 ) ARCHNAME=x86-64 ARCHSUFFIX=64 BITS=64 - BASE_OPTS="-G\"Visual Studio 12 2013 Win64\"" - add_cmake_opts "-G\"Visual Studio 12 2013 Win64\"" + BASE_OPTS="-G\"$GENERATOR Win64\"" + add_cmake_opts "-G\"$GENERATOR Win64\"" ;; x32|x86|i686|i386|win32|Win32 ) @@ -163,8 +220,8 @@ case $PLATFORM in ARCHSUFFIX=86 BITS=32 - BASE_OPTS="-G\"Visual Studio 12 2013\" -Tv120_xp" - add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp + BASE_OPTS="-G\"$GENERATOR\" -T$XP_TOOLSET" + add_cmake_opts "-G\"$GENERATOR\"" -T$XP_TOOLSET ;; * ) diff --git a/appveyor.yml b/appveyor.yml index 631cae63a..0667e0ee0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,8 @@ matrix: os: unstable -clone_depth: 1 +shallow_clone: true +#clone_depth: 1 cache: - C:\projects\openmw\deps\Bullet-2.83.5-win32.7z From d32358558e91b889cebb79873a5a4bf8b41ac63b Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 24 Dec 2015 22:39:07 +0100 Subject: [PATCH 38/42] We actually want the commit hash, so no zips --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0667e0ee0..28df364df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,8 +15,8 @@ matrix: os: unstable -shallow_clone: true -#clone_depth: 1 +#shallow_clone: true +clone_depth: 1 cache: - C:\projects\openmw\deps\Bullet-2.83.5-win32.7z From 1ac091e5b5c0200356bdb50e3d23fe606f834703 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 27 Dec 2015 20:00:52 +0100 Subject: [PATCH 39/42] Quick appveyor.yml cleanup --- appveyor.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 28df364df..1bc0d3ca6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,8 @@ version: "{build}" branches: only: + - master + - /openmw-.*$/ - appveyor platform: @@ -13,9 +15,11 @@ configuration: Debug matrix: fast_finish: true +# For the Qt, Boost, CMake, etc installs os: unstable -#shallow_clone: true +# We want the git revision for versioning, +# so shallow clones don't work. clone_depth: 1 cache: @@ -41,3 +45,10 @@ build_script: - cmd: msbuild %build%\OpenMW.sln /t:Build /p:Configuration=%configuration% /m:2 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" test: off + +#notifications: +# - provider: Email +# to: +# - +# on_build_failure: true +# on_build_status_changed: true From d5196ac4fc3ea94646023e1ee0c59a9eeac39c55 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Sun, 27 Dec 2015 20:05:37 +0100 Subject: [PATCH 40/42] Let's throw in a build badge too --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f353cd76e..585805368 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ OpenMW ====== -[![Build Status](https://img.shields.io/travis/OpenMW/openmw.svg)](https://travis-ci.org/OpenMW/openmw) [![Coverity Scan Build Status](https://scan.coverity.com/projects/3740/badge.svg)](https://scan.coverity.com/projects/3740) +[![Build Status](https://img.shields.io/travis/OpenMW/openmw.svg)](https://travis-ci.org/OpenMW/openmw) [![Build status](https://ci.appveyor.com/api/projects/status/e6bqw8oouy8ufd46?svg=true)](https://ci.appveyor.com/project/ace13/openmw) [![Coverity Scan Build Status](https://scan.coverity.com/projects/3740/badge.svg)](https://scan.coverity.com/projects/3740) OpenMW is a recreation of the engine for the popular role-playing game Morrowind by Bethesda Softworks. You need to own and install the original game for OpenMW to work. From 05335491ac82a78f1fe050f3b84478df0e61442d Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 28 Dec 2015 05:42:21 +0100 Subject: [PATCH 41/42] Build without unity builds, how far will we get? --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1bc0d3ca6..3e3de6780 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ cache: 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 -p %PLATFORM% build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32 From 42e3ff6f962dc68296b12ee693871d7f9201cc07 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 28 Dec 2015 09:01:08 +0100 Subject: [PATCH 42/42] Revert "Build without unity builds, how far will we get?" This reverts commit 05335491ac82a78f1fe050f3b84478df0e61442d. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3e3de6780..1bc0d3ca6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ cache: clone_folder: C:\projects\openmw before_build: - - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -p %PLATFORM% + - cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% build_script: - cmd: if %PLATFORM%==Win32 set build=Build_32