Files
UnrealEngineUWP/Engine/Build/BatchFiles/FindPlatformExtensionSources.sh
Josh Adams 84150c0c8f - Changed the directory structure from /Platforms/Engine to /Engine/Platforms (and .../Project/Platforms)
- Some fixes to get project platform files compiling
#rb ben.marsh

[CL 7294119 by Josh Adams in Dev-Build branch]
2019-07-12 16:09:23 -04:00

32 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
## Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
##
## Unreal Engine 4 AutomationTool setup script
##
## 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.
SCRIPT_DIR=$(cd "`dirname "$0"`" && pwd)
cd "$SCRIPT_DIR/../../Source"
mkdir -p ../Intermediate/ProjectFiles
## Look for any platform extension .cs files, and add them to a file that will be refernced by UBT project, so it can bring them in automatically
REFERENCE_FILE=../Intermediate/ProjectFiles/UnrealBuildTool.csproj.References
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $REFERENCE_FILE
echo "<Project ToolsVersion=\"15.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">" >> $REFERENCE_FILE
echo "<ItemGroup>" >> $REFERENCE_FILE
for PLATFORM in ../../Engine/Platforms/*; do
for SOURCE_FILE in ${PLATFORM}/Source/Programs/UnrealBuildTool/*; do
echo "<PlatformExtensionCompile Include=\"..\\..\\${SOURCE_FILE//\//\\}\">" >> $REFERENCE_FILE
echo " <Link>Platform\${PLATFORM##*/}\${SOURCE_FILE##*/}</Link>" >> $REFERENCE_FILE
echo "</PlatformExtensionCompile>" >> %REFERENCE_FILE%
done
done
echo "</ItemGroup>" >> $REFERENCE_FILE
echo "</Project>" >> $REFERENCE_FILE