1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/CI/build.msvc.sh

44 lines
861 B
Bash
Raw Normal View History

2015-06-02 21:11:09 +00:00
#!/bin/bash
if [ -z $PLATFORM ]; then
PLATFORM=`uname -m`
fi
if [ -z $CONFIGURATION ]; then
CONFIGURATION="Debug"
fi
2015-06-02 21:50:52 +00:00
case $PLATFORM in
x32|x86|i686|i386|win32|Win32 )
2015-06-02 21:29:47 +00:00
BITS=32 ;;
2015-06-02 21:11:09 +00:00
2015-06-02 21:50:52 +00:00
x64|x86_64|x86-64|win64|Win64 )
2015-06-02 21:29:47 +00:00
BITS=64 ;;
2015-06-02 21:11:09 +00:00
2015-06-02 21:29:47 +00:00
* )
2015-06-02 21:50:52 +00:00
echo "Unknown platform $PLATFORM."
2015-06-02 21:29:47 +00:00
exit 1 ;;
esac
2015-06-02 21:11:09 +00:00
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
2015-06-02 21:11:09 +00:00
which msbuild > /dev/null
if [ $? -ne 0 ]; then
msbuild() {
/c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe "$@"
}
fi
2015-06-02 21:50:52 +00:00
msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"