Files
UnrealEngineUWP/Engine/Build/BatchFiles/Linux/GenerateProjectFiles.sh
Joakim Lindqvist 3a29656e63 Updated linux shell scripts for UBT in NetCore, opt in by setting UE_USE_DOTNET=1, note that due to output path differences a lot of tooling will break when enabling it.
Added download.sh scripts to download new versions of dotnet sdk to inline for Linux and Mac.

#rb ben.marsh

[CL 14445358 by Joakim Lindqvist in ue5-main branch]
2020-10-08 09:28:12 -04:00

49 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Copyright Epic Games, Inc. All Rights Reserved.
echo
echo Setting up Unreal Engine 5 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 'Linux' 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
if [ ${UE_USE_DOTNET:=0} -ne 0 ]; then
source "$BASE_PATH/SetupEnvironment.sh" -dotnet "$BASE_PATH"
else
source "$BASE_PATH/SetupEnvironment.sh" -mono "$BASE_PATH"
fi
if [ -f "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" ]; then
if [ ${UE_USE_DOTNET:=0} -ne 0 ]; then
dotnet build $BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildToolCore.csproj -c Development
else
xbuild "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" /property:Configuration="Development" /verbosity:quiet /nologo /p:NoWarn=1591
fi
if [ $? -ne 0 ]; then
echo GenerateProjectFiles ERROR: Failed to build UnrealBuildTool
exit 1
fi
fi
# pass all parameters to UBT
if [ ${UE_USE_DOTNET:=0} -ne 0 ]; then
"$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool/UnrealBuildTool" -projectfiles "$@"
else
mono "$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool.exe" -projectfiles "$@"
fi