From e49cf2888de2c8a0ef5e3189afbeda0d674d04c9 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 3 Jun 2015 10:15:28 +0200 Subject: [PATCH 1/5] 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 a1e29162bdb6da9069394c439a90a7e96cfa4e01 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Wed, 24 Jun 2015 15:54:00 +0200 Subject: [PATCH 2/5] 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 3/5] 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 4/5] 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 5/5] 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