Files
UnrealEngineUWP/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh
Joe Graf a9c7318df5 Added support for AoT compilation for mono UnrealBuildTool (~ %10 savings on a noop build due to no JIT)
- Must be opted into using "defaults write com.epicgames.ue4 MonoAOT 1"

#rb: none
#fyi: matt.collins, mark.satterthwaite, michael.trepka

[CL 5748446 by Joe Graf in Dev-VR branch]
2019-04-04 16:12:39 -04:00

38 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
echo
echo Setting up Unreal Engine 4 project files...
echo
# If ran from somewhere other then the script location we'll have the full base path
BASE_PATH="`dirname "$0"`"
# this is located inside an extra 'Mac' path unlike the Windows variant.
if [ ! -d "$BASE_PATH/../../../Binaries/DotNET" ]; then
echo GenerateProjectFiles ERROR: It looks like you're missing some files that are required in order to generate projects. Please check that you've downloaded and unpacked the engine source code, binaries, content and third-party dependencies before running this script.
exit 1
fi
if [ ! -d "$BASE_PATH/../../../Source" ]; then
echo GenerateProjectFiles ERROR: This script file does not appear to be located inside the Engine/Build/BatchFiles/Mac directory.
exit 1
fi
. "$BASE_PATH/SetupMono.sh" "$BASE_PATH"
if [ -f "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" ]; then
xbuild "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" /property:Configuration="Development" /verbosity:quiet /nologo |grep -i error
fi
WANT_AOT="`defaults read com.epicgames.ue4 MonoAOT`"
if [ $WANT_AOT == "1" ]; then
if [ ! -f "$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool.exe.dylib" ]; then
echo Compiling UnrealBuildTool to native...
mono --aot "$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool.exe"
fi
fi
# pass all parameters to UBT
mono "$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool.exe" -projectfiles "$@"