@ -1,4 +1,5 @@
#!/bin/bash
#!/bin/bash
# set -x # turn-on for debugging
MISSINGTOOLS = 0
MISSINGTOOLS = 0
@ -76,7 +77,6 @@ while [ $# -gt 0 ]; do
h )
h )
cat <<EOF
cat <<EOF
Usage: $0 [ -cdehkpuvV]
Usage: $0 [ -cdehkpuvV]
Options:
Options:
-c <Release/Debug>
-c <Release/Debug>
Set the configuration, can also be set with environment variable CONFIGURATION.
Set the configuration, can also be set with environment variable CONFIGURATION.
@ -232,10 +232,9 @@ fi
case $VS_VERSION in
case $VS_VERSION in
15| 15.0| 2017 )
15| 15.0| 2017 )
GENERATOR = "Visual Studio 15 2017"
GENERATOR = "Visual Studio 15 2017"
TOOLSET = "vc140"
TOOLSET = "vc141"
TOOLSET_REAL = "vc141"
MSVC_REAL_VER = "15"
MSVC_REAL_VER = "15"
MSVC_VER = "14 "
MSVC_VER = "14 .1 "
MSVC_YEAR = "2015"
MSVC_YEAR = "2015"
MSVC_DISPLAY_YEAR = "2017"
MSVC_DISPLAY_YEAR = "2017"
; ;
; ;
@ -243,9 +242,8 @@ case $VS_VERSION in
14| 14.0| 2015 )
14| 14.0| 2015 )
GENERATOR = "Visual Studio 14 2015"
GENERATOR = "Visual Studio 14 2015"
TOOLSET = "vc140"
TOOLSET = "vc140"
TOOLSET_REAL = "vc140"
MSVC_REAL_VER = "14"
MSVC_REAL_VER = "14"
MSVC_VER = "14 "
MSVC_VER = "14 .0 "
MSVC_YEAR = "2015"
MSVC_YEAR = "2015"
MSVC_DISPLAY_YEAR = "2015"
MSVC_DISPLAY_YEAR = "2015"
; ;
; ;
@ -253,9 +251,8 @@ case $VS_VERSION in
12| 12.0| 2013 )
12| 12.0| 2013 )
GENERATOR = "Visual Studio 12 2013"
GENERATOR = "Visual Studio 12 2013"
TOOLSET = "vc120"
TOOLSET = "vc120"
TOOLSET_REAL = "vc120"
MSVC_REAL_VER = "12"
MSVC_REAL_VER = "12"
MSVC_VER = "12 "
MSVC_VER = "12 .0 "
MSVC_YEAR = "2013"
MSVC_YEAR = "2013"
MSVC_DISPLAY_YEAR = "2013"
MSVC_DISPLAY_YEAR = "2013"
; ;
; ;
@ -325,9 +322,9 @@ if [ -z $SKIP_DOWNLOAD ]; then
# Boost
# Boost
if [ -z $APPVEYOR ] ; then
if [ -z $APPVEYOR ] ; then
download "Boost 1.6 1 .0" \
download "Boost 1.6 7 .0" \
" https://sourceforge.net/projects/boost/files/boost-binaries/1.6 1.0/boost_1_61 _0-msvc-${ MSVC_VER } .0 -${ BITS } .exe " \
" https://sourceforge.net/projects/boost/files/boost-binaries/1.6 7.0/boost_1_67 _0-msvc-${ MSVC_VER } -${ BITS } .exe " \
" boost-1.6 1 .0-msvc${ MSVC_YEAR } -win ${ BITS } .exe "
" boost-1.6 7 .0-msvc${ MSVC_YEAR } -win ${ BITS } .exe "
fi
fi
# Bullet
# Bullet
@ -365,8 +362,8 @@ if [ -z $SKIP_DOWNLOAD ]; then
QT_SUFFIX = ""
QT_SUFFIX = ""
fi
fi
download "Qt 5.7. 2 " \
download "Qt 5.7. 0 " \
" https://download.qt.io/ official_releases /qt/5.7/5.7.0/qt-opensource-windows-x86-msvc${ MSVC_YEAR } ${ QT_SUFFIX } -5.7.0.exe " \
" https://download.qt.io/ archive /qt/5.7/5.7.0/qt-opensource-windows-x86-msvc${ MSVC_YEAR } ${ QT_SUFFIX } -5.7.0.exe " \
" qt-5.7.0-msvc ${ MSVC_YEAR } -win ${ BITS } .exe " \
" qt-5.7.0-msvc ${ MSVC_YEAR } -win ${ BITS } .exe " \
"https://www.lysator.liu.se/~ace/OpenMW/deps/qt-5-install.qs" \
"https://www.lysator.liu.se/~ace/OpenMW/deps/qt-5-install.qs" \
"qt-5-install.qs"
"qt-5-install.qs"
@ -403,9 +400,9 @@ echo
# Boost
# Boost
if [ -z $APPVEYOR ] ; then
if [ -z $APPVEYOR ] ; then
printf "Boost 1.6 1 .0... "
printf "Boost 1.6 7 .0... "
else
else
if [ $MSVC_VER -eq 12 ] ; then
if [ $MSVC_VER -eq 12.0 ] ; then
printf "Boost 1.58.0 AppVeyor... "
printf "Boost 1.58.0 AppVeyor... "
else
else
printf "Boost 1.67.0 AppVeyor... "
printf "Boost 1.67.0 AppVeyor... "
@ -417,17 +414,27 @@ fi
BOOST_SDK = " $( real_pwd) /Boost "
BOOST_SDK = " $( real_pwd) /Boost "
if [ -d Boost ] && grep "BOOST_VERSION 106100" Boost/boost/version.hpp > /dev/null; then
# 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
# get the current working drive's root, we'll install to that temporarily
CWD_DRIVE_ROOT = " $( powershell -command '(get-location).Drive.Root' ) Boost_temp "
CWD_DRIVE_ROOT_BASH = $( echo " $CWD_DRIVE_ROOT " | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1," )
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. " ;
exit 1;
fi
if [ -d ${ BOOST_SDK } ] && grep "BOOST_VERSION 106700" Boost/boost/version.hpp > /dev/null; then
printf "Exists. "
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf Boost
rm -rf Boost
" ${ DEPS } /boost-1.61.0-msvc ${ MSVC_YEAR } -win ${ BITS } .exe " //dir= " $( echo $BOOST_SDK | sed s,/,\\ \\ ,g) " //verysilent
[ -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 } " //VERYSILENT //NORESTART ${ CI_EXTRA_INNO_OPTIONS }
mv " ${ CWD_DRIVE_ROOT_BASH } " " ${ BOOST_SDK } "
fi
fi
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } .0 "
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } "
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET } "
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET } "
echo Done.
echo Done.
else
else
# Appveyor unstable has all the boost we need already
# Appveyor unstable has all the boost we need already
@ -444,19 +451,17 @@ fi
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
add_cmake_opts -DBOOST_ROOT= " $BOOST_SDK " \
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } . ${ LIB_SUFFIX } "
-DBOOST_LIBRARYDIR= " ${ BOOST_SDK } /lib ${ BITS } -msvc- ${ MSVC_VER } . ${ LIB_SUFFIX } "
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET _REAL } "
add_cmake_opts -DBoost_COMPILER= " - ${ TOOLSET } "
echo Done.
echo Done.
fi
fi
}
}
cd $DEPS
cd $DEPS
echo
echo
# Bullet
# Bullet
printf "Bullet 2.86... "
printf "Bullet 2.86... "
{
{
cd $DEPS_INSTALL
cd $DEPS_INSTALL
if [ -d Bullet ] ; then
if [ -d Bullet ] ; then
printf -- "Exists. (No version checking) "
printf -- "Exists. (No version checking) "
elif [ -z $SKIP_EXTRACT ] ; then
elif [ -z $SKIP_EXTRACT ] ; then
@ -464,49 +469,38 @@ printf "Bullet 2.86... "
eval 7z x -y " ${ DEPS } /Bullet-2.86-msvc ${ MSVC_YEAR } -win ${ BITS } .7z " $STRIP
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
mv " Bullet-2.86-msvc ${ MSVC_YEAR } -win ${ BITS } " Bullet
fi
fi
export BULLET_ROOT = " $( real_pwd) /Bullet "
export BULLET_ROOT = " $( real_pwd) /Bullet "
echo Done.
echo Done.
}
}
cd $DEPS
cd $DEPS
echo
echo
# FFmpeg
# FFmpeg
printf "FFmpeg 3.2.4... "
printf "FFmpeg 3.2.4... "
{
{
cd $DEPS_INSTALL
cd $DEPS_INSTALL
if [ -d FFmpeg ] && grep "FFmpeg version: 3.2.4" FFmpeg/README.txt > /dev/null; then
if [ -d FFmpeg ] && grep "FFmpeg version: 3.2.4" FFmpeg/README.txt > /dev/null; then
printf "Exists. "
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf FFmpeg
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-win ${ BITS } .zip " $STRIP
eval 7z x -y " ${ DEPS } /ffmpeg-3.2.4-dev-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
mv " ffmpeg-3.2.4-win ${ BITS } -shared " FFmpeg
cp -r " ffmpeg-3.2.4-win ${ BITS } -dev/ " * FFmpeg/
cp -r " ffmpeg-3.2.4-win ${ BITS } -dev/ " * FFmpeg/
rm -rf " ffmpeg-3.2.4-win ${ BITS } -dev "
rm -rf " ffmpeg-3.2.4-win ${ BITS } -dev "
fi
fi
export FFMPEG_HOME = " $( real_pwd) /FFmpeg "
export FFMPEG_HOME = " $( real_pwd) /FFmpeg "
add_runtime_dlls " $( pwd ) /FFmpeg/bin/ " { avcodec-57,avformat-57,avutil-55,swresample-2,swscale-4} .dll
add_runtime_dlls " $( pwd ) /FFmpeg/bin/ " { avcodec-57,avformat-57,avutil-55,swresample-2,swscale-4} .dll
if [ $BITS -eq 32 ] ; then
if [ $BITS -eq 32 ] ; then
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
fi
fi
echo Done.
echo Done.
}
}
cd $DEPS
cd $DEPS
echo
echo
# MyGUI
# MyGUI
printf "MyGUI 3.2.2... "
printf "MyGUI 3.2.2... "
{
{
cd $DEPS_INSTALL
cd $DEPS_INSTALL
if [ -d MyGUI ] && \
if [ -d MyGUI ] && \
grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
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 && \
grep "MYGUI_VERSION_MINOR 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
@ -518,21 +512,17 @@ printf "MyGUI 3.2.2... "
eval 7z x -y " ${ DEPS } /MyGUI-3.2.2-msvc ${ MSVC_YEAR } -win ${ BITS } .7z " $STRIP
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
mv " MyGUI-3.2.2-msvc ${ MSVC_YEAR } -win ${ BITS } " MyGUI
fi
fi
export MYGUI_HOME = " $( real_pwd) /MyGUI "
export MYGUI_HOME = " $( real_pwd) /MyGUI "
if [ $CONFIGURATION = = "Debug" ] ; then
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "_d"
SUFFIX = "_d"
else
else
SUFFIX = ""
SUFFIX = ""
fi
fi
add_runtime_dlls " $( pwd ) /MyGUI/bin/ ${ CONFIGURATION } /MyGUIEngine ${ SUFFIX } .dll "
add_runtime_dlls " $( pwd ) /MyGUI/bin/ ${ CONFIGURATION } /MyGUIEngine ${ SUFFIX } .dll "
echo Done.
echo Done.
}
}
cd $DEPS
cd $DEPS
echo
echo
# OpenAL
# OpenAL
printf "OpenAL-Soft 1.17.2... "
printf "OpenAL-Soft 1.17.2... "
{
{
@ -542,24 +532,18 @@ printf "OpenAL-Soft 1.17.2... "
rm -rf openal-soft-1.17.2-bin
rm -rf openal-soft-1.17.2-bin
eval 7z x -y OpenAL-Soft-1.17.2.zip $STRIP
eval 7z x -y OpenAL-Soft-1.17.2.zip $STRIP
fi
fi
OPENAL_SDK = " $( real_pwd) /openal-soft-1.17.2-bin "
OPENAL_SDK = " $( real_pwd) /openal-soft-1.17.2-bin "
add_cmake_opts -DOPENAL_INCLUDE_DIR= " ${ OPENAL_SDK } /include/AL " \
add_cmake_opts -DOPENAL_INCLUDE_DIR= " ${ OPENAL_SDK } /include/AL " \
-DOPENAL_LIBRARY= " ${ OPENAL_SDK } /libs/Win ${ BITS } /OpenAL32.lib "
-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 "
add_runtime_dlls " $( pwd ) /openal-soft-1.17.2-bin/bin/WIN ${ BITS } /soft_oal.dll:OpenAL32.dll "
echo Done.
echo Done.
}
}
cd $DEPS
cd $DEPS
echo
echo
# OSG
# OSG
printf "OSG 3.4.1-scrawl... "
printf "OSG 3.4.1-scrawl... "
{
{
cd $DEPS_INSTALL
cd $DEPS_INSTALL
if [ -d OSG ] && \
if [ -d OSG ] && \
grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
grep "OPENSCENEGRAPH_MINOR_VERSION 4" OSG/include/osg/Version > /dev/null && \
grep "OPENSCENEGRAPH_MINOR_VERSION 4" OSG/include/osg/Version > /dev/null && \
@ -571,28 +555,21 @@ printf "OSG 3.4.1-scrawl... "
eval 7z x -y " ${ DEPS } /OSG-3.4.1-scrawl-msvc ${ MSVC_YEAR } -win ${ BITS } .7z " $STRIP
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
mv " OSG-3.4.1-scrawl-msvc ${ MSVC_YEAR } -win ${ BITS } " OSG
fi
fi
OSG_SDK = " $( real_pwd) /OSG "
OSG_SDK = " $( real_pwd) /OSG "
add_cmake_opts -DOSG_DIR= " $OSG_SDK "
add_cmake_opts -DOSG_DIR= " $OSG_SDK "
if [ $CONFIGURATION = = "Debug" ] ; then
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "d"
SUFFIX = "d"
else
else
SUFFIX = ""
SUFFIX = ""
fi
fi
add_runtime_dlls " $( pwd ) /OSG/bin/ " { OpenThreads,zlib,libpng*} ${ SUFFIX } .dll \
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
" $( 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_ " { 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
add_osg_dlls " $( pwd ) /OSG/bin/osgPlugins-3.4.1/osgdb_serializers_osg " { ,animation,fx,ga,particle,text,util,viewer} ${ SUFFIX } .dll
echo Done.
echo Done.
}
}
cd $DEPS
cd $DEPS
echo
echo
# Qt
# Qt
if [ -z $APPVEYOR ] ; then
if [ -z $APPVEYOR ] ; then
printf "Qt 5.7.0... "
printf "Qt 5.7.0... "
@ -605,71 +582,53 @@ fi
else
else
SUFFIX = ""
SUFFIX = ""
fi
fi
if [ -z $APPVEYOR ] ; then
if [ -z $APPVEYOR ] ; then
cd $DEPS_INSTALL
cd $DEPS_INSTALL
QT_SDK = " $( real_pwd) /Qt/5.7/msvc ${ MSVC_YEAR } ${ SUFFIX } "
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
if [ -d Qt ] && head -n2 Qt/InstallationLog.txt | grep "5.7.0" > /dev/null; then
printf "Exists. "
printf "Exists. "
elif [ -z $SKIP_EXTRACT ] ; then
elif [ -z $SKIP_EXTRACT ] ; then
rm -rf Qt
rm -rf Qt
cp " ${ DEPS } /qt-5-install.qs " qt-install.qs
cp " ${ DEPS } /qt-5-install.qs " qt-install.qs
sed -i " s|INSTALL_DIR| $( real_pwd) /Qt| " 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
sed -i " s/qt.VERSION.winBITS_msvcYEAR/qt.57.win ${ BITS } _msvc ${ MSVC_YEAR } ${ SUFFIX } / " qt-install.qs
printf -- "(Installation might take a while) "
printf -- "(Installation might take a while) "
" ${ DEPS } /qt-5.7.0-msvc ${ MSVC_YEAR } -win ${ BITS } .exe " --script qt-install.qs --silent
" ${ DEPS } /qt-5.7.0-msvc ${ MSVC_YEAR } -win ${ BITS } .exe " --script qt-install.qs --silent
mv qt-install.qs Qt/
mv qt-install.qs Qt/
echo Done.
echo Done.
printf " Cleaning up extraneous data... "
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}
rm -r " $( real_pwd) /Qt/ " { dist,Docs,Examples,Tools,vcredist,components.xml,MaintenanceTool.dat,MaintenanceTool.exe,MaintenanceTool.ini,network.xml,qt-install.qs}
fi
fi
cd $QT_SDK
cd $QT_SDK
add_cmake_opts -DDESIRED_QT_VERSION= 5 \
add_cmake_opts -DDESIRED_QT_VERSION= 5 \
-DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
-DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
-DCMAKE_PREFIX_PATH= " $QT_SDK "
-DCMAKE_PREFIX_PATH= " $QT_SDK "
if [ $CONFIGURATION = = "Debug" ] ; then
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "d"
SUFFIX = "d"
else
else
SUFFIX = ""
SUFFIX = ""
fi
fi
add_runtime_dlls " $( pwd ) /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ SUFFIX } .dll
add_runtime_dlls " $( pwd ) /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ SUFFIX } .dll
add_qt_platform_dlls " $( pwd ) /plugins/platforms/qwindows ${ SUFFIX } .dll "
add_qt_platform_dlls " $( pwd ) /plugins/platforms/qwindows ${ SUFFIX } .dll "
echo Done.
echo Done.
else
else
QT_SDK = " C:/Qt/5.10/msvc ${ MSVC_DISPLAY_YEAR } ${ SUFFIX } "
QT_SDK = " C:/Qt/5.10/msvc ${ MSVC_DISPLAY_YEAR } ${ SUFFIX } "
add_cmake_opts -DDESIRED_QT_VERSION= 5 \
add_cmake_opts -DDESIRED_QT_VERSION= 5 \
-DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
-DQT_QMAKE_EXECUTABLE= " ${ QT_SDK } /bin/qmake.exe " \
-DCMAKE_PREFIX_PATH= " $QT_SDK "
-DCMAKE_PREFIX_PATH= " $QT_SDK "
if [ $CONFIGURATION = = "Debug" ] ; then
if [ $CONFIGURATION = = "Debug" ] ; then
SUFFIX = "d"
SUFFIX = "d"
else
else
SUFFIX = ""
SUFFIX = ""
fi
fi
DIR = $( echo " ${ QT_SDK } " | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1," )
DIR = $( echo " ${ QT_SDK } " | sed "s,\\\\,/,g" | sed "s,\(.\):,/\\1," )
add_runtime_dlls " ${ DIR } /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ SUFFIX } .dll
add_runtime_dlls " ${ DIR } /bin/Qt5 " { Core,Gui,Network,OpenGL,Widgets} ${ SUFFIX } .dll
add_qt_platform_dlls " ${ DIR } /plugins/platforms/qwindows ${ SUFFIX } .dll "
add_qt_platform_dlls " ${ DIR } /plugins/platforms/qwindows ${ SUFFIX } .dll "
echo Done.
echo Done.
fi
fi
}
}
cd $DEPS
cd $DEPS
echo
echo
# SDL2
# SDL2
printf "SDL 2.0.7... "
printf "SDL 2.0.7... "
{
{
@ -679,26 +638,18 @@ printf "SDL 2.0.7... "
rm -rf SDL2-2.0.7
rm -rf SDL2-2.0.7
eval 7z x -y SDL2-2.0.7.zip $STRIP
eval 7z x -y SDL2-2.0.7.zip $STRIP
fi
fi
export SDL2DIR = " $( real_pwd) /SDL2-2.0.7 "
export SDL2DIR = " $( real_pwd) /SDL2-2.0.7 "
add_runtime_dlls " $( pwd ) /SDL2-2.0.7/lib/x ${ ARCHSUFFIX } /SDL2.dll "
add_runtime_dlls " $( pwd ) /SDL2-2.0.7/lib/x ${ ARCHSUFFIX } /SDL2.dll "
echo Done.
echo Done.
}
}
echo
echo
cd $DEPS_INSTALL /..
cd $DEPS_INSTALL /..
echo
echo
echo "Setting up OpenMW build..."
echo "Setting up OpenMW build..."
add_cmake_opts -DBUILD_BSATOOL= no \
add_cmake_opts -DBUILD_BSATOOL= no \
-DBUILD_ESMTOOL= no \
-DBUILD_ESMTOOL= no \
-DBUILD_MYGUI_PLUGIN= no \
-DBUILD_MYGUI_PLUGIN= no \
-DOPENMW_MP_BUILD= on
-DOPENMW_MP_BUILD= on
if [ ! -z $CI ] ; then
if [ ! -z $CI ] ; then
case $STEP in
case $STEP in
components )
components )
@ -710,7 +661,6 @@ if [ ! -z $CI ]; then
-DBUILD_OPENMW= no \
-DBUILD_OPENMW= no \
-DBUILD_WIZARD= no
-DBUILD_WIZARD= no
; ;
; ;
openmw )
openmw )
echo " Building subproject: OpenMW."
echo " Building subproject: OpenMW."
add_cmake_opts -DBUILD_ESSIMPORTER= no \
add_cmake_opts -DBUILD_ESSIMPORTER= no \
@ -719,7 +669,6 @@ if [ ! -z $CI ]; then
-DBUILD_OPENCS= no \
-DBUILD_OPENCS= no \
-DBUILD_WIZARD= no
-DBUILD_WIZARD= no
; ;
; ;
opencs )
opencs )
echo " Building subproject: OpenCS."
echo " Building subproject: OpenCS."
add_cmake_opts -DBUILD_ESSIMPORTER= no \
add_cmake_opts -DBUILD_ESSIMPORTER= no \
@ -728,7 +677,6 @@ if [ ! -z $CI ]; then
-DBUILD_OPENMW= no \
-DBUILD_OPENMW= no \
-DBUILD_WIZARD= no
-DBUILD_WIZARD= no
; ;
; ;
misc )
misc )
echo " Building subprojects: Misc."
echo " Building subprojects: Misc."
add_cmake_opts -DBUILD_OPENCS= no \
add_cmake_opts -DBUILD_OPENCS= no \
@ -736,7 +684,6 @@ if [ ! -z $CI ]; then
; ;
; ;
esac
esac
fi
fi
# NOTE: Disable this when/if we want to run test cases
# NOTE: Disable this when/if we want to run test cases
#if [ -z $CI ]; then
#if [ -z $CI ]; then
echo "- Copying Runtime DLLs..."
echo "- Copying Runtime DLLs..."
@ -745,16 +692,13 @@ fi
TARGET = " $( basename " $DLL " ) "
TARGET = " $( basename " $DLL " ) "
if [ [ " $DLL " = = *":" * ] ] ; then
if [ [ " $DLL " = = *":" * ] ] ; then
IFS = ':' ; SPLIT = ( ${ DLL } ) ; unset IFS
IFS = ':' ; SPLIT = ( ${ DLL } ) ; unset IFS
DLL = ${ SPLIT [0] }
DLL = ${ SPLIT [0] }
TARGET = ${ SPLIT [1] }
TARGET = ${ SPLIT [1] }
fi
fi
echo " ${ TARGET } . "
echo " ${ TARGET } . "
cp " $DLL " " $BUILD_CONFIG / $TARGET "
cp " $DLL " " $BUILD_CONFIG / $TARGET "
done
done
echo
echo
echo "- OSG Plugin DLLs..."
echo "- OSG Plugin DLLs..."
mkdir -p $BUILD_CONFIG /osgPlugins-3.4.1
mkdir -p $BUILD_CONFIG /osgPlugins-3.4.1
for DLL in $OSG_PLUGINS ; do
for DLL in $OSG_PLUGINS ; do
@ -762,7 +706,6 @@ fi
cp " $DLL " $BUILD_CONFIG /osgPlugins-3.4.1
cp " $DLL " $BUILD_CONFIG /osgPlugins-3.4.1
done
done
echo
echo
echo "- Qt Platform DLLs..."
echo "- Qt Platform DLLs..."
mkdir -p ${ BUILD_CONFIG } /platforms
mkdir -p ${ BUILD_CONFIG } /platforms
for DLL in $QT_PLATFORMS ; do
for DLL in $QT_PLATFORMS ; do
@ -771,16 +714,13 @@ fi
done
done
echo
echo
#fi
#fi
if [ -z $VERBOSE ] ; then
if [ -z $VERBOSE ] ; then
printf -- "- Configuring... "
printf -- "- Configuring... "
else
else
echo " - cmake .. $CMAKE_OPTS "
echo " - cmake .. $CMAKE_OPTS "
fi
fi
run_cmd cmake .. $CMAKE_OPTS
run_cmd cmake .. $CMAKE_OPTS
RET = $?
RET = $?
if [ -z $VERBOSE ] ; then
if [ -z $VERBOSE ] ; then
if [ $RET -eq 0 ] ; then
if [ $RET -eq 0 ] ; then
echo Done.
echo Done.
@ -788,5 +728,4 @@ if [ -z $VERBOSE ]; then
echo Failed.
echo Failed.
fi
fi
fi
fi
exit $RET
exit $RET