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