~openmw/openmw/openmw-packaging2

« back to all changes in this revision

Viewing changes to CI/build.msvc.sh

  • Committer: Scott Howard
  • Date: 2016-04-16 07:00:56 UTC
  • Revision ID: showard@debian.org-20160416070056-v6l5thn424is72s4
Cron update. Git hash: 1f7a547

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
if [ -z $PLATFORM ]; then
 
4
        PLATFORM=`uname -m`
 
5
fi
 
6
 
 
7
if [ -z $CONFIGURATION ]; then
 
8
        CONFIGURATION="Debug"
 
9
fi
 
10
 
 
11
case $PLATFORM in
 
12
        x32|x86|i686|i386|win32|Win32 )
 
13
                BITS=32
 
14
                PLATFORM=Win32
 
15
                ;;
 
16
 
 
17
        x64|x86_64|x86-64|win64|Win64 )
 
18
                BITS=64
 
19
                PLATFORM=x64
 
20
                ;;
 
21
 
 
22
        * )
 
23
                echo "Unknown platform $PLATFORM."
 
24
                exit 1 ;;
 
25
esac
 
26
 
 
27
if [ -z $APPVEYOR ]; then
 
28
        echo "Running $BITS-bit $CONFIGURATION build outside of Appveyor."
 
29
 
 
30
        DIR=$(echo "$0" | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,")
 
31
        cd $(dirname "$DIR")/..
 
32
else
 
33
        echo "Running $BITS-bit $CONFIGURATION build in Appveyor."
 
34
 
 
35
        cd $APPVEYOR_BUILD_FOLDER
 
36
fi
 
37
 
 
38
cd build_$BITS
 
39
 
 
40
which msbuild > /dev/null
 
41
if [ $? -ne 0 ]; then
 
42
        msbuild() {
 
43
                /c/Program\ Files\ \(x86\)/MSBuild/12.0/Bin/MSBuild.exe "$@"
 
44
        }
 
45
fi
 
46
 
 
47
if [ -z $APPVEYOR ]; then
 
48
        msbuild OpenMW.sln //t:Build //m:8
 
49
else
 
50
        msbuild OpenMW.sln //t:Build //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
 
51
fi
 
52
 
 
53
RET=$?
 
54
if [ $RET -eq 0 ] && [ ! -z $PACKAGE ]; then
 
55
        msbuild PACKAGE.vcxproj //t:Build //m:8
 
56
        RET=$?
 
57
fi
 
58
 
 
59
exit $RET