More script fixes

coverity_scan
Alexander "Ace" Olofsson 10 years ago
parent cd4042109a
commit d7494128a2

@ -8,14 +8,9 @@ while [ $# -gt 0 ]; do
-v ) -v )
VERBOSE=true ;; 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 esac
done done
@ -23,9 +18,14 @@ if [ -z $VERBOSE ]; then
STRIP="> /dev/null 2>&1" STRIP="> /dev/null 2>&1"
fi fi
cd $(dirname $0)/.. if [ -z $APPVEYOR ]; then
which appveyor > /dev/null echo "Running prebuild outside of Appveyor."
if [ $? -eq 0 ]; then
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)" VERSION="$(cat README.md | grep Version: | awk '{ print $3; }')-$(git rev-parse --short HEAD)"
appveyor UpdateBuild -Version "$VERSION" appveyor UpdateBuild -Version "$VERSION"
fi fi
@ -70,28 +70,43 @@ add_cmake_opts() {
} }
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
if [ -z "$platform" ]; then if [ -z "$PLATFORM" ]; then
ARCH=`uname -m` ARCH=`uname -m`
else else
ARCH="$platform" ARCH="$PLATFORM"
fi fi
fi fi
if [ $ARCH == x86_64 ]; then case $PLATFORM in
ARCHNAME=x86-64 x64|x86_64|x86-64|win64|Win64 )
ARCHSUFFIX=64 ARCHNAME=x86-64
BITS=64 ARCHSUFFIX=64
BITS=64
BASE_OPTS="-G\"Visual Studio 12 2013 Win64\"" BASE_OPTS="-G\"Visual Studio 12 2013 Win64\""
add_cmake_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" x32|x86|i686|i386|win32|Win32 )
add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp ARCHNAME=x86
fi 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 mkdir -p deps
cd deps cd deps
@ -108,7 +123,7 @@ echo
# Bullet # Bullet
echo "Bullet 2.83.4..." 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 echo
# FFmpeg # FFmpeg

@ -1,17 +1,17 @@
#!/bin/bash #!/bin/bash
case $1 in case $PLATFORM in
x86|i686|win32 ) x32|x86|i686|i386|win32|Win32 )
BITS=32 ;; BITS=32 ;;
x64_64|x64|win64 ) x64|x86_64|x86-64|win64|Win64 )
BITS=64 ;; BITS=64 ;;
* ) * )
echo "Unknown platform $ARG." echo "Unknown platform $PLATFORM."
exit 1 ;; exit 1 ;;
esac esac
cd $(dirname $0)/../build_$BITS 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"

@ -11,14 +11,30 @@ configuration:
matrix: matrix:
fast_finish: true 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: init:
- cmd: bash --version
- cmd: cmake --version - cmd: cmake --version
- cmd: msbuild /version - cmd: msbuild /version
- cmd: echo.
clone_folder: C:\projects\openmw clone_folder: C:\projects\openmw
build_script: build_script:
- cmd: sh C:\projects\openmw\CI\build.msvc.sh %platform% %configuration% - cmd: sh C:\projects\openmw\CI\build.msvc.sh
before_build: before_build:
- cmd: sh C:\projects\openmw\CI\before_script.msvc.sh %platform% - cmd: sh C:\projects\openmw\CI\before_script.msvc.sh

Loading…
Cancel
Save