Files
UnrealEngineUWP/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh
jack porter bd6edb9d47 Fix Mac GenerateProjectFiles.sh argument quoting
#jira UE-106289
#jira UE-112801
#rb Will.Damon
#lockdown Jack.Porter
[FYI] Will.Damon
#preflight 6076842193d37d0001e897d1

#ROBOMERGE-OWNER: jack.porter
#ROBOMERGE-AUTHOR: jack.porter
#ROBOMERGE-SOURCE: CL 16001683 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)
#ROBOMERGE-CONFLICT from-shelf

[CL 16001716 by jack porter in ue5-main branch]
2021-04-14 02:30:22 -04:00

36 lines
1.5 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 '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
echo "$BASE_PATH"
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
source "$BASE_PATH/SetupEnvironment.sh" -dotnet "$BASE_PATH"
# ensure UnrealBuildTool is up to date if the project file exists, but not if running from an installed build
if [ -f "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" -a ! -f "$BASE_PATH/../../../Build/InstalledBuild.txt" ]; then
dotnet msbuild /restore /target:build /property:Configuration=Development /nologo "$BASE_PATH/../../../Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj" /verbosity:quiet
if [ $? -ne 0 ]; then
echo GenerateProjectFiles ERROR: Failed to build UnrealBuildTool
exit 1
fi
fi
# pass all parameters to UBT
"$BASE_PATH/../../../Binaries/DotNET/UnrealBuildTool/UnrealBuildTool" -projectfiles "$@"