2014-07-30 16:36:51 -04:00
|
|
|
#!/bin/bash
|
2014-04-02 18:09:23 -04:00
|
|
|
|
|
|
|
|
SCRIPT_DIR=$(cd "$(dirname "$BASH_SOURCE")" ; pwd)
|
2014-10-03 20:22:34 -04:00
|
|
|
# these need to be passed to children scripts
|
|
|
|
|
export ARCHIVE_ROOT=$HOME/Downloads
|
|
|
|
|
export GITHUB_TAG=4.5.0-preview
|
|
|
|
|
|
2014-10-07 15:34:18 -04:00
|
|
|
IS_GITHUB_BUILD=true
|
|
|
|
|
FORCE_UPDATEDEPS=false
|
|
|
|
|
|
|
|
|
|
CheckArgs()
|
2014-10-03 20:22:34 -04:00
|
|
|
{
|
|
|
|
|
# if p4 is installed, assume building out of perforce repo (no need to download and fix dependencies)
|
2014-10-07 15:34:18 -04:00
|
|
|
if which p4 > /dev/null; then
|
|
|
|
|
IS_GITHUB_BUILD=false # perforce
|
|
|
|
|
fi
|
|
|
|
|
|
2014-10-03 20:22:34 -04:00
|
|
|
# Override this with -git
|
|
|
|
|
for Arg in $@; do
|
|
|
|
|
if [ "$Arg" == "-git" ]; then
|
2014-10-07 15:34:18 -04:00
|
|
|
IS_GITHUB_BUILD=true
|
|
|
|
|
elif [ "$Arg" == "-updatedeps" ]; then
|
|
|
|
|
FORCE_UPDATEDEPS=true
|
2014-10-03 20:22:34 -04:00
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-02 18:09:23 -04:00
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
TOP_DIR=$(cd $SCRIPT_DIR/../../.. ; pwd)
|
|
|
|
|
cd ${TOP_DIR}
|
|
|
|
|
|
|
|
|
|
if [ ! -d Source ]; then
|
|
|
|
|
echo "GenerateProjectFiles ERROR: This script file does not appear to be \
|
|
|
|
|
located inside the Engine/Build/BatchFiles/Linux directory."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2014-10-07 15:34:18 -04:00
|
|
|
CheckArgs $@
|
|
|
|
|
|
2014-10-09 17:16:57 -04:00
|
|
|
if [ "$(lsb_release --id)" = "Distributor ID: Ubuntu" -o "$(lsb_release --id)" = "Distributor ID: Debian" -o "$(lsb_release --id)" = "Distributor ID: LinuxMint" ]; then
|
2014-04-02 18:09:23 -04:00
|
|
|
# Install all necessary dependencies
|
|
|
|
|
DEPS="mono-xbuild \
|
2014-05-08 13:01:46 -04:00
|
|
|
mono-dmcs \
|
2014-04-02 18:09:23 -04:00
|
|
|
libmono-microsoft-build-tasks-v4.0-4.0-cil \
|
|
|
|
|
libmono-system-data-datasetextensions4.0-cil
|
2014-05-12 08:37:34 -04:00
|
|
|
libmono-system-web-extensions4.0-cil
|
|
|
|
|
libmono-system-management4.0-cil
|
2014-07-08 00:06:17 -04:00
|
|
|
libmono-system-xml-linq4.0-cil
|
2014-07-29 01:53:17 -04:00
|
|
|
libmono-corlib4.0-cil
|
2014-10-03 20:22:34 -04:00
|
|
|
libqt4-dev
|
|
|
|
|
dos2unix
|
2014-10-07 15:34:18 -04:00
|
|
|
cmake
|
2014-10-03 20:22:34 -04:00
|
|
|
"
|
2014-04-02 18:09:23 -04:00
|
|
|
|
|
|
|
|
for DEP in $DEPS; do
|
|
|
|
|
if ! dpkg -s $DEP > /dev/null 2>&1; then
|
|
|
|
|
echo "Attempting installation of missing package: $DEP"
|
|
|
|
|
set -x
|
2014-10-03 20:22:34 -04:00
|
|
|
sudo apt-get install -y $DEP
|
2014-04-02 18:09:23 -04:00
|
|
|
set +x
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
2014-10-03 20:22:34 -04:00
|
|
|
echo
|
2014-10-07 15:34:18 -04:00
|
|
|
if [ "$IS_GITHUB_BUILD" = true ]; then
|
2014-10-03 20:22:34 -04:00
|
|
|
echo
|
|
|
|
|
echo Github build
|
|
|
|
|
echo Checking / downloading the latest archives
|
|
|
|
|
echo
|
|
|
|
|
set +e
|
2014-10-07 15:34:18 -04:00
|
|
|
chmod +x Build/BatchFiles/Linux/GetAssets.py
|
2014-10-03 20:22:34 -04:00
|
|
|
Build/BatchFiles/Linux/GetAssets.py EpicGames/UnrealEngine $GITHUB_TAG
|
2014-10-03 21:22:49 -04:00
|
|
|
UpdateResult=$?
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
if [ $UpdateResult -eq 1 ]; then
|
|
|
|
|
echo
|
|
|
|
|
echo Could not check/download binary dependencies!
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2014-10-03 20:22:34 -04:00
|
|
|
|
|
|
|
|
# check if it had to download anything
|
2014-10-07 15:34:18 -04:00
|
|
|
if [ $UpdateResult -eq 2 -o "$FORCE_UPDATEDEPS" = true ]; then
|
2014-10-03 20:22:34 -04:00
|
|
|
echo
|
|
|
|
|
echo Downloaded new binaries!
|
|
|
|
|
echo Unpacking and massaging the files
|
|
|
|
|
pushd Build/BatchFiles/Linux > /dev/null
|
|
|
|
|
./UpdateDeps.sh
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
else
|
|
|
|
|
echo
|
|
|
|
|
echo All assets are up to date, not unpacking zip files again.
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
echo Perforce build
|
|
|
|
|
echo Assuming availability of up to date third-party libraries
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
pushd Build/BatchFiles/Linux > /dev/null
|
|
|
|
|
./BuildThirdParty.sh
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo Setting up Unreal Engine 4 project files...
|
|
|
|
|
echo
|
|
|
|
|
|
2014-07-30 16:36:51 -04:00
|
|
|
# args: wrong filename, correct filename
|
|
|
|
|
# expects to be in Engine folder
|
|
|
|
|
CreateLinkIfNoneExists()
|
|
|
|
|
{
|
|
|
|
|
WrongName=$1
|
|
|
|
|
CorrectName=$2
|
|
|
|
|
|
2014-10-07 15:34:18 -04:00
|
|
|
pushd `dirname $CorrectName` > /dev/null
|
2014-09-23 20:11:18 -04:00
|
|
|
if [ ! -f `basename $CorrectName` ] && [ -f $WrongName ]; then
|
2014-07-30 16:36:51 -04:00
|
|
|
echo "$WrongName -> $CorrectName"
|
|
|
|
|
ln -sf $WrongName `basename $CorrectName`
|
|
|
|
|
fi
|
2014-10-07 15:34:18 -04:00
|
|
|
popd > /dev/null
|
2014-07-30 16:36:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fixes for case sensitive filesystem.
|
|
|
|
|
for BASE in Content/Editor/Slate Content/Slate Documentation/Source/Shared/Icons; do
|
|
|
|
|
find $BASE -name "*.PNG" | while read PNG_UPPER; do
|
|
|
|
|
png_lower="$(echo "$PNG_UPPER" | sed 's/.PNG$/.png/')"
|
|
|
|
|
if [ ! -f $png_lower ]; then
|
|
|
|
|
PNG_UPPER=$(basename $PNG_UPPER)
|
|
|
|
|
echo "$png_lower -> $PNG_UPPER"
|
|
|
|
|
# link, and not move, to make it usable with Perforce workspaces
|
|
|
|
|
ln -sf `basename "$PNG_UPPER"` "$png_lower"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
CreateLinkIfNoneExists ../../engine/shaders/Fxaa3_11.usf ../Engine/Shaders/Fxaa3_11.usf
|
2014-09-23 20:11:18 -04:00
|
|
|
CreateLinkIfNoneExists ../../Engine/shaders/Fxaa3_11.usf ../Engine/Shaders/Fxaa3_11.usf
|
2014-07-30 16:36:51 -04:00
|
|
|
|
2014-04-02 18:09:23 -04:00
|
|
|
set -x
|
|
|
|
|
xbuild Source/Programs/UnrealBuildTool/UnrealBuildTool_Mono.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
|
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
2014-07-29 01:53:17 -04:00
|
|
|
xbuild Source/Programs/AutomationTool/AutomationTool_Mono.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
2014-10-09 17:15:41 -04:00
|
|
|
/p:Platform="AnyCPU" \
|
2014-07-29 01:53:17 -04:00
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
|
|
|
|
xbuild Source/Programs/AutomationTool/Scripts/AutomationScripts.Automation.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
|
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
|
|
|
|
xbuild Source/Programs/AutomationTool/Linux/Linux.Automation.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
|
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
|
|
|
|
xbuild Source/Programs/AutomationTool/Android/Android.Automation.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
|
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
|
|
|
|
xbuild Source/Programs/AutomationTool/HTML5/HTML5.Automation.csproj \
|
|
|
|
|
/verbosity:quiet /nologo \
|
|
|
|
|
/p:TargetFrameworkVersion=v4.0 \
|
|
|
|
|
/p:Configuration="Development"
|
|
|
|
|
|
2014-04-02 18:09:23 -04:00
|
|
|
# pass all parameters to UBT
|
2014-05-12 08:37:34 -04:00
|
|
|
mono Binaries/DotNET/UnrealBuildTool.exe -makefile "$@"
|
2014-07-29 01:53:17 -04:00
|
|
|
set +x
|