2015-06-02 21:11:09 +00:00
#!/bin/bash
2018-06-29 13:17:19 +00:00
# set -x # turn-on for debugging
2015-06-02 21:11:09 +00:00
2020-05-16 21:55:14 +00:00
function wrappedExit {
if [ [ " ${ BASH_SOURCE [0] } " = = " ${ 0 } " ] ] ; then
exit $1
else
return $1
fi
}
2018-06-07 14:28:45 +00:00
MISSINGTOOLS = 0
command -v 7z >/dev/null 2>& 1 || { echo "Error: 7z (7zip) is not on the path." ; MISSINGTOOLS = 1; }
command -v cmake >/dev/null 2>& 1 || { echo "Error: cmake (CMake) is not on the path." ; MISSINGTOOLS = 1; }
2020-06-03 22:36:55 +00:00
MISSINGPYTHON = 0
if ! command -v python >/dev/null 2>& 1; then
echo "Warning: Python is not on the path, automatic Qt installation impossible."
MISSINGPYTHON = 1
elif ! python --version >/dev/null 2>& 1; then
echo "Warning: Python is (probably) fake stub Python that comes bundled with newer versions of Windows, automatic Qt installation impossible."
echo "If you think you have Python installed, try changing the order of your PATH environment variable in Advanced System Settings."
MISSINGPYTHON = 1
fi
2018-06-07 14:28:45 +00:00
if [ $MISSINGTOOLS -ne 0 ] ; then
2020-05-16 21:55:14 +00:00
wrappedExit 1
2018-06-07 14:28:45 +00:00
fi
WORKINGDIR = " $( pwd ) "
case " $WORKINGDIR " in
*[ [ :space:] ] *)
echo "Error: Working directory contains spaces."
2020-05-16 21:55:14 +00:00
wrappedExit 1
2018-06-07 14:28:45 +00:00
; ;
esac
2016-08-28 19:42:48 +00:00
set -euo pipefail
2020-05-16 21:55:14 +00:00
function windowsPathAsUnix {
if command -v cygpath >/dev/null 2>& 1; then
cygpath -u $1
else
echo " $1 " | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,"
fi
}
function unixPathAsWindows {
if command -v cygpath >/dev/null 2>& 1; then
cygpath -w $1
else
echo " $1 " | sed "s,^/\([^/]\)/,\\1:/," | sed "s,/,\\\\,g"
fi
}
2016-08-28 19:48:00 +00:00
APPVEYOR = ${ APPVEYOR :- }
CI = ${ CI :- }
2016-08-28 19:54:41 +00:00
STEP = ${ STEP :- }
2016-08-28 19:42:48 +00:00
VERBOSE = ""
STRIP = ""
SKIP_DOWNLOAD = ""
SKIP_EXTRACT = ""
KEEP = ""
UNITY_BUILD = ""
VS_VERSION = ""
2018-12-07 14:46:32 +00:00
NMAKE = ""
2020-05-16 21:55:14 +00:00
NINJA = ""
2020-05-16 23:12:04 +00:00
PDBS = ""
2016-08-28 19:42:48 +00:00
PLATFORM = ""
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
CONFIGURATIONS = ( )
2019-01-20 13:36:48 +00:00
TEST_FRAMEWORK = ""
GOOGLE_INSTALL_ROOT = ""
2020-05-10 10:45:56 +00:00
INSTALL_PREFIX = "."
2020-05-16 23:12:04 +00:00
BULLET_DOUBLE = ""
BULLET_DBL = ""
BULLET_DBL_DISPLAY = "Single precision"
2016-08-28 19:42:48 +00:00
2020-05-16 21:55:14 +00:00
ACTIVATE_MSVC = ""
SINGLE_CONFIG = ""
2015-06-02 21:11:09 +00:00
while [ $# -gt 0 ] ; do
2015-12-24 17:27:57 +00:00
ARGSTR = $1
2015-06-02 21:11:09 +00:00
shift
2015-12-24 17:27:57 +00:00
if [ ${ ARGSTR : 0 : 1 } != "-" ] ; then
echo " Unknown argument $ARGSTR "
echo " Try ' $0 -h' "
2020-05-16 21:55:14 +00:00
wrappedExit 1
2015-12-24 17:27:57 +00:00
fi
2015-12-23 18:32:43 +00:00
2015-12-24 17:27:57 +00:00
for ( ( i = 1; i<${# ARGSTR } ; i++ ) ) ; do
ARG = ${ ARGSTR : $i : 1 }
case $ARG in
V )
VERBOSE = true ; ;
d )
SKIP_DOWNLOAD = true ; ;
2020-05-16 23:12:04 +00:00
D )
BULLET_DOUBLE = true ; ;
2015-12-24 17:27:57 +00:00
e )
SKIP_EXTRACT = true ; ;
k )
KEEP = true ; ;
u )
UNITY_BUILD = true ; ;
2016-08-28 19:42:48 +00:00
v )
VS_VERSION = $1
shift ; ;
2018-12-07 14:46:32 +00:00
n )
NMAKE = true ; ;
2020-05-16 21:55:14 +00:00
N )
NINJA = true ; ;
2018-12-07 14:46:32 +00:00
2015-12-24 17:27:57 +00:00
p )
PLATFORM = $1
shift ; ;
2020-05-16 23:12:04 +00:00
P )
PDBS = true ; ;
2015-12-24 17:27:57 +00:00
c )
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
CONFIGURATIONS += ( $1 )
2015-12-24 17:27:57 +00:00
shift ; ;
2019-01-20 13:36:48 +00:00
t )
TEST_FRAMEWORK = true ; ;
2019-03-06 21:26:45 +00:00
2020-05-10 10:45:56 +00:00
i )
INSTALL_PREFIX = $( echo " $1 " | sed 's;\\;/;g' | sed -E 's;/+;/;g' )
shift ; ;
2015-12-24 17:27:57 +00:00
h )
cat <<EOF
2020-05-10 10:45:56 +00:00
Usage: $0 [ -cdehkpuvVi]
2015-12-24 17:27:57 +00:00
Options:
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
-c <Release/Debug/RelWithDebInfo>
2015-12-24 17:27:57 +00:00
Set the configuration, can also be set with environment variable CONFIGURATION.
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
For mutli-config generators, this is ignored, and all configurations are set up.
For single-config generators, several configurations can be set up at once by specifying -c multiple times.
2015-12-24 17:27:57 +00:00
-d
Skip checking the downloads.
2020-05-16 23:12:04 +00:00
-D
Use double-precision Bullet
2015-12-24 17:27:57 +00:00
-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.
2019-03-06 21:26:45 +00:00
-t
Build unit tests / Google test
2015-12-24 17:27:57 +00:00
-u
Configure for unity builds.
2020-06-18 13:46:08 +00:00
-v <2017/2019>
2015-12-24 17:27:57 +00:00
Choose the Visual Studio version to use.
2018-12-07 14:46:32 +00:00
-n
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
Produce NMake makefiles instead of a Visual Studio solution. Cannot be used with -N.
2020-05-16 21:55:14 +00:00
-N
2020-05-17 00:23:18 +00:00
Produce Ninja ( multi-config if CMake is new enough to support it) files instead of a Visual Studio solution. Cannot be used with -n..
2020-05-16 23:12:04 +00:00
-P
Download debug symbols where available
2015-12-24 17:27:57 +00:00
-V
Run verbosely
2020-05-10 10:45:56 +00:00
-i
CMake install prefix
2015-12-24 17:27:57 +00:00
EOF
2020-05-16 21:55:14 +00:00
wrappedExit 0
2015-12-24 17:27:57 +00:00
; ;
* )
echo " Unknown argument $ARG . "
echo " Try ' $0 -h' "
2020-05-16 21:55:14 +00:00
wrappedExit 1 ; ;
2015-12-24 17:27:57 +00:00
esac
done
2015-06-02 21:11:09 +00:00
done
2020-05-16 21:55:14 +00:00
if [ -n " $NMAKE " ] || [ -n " $NINJA " ] ; then
if [ -n " $NMAKE " ] && [ -n " $NINJA " ] ; then
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
echo "Cannot run in NMake and Ninja mode at the same time."
2020-05-16 21:55:14 +00:00
wrappedExit 1
fi
ACTIVATE_MSVC = true
2018-12-07 14:46:32 +00:00
fi
2015-06-02 21:11:09 +00:00
if [ -z $VERBOSE ] ; then
STRIP = "> /dev/null 2>&1"
fi
2015-06-02 21:50:52 +00:00
if [ -z $APPVEYOR ] ; then
echo "Running prebuild outside of Appveyor."
2020-05-16 21:55:14 +00:00
DIR = $( windowsPathAsUnix " ${ BASH_SOURCE [0] } " )
2015-06-02 23:41:45 +00:00
cd $( dirname " $DIR " ) /..
2015-06-02 21:50:52 +00:00
else
echo "Running prebuild in Appveyor."
2016-08-28 22:37:20 +00:00
cd " $APPVEYOR_BUILD_FOLDER "
2015-06-02 21:11:09 +00:00
fi
2015-06-02 22:51:22 +00:00
run_cmd( ) {
CMD = " $1 "
shift
if [ -z $VERBOSE ] ; then
2020-06-13 00:51:27 +00:00
RET = 0
eval $CMD $@ > output.log 2>& 1 || RET = $?
2015-06-02 22:51:22 +00:00
if [ $RET -ne 0 ] ; then
if [ -z $APPVEYOR ] ; then
2016-08-28 21:23:44 +00:00
echo " Command $CMD failed, output can be found in $( real_pwd) /output.log "
2015-06-02 22:51:22 +00:00
else
2015-06-25 17:19:04 +00:00
echo
echo " Command $CMD failed; "
cat output.log
2015-06-02 22:51:22 +00:00
fi
else
rm output.log
fi
return $RET
else
2020-06-13 00:51:27 +00:00
RET = 0
eval $CMD $@ || RET = $?
2020-06-16 13:51:25 +00:00
return $RET
2015-06-02 22:51:22 +00:00
fi
}
2015-06-02 21:11:09 +00:00
download( ) {
2015-06-24 13:54:00 +00:00
if [ $# -lt 3 ] ; then
echo "Invalid parameters to download."
return 1
fi
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
NAME = $1
shift
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
echo " $NAME ... "
while [ $# -gt 1 ] ; do
URL = $1
FILE = $2
shift
shift
if ! [ -f $FILE ] ; then
printf " Downloading $FILE ... "
if [ -z $VERBOSE ] ; then
2020-06-13 00:51:27 +00:00
RET = 0
2020-08-03 22:59:08 +00:00
curl --silent --retry 10 -Ly 5 -o $FILE $URL || RET = $?
2015-06-24 13:54:00 +00:00
else
2020-06-13 00:51:27 +00:00
RET = 0
2020-08-03 22:59:08 +00:00
curl --retry 10 -Ly 5 -o $FILE $URL || RET = $?
2015-06-24 13:54:00 +00:00
fi
if [ $RET -ne 0 ] ; then
echo "Failed!"
2020-06-13 00:51:27 +00:00
wrappedExit $RET
2015-06-24 13:54:00 +00:00
else
echo "Done."
fi
2015-06-02 21:11:09 +00:00
else
2015-06-24 13:54:00 +00:00
echo " $FILE exists, skipping. "
2015-06-02 21:11:09 +00:00
fi
2015-06-24 13:54:00 +00:00
done
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
if [ $# -ne 0 ] ; then
echo "Missing parameter."
2015-06-02 21:11:09 +00:00
fi
}
real_pwd( ) {
2018-11-03 19:19:44 +00:00
if type cygpath >/dev/null 2>& 1; then
cygpath -am " $PWD "
else
pwd # not git bash, Cygwin or the like
fi
2015-06-02 21:11:09 +00:00
}
CMAKE_OPTS = ""
add_cmake_opts( ) {
CMAKE_OPTS = " $CMAKE_OPTS $@ "
}
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
declare -A RUNTIME_DLLS
RUNTIME_DLLS[ "Release" ] = ""
RUNTIME_DLLS[ "Debug" ] = ""
RUNTIME_DLLS[ "RelWithDebInfo" ] = ""
2015-06-24 13:54:00 +00:00
add_runtime_dlls( ) {
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
local CONFIG = $1
shift
RUNTIME_DLLS[ $CONFIG ] = " ${ RUNTIME_DLLS [ $CONFIG ] } $@ "
2015-06-24 13:54:00 +00:00
}
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
declare -A OSG_PLUGINS
OSG_PLUGINS[ "Release" ] = ""
OSG_PLUGINS[ "Debug" ] = ""
OSG_PLUGINS[ "RelWithDebInfo" ] = ""
2015-07-11 22:45:42 +00:00
add_osg_dlls( ) {
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
local CONFIG = $1
shift
OSG_PLUGINS[ $CONFIG ] = " ${ OSG_PLUGINS [ $CONFIG ] } $@ "
2015-07-11 22:45:42 +00:00
}
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
declare -A QT_PLATFORMS
QT_PLATFORMS[ "Release" ] = ""
QT_PLATFORMS[ "Debug" ] = ""
QT_PLATFORMS[ "RelWithDebInfo" ] = ""
2016-08-29 05:07:50 +00:00
add_qt_platform_dlls( ) {
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
local CONFIG = $1
shift
QT_PLATFORMS[ $CONFIG ] = " ${ QT_PLATFORMS [ $CONFIG ] } $@ "
2016-08-29 05:07:50 +00:00
}
2015-06-02 23:41:45 +00:00
if [ -z $PLATFORM ] ; then
2016-08-28 21:23:44 +00:00
PLATFORM = " $( uname -m) "
2015-06-02 23:41:45 +00:00
fi
2016-08-28 19:42:48 +00:00
if [ -z $VS_VERSION ] ; then
2019-10-21 12:28:12 +00:00
VS_VERSION = "2017"
2016-08-28 19:42:48 +00:00
fi
2015-12-24 17:27:57 +00:00
case $VS_VERSION in
2019-10-12 06:08:43 +00:00
16| 16.0| 2019 )
GENERATOR = "Visual Studio 16 2019"
TOOLSET = "vc142"
MSVC_REAL_VER = "16"
MSVC_VER = "14.2"
MSVC_YEAR = "2015"
2020-05-16 23:12:04 +00:00
MSVC_REAL_YEAR = "2019"
2019-10-12 06:08:43 +00:00
MSVC_DISPLAY_YEAR = "2019"
BOOST_VER = "1.71.0"
BOOST_VER_URL = "1_71_0"
BOOST_VER_SDK = "107100"
; ;
2017-07-14 00:07:16 +00:00
15| 15.0| 2017 )
GENERATOR = "Visual Studio 15 2017"
2018-06-28 12:18:01 +00:00
TOOLSET = "vc141"
2018-05-20 16:22:02 +00:00
MSVC_REAL_VER = "15"
2018-06-27 20:24:08 +00:00
MSVC_VER = "14.1"
2017-07-14 00:07:16 +00:00
MSVC_YEAR = "2015"
2020-05-16 23:12:04 +00:00
MSVC_REAL_YEAR = "2017"
2017-07-14 00:07:16 +00:00
MSVC_DISPLAY_YEAR = "2017"
2019-10-12 06:08:43 +00:00
BOOST_VER = "1.67.0"
BOOST_VER_URL = "1_67_0"
BOOST_VER_SDK = "106700"
2017-07-14 00:07:16 +00:00
; ;
2016-08-28 19:42:48 +00:00
14| 14.0| 2015 )
2020-06-18 13:46:08 +00:00
echo "Visual Studio 2015 is no longer supported"
wrappedExit 1
2015-12-24 17:27:57 +00:00
; ;
2016-08-28 19:42:48 +00:00
12| 12.0| 2013 )
2020-05-16 23:12:04 +00:00
echo "Visual Studio 2013 is no longer supported"
2020-06-18 13:46:08 +00:00
wrappedExit 1
2015-12-24 17:27:57 +00:00
; ;
esac
2015-06-02 21:50:52 +00:00
case $PLATFORM in
x64| x86_64| x86-64| win64| Win64 )
2016-08-28 19:42:48 +00:00
ARCHNAME = "x86-64"
ARCHSUFFIX = "64"
BITS = "64"
2015-06-02 21:50:52 +00:00
; ;
2015-06-02 21:11:09 +00:00
2015-06-02 21:50:52 +00:00
x32| x86| i686| i386| win32| Win32 )
2016-08-28 19:42:48 +00:00
ARCHNAME = "x86"
ARCHSUFFIX = "86"
BITS = "32"
2015-06-02 21:50:52 +00:00
; ;
* )
echo " Unknown platform $PLATFORM . "
2020-05-16 21:55:14 +00:00
wrappedExit 1
2015-06-02 21:50:52 +00:00
; ;
esac
2019-10-12 06:08:43 +00:00
if [ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ] ; then
2018-03-13 18:58:52 +00:00
GENERATOR = " ${ GENERATOR } Win64 "
fi
2018-12-07 15:03:36 +00:00
if [ -n " $NMAKE " ] ; then
2018-12-07 14:46:32 +00:00
GENERATOR = "NMake Makefiles"
2020-05-16 21:55:14 +00:00
SINGLE_CONFIG = true
2018-12-07 14:46:32 +00:00
fi
2020-05-16 21:55:14 +00:00
if [ -n " $NINJA " ] ; then
GENERATOR = "Ninja Multi-Config"
if ! cmake -E capabilities | grep -F " $GENERATOR " > /dev/null; then
SINGLE_CONFIG = true
GENERATOR = "Ninja"
fi
fi
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
if [ -n " $SINGLE_CONFIG " ] ; then
if [ ${# CONFIGURATIONS [@] } -eq 0 ] ; then
if [ -n " ${ CONFIGURATION :- } " ] ; then
CONFIGURATIONS = ( " $CONFIGURATION " )
else
CONFIGURATIONS = ( "Debug" )
fi
elif [ ${# CONFIGURATIONS [@] } -ne 1 ] ; then
# It's simplest just to recursively call the script a few times.
RECURSIVE_OPTIONS = ( )
if [ -n " $VERBOSE " ] ; then
RECURSIVE_OPTIONS += ( "-V" )
fi
if [ -n " $SKIP_DOWNLOAD " ] ; then
RECURSIVE_OPTIONS += ( "-d" )
fi
if [ -n " $BULLET_DOUBLE " ] ; then
RECURSIVE_OPTIONS += ( "-D" )
fi
if [ -n " $SKIP_EXTRACT " ] ; then
RECURSIVE_OPTIONS += ( "-e" )
fi
if [ -n " $KEEP " ] ; then
RECURSIVE_OPTIONS += ( "-k" )
fi
if [ -n " $UNITY_BUILD " ] ; then
RECURSIVE_OPTIONS += ( "-u" )
fi
if [ -n " $NMAKE " ] ; then
RECURSIVE_OPTIONS += ( "-n" )
fi
if [ -n " $NINJA " ] ; then
RECURSIVE_OPTIONS += ( "-N" )
fi
if [ -n " $PDBS " ] ; then
RECURSIVE_OPTIONS += ( "-P" )
fi
if [ -n " $TEST_FRAMEWORK " ] ; then
RECURSIVE_OPTIONS += ( "-t" )
fi
RECURSIVE_OPTIONS += ( " -v $VS_VERSION " )
RECURSIVE_OPTIONS += ( " -p $PLATFORM " )
RECURSIVE_OPTIONS += ( " -i ' $INSTALL_PREFIX ' " )
for config in ${ CONFIGURATIONS [@] } ; do
$0 ${ RECURSIVE_OPTIONS [@] } -c $config
done
wrappedExit 1
fi
else
if [ ${# CONFIGURATIONS [@] } -ne 0 ] ; then
echo "Ignoring configurations argument - generator is multi-config"
fi
CONFIGURATIONS = ( "Release" "Debug" "RelWithDebInfo" )
fi
for i in ${ !CONFIGURATIONS[@] } ; do
case ${ CONFIGURATIONS [ $i ] } in
debug| Debug| DEBUG )
CONFIGURATIONS[ $i ] = Debug
; ;
release| Release| RELEASE )
CONFIGURATIONS[ $i ] = Release
; ;
relwithdebinfo| RelWithDebInfo| RELWITHDEBINFO )
CONFIGURATIONS[ $i ] = RelWithDebInfo
; ;
esac
done
2020-05-16 21:55:14 +00:00
if [ $MSVC_REAL_VER -ge 16 ] && [ -z " $NMAKE " ] && [ -z " $NINJA " ] ; then
2019-10-12 06:08:43 +00:00
if [ $BITS -eq 64 ] ; then
add_cmake_opts " -G\" $GENERATOR \" -A x64 "
else
add_cmake_opts " -G\" $GENERATOR \" -A Win32 "
fi
else
add_cmake_opts " -G\" $GENERATOR \" "
fi
2018-12-07 14:46:32 +00:00
2020-05-16 21:55:14 +00:00
if [ -n " $SINGLE_CONFIG " ] ; then
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
add_cmake_opts " -DCMAKE_BUILD_TYPE= ${ CONFIGURATIONS [0] } "
2018-12-07 14:46:32 +00:00
fi
if ! [ -z $UNITY_BUILD ] ; then
add_cmake_opts "-DOPENMW_UNITY_BUILD=True"
fi
2020-05-16 23:12:04 +00:00
if [ -n " $BULLET_DOUBLE " ] ; then
BULLET_DBL = "-double"
BULLET_DBL_DISPLAY = "Double precision"
add_cmake_opts "-DBULLET_USE_DOUBLES=True"
fi
2015-06-02 21:50:52 +00:00
echo
2016-08-28 19:42:48 +00:00
echo "==================================="
2017-07-14 00:07:16 +00:00
echo " Starting prebuild on MSVC ${ MSVC_DISPLAY_YEAR } WIN ${ BITS } "
2016-08-28 19:42:48 +00:00
echo "==================================="
2015-06-02 21:50:52 +00:00
echo
2015-06-02 21:11:09 +00:00
2015-06-08 00:14:20 +00:00
# cd OpenMW/AppVeyor-test
2015-06-02 21:11:09 +00:00
mkdir -p deps
cd deps
2016-08-28 21:23:44 +00:00
DEPS = " $( pwd ) "
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
if [ -z $SKIP_DOWNLOAD ] ; then
echo "Downloading dependency packages."
2015-06-02 22:51:22 +00:00
echo
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
# Boost
if [ -z $APPVEYOR ] ; then
2019-10-12 06:08:43 +00:00
download " Boost ${ BOOST_VER } " \
2020-10-02 21:07:46 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/boost_ ${ BOOST_VER_URL } -msvc- ${ MSVC_VER } - ${ BITS } .exe " \
2019-10-12 06:08:43 +00:00
" boost- ${ BOOST_VER } -msvc ${ MSVC_VER } -win ${ BITS } .exe "
2015-06-24 13:54:00 +00:00
fi
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
# Bullet
2020-05-16 23:12:04 +00:00
download " Bullet 2.89 ( ${ BULLET_DBL_DISPLAY } ) " \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/Bullet-2.89-msvc ${ MSVC_YEAR } -win ${ BITS } ${ BULLET_DBL } .7z " \
2020-05-16 23:12:04 +00:00
" Bullet-2.89-msvc ${ MSVC_YEAR } -win ${ BITS } ${ BULLET_DBL } .7z "
2015-06-24 13:54:00 +00:00
# FFmpeg
2020-05-16 23:12:04 +00:00
download "FFmpeg 4.2.2" \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/ffmpeg-4.2.2-win ${ BITS } .zip " \
2020-05-16 23:12:04 +00:00
" ffmpeg-4.2.2-win ${ BITS } .zip " \
2020-09-29 11:13:26 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/ffmpeg-4.2.2-dev-win ${ BITS } .zip " \
2020-05-16 23:12:04 +00:00
" ffmpeg-4.2.2-dev-win ${ BITS } .zip "
2015-06-24 13:54:00 +00:00
# MyGUI
2020-05-16 23:12:04 +00:00
download "MyGUI 3.4.0" \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z " \
2020-05-16 23:12:04 +00:00
" MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z "
if [ -n " $PDBS " ] ; then
download "MyGUI symbols" \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z " \
2020-05-16 23:12:04 +00:00
" MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z "
fi
2015-06-24 13:54:00 +00:00
# OpenAL
2020-05-16 23:12:04 +00:00
download "OpenAL-Soft 1.20.1" \
2020-09-29 11:29:12 +00:00
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OpenAL-Soft-1.20.1.zip" \
2020-05-16 23:12:04 +00:00
"OpenAL-Soft-1.20.1.zip"
2015-06-24 13:54:00 +00:00
2015-06-08 00:14:20 +00:00
# OSG
2020-05-16 23:12:04 +00:00
download "OpenSceneGraph 3.6.5" \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z " \
2020-05-16 23:12:04 +00:00
" OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z "
if [ -n " $PDBS " ] ; then
download "OpenSceneGraph symbols" \
2020-09-29 10:21:25 +00:00
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z " \
2020-05-16 23:12:04 +00:00
" OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z "
fi
2015-06-24 13:54:00 +00:00
# SDL2
2020-03-22 22:07:07 +00:00
download "SDL 2.0.12" \
2020-09-29 11:29:12 +00:00
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
2020-03-22 22:07:07 +00:00
"SDL2-2.0.12.zip"
2019-03-06 21:26:45 +00:00
2020-10-15 21:47:19 +00:00
# LZ4
download "LZ4 1.9.2" \
" https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/lz4_win ${ BITS } _v1_9_2.zip " \
" lz4_win ${ BITS } _v1_9_2.zip "
2019-01-20 13:36:48 +00:00
# Google test and mock
if [ ! -z $TEST_FRAMEWORK ] ; then
2020-06-27 13:30:28 +00:00
echo "Google test 1.10.0..."
2019-01-20 13:36:48 +00:00
if [ -d googletest ] ; then
printf " Google test exists, skipping."
else
2020-06-27 13:30:28 +00:00
git clone -b release-1.10.0 https://github.com/google/googletest.git
2019-01-20 13:36:48 +00:00
fi
fi
2015-06-24 13:54:00 +00:00
fi
2015-06-02 21:11:09 +00:00
2015-06-08 00:14:20 +00:00
cd .. #/..
2015-06-02 21:11:09 +00:00
2015-06-24 13:54:00 +00:00
# Set up dependencies
2017-07-14 00:07:16 +00:00
BUILD_DIR = " MSVC ${ MSVC_DISPLAY_YEAR } _ ${ BITS } "
2018-12-07 14:46:32 +00:00
2018-12-07 15:03:36 +00:00
if [ -n " $NMAKE " ] ; then
2020-05-16 21:55:14 +00:00
BUILD_DIR = " ${ BUILD_DIR } _NMake "
elif [ -n " $NINJA " ] ; then
BUILD_DIR = " ${ BUILD_DIR } _Ninja "
fi
if [ -n " $SINGLE_CONFIG " ] ; then
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
BUILD_DIR = " ${ BUILD_DIR } _ ${ CONFIGURATIONS [0] } "
2018-12-07 14:46:32 +00:00
fi
2015-06-24 13:54:00 +00:00
if [ -z $KEEP ] ; then
echo
2016-08-28 19:42:48 +00:00
echo "(Re)Creating build directory."
2015-06-02 21:11:09 +00:00
2016-08-28 19:42:48 +00:00
rm -rf " $BUILD_DIR "
2015-06-24 13:54:00 +00:00
fi
2016-08-28 19:42:48 +00:00
mkdir -p " ${ BUILD_DIR } /deps "
cd " ${ BUILD_DIR } /deps "
2015-06-02 21:11:09 +00:00
2016-08-28 21:23:44 +00:00
DEPS_INSTALL = " $( pwd ) "
2015-07-11 22:45:42 +00:00
cd $DEPS
2015-06-02 21:11:09 +00:00
echo
2016-08-28 19:42:48 +00:00
echo "Extracting dependencies, this might take a while..."
echo "---------------------------------------------------"
echo
2015-06-02 21:11:09 +00:00
2015-07-06 08:49:11 +00:00
2015-06-02 21:11:09 +00:00
# Boost
2016-08-28 19:42:48 +00:00
if [ -z $APPVEYOR ] ; then
2019-10-12 06:08:43 +00:00
printf " Boost ${ BOOST_VER } ... "
2016-08-28 19:42:48 +00:00
else
2019-10-12 06:08:43 +00:00
printf " Boost ${ BOOST_VER } AppVeyor... "
2016-08-28 19:42:48 +00:00
fi
2015-07-11 22:45:42 +00:00
{
if [ -z $APPVEYOR ] ; then
cd $DEPS_INSTALL
2015-06-02 21:11:09 +00:00
2016-08-28 19:42:48 +00:00
BOOST_SDK = " $( real_pwd) /Boost "
2015-06-02 21:11:09 +00:00
2018-06-29 13:17:19 +00:00
# Boost's installer is still based on ms-dos API that doesn't support larger than 260 char path names
# We work around this by installing to root of the current working drive and then move it to our deps
2018-06-29 19:07:39 +00:00
# get the current working drive's root, we'll install to that temporarily
2018-07-03 13:00:19 +00:00
CWD_DRIVE_ROOT = " $( powershell -command '(get-location).Drive.Root' ) Boost_temp "
2020-05-16 21:55:14 +00:00
CWD_DRIVE_ROOT_BASH = $( windowsPathAsUnix " $CWD_DRIVE_ROOT " )
2018-07-03 13:53:13 +00:00
if [ -d CWD_DRIVE_ROOT_BASH ] ; then
printf " Cannot continue, ${ CWD_DRIVE_ROOT_BASH } aka ${ CWD_DRIVE_ROOT } already exists. Please remove before re-running. " ;
2020-05-16 21:55:14 +00:00
wrappedExit 1;
2018-07-03 13:41:06 +00:00
fi
2019-10-12 06:08:43 +00:00
if [ -d ${ BOOST_SDK } ] && grep " BOOST_VERSION ${ BOOST_VER_SDK } " Boost/boost/version.hpp > /dev/null; then
2015-07-11 22:45:42 +00:00
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf Boost
2018-07-22 23:12:37 +00:00
CI_EXTRA_INNO_OPTIONS = ""
2018-06-29 13:25:36 +00:00
[ -n " $CI " ] && CI_EXTRA_INNO_OPTIONS = "//SUPPRESSMSGBOXES //LOG='boost_install.log'"
2019-10-12 06:08:43 +00:00
" ${ DEPS } /boost- ${ BOOST_VER } -msvc ${ MSVC_VER } -win ${ BITS } .exe " //DIR= " ${ CWD_DRIVE_ROOT } " //VERYSILENT //NORESTART ${ CI_EXTRA_INNO_OPTIONS }
2018-07-03 13:00:19 +00:00
mv " ${ CWD_DRIVE_ROOT_BASH } " " ${ BOOST_SDK } "
2015-07-11 22:45:42 +00:00
fi
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
2018-06-27 20:24:08 +00:00
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } "
2017-07-22 05:58:04 +00:00
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET } "
2015-07-11 22:45:42 +00:00
echo Done.
else
2019-10-21 12:28:12 +00:00
# Appveyor has all the boost we need already
2019-10-12 06:08:43 +00:00
BOOST_SDK = " c:/Libraries/boost_ ${ BOOST_VER_URL } "
2015-07-11 22:45:42 +00:00
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
2020-06-18 13:46:08 +00:00
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } .1 "
2018-06-28 12:18:01 +00:00
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET } "
2015-06-02 21:11:09 +00:00
2016-08-28 19:42:48 +00:00
echo Done.
2015-07-11 22:45:42 +00:00
fi
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-02 21:11:09 +00:00
# Bullet
2020-05-16 23:12:04 +00:00
printf " Bullet 2.89 ( ${ BULLET_DBL_DISPLAY } )... "
2015-07-11 22:45:42 +00:00
{
cd $DEPS_INSTALL
if [ -d Bullet ] ; then
2016-08-28 21:23:44 +00:00
printf -- "Exists. (No version checking) "
2015-07-11 22:45:42 +00:00
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf Bullet
2020-05-16 23:12:04 +00:00
eval 7z x -y " ${ DEPS } /Bullet-2.89-msvc ${ MSVC_YEAR } -win ${ BITS } ${ BULLET_DBL } .7z " $STRIP
mv " Bullet-2.89-msvc ${ MSVC_YEAR } -win ${ BITS } ${ BULLET_DBL } " Bullet
2015-07-11 22:45:42 +00:00
fi
2020-07-10 22:18:14 +00:00
add_cmake_opts -DBULLET_ROOT= " $( real_pwd) /Bullet "
2015-07-11 22:45:42 +00:00
echo Done.
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-02 21:11:09 +00:00
# FFmpeg
2020-05-16 23:12:04 +00:00
printf "FFmpeg 4.2.2... "
2015-07-11 22:45:42 +00:00
{
cd $DEPS_INSTALL
2020-05-16 23:12:04 +00:00
if [ -d FFmpeg ] && grep "4.2.2" FFmpeg/README.txt > /dev/null; then
2015-07-11 22:45:42 +00:00
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf FFmpeg
2020-05-16 23:12:04 +00:00
eval 7z x -y " ${ DEPS } /ffmpeg-4.2.2-win ${ BITS } .zip " $STRIP
eval 7z x -y " ${ DEPS } /ffmpeg-4.2.2-dev-win ${ BITS } .zip " $STRIP
mv " ffmpeg-4.2.2-win ${ BITS } -shared " FFmpeg
cp -r " ffmpeg-4.2.2-win ${ BITS } -dev/ " * FFmpeg/
rm -rf " ffmpeg-4.2.2-win ${ BITS } -dev "
2015-07-11 22:45:42 +00:00
fi
2016-08-28 19:42:48 +00:00
export FFMPEG_HOME = " $( real_pwd) /FFmpeg "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for config in ${ CONFIGURATIONS [@] } ; do
add_runtime_dlls $config " $( pwd ) /FFmpeg/bin/ " { avcodec-58,avformat-58,avutil-56,swresample-3,swscale-5} .dll
done
2015-07-11 22:45:42 +00:00
if [ $BITS -eq 32 ] ; then
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
fi
echo Done.
}
2015-06-02 21:11:09 +00:00
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-24 13:54:00 +00:00
# MyGUI
2020-05-16 23:12:04 +00:00
printf "MyGUI 3.4.0... "
2015-07-11 22:45:42 +00:00
{
cd $DEPS_INSTALL
if [ -d MyGUI ] && \
grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
2020-05-16 23:12:04 +00:00
grep "MYGUI_VERSION_MINOR 4" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
grep "MYGUI_VERSION_PATCH 0" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
2015-07-11 22:45:42 +00:00
then
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf MyGUI
2020-05-16 23:12:04 +00:00
eval 7z x -y " ${ DEPS } /MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z " $STRIP
[ -n " $PDBS " ] && eval 7z x -y " ${ DEPS } /MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z " $STRIP
mv " MyGUI-3.4.0-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } " MyGUI
2015-07-11 22:45:42 +00:00
fi
2016-08-28 19:42:48 +00:00
export MYGUI_HOME = " $( real_pwd) /MyGUI "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "_d"
MYGUI_CONFIGURATION = "Debug"
else
SUFFIX = ""
MYGUI_CONFIGURATION = "RelWithDebInfo"
fi
add_runtime_dlls $CONFIGURATION " $( pwd ) /MyGUI/bin/ ${ MYGUI_CONFIGURATION } /MyGUIEngine ${ SUFFIX } .dll "
done
2015-07-11 22:45:42 +00:00
echo Done.
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-02 21:11:09 +00:00
# OpenAL
2020-05-16 23:12:04 +00:00
printf "OpenAL-Soft 1.20.1... "
2015-07-11 22:45:42 +00:00
{
2020-05-16 23:12:04 +00:00
if [ -d openal-soft-1.20.1-bin ] ; then
2015-07-11 22:45:42 +00:00
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
2020-05-16 23:12:04 +00:00
rm -rf openal-soft-1.20.1-bin
eval 7z x -y OpenAL-Soft-1.20.1.zip $STRIP
2015-07-11 22:45:42 +00:00
fi
2020-05-16 23:12:04 +00:00
OPENAL_SDK = " $( real_pwd) /openal-soft-1.20.1-bin "
2016-08-28 21:23:44 +00:00
add_cmake_opts -DOPENAL_INCLUDE_DIR= " ${ OPENAL_SDK } /include/AL " \
2016-08-28 21:26:02 +00:00
-DOPENAL_LIBRARY= " ${ OPENAL_SDK } /libs/Win ${ BITS } /OpenAL32.lib "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for config in ${ CONFIGURATIONS [@] } ; do
add_runtime_dlls $config " $( pwd ) /openal-soft-1.20.1-bin/bin/WIN ${ BITS } /soft_oal.dll:OpenAL32.dll "
done
2015-07-11 22:45:42 +00:00
echo Done.
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-08 00:14:20 +00:00
# OSG
2020-05-16 23:12:04 +00:00
printf "OSG 3.6.5... "
2015-07-11 22:45:42 +00:00
{
cd $DEPS_INSTALL
if [ -d OSG ] && \
grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
2020-05-16 23:12:04 +00:00
grep "OPENSCENEGRAPH_MINOR_VERSION 6" OSG/include/osg/Version > /dev/null && \
grep "OPENSCENEGRAPH_PATCH_VERSION 5" OSG/include/osg/Version > /dev/null
2015-07-11 22:45:42 +00:00
then
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf OSG
2020-05-16 23:12:04 +00:00
eval 7z x -y " ${ DEPS } /OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } .7z " $STRIP
[ -n " $PDBS " ] && eval 7z x -y " ${ DEPS } /OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } -sym.7z " $STRIP
mv " OSG-3.6.5-msvc ${ MSVC_REAL_YEAR } -win ${ BITS } " OSG
2015-07-11 22:45:42 +00:00
fi
2016-08-28 19:42:48 +00:00
OSG_SDK = " $( real_pwd) /OSG "
2015-07-11 22:45:42 +00:00
add_cmake_opts -DOSG_DIR= " $OSG_SDK "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "d"
else
SUFFIX = ""
fi
add_runtime_dlls $CONFIGURATION " $( pwd ) /OSG/bin/ " { OpenThreads,zlib,libpng} ${ SUFFIX } .dll \
" $( pwd ) /OSG/bin/osg " { ,Animation,DB,FX,GA,Particle,Text,Util,Viewer,Shadow} ${ SUFFIX } .dll
add_osg_dlls $CONFIGURATION " $( pwd ) /OSG/bin/osgPlugins-3.6.5/osgdb_ " { bmp,dds,freetype,jpeg,osg,png,tga} ${ SUFFIX } .dll
add_osg_dlls $CONFIGURATION " $( pwd ) /OSG/bin/osgPlugins-3.6.5/osgdb_serializers_osg " { ,animation,fx,ga,particle,text,util,viewer,shadow} ${ SUFFIX } .dll
done
2015-07-11 22:45:42 +00:00
echo Done.
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-02 21:11:09 +00:00
# Qt
2015-06-25 07:02:30 +00:00
if [ -z $APPVEYOR ] ; then
2020-05-16 23:12:04 +00:00
printf "Qt 5.15.0... "
2015-07-11 22:45:42 +00:00
else
2019-10-21 13:38:10 +00:00
printf "Qt 5.13 AppVeyor... "
2015-07-11 22:45:42 +00:00
fi
{
2016-08-28 19:42:48 +00:00
if [ $BITS -eq 64 ] ; then
SUFFIX = "_64"
else
SUFFIX = ""
fi
2015-07-11 22:45:42 +00:00
if [ -z $APPVEYOR ] ; then
cd $DEPS_INSTALL
2020-05-16 23:12:04 +00:00
2020-06-23 14:22:59 +00:00
qt_version = "5.15.0"
if [ " win ${ BITS } _msvc ${ MSVC_REAL_YEAR } ${ SUFFIX } " = = "win64_msvc2017_64" ] ; then
echo "This combination of options is known not to work. Falling back to Qt 5.14.2."
qt_version = "5.14.2"
fi
QT_SDK = " $( real_pwd) /Qt/ ${ qt_version } /msvc ${ MSVC_REAL_YEAR } ${ SUFFIX } "
if [ -d " Qt/ ${ qt_version } " ] ; then
2015-07-11 22:45:42 +00:00
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
2020-06-03 22:38:08 +00:00
if [ $MISSINGPYTHON -ne 0 ] ; then
2020-06-03 22:36:55 +00:00
echo "Can't be automatically installed without Python."
wrappedExit 1
fi
2020-05-16 23:12:04 +00:00
pushd " $DEPS " > /dev/null
if ! [ -d 'aqt-venv' ] ; then
echo " Creating Virtualenv for aqt..."
2020-06-23 14:22:59 +00:00
run_cmd python -m venv aqt-venv
2020-05-16 23:12:04 +00:00
fi
if [ -d 'aqt-venv/bin' ] ; then
VENV_BIN_DIR = 'bin'
elif [ -d 'aqt-venv/Scripts' ] ; then
VENV_BIN_DIR = 'Scripts'
else
2020-06-23 14:26:24 +00:00
echo "Error: Failed to create virtualenv in expected location."
wrappedExit 1
2020-05-16 23:12:04 +00:00
fi
if ! [ -e " aqt-venv/ ${ VENV_BIN_DIR } /aqt " ] ; then
echo " Installing aqt wheel into virtualenv..."
2020-06-23 14:22:59 +00:00
run_cmd " aqt-venv/ ${ VENV_BIN_DIR } /pip " install aqtinstall = = 0.9.2
2020-05-16 23:12:04 +00:00
fi
popd > /dev/null
2015-07-11 22:45:42 +00:00
rm -rf Qt
2020-05-16 23:12:04 +00:00
mkdir Qt
cd Qt
2020-06-23 14:22:59 +00:00
run_cmd " ${ DEPS } /aqt-venv/ ${ VENV_BIN_DIR } /aqt " install $qt_version windows desktop " win ${ BITS } _msvc ${ MSVC_REAL_YEAR } ${ SUFFIX } "
2020-05-16 23:12:04 +00:00
2016-08-28 19:42:48 +00:00
printf " Cleaning up extraneous data... "
2020-05-16 23:12:04 +00:00
rm -rf Qt/{ aqtinstall.log,Tools}
echo Done.
2015-07-11 22:45:42 +00:00
fi
2020-05-16 23:12:04 +00:00
2015-07-11 22:45:42 +00:00
cd $QT_SDK
2020-06-22 10:17:06 +00:00
add_cmake_opts -DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
2016-08-28 19:42:48 +00:00
-DCMAKE_PREFIX_PATH= " $QT_SDK "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
if [ $CONFIGURATION = = "Debug" ] ; then
DLLSUFFIX = "d"
else
DLLSUFFIX = ""
fi
add_runtime_dlls $CONFIGURATION " $( pwd ) /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ DLLSUFFIX } .dll
add_qt_platform_dlls $CONFIGURATION " $( pwd ) /plugins/platforms/qwindows ${ DLLSUFFIX } .dll "
done
2015-07-11 22:45:42 +00:00
echo Done.
2015-06-25 07:02:30 +00:00
else
2019-10-21 13:40:38 +00:00
QT_SDK = " C:/Qt/5.13/msvc2017 ${ SUFFIX } "
2020-06-22 10:17:06 +00:00
add_cmake_opts -DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
2015-07-11 22:45:42 +00:00
-DCMAKE_PREFIX_PATH= " $QT_SDK "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
if [ $CONFIGURATION = = "Debug" ] ; then
DLLSUFFIX = "d"
else
DLLSUFFIX = ""
fi
DIR = $( windowsPathAsUnix " ${ QT_SDK } " )
add_runtime_dlls $CONFIGURATION " ${ DIR } /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ DLLSUFFIX } .dll
add_qt_platform_dlls $CONFIGURATION " ${ DIR } /plugins/platforms/qwindows ${ DLLSUFFIX } .dll "
done
2016-08-28 19:42:48 +00:00
echo Done.
2015-06-25 07:02:30 +00:00
fi
2015-07-11 22:45:42 +00:00
}
cd $DEPS
2016-08-28 19:42:48 +00:00
echo
2015-06-02 21:11:09 +00:00
# SDL2
2020-03-22 22:07:07 +00:00
printf "SDL 2.0.12... "
2015-07-11 22:45:42 +00:00
{
2020-03-22 22:07:07 +00:00
if [ -d SDL2-2.0.12 ] ; then
2015-07-11 22:45:42 +00:00
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
2020-03-22 22:07:07 +00:00
rm -rf SDL2-2.0.12
eval 7z x -y SDL2-2.0.12.zip $STRIP
2015-07-11 22:45:42 +00:00
fi
2020-03-22 22:07:07 +00:00
export SDL2DIR = " $( real_pwd) /SDL2-2.0.12 "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for config in ${ CONFIGURATIONS [@] } ; do
add_runtime_dlls $config " $( pwd ) /SDL2-2.0.12/lib/x ${ ARCHSUFFIX } /SDL2.dll "
done
2015-07-11 22:45:42 +00:00
echo Done.
}
2019-01-20 13:36:48 +00:00
cd $DEPS
echo
2020-10-15 21:47:19 +00:00
# LZ4
printf "LZ4 1.9.2... "
{
if [ -d LZ4-1.9.2 ] ; then
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf LZ4-1.9.2
2020-10-15 22:29:12 +00:00
eval 7z x -y lz4_win${ BITS } _v1_9_2.zip -o./LZ4-1.9.2 $STRIP
2020-10-15 21:47:19 +00:00
fi
export LZ4DIR = " $( real_pwd) /LZ4-1.9.2 "
add_cmake_opts -DLZ4_INCLUDE_DIR= " ${ LZ4DIR } /include " \
-DLZ4_LIBRARY= " ${ LZ4DIR } /static/liblz4_static.lib "
for config in ${ CONFIGURATIONS [@] } ; do
add_runtime_dlls $config " $( pwd ) /LZ4-1.9.2/dll/liblz4.dll.a "
done
echo Done.
}
cd $DEPS
echo
2019-01-20 13:36:48 +00:00
# Google Test and Google Mock
if [ ! -z $TEST_FRAMEWORK ] ; then
2020-06-27 13:30:28 +00:00
printf "Google test 1.10.0 ..."
2019-03-06 21:26:45 +00:00
2019-01-20 13:36:48 +00:00
cd googletest
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
mkdir -p build${ MSVC_REAL_YEAR }
2019-03-06 21:26:45 +00:00
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
cd build${ MSVC_REAL_YEAR }
2019-03-06 21:26:45 +00:00
2019-01-20 13:36:48 +00:00
GOOGLE_INSTALL_ROOT = " ${ DEPS_INSTALL } /GoogleTest "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
# FindGMock.cmake mentions Release explicitly, but not RelWithDebInfo. Only one optimised library config can be used, so go for the safer one.
GTEST_CONFIG = $( [ $CONFIGURATION = = "RelWithDebInfo" ] && echo "Release" || echo " $CONFIGURATION " )
if [ $GTEST_CONFIG = = "Debug" ] ; then
2019-01-20 13:36:48 +00:00
DEBUG_SUFFIX = "d"
else
DEBUG_SUFFIX = ""
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
fi
2019-03-06 21:26:45 +00:00
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
if [ ! -f " $GOOGLE_INSTALL_ROOT /lib/gtest ${ DEBUG_SUFFIX } .lib " ] ; then
# Always use MSBuild solution files as they don't need the environment activating
cmake .. -DCMAKE_USE_WIN32_THREADS_INIT= 1 -G " Visual Studio $MSVC_REAL_VER $MSVC_REAL_YEAR $( [ $BITS -eq 64 ] && [ $MSVC_REAL_VER -lt 16 ] && echo " Win64" ) " $( [ $MSVC_REAL_VER -ge 16 ] && echo " -A $( [ $BITS -eq 64 ] && echo "x64" || echo "Win32" ) " ) -DBUILD_SHARED_LIBS= 1
cmake --build . --config " ${ GTEST_CONFIG } "
cmake --install . --config " ${ GTEST_CONFIG } " --prefix " ${ GOOGLE_INSTALL_ROOT } "
fi
2019-03-06 21:26:45 +00:00
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
add_runtime_dlls $CONFIGURATION " ${ GOOGLE_INSTALL_ROOT } \bin\gtest_main ${ DEBUG_SUFFIX } .dll "
add_runtime_dlls $CONFIGURATION " ${ GOOGLE_INSTALL_ROOT } \bin\gtest ${ DEBUG_SUFFIX } .dll "
add_runtime_dlls $CONFIGURATION " ${ GOOGLE_INSTALL_ROOT } \bin\gmock_main ${ DEBUG_SUFFIX } .dll "
add_runtime_dlls $CONFIGURATION " ${ GOOGLE_INSTALL_ROOT } \bin\gmock ${ DEBUG_SUFFIX } .dll "
done
2019-03-06 21:26:45 +00:00
2019-01-20 13:36:48 +00:00
add_cmake_opts -DBUILD_UNITTESTS= yes
# FindGTest and FindGMock do not work perfectly on Windows
# but we can help them by telling them everything we know about installation
add_cmake_opts -DGMOCK_ROOT= " $GOOGLE_INSTALL_ROOT "
add_cmake_opts -DGTEST_ROOT= " $GOOGLE_INSTALL_ROOT "
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
add_cmake_opts -DGTEST_LIBRARY= " $GOOGLE_INSTALL_ROOT /lib/gtest.lib "
add_cmake_opts -DGTEST_MAIN_LIBRARY= " $GOOGLE_INSTALL_ROOT /lib/gtest_main.lib "
add_cmake_opts -DGMOCK_LIBRARY= " $GOOGLE_INSTALL_ROOT /lib/gmock.lib "
add_cmake_opts -DGMOCK_MAIN_LIBRARY= " $GOOGLE_INSTALL_ROOT /lib/gmock_main.lib "
add_cmake_opts -DGTEST_LIBRARY_DEBUG= " $GOOGLE_INSTALL_ROOT /lib/gtestd.lib "
add_cmake_opts -DGTEST_MAIN_LIBRARY_DEBUG= " $GOOGLE_INSTALL_ROOT /lib/gtest_maind.lib "
add_cmake_opts -DGMOCK_LIBRARY_DEBUG= " $GOOGLE_INSTALL_ROOT /lib/gmockd.lib "
add_cmake_opts -DGMOCK_MAIN_LIBRARY_DEBUG= " $GOOGLE_INSTALL_ROOT /lib/gmock_maind.lib "
2019-01-20 13:36:48 +00:00
add_cmake_opts -DGTEST_LINKED_AS_SHARED_LIBRARY= True
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
add_cmake_opts -DGTEST_LIBRARY_TYPE= SHARED
add_cmake_opts -DGTEST_MAIN_LIBRARY_TYPE= SHARED
2019-01-20 13:36:48 +00:00
echo Done.
2019-03-06 21:26:45 +00:00
2019-01-20 13:36:48 +00:00
fi
2016-08-28 19:42:48 +00:00
echo
2015-06-24 13:54:00 +00:00
cd $DEPS_INSTALL /..
2015-07-11 22:45:42 +00:00
echo
2015-06-24 13:54:00 +00:00
echo "Setting up OpenMW build..."
2020-05-09 17:41:55 +00:00
add_cmake_opts -DOPENMW_MP_BUILD= on
2020-05-10 10:45:56 +00:00
add_cmake_opts -DCMAKE_INSTALL_PREFIX= " ${ INSTALL_PREFIX } "
2016-08-28 19:42:48 +00:00
if [ ! -z $CI ] ; then
2015-06-24 13:54:00 +00:00
case $STEP in
components )
2016-08-28 19:42:48 +00:00
echo " Building subproject: Components."
2015-06-24 13:54:00 +00:00
add_cmake_opts -DBUILD_ESSIMPORTER= no \
-DBUILD_LAUNCHER= no \
-DBUILD_MWINIIMPORTER= no \
-DBUILD_OPENCS= no \
-DBUILD_OPENMW= no \
-DBUILD_WIZARD= no
; ;
openmw )
2016-08-28 19:42:48 +00:00
echo " Building subproject: OpenMW."
2015-06-24 13:54:00 +00:00
add_cmake_opts -DBUILD_ESSIMPORTER= no \
-DBUILD_LAUNCHER= no \
-DBUILD_MWINIIMPORTER= no \
-DBUILD_OPENCS= no \
-DBUILD_WIZARD= no
; ;
opencs )
2016-08-28 19:42:48 +00:00
echo " Building subproject: OpenCS."
2015-06-24 13:54:00 +00:00
add_cmake_opts -DBUILD_ESSIMPORTER= no \
-DBUILD_LAUNCHER= no \
-DBUILD_MWINIIMPORTER= no \
-DBUILD_OPENMW= no \
-DBUILD_WIZARD= no
; ;
misc )
2016-08-28 19:42:48 +00:00
echo " Building subprojects: Misc."
2015-06-24 13:54:00 +00:00
add_cmake_opts -DBUILD_OPENCS= no \
-DBUILD_OPENMW= no
; ;
esac
fi
2016-08-28 21:23:44 +00:00
# NOTE: Disable this when/if we want to run test cases
2018-05-26 15:51:50 +00:00
#if [ -z $CI ]; then
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for CONFIGURATION in ${ CONFIGURATIONS [@] } ; do
echo " - Copying Runtime DLLs for $CONFIGURATION ... "
DLL_PREFIX = ""
if [ -z $SINGLE_CONFIG ] ; then
mkdir -p $CONFIGURATION
DLL_PREFIX = " $CONFIGURATION / "
2016-09-02 04:57:36 +00:00
fi
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
for DLL in ${ RUNTIME_DLLS [ $CONFIGURATION ] } ; do
TARGET = " $( basename " $DLL " ) "
if [ [ " $DLL " = = *":" * ] ] ; then
originalIFS = " $IFS "
IFS = ':' ; SPLIT = ( ${ DLL } ) ; IFS = $originalIFS
DLL = ${ SPLIT [0] }
TARGET = ${ SPLIT [1] }
fi
echo " ${ TARGET } . "
cp " $DLL " " ${ DLL_PREFIX } $TARGET "
done
echo
echo "- OSG Plugin DLLs..."
mkdir -p ${ DLL_PREFIX } osgPlugins-3.6.5
for DLL in ${ OSG_PLUGINS [ $CONFIGURATION ] } ; do
echo " $( basename $DLL ) . "
cp " $DLL " ${ DLL_PREFIX } osgPlugins-3.6.5
done
echo
echo "- Qt Platform DLLs..."
mkdir -p ${ DLL_PREFIX } platforms
for DLL in ${ QT_PLATFORMS [ $CONFIGURATION ] } ; do
echo " $( basename $DLL ) "
cp " $DLL " " ${ DLL_PREFIX } platforms "
done
echo
2016-08-29 05:07:50 +00:00
done
2018-05-26 15:51:50 +00:00
#fi
2020-05-16 21:55:14 +00:00
2020-06-12 22:35:38 +00:00
if [ -n " $ACTIVATE_MSVC " ] ; then
2020-05-16 21:55:14 +00:00
echo -n "- Activating MSVC in the current shell... "
command -v vswhere >/dev/null 2>& 1 || { echo "Error: vswhere is not on the path." ; wrappedExit 1; }
Allow setting up multiple build configurations at once
Also fix some bugs discovered in the process.
For multi-config generators, this basically just copies the DLLs for
each configuration, and for single-config, due to there being separate
build directories with separate extracted dependencies for each, it
defaults to just one, and will run the script several times if you
manually specify several.
Details include:
* Changing CONFIGURATION from a string to an array called
CONFIGURATIONS. This gets iterated over in a bunch of places.
* Fixing a typo of 'cannot'
* Making the DLL lists arrays per-config, too.
* Some handling for the recursive stuff and a warning if configurations
are set with a multi-config generator.
* Moving the configuration name sanitisation after they've been set.
* Myriad changes to Google Test:
- Build it in a directory specific to the build tools - previously,
having an MSVC 2017 and MSVC 2019 build on the same machine was
impossible if unit tests were on, even though it's allowed otherwise
- Use either Debug or Release Google Test as its finder isn't looking
for RelWithDebInfo or capable of dealing with it if we try and use
it anyway.
- Always build Google Test with MSBuild as it's much less hassle due
to CMake setting up the environment for us. Currently, MSVC always
comes with something that can build solution files, no matter how
you get it, so this shouldn't upset anyone.
- Use CMake's --install mode so we can set the install prefix in the
place that uses it.
- Pass CMake both Debug and Release Google Test instead of risking a
C/C++ library configuration mismatch causing linker and runtime
errors - it'll pick a suitable one for each configuration.
- Pass the library type explicitly as CMake can't cope without a
Release library if you only gave it Debug, due to accessing a
Release-specific variable unconditionally.
* Remove the -legacy flag from vswhere as it's only needed for MSVC
2015, which we don't support any more.
* Fix the -version argument for vswhere as I'd massively cocked it up.
I don't know how that happened as I did test it on a machine with
multiple MSVC versions installed, which was the failure case, but it
didn't fail then.
2020-09-07 23:18:18 +00:00
MSVC_INSTALLATION_PATH = $( vswhere -products '*' -version " [ $MSVC_REAL_VER , $( awk " BEGIN { print $MSVC_REAL_VER + 1; exit } " ) ) " -property installationPath)
2020-06-18 13:50:07 +00:00
if [ -z " $MSVC_INSTALLATION_PATH " ] ; then
echo " vswhere was unable to find MSVC $MSVC_DISPLAY_YEAR "
wrappedExit 1
fi
2020-06-18 13:46:08 +00:00
echo " @\" ${ MSVC_INSTALLATION_PATH } \Common7\Tools\VsDevCmd.bat\" -no_logo -arch= $( [ $BITS -eq 64 ] && echo "amd64" || echo "x86" ) -host_arch= $( [ $( uname -m) = = 'x86_64' ] && echo "amd64" || echo "x86" ) " > ActivateMSVC.bat
2020-05-16 21:55:14 +00:00
cp "../CI/activate_msvc.sh" .
sed -i " s/\$MSVC_DISPLAY_YEAR/ $MSVC_DISPLAY_YEAR /g " activate_msvc.sh
source ./activate_msvc.sh
cp "../CI/ActivateMSVC.ps1" .
sed -i " s/\$MSVC_DISPLAY_YEAR/ $MSVC_DISPLAY_YEAR /g " ActivateMSVC.ps1
echo "done."
echo
fi
2015-06-02 21:11:09 +00:00
if [ -z $VERBOSE ] ; then
2016-08-28 19:56:53 +00:00
printf -- "- Configuring... "
2015-06-02 21:11:09 +00:00
else
2016-08-28 19:42:48 +00:00
echo " - cmake .. $CMAKE_OPTS "
2015-06-02 21:11:09 +00:00
fi
2020-06-13 00:51:27 +00:00
RET = 0
run_cmd cmake .. $CMAKE_OPTS || RET = $?
2015-06-02 22:51:22 +00:00
if [ -z $VERBOSE ] ; then
2016-08-28 19:42:48 +00:00
if [ $RET -eq 0 ] ; then
echo Done.
else
echo Failed.
fi
2015-06-02 22:51:22 +00:00
fi
2020-06-13 00:51:27 +00:00
if [ $RET -ne 0 ] ; then
wrappedExit $RET
fi
2020-05-18 16:36:07 +00:00
2020-06-12 22:50:06 +00:00
echo "Script completed successfully."
echo " You now have an OpenMW build system at $( unixPathAsWindows " $( pwd ) " ) "
2020-06-12 22:35:38 +00:00
if [ -n " $ACTIVATE_MSVC " ] ; then
2020-05-18 16:36:07 +00:00
echo
echo "Note: you must manually activate MSVC for the shell in which you want to do the build."
echo
echo "Some scripts have been created in the build directory to do so in an existing shell."
echo "Bash: source activate_msvc.sh"
echo "CMD: ActivateMSVC.bat"
echo "PowerShell: ActivateMSVC.ps1"
echo
echo "You may find options to launch a Development/Native Tools/Cross Tools shell in your start menu or Visual Studio."
echo
if [ $( uname -m) = = 'x86_64' ] ; then
if [ $BITS -eq 64 ] ; then
inheritEnvironments = msvc_x64_x64
else
inheritEnvironments = msvc_x64
fi
else
if [ $BITS -eq 64 ] ; then
inheritEnvironments = msvc_x86_x64
else
inheritEnvironments = msvc_x86
fi
fi
echo " In Visual Studio 15.3 (2017 Update 3) or later, try setting '\"inheritEnvironments\": [ \" $inheritEnvironments \" ]' in CMakeSettings.json to build in the IDE. "
fi
2020-05-16 21:55:14 +00:00
wrappedExit $RET