Slight improvement to the build setup

coverity_scan
Alexander "Ace" Olofsson 9 years ago
parent 09ec622f66
commit f422fe49f8

@ -1,42 +1,86 @@
#!/bin/bash
while [ $# -gt 0 ]; do
ARG=$1
ARGSTR=$1
shift
case $ARG in
-v )
VERBOSE=true ;;
-d )
SKIP_DOWNLOAD=true ;;
-e )
SKIP_EXTRACT=true ;;
-k )
KEEP=true ;;
-u )
UNITY_BUILD=true ;;
-p )
PLATFORM=$1
shift ;;
-c )
CONFIGURATION=$1
shift ;;
if [ ${ARGSTR:0:1} != "-" ]; then
echo "Unknown argument $ARGSTR"
echo "Try '$0 -h'"
exit 1
fi
* )
echo "Unknown arg $ARG."
exit 1 ;;
esac
for (( i=1; i<${#ARGSTR}; i++ )); do
ARG=${ARGSTR:$i:1}
case $ARG in
V )
VERBOSE=true ;;
v )
VS_VERSION=$1
shift ;;
d )
SKIP_DOWNLOAD=true ;;
e )
SKIP_EXTRACT=true ;;
k )
KEEP=true ;;
u )
UNITY_BUILD=true ;;
p )
PLATFORM=$1
shift ;;
c )
CONFIGURATION=$1
shift ;;
h )
cat <<EOF
Usage: $0 [-cdehkpuvV]
Options:
-c <Release/Debug>
Set the configuration, can also be set with environment variable CONFIGURATION.
-d
Skip checking the downloads.
-e
Skip extracting dependencies.
-h
Show this message.
-k
Keep the old build directory, default is to delete it.
-p <Win32/Win64>
Set the build platform, can also be set with environment variable PLATFORM.
-u
Configure for unity builds.
-v <2013/2015>
Choose the Visual Studio version to use.
-V
Run verbosely
EOF
exit 0
;;
* )
echo "Unknown argument $ARG."
echo "Try '$0 -h'"
exit 1 ;;
esac
done
done
if [ -z $VERBOSE ]; then
STRIP="> /dev/null 2>&1"
fi
if [ -z $VS_VERSION ]; then
VS_VERSION="2013"
fi
if [ -z $APPVEYOR ]; then
echo "Running prebuild outside of Appveyor."
@ -148,14 +192,27 @@ if [ -z $CONFIGURATION ]; then
CONFIGURATION="Debug"
fi
case $VS_VERSION in
14|2015 )
GENERATOR="Visual Studio 14 2015"
XP_TOOLSET="v140_xp"
;;
# 12|2013|
* )
GENERATOR="Visual Studio 12 2013"
XP_TOOLSET="v120_xp"
;;
esac
case $PLATFORM in
x64|x86_64|x86-64|win64|Win64 )
ARCHNAME=x86-64
ARCHSUFFIX=64
BITS=64
BASE_OPTS="-G\"Visual Studio 12 2013 Win64\""
add_cmake_opts "-G\"Visual Studio 12 2013 Win64\""
BASE_OPTS="-G\"$GENERATOR Win64\""
add_cmake_opts "-G\"$GENERATOR Win64\""
;;
x32|x86|i686|i386|win32|Win32 )
@ -163,8 +220,8 @@ case $PLATFORM in
ARCHSUFFIX=86
BITS=32
BASE_OPTS="-G\"Visual Studio 12 2013\" -Tv120_xp"
add_cmake_opts "-G\"Visual Studio 12 2013\"" -Tv120_xp
BASE_OPTS="-G\"$GENERATOR\" -T$XP_TOOLSET"
add_cmake_opts "-G\"$GENERATOR\"" -T$XP_TOOLSET
;;
* )

@ -15,7 +15,8 @@ matrix:
os: unstable
clone_depth: 1
shallow_clone: true
#clone_depth: 1
cache:
- C:\projects\openmw\deps\Bullet-2.83.5-win32.7z

Loading…
Cancel
Save