Files
UnrealEngineUWP/Engine/Build/BatchFiles/RunUBT.sh
joe kirchoff 27ee520c1b [Backout] - CL23055743
[FYI] Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
BatchFiles: Add output directory when caling dotnet build as running the scripts via a visual studio environment requires this, and for consistency. Via UDN

#rnx
#rb Josh.Adams
#preflight 636ae35c7c2b505190d92839

[CL 23069893 by joe kirchoff in ue5-main branch]
2022-11-09 21:04:55 -05:00

45 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Copyright Epic Games, Inc. All Rights Reserved.
EnvironmentType=-dotnet
# If ran from somewhere other then the script location we'll have the full base path
BASE_PATH="`dirname "$0"`"
if [ ! -d "$BASE_PATH/../../Binaries/DotNET" ]; then
echo RunUBT ERROR: It looks like you're missing some files that are required in order to run UBT. 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 RunUBT ERROR: This script file does not appear to be located inside the Engine/Build/BatchFiles directory.
exit 1
fi
if [ "$(uname)" = "Darwin" ]; then
# Setup Environment
source "$BASE_PATH/Mac/SetupEnvironment.sh" $EnvironmentType "$BASE_PATH/Mac"
fi
if [ "$(uname)" = "Linux" ]; then
# Setup Environment
source "$BASE_PATH/Linux/SetupEnvironment.sh" $EnvironmentType "$BASE_PATH/Linux"
fi
if [[ "$*" != *-SkipUBTBuild* ]]; then
if [ -f "$BASE_PATH/../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" ]; then
echo "Building UBT..."
dotnet build $BASE_PATH/../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj -c Development -v quiet
if [ $? -ne 0 ]; then
echo RunUBT ERROR: Failed to build UnrealBuildTool
exit 1
fi
fi
else
echo "Skipping UBT build..."
fi
# pass all parameters to UBT
dotnet "$BASE_PATH/../../Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll" "$@"