2021-03-09 21:05:18 -04:00
<?xml version='1.0' ?>
<BuildGraph xmlns= "http://www.epicgames.com/BuildGraph" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.epicgames.com/BuildGraph ../../Schema.xsd" >
<!--
This script exposes all supported platforms as options and turns the selected platforms
into three + separated lists.
1) EditorPlatforms - these are editor platforms the user requested directly or via WithWin64Editor=true
2023-10-30 10:07:27 -04:00
2) TargetPlatforms - these are cooked platforms the user requested directly or via WithIOS=true
2021-03-09 21:05:18 -04:00
3) RequiredEditorPlatforms - these are editor platforms that need to be build due to #2, but shouldn't be
used for tests etc because they weren't in #1
2023-10-30 10:07:27 -04:00
Both 1) and 2) can be specified directly for convenience. E.g. -set:TargetPlatforms=Android+IOS
2021-03-09 21:05:18 -04:00
Downstream code can make the distinction of an editor to build but not test by the following
condition being true - ContainsItem('$(EditorName)', '$(EditorPlatforms)', '+')
If no platforms are found either by being specified directly or via the 'WithFoo' syntax, then
the DefaultEditorPlatforms and DefaultTargetPlatforms properties are returned. This allows scripts
to set defaults.
OutProperty: EditorPlatforms - Editor platforms to build and test, separated by +
OutProperty: TargetPlatforms - Target platforms to build and test, separated by +
OutProperty: RequiredEditorPlatforms - Editor platforms to build to cook targets
-->
2023-11-08 11:55:30 -05:00
<Property Name= "AllDesktopPlatforms" Value= "Mac+Win64+Linux" />
<Property Name= "AllEditorPlatforms" Value= "$(AllDesktopPlatforms)" />
2023-10-30 10:07:27 -04:00
<Property Name= "AllConsolePlatforms" Value= "" />
<Property Name= "AllTargetPlatforms" Value= "Android+IOS+Mac+TVOS+Win64+Linux" />
2023-11-08 11:55:30 -05:00
<Property Name= "AllVirtualizedPlatforms" Value= "" />
2021-03-11 23:26:40 -04:00
2021-03-09 21:05:18 -04:00
<Option Name= "EditorPlatforms" DefaultValue= "" Description= "Alternative to 'WithFooEditor', a list of editors to build and test. Win64+Mac etc" />
2023-10-30 10:07:27 -04:00
<Option Name= "TargetPlatforms" DefaultValue= "" Description= "Alternative to 'WithFoo', a list of Platforms to build and test. Android+IOS etc" />
2022-07-11 09:50:47 -04:00
<Option Name= "CookedEditorPlatforms" DefaultValue= "" Description= "Alternative to 'WithFooCookedEditor', a list of editors to build and cooked. Win64+Mac etc" />
2021-03-09 21:05:18 -04:00
2021-03-11 23:26:40 -04:00
<!-- Support simple One+Two+Three style -->
<Option Name= "TargetConfigurations" DefaultValue= "" Description= "Configuration(s) to build" />
<Option Name= "PackageConfigurations" DefaultValue= "$(TargetConfigurations)" Description= "Configuration to package" />
<Option Name= "TestConfigurations" DefaultValue= "$(PackageConfigurations)" Description= "Configuration to test" />
2022-07-11 09:50:47 -04:00
<Option Name= "CookedEditorConfigurations" DefaultValue= "" Description= "Configuration(s) to use when making a cooked editor (Development, Shipping or Development+Shipping)" />
2021-03-09 21:05:18 -04:00
2021-03-28 22:51:06 -04:00
<!-- No means of reliably running these tests atm -->
2021-05-13 20:20:24 -04:00
<Option Name= "EditorPlatformsToSkipTests" DefaultValue= "" Restrict= ".*" Description= "List of editor platforms that editor tests won't be run on" />
2024-01-16 13:57:03 -05:00
<Option Name= "TargetPlatformsToSkipTests" DefaultValue= "IOS+TVOS" Restrict= ".*" Description= "List of target platforms that target tests won't be run on" />
2022-07-11 09:50:47 -04:00
<Option Name= "CookedEditorPlatformsToSkipTests" DefaultValue= "" Restrict= ".*" Description= "List of editor cooked platforms that editor tests won't be run on" />
2021-05-13 20:20:24 -04:00
<Option Name= "PlatformsToSkipTests" DefaultValue= "" Restrict= ".*" Description= "List of platforms that all tests won't be run on. Overrides Editor/TargetPlatformsToSkipTests when non-empty." />
2021-03-28 22:51:06 -04:00
2023-11-08 11:55:30 -05:00
<Macro Name= "AddPlatform" Arguments= "Platform;IsConsole;IsEnabled" OptionalArguments= "IsVirtualized" >
<Property Name= "IsVirtualized" Value= "('$(IsVirtualized)' != '' and '$(IsVirtualized)' != 'false')" />
2023-10-30 10:07:27 -04:00
<Property Name= "AllTargetPlatforms" Value= "$(AllTargetPlatforms)+$(Platform)" If= "!ContainsItem('$(AllTargetPlatforms)', '$(Platform)', '+')" />
<Property Name= "AllConsolePlatforms" Value= "$(AllConsolePlatforms)+$(Platform)" If= "$(IsConsole) and !ContainsItem('$(AllConsolePlatforms)', '$(Platform)', '+')" />
2023-11-08 11:55:30 -05:00
<Property Name= "AllVirtualizedPlatforms" Value= "$(AllVirtualizedPlatforms)+$(Platform)" If= "$(IsVirtualized) And !ContainsItem('$(AllVirtualizedPlatforms)', '$(Platform)', '+')" />
2023-10-30 10:07:27 -04:00
<Property Name= "TargetPlatforms" Value= "$(TargetPlatforms)+$(Platform)" If= "$(IsEnabled) and !ContainsItem('$(TargetPlatforms)', '$(Platform)', '+')" />
</Macro>
<!-- Include any scripts from platform extensions -->
<Include Script= "../../../../Platforms/*/Build/Inc/PlatformOptions.xml" />
2021-03-09 21:05:18 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithWin64Editor" DefaultValue= "false" Description= "Build and test Win64 Editor" />
<Option Name= "WithMacEditor" DefaultValue= "false" Description= "Build and test Mac Editor" />
<Option Name= "WithLinuxEditor" DefaultValue= "false" Description= "Build and test Linux Editor" />
2022-07-11 09:50:47 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithWin64CookedEditor" DefaultValue= "false" Description= "Build and cook Win64 CookedEditor" />
<Option Name= "WithMacCookedEditor" DefaultValue= "false" Description= "Build and cook Mac CookedEditor" />
<Option Name= "WithLinuxCookedEditor" DefaultValue= "false" Description= "Build and cook Linux CookedEditor" />
2021-03-09 21:05:18 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithAndroid" DefaultValue= "false" Description= "Build and test Android" />
<Option Name= "WithIOS" DefaultValue= "false" Description= "Build and test IOS" />
<Option Name= "WithLinux" DefaultValue= "false" Description= "Build and test Linux" />
<Option Name= "WithMac" DefaultValue= "false" Description= "Build and test Mac" />
<Option Name= "WithTVOS" DefaultValue= "false" Description= "Build and test TVOS" />
<Option Name= "WithWin64" DefaultValue= "false" Description= "Build and test Win64" />
2021-03-09 21:05:18 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(EditorPlatforms)' == ''" >
<Property Name= "EditorPlatforms" Value= "" />
<Property Name= "EditorPlatforms" Value= "$(EditorPlatforms)Win64+" If= "$(WithWin64Editor)" />
<Property Name= "EditorPlatforms" Value= "$(EditorPlatforms)Mac+" If= "$(WithMacEditor)" />
<Property Name= "EditorPlatforms" Value= "$(EditorPlatforms)Linux+" If= "$(WithLinuxEditor)" />
</Do>
2022-07-11 09:50:47 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(CookedEditorPlatforms)' == ''" >
<Property Name= "CookedEditorPlatforms" Value= "" />
<Property Name= "CookedEditorPlatforms" Value= "$(CookedEditorPlatforms)Win64+" If= "$(WithWin64CookedEditor)" />
<Property Name= "CookedEditorPlatforms" Value= "$(CookedEditorPlatforms)Mac+" If= "$(WithMacCookedEditor)" />
<Property Name= "CookedEditorPlatforms" Value= "$(CookedEditorPlatforms)Linux+" If= "$(WithLinuxCookedEditor)" />
</Do>
2023-10-31 12:46:54 -04:00
<Expand Name= "AddPlatform" Platform= "Android" IsConsole= "false" IsEnabled= "$(WithAndroid)" />
<Expand Name= "AddPlatform" Platform= "IOS" IsConsole= "false" IsEnabled= "$(WithIOS)" />
<Expand Name= "AddPlatform" Platform= "Linux" IsConsole= "false" IsEnabled= "$(WithLinux)" />
<Expand Name= "AddPlatform" Platform= "Mac" IsConsole= "false" IsEnabled= "$(WithMac)" />
<Expand Name= "AddPlatform" Platform= "TVOS" IsConsole= "false" IsEnabled= "$(WithTVOS)" />
<Expand Name= "AddPlatform" Platform= "Win64" IsConsole= "false" IsEnabled= "$(WithWin64)" />
2021-03-09 21:05:18 -04:00
<!-- If still no platforms, pick the defaults that the script should have specified -->
<Do If= "'$(EditorPlatforms)' == ''" >
<Property Name= "EditorPlatforms" Value= "$(DefaultEditorPlatforms)" />
</Do>
2022-07-11 09:50:47 -04:00
<Do If= "'$(CookedEditorPlatforms)' == ''" >
<Property Name= "CookedEditorPlatforms" Value= "$(DefaultCookedEditorPlatforms)" />
</Do>
2021-03-09 21:05:18 -04:00
<Do If= "'$(TargetPlatforms)' == ''" >
<Property Name= "TargetPlatforms" Value= "$(DefaultTargetPlatforms)" />
</Do>
<!-- 'None' means don't do any platforms. We need to do this because an empty string means use defaults.. -->
<Do If= "'$(EditorPlatforms)' == 'None'" >
<Property Name= "EditorPlatforms" Value= "" />
</Do>
2022-07-11 09:50:47 -04:00
<Do If= "'$(CookedEditorPlatforms)' == 'None'" >
<Property Name= "CookedEditorPlatforms" Value= "" />
</Do>
2021-03-09 21:05:18 -04:00
<Do If= "'$(TargetPlatforms)' == 'None'" >
<Property Name= "TargetPlatforms" Value= "" />
</Do>
2023-10-30 10:07:27 -04:00
<!-- 'All' means that we want to support all available platforms -->
2021-03-11 23:26:40 -04:00
<Do If= "'$(EditorPlatforms)' == 'All'" >
<Property Name= "EditorPlatforms" Value= "$(AllEditorPlatforms)" />
</Do>
<Do If= "'$(TargetPlatforms)' == 'All'" >
<Property Name= "TargetPlatforms" Value= "$(AllTargetPlatforms)" />
</Do>
2022-07-11 09:50:47 -04:00
<Do If= "'$(CookedEditorPlatforms)' == 'All'" >
<Property Name= "CookedEditorPlatforms" Value= "$(AllEditorPlatforms)" />
</Do>
2021-03-11 23:26:40 -04:00
2021-03-09 21:05:18 -04:00
<Property Name= "RequiredEditorPlatforms" Value= "$(EditorPlatforms)" />
<ForEach Name= "TargetPlatform" Values= "$(TargetPlatforms)" Separator= "+" >
2021-03-11 23:26:40 -04:00
<!-- Check the platform is valid -->
<Do If= "!ContainsItem('$(AllTargetPlatforms)','$(TargetPlatform)','+')" >
<Error Message= "Platform $(TargetPlatform) is not a recognized platform!" />
</Do>
2021-03-09 21:05:18 -04:00
<!-- Declare type of host required to build & cook this platform -->
<Property Name= "HostAgentType" Value= "Win64" />
2023-10-30 10:07:27 -04:00
<Property Name= "HostAgentType" Value= "Mac" If= "'$(TargetPlatform)' == 'Mac' or '$(TargetPlatform)' == 'IOS' or '$(TargetPlatform)' == 'TVOS'" />
2022-10-12 13:24:57 -04:00
<Property Name= "HostAgentType" Value= "Linux" If= "'$(TargetPlatform)' == 'Linux'" />
2021-03-09 21:05:18 -04:00
<Do If= "!ContainsItem('$(RequiredEditorPlatforms)','$(HostAgentType)', '+')" >
<Property Name= "RequiredEditorPlatforms" Value= "$(RequiredEditorPlatforms)+$(HostAgentType)" />
</Do>
</ForEach>
2022-07-11 09:50:47 -04:00
<ForEach Name= "CookedEditorPlatform" Values= "$(CookedEditorPlatforms)" Separator= "+" >
<!-- Check the platform is valid -->
<Do If= "!ContainsItem('$(AllEditorPlatforms)','$(CookedEditorPlatform)','+')" >
<Error Message= "Platform $(CookedEditorPlatform) is not a recognized platform!" />
</Do>
<Do If= "!ContainsItem('$(RequiredEditorPlatforms)','$(CookedEditorPlatform)', '+')" >
<Property Name= "RequiredEditorPlatforms" Value= "$(RequiredEditorPlatforms)+$(CookedEditorPlatform)" />
</Do>
</ForEach>
2023-10-30 10:07:27 -04:00
<!-- Packaging isn't supported by Gauntlet yet :( ) -->
2024-02-27 10:06:06 -05:00
<Property Name= "PlatformsToSkipPackaging" Value= "Win64+Linux" />
2021-03-09 21:05:18 -04:00
2021-03-23 13:53:51 -04:00
<!-- These platforms can't run from loose staged content -->
2023-10-30 10:07:27 -04:00
<Property Name= "PlatformsThatRequirePackaging" Value= "Android+IOS" />
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithDebugTargets" DefaultValue= "false" Description= "Build Debug configurations" />
<Option Name= "WithDevelopmentTargets" DefaultValue= "false" Description= "Build Development configurations" />
<Option Name= "WithTestTargets" DefaultValue= "false" Description= "Build Test configurations" />
<Option Name= "WithShippingTargets" DefaultValue= "false" Description= "Build Shipping configurations" />
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithDebugPackages" DefaultValue= "false" Description= "Build Debug packages" />
<Option Name= "WithDevelopmentPackages" DefaultValue= "false" Description= "Build Development packages" />
<Option Name= "WithTestPackages" DefaultValue= "false" Description= "Build Test packages" />
<Option Name= "WithShippingPackages" DefaultValue= "false" Description= "Build Shipping packages" />
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithDebugTests" DefaultValue= "false" Description= "Run tests on Debug builds" />
<Option Name= "WithDevelopmentTests" DefaultValue= "false" Description= "Run tests on Development builds" />
<Option Name= "WithTestTests" DefaultValue= "false" Description= "Run tests on Test builds" />
<Option Name= "WithShippingTests" DefaultValue= "false" Description= "Run tests on Shipping builds" />
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Option Name= "WithDevelopmentCookedEditor" DefaultValue= "false" Description= "Build Development configuration for Editor cooked" />
<Option Name= "WithShippingCookedEditor" DefaultValue= "false" Description= "Build Shipping configuration for Editor cooked" />
2022-07-11 09:50:47 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(TargetConfigurations)' == ''" >
<Property Name= "TargetConfigurations" Value= "" />
<Property Name= "TargetConfigurations" Value= "$(TargetConfigurations)Debug+" If= "$(WithDebugTargets)" />
<Property Name= "TargetConfigurations" Value= "$(TargetConfigurations)Development+" If= "$(WithDevelopmentTargets)" />
<Property Name= "TargetConfigurations" Value= "$(TargetConfigurations)Test+" If= "$(WithTestTargets)" />
<Property Name= "TargetConfigurations" Value= "$(TargetConfigurations)Shipping+" If= "$(WithShippingTargets)" />
</Do>
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(PackageConfigurations)' == ''" >
<Property Name= "PackageConfigurations" Value= "" />
<Property Name= "PackageConfigurations" Value= "$(PackageConfigurations)Debug+" If= "$(WithDebugPackages)" />
<Property Name= "PackageConfigurations" Value= "$(PackageConfigurations)Development+" If= "$(WithDevelopmentPackages)" />
<Property Name= "PackageConfigurations" Value= "$(PackageConfigurations)Test+" If= "$(WithTestPackages)" />
<Property Name= "PackageConfigurations" Value= "$(PackageConfigurations)Shipping+" If= "$(WithShippingPackages)" />
</Do>
2021-03-11 23:26:40 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(TestConfigurations)' == ''" >
<Property Name= "TestConfigurations" Value= "" />
<Property Name= "TestConfigurations" Value= "$(TestConfigurations)Debug+" If= "$(WithDebugTests)" />
<Property Name= "TestConfigurations" Value= "$(TestConfigurations)Development+" If= "$(WithDevelopmentTests)" />
<Property Name= "TestConfigurations" Value= "$(TestConfigurations)Test+" If= "$(WithTestTests)" />
<Property Name= "TestConfigurations" Value= "$(TestConfigurations)Shipping+" If= "$(WithShippingTests)" />
</Do>
2022-07-11 09:50:47 -04:00
2023-10-30 10:07:27 -04:00
<Do If= "'$(CookedEditorConfigurations)' == ''" >
<Property Name= "CookedEditorConfigurations" Value= "" />
<Property Name= "CookedEditorConfigurations" Value= "$(CookedEditorConfigurations)Development+" If= "$(WithDevelopmentCookedEditor)" />
<Property Name= "CookedEditorConfigurations" Value= "$(CookedEditorConfigurations)Shipping+" If= "$(WithShippingCookedEditor)" />
2021-03-11 23:26:40 -04:00
</Do>
<Do If= "'$(TargetConfigurations)' == ''" >
<Property Name= "TargetConfigurations" Value= "$(DefaultTargetConfigurations)" />
</Do>
<Do If= "'$(PackageConfigurations)' == ''" >
<Property Name= "PackageConfigurations" Value= "$(TargetConfigurations)" />
</Do>
<Do If= "'$(TestConfigurations)' == ''" >
<Property Name= "TestConfigurations" Value= "$(PackageConfigurations)" />
</Do>
2022-07-11 09:50:47 -04:00
<Do If= "'$(CookedEditorConfigurations)' == ''" >
<Property Name= "CookedEditorConfigurations" Value= "$(DefaultCookedEditorConfigurations)" />
</Do>
2021-03-12 00:17:33 -04:00
<!-- add up any package configurations that are needed by test configurations.. -->
<ForEach Name= "TestConfiguration" Values= "$(TestConfigurations)" Separator= "+" >
<Do If= "!ContainsItem('$(PackageConfigurations)','$(TestConfiguration)', '+')" >
2021-03-12 15:39:07 -04:00
<Trace Message= "Adding package configuration for $(TestConfiguration) due to the config being set for testing" />
2021-03-12 00:17:33 -04:00
<Property Name= "PackageConfigurations" Value= "$(PackageConfigurations)+$(TestConfiguration)" />
</Do>
</ForEach>
2021-03-11 23:26:40 -04:00
2021-03-12 00:17:33 -04:00
<!-- add up any target configurations that are needed by package configurations.. -->
<ForEach Name= "PackageConfiguration" Values= "$(PackageConfigurations)" Separator= "+" >
<Do If= "!ContainsItem('$(TargetConfigurations)','$(PackageConfiguration)', '+')" >
2021-03-12 15:39:07 -04:00
<Trace Message= "Adding target configuration for $(PackageConfiguration) due to the config being set for packaging" />
2021-03-12 00:17:33 -04:00
<Property Name= "TargetConfigurations" Value= "$(TargetConfigurations)+$(PackageConfiguration)" />
</Do>
</ForEach>
2021-03-11 23:26:40 -04:00
2021-07-23 12:25:41 -04:00
<!-- If no target configurations were added, then no configurations were specified. Default to Development. -->
2021-07-22 01:02:46 -04:00
<Property Name= "TargetConfigurations" Value= "Development" If= "'$(TargetConfigurations)' == ''" />
2021-07-23 12:25:41 -04:00
<Property Name= "PackageConfigurations" Value= "$(TargetConfigurations)" If= "'$(PackageConfigurations)' == ''" />
<Property Name= "TestConfigurations" Value= "$(PackageConfigurations)" If= "'$(TestConfigurations)' == ''" />
2022-07-11 09:50:47 -04:00
<Property Name= "CookedEditorConfigurations" Value= "Development" If= "'$(CookedEditorConfigurations)' == ''" />
2021-07-22 01:02:46 -04:00
2021-03-09 21:05:18 -04:00
</BuildGraph>