|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
set -x
|
|
|
|
|
# set -x # turn-on for debugging
|
|
|
|
|
|
|
|
|
|
MISSINGTOOLS=0
|
|
|
|
|
|
|
|
|
@ -77,7 +77,6 @@ while [ $# -gt 0 ]; do
|
|
|
|
|
h )
|
|
|
|
|
cat <<EOF
|
|
|
|
|
Usage: $0 [-cdehkpuvV]
|
|
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
-c <Release/Debug>
|
|
|
|
|
Set the configuration, can also be set with environment variable CONFIGURATION.
|
|
|
|
@ -413,25 +412,23 @@ fi
|
|
|
|
|
if [ -z $APPVEYOR ]; then
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
BOOST_SDK="$(real_pwd)/Boost"
|
|
|
|
|
CWD_DRIVE_ROOT=`powershell -command '(get-location).Drive.Root'` # get the current working drive's root
|
|
|
|
|
CWD_DRIVE_ROOT=$(powershell -command '(get-location).Drive.Root') # get the current working drive's root
|
|
|
|
|
|
|
|
|
|
if [ -d Boost ] && grep "BOOST_VERSION 106700" Boost/boost/version.hpp > /dev/null; then
|
|
|
|
|
printf "Exists. "
|
|
|
|
|
elif [ -z $SKIP_EXTRACT ]; then
|
|
|
|
|
rm -rf Boost
|
|
|
|
|
"${DEPS}/boost-1.67.0-msvc${MSVC_YEAR}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}Boost_temp" //VERYSILENT //NORESTART //SUPPRESSMSGBOXES //LOG="boost_install.log"
|
|
|
|
|
[ -n "$CI" ] CI_EXTRA_INNO_OPTIONS="//SUPPRESSMSGBOXES //LOG="boost_install.log"
|
|
|
|
|
"${DEPS}/boost-1.67.0-msvc${MSVC_YEAR}-win${BITS}.exe" //DIR="${CWD_DRIVE_ROOT}Boost_temp" //VERYSILENT //NORESTART ${CI_EXTRA_INNO_OPTIONS}
|
|
|
|
|
mv "${CWD_DRIVE_ROOT}Boost_temp" "${BOOST_SDK}"
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
|
|
|
|
|
-DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}"
|
|
|
|
|
add_cmake_opts -DBoost_COMPILER="-${TOOLSET}"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
else
|
|
|
|
|
# Appveyor unstable has all the boost we need already
|
|
|
|
@ -449,18 +446,15 @@ fi
|
|
|
|
|
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
|
|
|
|
|
-DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.${LIB_SUFFIX}"
|
|
|
|
|
add_cmake_opts -DBoost_COMPILER="-${TOOLSET}"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# Bullet
|
|
|
|
|
printf "Bullet 2.86... "
|
|
|
|
|
{
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
|
|
|
|
|
if [ -d Bullet ]; then
|
|
|
|
|
printf -- "Exists. (No version checking) "
|
|
|
|
|
elif [ -z $SKIP_EXTRACT ]; then
|
|
|
|
@ -468,49 +462,38 @@ printf "Bullet 2.86... "
|
|
|
|
|
eval 7z x -y "${DEPS}/Bullet-2.86-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP
|
|
|
|
|
mv "Bullet-2.86-msvc${MSVC_YEAR}-win${BITS}" Bullet
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export BULLET_ROOT="$(real_pwd)/Bullet"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# FFmpeg
|
|
|
|
|
printf "FFmpeg 3.2.4... "
|
|
|
|
|
{
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
|
|
|
|
|
if [ -d FFmpeg ] && grep "FFmpeg version: 3.2.4" FFmpeg/README.txt > /dev/null; then
|
|
|
|
|
printf "Exists. "
|
|
|
|
|
elif [ -z $SKIP_EXTRACT ]; then
|
|
|
|
|
rm -rf FFmpeg
|
|
|
|
|
|
|
|
|
|
eval 7z x -y "${DEPS}/ffmpeg-3.2.4-win${BITS}.zip" $STRIP
|
|
|
|
|
eval 7z x -y "${DEPS}/ffmpeg-3.2.4-dev-win${BITS}.zip" $STRIP
|
|
|
|
|
|
|
|
|
|
mv "ffmpeg-3.2.4-win${BITS}-shared" FFmpeg
|
|
|
|
|
cp -r "ffmpeg-3.2.4-win${BITS}-dev/"* FFmpeg/
|
|
|
|
|
rm -rf "ffmpeg-3.2.4-win${BITS}-dev"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export FFMPEG_HOME="$(real_pwd)/FFmpeg"
|
|
|
|
|
add_runtime_dlls "$(pwd)/FFmpeg/bin/"{avcodec-57,avformat-57,avutil-55,swresample-2,swscale-4}.dll
|
|
|
|
|
|
|
|
|
|
if [ $BITS -eq 32 ]; then
|
|
|
|
|
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# MyGUI
|
|
|
|
|
printf "MyGUI 3.2.2... "
|
|
|
|
|
{
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
|
|
|
|
|
if [ -d MyGUI ] && \
|
|
|
|
|
grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
|
|
|
|
|
grep "MYGUI_VERSION_MINOR 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
|
|
|
|
@ -522,21 +505,17 @@ printf "MyGUI 3.2.2... "
|
|
|
|
|
eval 7z x -y "${DEPS}/MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP
|
|
|
|
|
mv "MyGUI-3.2.2-msvc${MSVC_YEAR}-win${BITS}" MyGUI
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export MYGUI_HOME="$(real_pwd)/MyGUI"
|
|
|
|
|
|
|
|
|
|
if [ $CONFIGURATION == "Debug" ]; then
|
|
|
|
|
SUFFIX="_d"
|
|
|
|
|
else
|
|
|
|
|
SUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
add_runtime_dlls "$(pwd)/MyGUI/bin/${CONFIGURATION}/MyGUIEngine${SUFFIX}.dll"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# OpenAL
|
|
|
|
|
printf "OpenAL-Soft 1.17.2... "
|
|
|
|
|
{
|
|
|
|
@ -546,24 +525,18 @@ printf "OpenAL-Soft 1.17.2... "
|
|
|
|
|
rm -rf openal-soft-1.17.2-bin
|
|
|
|
|
eval 7z x -y OpenAL-Soft-1.17.2.zip $STRIP
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
OPENAL_SDK="$(real_pwd)/openal-soft-1.17.2-bin"
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DOPENAL_INCLUDE_DIR="${OPENAL_SDK}/include/AL" \
|
|
|
|
|
-DOPENAL_LIBRARY="${OPENAL_SDK}/libs/Win${BITS}/OpenAL32.lib"
|
|
|
|
|
|
|
|
|
|
add_runtime_dlls "$(pwd)/openal-soft-1.17.2-bin/bin/WIN${BITS}/soft_oal.dll:OpenAL32.dll"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# OSG
|
|
|
|
|
printf "OSG 3.4.1-scrawl... "
|
|
|
|
|
{
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
|
|
|
|
|
if [ -d OSG ] && \
|
|
|
|
|
grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
|
|
|
|
|
grep "OPENSCENEGRAPH_MINOR_VERSION 4" OSG/include/osg/Version > /dev/null && \
|
|
|
|
@ -575,28 +548,21 @@ printf "OSG 3.4.1-scrawl... "
|
|
|
|
|
eval 7z x -y "${DEPS}/OSG-3.4.1-scrawl-msvc${MSVC_YEAR}-win${BITS}.7z" $STRIP
|
|
|
|
|
mv "OSG-3.4.1-scrawl-msvc${MSVC_YEAR}-win${BITS}" OSG
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
OSG_SDK="$(real_pwd)/OSG"
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DOSG_DIR="$OSG_SDK"
|
|
|
|
|
|
|
|
|
|
if [ $CONFIGURATION == "Debug" ]; then
|
|
|
|
|
SUFFIX="d"
|
|
|
|
|
else
|
|
|
|
|
SUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
add_runtime_dlls "$(pwd)/OSG/bin/"{OpenThreads,zlib,libpng*}${SUFFIX}.dll \
|
|
|
|
|
"$(pwd)/OSG/bin/osg"{,Animation,DB,FX,GA,Particle,Text,Util,Viewer}${SUFFIX}.dll
|
|
|
|
|
|
|
|
|
|
add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.1/osgdb_"{bmp,dds,jpeg,osg,png,tga}${SUFFIX}.dll
|
|
|
|
|
add_osg_dlls "$(pwd)/OSG/bin/osgPlugins-3.4.1/osgdb_serializers_osg"{,animation,fx,ga,particle,text,util,viewer}${SUFFIX}.dll
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# Qt
|
|
|
|
|
if [ -z $APPVEYOR ]; then
|
|
|
|
|
printf "Qt 5.7.0... "
|
|
|
|
@ -609,71 +575,53 @@ fi
|
|
|
|
|
else
|
|
|
|
|
SUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -z $APPVEYOR ]; then
|
|
|
|
|
cd $DEPS_INSTALL
|
|
|
|
|
QT_SDK="$(real_pwd)/Qt/5.7/msvc${MSVC_YEAR}${SUFFIX}"
|
|
|
|
|
|
|
|
|
|
if [ -d Qt ] && head -n2 Qt/InstallationLog.txt | grep "5.7.0" > /dev/null; then
|
|
|
|
|
printf "Exists. "
|
|
|
|
|
elif [ -z $SKIP_EXTRACT ]; then
|
|
|
|
|
rm -rf Qt
|
|
|
|
|
cp "${DEPS}/qt-5-install.qs" qt-install.qs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sed -i "s|INSTALL_DIR|$(real_pwd)/Qt|" qt-install.qs
|
|
|
|
|
sed -i "s/qt.VERSION.winBITS_msvcYEAR/qt.57.win${BITS}_msvc${MSVC_YEAR}${SUFFIX}/" qt-install.qs
|
|
|
|
|
|
|
|
|
|
printf -- "(Installation might take a while) "
|
|
|
|
|
"${DEPS}/qt-5.7.0-msvc${MSVC_YEAR}-win${BITS}.exe" --script qt-install.qs --silent
|
|
|
|
|
|
|
|
|
|
mv qt-install.qs Qt/
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
printf " Cleaning up extraneous data... "
|
|
|
|
|
rm -r "$(real_pwd)/Qt/"{dist,Docs,Examples,Tools,vcredist,components.xml,MaintenanceTool.dat,MaintenanceTool.exe,MaintenanceTool.ini,network.xml,qt-install.qs}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd $QT_SDK
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DDESIRED_QT_VERSION=5 \
|
|
|
|
|
-DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \
|
|
|
|
|
-DCMAKE_PREFIX_PATH="$QT_SDK"
|
|
|
|
|
|
|
|
|
|
if [ $CONFIGURATION == "Debug" ]; then
|
|
|
|
|
SUFFIX="d"
|
|
|
|
|
else
|
|
|
|
|
SUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
add_runtime_dlls "$(pwd)/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll
|
|
|
|
|
add_qt_platform_dlls "$(pwd)/plugins/platforms/qwindows${SUFFIX}.dll"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
else
|
|
|
|
|
QT_SDK="C:/Qt/5.10/msvc${MSVC_DISPLAY_YEAR}${SUFFIX}"
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DDESIRED_QT_VERSION=5 \
|
|
|
|
|
-DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \
|
|
|
|
|
-DCMAKE_PREFIX_PATH="$QT_SDK"
|
|
|
|
|
|
|
|
|
|
if [ $CONFIGURATION == "Debug" ]; then
|
|
|
|
|
SUFFIX="d"
|
|
|
|
|
else
|
|
|
|
|
SUFFIX=""
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
DIR=$(echo "${QT_SDK}" | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1,")
|
|
|
|
|
|
|
|
|
|
add_runtime_dlls "${DIR}/bin/Qt5"{Core,Gui,Network,OpenGL,Widgets}${SUFFIX}.dll
|
|
|
|
|
add_qt_platform_dlls "${DIR}/plugins/platforms/qwindows${SUFFIX}.dll"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
cd $DEPS
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# SDL2
|
|
|
|
|
printf "SDL 2.0.7... "
|
|
|
|
|
{
|
|
|
|
@ -683,26 +631,18 @@ printf "SDL 2.0.7... "
|
|
|
|
|
rm -rf SDL2-2.0.7
|
|
|
|
|
eval 7z x -y SDL2-2.0.7.zip $STRIP
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export SDL2DIR="$(real_pwd)/SDL2-2.0.7"
|
|
|
|
|
|
|
|
|
|
add_runtime_dlls "$(pwd)/SDL2-2.0.7/lib/x${ARCHSUFFIX}/SDL2.dll"
|
|
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|
}
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd $DEPS_INSTALL/..
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo "Setting up OpenMW build..."
|
|
|
|
|
|
|
|
|
|
add_cmake_opts -DBUILD_BSATOOL=no \
|
|
|
|
|
-DBUILD_ESMTOOL=no \
|
|
|
|
|
-DBUILD_MYGUI_PLUGIN=no \
|
|
|
|
|
-DOPENMW_MP_BUILD=on
|
|
|
|
|
|
|
|
|
|
if [ ! -z $CI ]; then
|
|
|
|
|
case $STEP in
|
|
|
|
|
components )
|
|
|
|
@ -714,7 +654,6 @@ if [ ! -z $CI ]; then
|
|
|
|
|
-DBUILD_OPENMW=no \
|
|
|
|
|
-DBUILD_WIZARD=no
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
openmw )
|
|
|
|
|
echo " Building subproject: OpenMW."
|
|
|
|
|
add_cmake_opts -DBUILD_ESSIMPORTER=no \
|
|
|
|
@ -723,7 +662,6 @@ if [ ! -z $CI ]; then
|
|
|
|
|
-DBUILD_OPENCS=no \
|
|
|
|
|
-DBUILD_WIZARD=no
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
opencs )
|
|
|
|
|
echo " Building subproject: OpenCS."
|
|
|
|
|
add_cmake_opts -DBUILD_ESSIMPORTER=no \
|
|
|
|
@ -732,7 +670,6 @@ if [ ! -z $CI ]; then
|
|
|
|
|
-DBUILD_OPENMW=no \
|
|
|
|
|
-DBUILD_WIZARD=no
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
misc )
|
|
|
|
|
echo " Building subprojects: Misc."
|
|
|
|
|
add_cmake_opts -DBUILD_OPENCS=no \
|
|
|
|
@ -740,7 +677,6 @@ if [ ! -z $CI ]; then
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# NOTE: Disable this when/if we want to run test cases
|
|
|
|
|
#if [ -z $CI ]; then
|
|
|
|
|
echo "- Copying Runtime DLLs..."
|
|
|
|
@ -749,16 +685,13 @@ fi
|
|
|
|
|
TARGET="$(basename "$DLL")"
|
|
|
|
|
if [[ "$DLL" == *":"* ]]; then
|
|
|
|
|
IFS=':'; SPLIT=( ${DLL} ); unset IFS
|
|
|
|
|
|
|
|
|
|
DLL=${SPLIT[0]}
|
|
|
|
|
TARGET=${SPLIT[1]}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo " ${TARGET}."
|
|
|
|
|
cp "$DLL" "$BUILD_CONFIG/$TARGET"
|
|
|
|
|
done
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
echo "- OSG Plugin DLLs..."
|
|
|
|
|
mkdir -p $BUILD_CONFIG/osgPlugins-3.4.1
|
|
|
|
|
for DLL in $OSG_PLUGINS; do
|
|
|
|
@ -766,7 +699,6 @@ fi
|
|
|
|
|
cp "$DLL" $BUILD_CONFIG/osgPlugins-3.4.1
|
|
|
|
|
done
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
echo "- Qt Platform DLLs..."
|
|
|
|
|
mkdir -p ${BUILD_CONFIG}/platforms
|
|
|
|
|
for DLL in $QT_PLATFORMS; do
|
|
|
|
@ -775,16 +707,13 @@ fi
|
|
|
|
|
done
|
|
|
|
|
echo
|
|
|
|
|
#fi
|
|
|
|
|
|
|
|
|
|
if [ -z $VERBOSE ]; then
|
|
|
|
|
printf -- "- Configuring... "
|
|
|
|
|
else
|
|
|
|
|
echo "- cmake .. $CMAKE_OPTS"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
run_cmd cmake .. $CMAKE_OPTS
|
|
|
|
|
RET=$?
|
|
|
|
|
|
|
|
|
|
if [ -z $VERBOSE ]; then
|
|
|
|
|
if [ $RET -eq 0 ]; then
|
|
|
|
|
echo Done.
|
|
|
|
@ -792,5 +721,4 @@ if [ -z $VERBOSE ]; then
|
|
|
|
|
echo Failed.
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
exit $RET
|
|
|
|
|