mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Finish up the OSG build scripts and configuration
Sadly it seems like Appveyor can't build OpenMW without timing out yet. More build-time improvements are in order
This commit is contained in:
parent
4f2cd17119
commit
c71bbd02bf
4 changed files with 197 additions and 41 deletions
|
@ -121,6 +121,11 @@ add_cmake_opts() {
|
|||
CMAKE_OPTS="$CMAKE_OPTS $@"
|
||||
}
|
||||
|
||||
RUNTIME_DLLS=""
|
||||
add_runtime_dlls() {
|
||||
RUNTIME_DLLS="$RUNTIME_DLLS $@"
|
||||
}
|
||||
|
||||
if [ -z $PLATFORM ]; then
|
||||
PLATFORM=`uname -m`
|
||||
fi
|
||||
|
@ -154,6 +159,20 @@ case $PLATFORM in
|
|||
;;
|
||||
esac
|
||||
|
||||
case $CONFIGURATION in
|
||||
debug|Debug|DEBUG )
|
||||
CONFIGURATION=Debug
|
||||
;;
|
||||
|
||||
release|Release|RELEASE )
|
||||
CONFIGURATION=Release
|
||||
;;
|
||||
|
||||
relwithdebinfo|RelWithDebInfo|RELWITHDEBINFO )
|
||||
CONFIGURATION=RelWithDebInfo
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo "=========================="
|
||||
echo "Starting prebuild on win$BITS"
|
||||
|
@ -178,9 +197,9 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
|||
fi
|
||||
|
||||
# Bullet
|
||||
download "Bullet 2.83.4" \
|
||||
http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.4-win$BITS.7z \
|
||||
Bullet-2.83.4-win$BITS.7z
|
||||
download "Bullet 2.83.5" \
|
||||
http://www.lysator.liu.se/~ace/OpenMW/deps/Bullet-2.83.5-win$BITS.7z \
|
||||
Bullet-2.83.5-win$BITS.7z
|
||||
|
||||
# FFmpeg
|
||||
download "FFmpeg 2.5.2" \
|
||||
|
@ -219,10 +238,16 @@ cd .. #/..
|
|||
|
||||
# Set up dependencies
|
||||
if [ -z $KEEP ]; then
|
||||
rm -rf OSG_$BITS
|
||||
mkdir -p OSG_$BITS/deps
|
||||
echo
|
||||
printf "Preparing build directory... "
|
||||
|
||||
rm -rf Build_$BITS
|
||||
mkdir -p Build_$BITS/deps
|
||||
|
||||
echo Done.
|
||||
fi
|
||||
cd OSG_$BITS/deps
|
||||
mkdir -p Build_$BITS/deps
|
||||
cd Build_$BITS/deps
|
||||
|
||||
DEPS_INSTALL=`pwd`
|
||||
|
||||
|
@ -236,7 +261,10 @@ if [ -z $APPVEYOR ]; then
|
|||
|
||||
BOOST_SDK="`real_pwd`/Boost"
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d Boost ] && grep "BOOST_VERSION 105800" Boost/boost/version.hpp > /dev/null; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf Boost
|
||||
$DEPS/boost-1.58.0-win$BITS.exe //dir="$(echo $BOOST_SDK | sed s,/,\\\\,g)" //verysilent
|
||||
fi
|
||||
|
||||
|
@ -254,12 +282,15 @@ else
|
|||
fi
|
||||
|
||||
# Bullet
|
||||
printf "Bullet 2.83.4... "
|
||||
printf "Bullet 2.83.5... "
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
eval 7z x -y $DEPS/Bullet-2.83.4-win$BITS.7z $STRIP
|
||||
mv Bullet-2.83.4-win$BITS Bullet
|
||||
if [ -d Bullet ]; then
|
||||
printf "Exists. (No version checking) "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf Bullet
|
||||
eval 7z x -y $DEPS/Bullet-2.83.5-win$BITS.7z $STRIP
|
||||
mv Bullet-2.83.5-win$BITS Bullet
|
||||
fi
|
||||
|
||||
BULLET_SDK="`real_pwd`/Bullet"
|
||||
|
@ -279,7 +310,11 @@ echo Done.
|
|||
printf "FFmpeg 2.5.2... "
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d FFmpeg ] && grep "FFmpeg version: 2.5.2" FFmpeg/README.txt > /dev/null; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf FFmpeg
|
||||
|
||||
eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2.7z $STRIP
|
||||
eval 7z x -y $DEPS/ffmpeg$BITS-2.5.2-dev.7z $STRIP
|
||||
|
||||
|
@ -304,6 +339,8 @@ add_cmake_opts -DAVCODEC_INCLUDE_DIRS="$FFMPEG_SDK/include" \
|
|||
-DSWSCALE_INCLUDE_DIRS="$FFMPEG_SDK/include" \
|
||||
-DSWSCALE_LIBRARIES="$FFMPEG_SDK/lib/swscale.lib"
|
||||
|
||||
add_runtime_dlls `pwd`/FFmpeg/bin/{avcodec-56,avformat-56,avutil-54,swresample-1,swscale-3}.dll
|
||||
|
||||
if [ $BITS -eq 32 ]; then
|
||||
add_cmake_opts "-DCMAKE_EXE_LINKER_FLAGS=\"/machine:X86 /safeseh:no\""
|
||||
fi
|
||||
|
@ -316,7 +353,14 @@ echo Done.
|
|||
printf "MyGUI 3.2.2... "
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
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 && \
|
||||
grep "MYGUI_VERSION_PATCH 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
|
||||
then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf MyGUI
|
||||
eval 7z x -y $DEPS/MyGUI-3.2.2-win$BITS.7z $STRIP
|
||||
mv MyGUI-3.2.2-win$BITS MyGUI
|
||||
fi
|
||||
|
@ -327,28 +371,47 @@ add_cmake_opts -DMYGUISDK="$MYGUI_SDK" \
|
|||
-DMYGUI_INCLUDE_DIRS="$MYGUI_SDK/include/MYGUI" \
|
||||
-DMYGUI_PREQUEST_FILE="$MYGUI_SDK/include/MYGUI/MyGUI_Prerequest.h"
|
||||
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="_d"
|
||||
else
|
||||
SUFFIX=""
|
||||
fi
|
||||
add_runtime_dlls `pwd`/MyGUI/bin/$CONFIGURATION/MyGUIEngine$SUFFIX.dll
|
||||
|
||||
cd $DEPS
|
||||
|
||||
echo Done.
|
||||
|
||||
# OpenAL
|
||||
printf "OpenAL-Soft 1.16.0... "
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d openal-soft-1.16.0-bin ]; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf openal-soft-1.16.0-bin
|
||||
eval 7z x -y OpenAL-Soft-1.16.0.zip $STRIP
|
||||
fi
|
||||
|
||||
OPENAL_SDK="`real_pwd`/openal-soft-1.16.0-bin"
|
||||
|
||||
add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include" \
|
||||
add_cmake_opts -DOPENAL_INCLUDE_DIR="$OPENAL_SDK/include/AL" \
|
||||
-DOPENAL_LIBRARY="$OPENAL_SDK/libs/Win$BITS/OpenAL32.lib"
|
||||
|
||||
|
||||
|
||||
echo Done.
|
||||
|
||||
# OSG
|
||||
printf "OSG 3.3.8... "
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d OSG ] && \
|
||||
grep "OPENSCENEGRAPH_MAJOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
|
||||
grep "OPENSCENEGRAPH_MINOR_VERSION 3" OSG/include/osg/Version > /dev/null && \
|
||||
grep "OPENSCENEGRAPH_PATCH_VERSION 8" OSG/include/osg/Version > /dev/null
|
||||
then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf OSG
|
||||
eval 7z x -y $DEPS/OSG-3.3.8-win$BITS.7z $STRIP
|
||||
mv OSG-3.3.8-win$BITS OSG
|
||||
fi
|
||||
|
@ -357,6 +420,21 @@ 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}$SUFFIX.dll \
|
||||
`pwd`/OSG/bin/osg{,Animation,DB,FX,GA,Particle,Qt,Text,Util,Viewer}$SUFFIX.dll
|
||||
|
||||
OSG_PLUGINS=""
|
||||
add_osg_dlls() {
|
||||
OSG_PLUGINS="$OSG_PLUGINS $@"
|
||||
}
|
||||
|
||||
add_osg_dlls `pwd`/OSG/bin/osgPlugins-3.3.8/osgdb_{bmp,dds,gif,jpeg,png,tga}$SUFFIX.dll
|
||||
|
||||
cd $DEPS
|
||||
|
||||
echo Done.
|
||||
|
@ -365,7 +443,10 @@ echo Done.
|
|||
printf "Qt 4.8.6... "
|
||||
cd $DEPS_INSTALL
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d Qt ] && head -n2 Qt/BUILDINFO.txt | grep "4.8.6" > /dev/null; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf Qt
|
||||
eval 7z x -y $DEPS/qt$BITS-4.8.6.7z $STRIP
|
||||
mv qt-4.8.6-* Qt
|
||||
fi
|
||||
|
@ -377,6 +458,13 @@ eval qtbinpatcher.exe $STRIP
|
|||
|
||||
add_cmake_opts -DQT_QMAKE_EXECUTABLE="$QT_SDK/bin/qmake.exe"
|
||||
|
||||
if [ $CONFIGURATION == "Debug" ]; then
|
||||
SUFFIX="d4"
|
||||
else
|
||||
SUFFIX="4"
|
||||
fi
|
||||
add_runtime_dlls `pwd`/bin/Qt{Core,Gui,Network,OpenGL}$SUFFIX.dll
|
||||
|
||||
cd $DEPS
|
||||
|
||||
echo Done.
|
||||
|
@ -384,7 +472,10 @@ echo Done.
|
|||
# SDL2
|
||||
printf "SDL 2.0.3... "
|
||||
|
||||
if [ -z $SKIP_EXTRACT ]; then
|
||||
if [ -d SDL2-2.0.3 ]; then
|
||||
printf "Exists. "
|
||||
elif [ -z $SKIP_EXTRACT ]; then
|
||||
rm -rf SDL2-2.0.3
|
||||
eval 7z x -y SDL2-2.0.3.zip $STRIP
|
||||
fi
|
||||
|
||||
|
@ -394,6 +485,8 @@ add_cmake_opts -DSDL2_INCLUDE_DIR="$SDL_SDK/include" \
|
|||
-DSDL2_LIBRARY_PATH="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib" \
|
||||
-DSDL2_LIBRARY_ONLY="$SDL_SDK/lib/x$ARCHSUFFIX/SDL2.lib"
|
||||
|
||||
add_runtime_dlls `pwd`/SDL2-2.0.3/lib/x$ARCHSUFFIX/SDL2.dll
|
||||
|
||||
cd $DEPS
|
||||
|
||||
echo Done.
|
||||
|
@ -401,11 +494,50 @@ echo
|
|||
|
||||
cd $DEPS_INSTALL/..
|
||||
|
||||
echo "Building OpenMW..."
|
||||
echo "Setting up OpenMW build..."
|
||||
|
||||
add_cmake_opts -DBUILD_BSATOOL=no \
|
||||
-DBUILD_ESMTOOL=no \
|
||||
-DBUILD_MYGUI_PLUGIN=no
|
||||
-DBUILD_MYGUI_PLUGIN=no \
|
||||
-DOPENMW_MP_BUILD=yes
|
||||
|
||||
if [ -z $APPVEYOR ]; then
|
||||
echo " (Outside of AppVeyor, doing full build.)"
|
||||
else
|
||||
case $STEP in
|
||||
components )
|
||||
echo " Subproject: Components."
|
||||
add_cmake_opts -DBUILD_ESSIMPORTER=no \
|
||||
-DBUILD_LAUNCHER=no \
|
||||
-DBUILD_MWINIIMPORTER=no \
|
||||
-DBUILD_OPENCS=no \
|
||||
-DBUILD_OPENMW=no \
|
||||
-DBUILD_WIZARD=no
|
||||
rm -rf components
|
||||
;;
|
||||
openmw )
|
||||
echo " Subproject: OpenMW."
|
||||
add_cmake_opts -DBUILD_ESSIMPORTER=no \
|
||||
-DBUILD_LAUNCHER=no \
|
||||
-DBUILD_MWINIIMPORTER=no \
|
||||
-DBUILD_OPENCS=no \
|
||||
-DBUILD_WIZARD=no
|
||||
;;
|
||||
opencs )
|
||||
echo " Subproject: OpenCS."
|
||||
add_cmake_opts -DBUILD_ESSIMPORTER=no \
|
||||
-DBUILD_LAUNCHER=no \
|
||||
-DBUILD_MWINIIMPORTER=no \
|
||||
-DBUILD_OPENMW=no \
|
||||
-DBUILD_WIZARD=no
|
||||
;;
|
||||
misc )
|
||||
echo " Subproject: Misc."
|
||||
add_cmake_opts -DBUILD_OPENCS=no \
|
||||
-DBUILD_OPENMW=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z $VERBOSE ]; then
|
||||
printf " Configuring... "
|
||||
|
@ -423,4 +555,18 @@ fi
|
|||
|
||||
echo
|
||||
|
||||
echo "Copying Runtime DLLs..."
|
||||
mkdir -p $CONFIGURATION
|
||||
for DLL in $RUNTIME_DLLS; do
|
||||
echo " `basename $DLL`."
|
||||
cp "$DLL" $CONFIGURATION/
|
||||
done
|
||||
echo "OSG Plugin DLLs..."
|
||||
mkdir -p $CONFIGURATION/osgPlugins-3.3.8
|
||||
for DLL in $OSG_PLUGINS; do
|
||||
echo " `basename $DLL`."
|
||||
cp "$DLL" $CONFIGURATION/osgPlugins-3.3.8
|
||||
done
|
||||
echo
|
||||
|
||||
exit $RET
|
|
@ -10,10 +10,14 @@ fi
|
|||
|
||||
case $PLATFORM in
|
||||
x32|x86|i686|i386|win32|Win32 )
|
||||
BITS=32 ;;
|
||||
BITS=32
|
||||
PLATFORM=Win32
|
||||
;;
|
||||
|
||||
x64|x86_64|x86-64|win64|Win64 )
|
||||
BITS=64 ;;
|
||||
BITS=64
|
||||
PLATFORM=x64
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown platform $PLATFORM."
|
||||
|
@ -40,4 +44,12 @@ if [ $? -ne 0 ]; then
|
|||
}
|
||||
fi
|
||||
|
||||
msbuild OpenMW.sln //t:Build //p:Configuration=$CONFIGURATION //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
if [ -z $APPVEYOR ]; then
|
||||
msbuild OpenMW.sln //t:Build //m:8
|
||||
else
|
||||
msbuild OpenMW.sln //t:Build //m:8 //logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
fi
|
||||
|
||||
if [ ! -z $PACKAGE ]; then
|
||||
msbuild PACKAGE.vcxproj //t:Build //m:8
|
||||
fi
|
|
@ -138,9 +138,6 @@ if (WIN32)
|
|||
|
||||
# Suppress WinMain(), provided by SDL
|
||||
add_definitions(-DSDL_MAIN_HANDLED)
|
||||
|
||||
# Get rid of useless crud from windows.h
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
endif()
|
||||
|
||||
# Dependencies
|
||||
|
|
31
appveyor.yml
31
appveyor.yml
|
@ -6,28 +6,27 @@ platform:
|
|||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- STEP: openmw
|
||||
- STEP: opencs
|
||||
- STEP: misc
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
os: unstable
|
||||
|
||||
clone_depth: 5
|
||||
clone_depth: 1
|
||||
|
||||
cache:
|
||||
- C:\projects\openmw\deps\Bullet-2.83.4-win32.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\Bullet-2.83.4-win64.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\Ogre-1.9-win32.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\Ogre-1.9-win64.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\ffmpeg32-2.5.2.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\ffmpeg64-2.5.2.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\ffmpeg64-2.5.2-dev.7z -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\OpenAL-Soft-1.16.0.zip -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\SDL2-2.0.3.zip -> CI/before_script.msvc.sh
|
||||
- C:\projects\openmw\deps\Bullet-2.83.5-win32.7z
|
||||
- C:\projects\openmw\deps\Bullet-2.83.5-win64.7z
|
||||
- C:\projects\openmw\deps\MyGUI-3.2.2-win32.7z
|
||||
- C:\projects\openmw\deps\MyGUI-3.2.2-win64.7z
|
||||
- C:\projects\openmw\deps\OSG-3.3.8-win32.7z
|
||||
- C:\projects\openmw\deps\OSG-3.3.8-win64.7z
|
||||
|
||||
init:
|
||||
- cmd: bash --version
|
||||
|
@ -41,4 +40,6 @@ build_script:
|
|||
- cmd: bash --login C:\projects\openmw\CI\build.msvc.sh
|
||||
|
||||
before_build:
|
||||
- cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh
|
||||
- cmd: bash --login C:\projects\openmw\CI\before_script.msvc.sh -k
|
||||
|
||||
test: off
|
||||
|
|
Loading…
Reference in a new issue