Files
joe kirchoff f1edb85ce3 Fix up code compile batch scripts to better support visual studio
* If invoked from VS2022, use visual studio to build UnrealBuildTool to prevent unnecessary rebuilds
* If invoked from VS2019 or on the command line without visual studio, use bundled dotnet to build
* Deduplicate all logic into Build.bat, and have Clean.bat and Rebuild.bat call Build.bat with either -Clean or -Rebuild
* Print entire dotnet version
* Replace various calls to dotnet msbuild with dotnet build
* Update old UE4 comments

#jira UE-165754
#rb ?

[CL 22387871 by joe kirchoff in ue5-main branch]
2022-10-06 19:45:24 -04:00

29 lines
814 B
Bash
Executable File

#!/bin/sh
## Unreal Engine XBuild setup script
## Copyright Epic Games, Inc. All Rights Reserved.
## This script is expecting to exist in the UE4/Engine/Build/BatchFiles directory. It will not work correctly
## if you copy it to a different location and run it.
echo
echo Running XBuild...
echo
source "`dirname "$0"`/SetupEnvironment.sh" -dotnet "`dirname "$0"`"
# put ourselves into Engine directory (two up from location of this script)
pushd "`dirname "$0"`/../../.."
if [ ! -f Build/BatchFiles/Mac/RunXBuild.sh ]; then
echo RunXBuild ERROR: The batch file does not appear to be located in the /Engine/Build/BatchFiles directory. This script must be run from within that directory.
exit 1
fi
dotnet msbuild /verbosity:quiet /nologo "$@" |grep -wi error
if [ $? -ne 1 ]; then
exit 1
else
exit 0
fi