diff --git a/.github/workflows/build_self_hosted.yml b/.github/workflows/build_self_hosted.yml
index dfe66cdd3..0195964da 100644
--- a/.github/workflows/build_self_hosted.yml
+++ b/.github/workflows/build_self_hosted.yml
@@ -24,6 +24,11 @@ jobs:
call Build.bat --git-code T8w6TYB_r71gGTP3A02B
shell: cmd
+ - name: install
+ run: |
+ call RunUAT.bat
+ shell: cmd
+
- uses: mickem/clean-after-action@v1
- name: Delete .git folder
diff --git a/Engine/Build/InstalledEngineBuild.xml b/Engine/Build/InstalledEngineBuild.xml
index b3bde84d0..24202695e 100644
--- a/Engine/Build/InstalledEngineBuild.xml
+++ b/Engine/Build/InstalledEngineBuild.xml
@@ -75,8 +75,8 @@
-
-
+
+
@@ -107,8 +107,8 @@
-
-
+
+
diff --git a/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs b/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
index d77b52807..c5757399b 100644
--- a/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
+++ b/Engine/Source/Programs/AutomationTool/Scripts/BuildPluginCommand.Automation.cs
@@ -48,8 +48,9 @@ public override void ExecuteBuild()
// Option for verifying that all include directive s
bool bStrictIncludes = ParseParam("StrictIncludes");
- // Whether to use VS2019 for compiling all targets. By default, we currently use 2017 for compiling static libraries for maximum compatibility.
- bool bVS2019 = ParseParam("VS2019");
+
+ // Whether to use VS2022 for compiling all targets. By default, we currently use 2019 for compiling static libraries for maximum compatibility.
+ bool bVS2022 = ParseParam("VS2022");
// Make sure the packaging directory is valid
DirectoryReference PackageDir = new DirectoryReference(PackageParam);
@@ -108,7 +109,7 @@ public override void ExecuteBuild()
// Compile the plugin for all the target platforms
List HostPlatforms = ParseParam("NoHostPlatform")? new List() : new List { BuildHostPlatform.Current.Platform };
List TargetPlatforms = GetTargetPlatforms(this, BuildHostPlatform.Current.Platform);
- FileReference[] BuildProducts = CompilePlugin(HostProjectFile, HostProjectPluginFile, Plugin, HostPlatforms, TargetPlatforms, AdditionalArgs.ToString(), bVS2019);
+ FileReference[] BuildProducts = CompilePlugin(HostProjectFile, HostProjectPluginFile, Plugin, HostPlatforms, TargetPlatforms, AdditionalArgs.ToString(), bVS2022);
// Package up the final plugin data
PackagePlugin(HostProjectPluginFile, BuildProducts, PackageDir, ParseParam("unversioned"));
@@ -137,7 +138,7 @@ FileReference CreateHostProject(FileReference HostProjectFile, FileReference Plu
return FileReference.Combine(HostProjectPluginDir, PluginFile.GetFileName());
}
- FileReference[] CompilePlugin(FileReference HostProjectFile, FileReference HostProjectPluginFile, PluginDescriptor Plugin, List HostPlatforms, List TargetPlatforms, string AdditionalArgs, bool bVS2019)
+ FileReference[] CompilePlugin(FileReference HostProjectFile, FileReference HostProjectPluginFile, PluginDescriptor Plugin, List HostPlatforms, List TargetPlatforms, string AdditionalArgs, bool bVS2022)
{
List ManifestFileNames = new List();
@@ -163,7 +164,7 @@ FileReference[] CompilePlugin(FileReference HostProjectFile, FileReference HostP
{
if(Plugin.SupportsTargetPlatform(TargetPlatform))
{
- string AdditionalTargetArgs = AdditionalArgs + (bVS2019 ? "" : " -2017");
+ string AdditionalTargetArgs = AdditionalArgs + (bVS2022 ? "" : " -2019");
CompilePluginWithUBT(HostProjectFile, HostProjectPluginFile, Plugin, "UE4Game", TargetType.Game, TargetPlatform, UnrealTargetConfiguration.Development, ManifestFileNames, AdditionalTargetArgs);
CompilePluginWithUBT(HostProjectFile, HostProjectPluginFile, Plugin, "UE4Game", TargetType.Game, TargetPlatform, UnrealTargetConfiguration.Shipping, ManifestFileNames, AdditionalTargetArgs);
}
diff --git a/RunUAT.bat b/RunUAT.bat
new file mode 100644
index 000000000..0a0ed6070
--- /dev/null
+++ b/RunUAT.bat
@@ -0,0 +1,32 @@
+@echo off
+
+set "Root=%~dp0"
+set "RunUAT=%Root%Engine\Build\BatchFiles\RunUAT.bat"
+set "BuildGraphScript=%Root%Engine\Build\InstalledEngineBuild.xml"
+
+if not exist "%RunUAT%" (
+ echo Could not find "%RunUAT%".
+ pause
+ exit /b 1
+)
+
+if not exist "%BuildGraphScript%" (
+ echo Could not find "%BuildGraphScript%".
+ pause
+ exit /b 1
+)
+
+rem fix: Unable to find installation of PDBCOPY.EXE
+.git\ue4-gitdeps\X64_Debuggers_And_Tools-x64_en-us.msi
+
+if exist "%ProgramW6432%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
+ echo Using Visual Studio 2022 for packaging.
+ call "%RunUAT%" BuildGraph -script="%BuildGraphScript%" -target="Make Installed Build Win64" -nosign -set:GameConfigurations=Development;Shipping -set:WithWin64=true -set:WithWin32=false -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithLinuxAArch64=false -set:WithDDC=false -set:VS2022=true -clean
+) else (
+ echo Using Visual Studio 2019 for packaging.
+ call "%RunUAT%" BuildGraph -script="%BuildGraphScript%" -target="Make Installed Build Win64" -nosign -set:GameConfigurations=Development;Shipping -set:WithWin64=true -set:WithWin32=false -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithLinuxAArch64=false -set:WithDDC=false -clean
+)
+
+
+pause
+exit /b %ERRORLEVEL%
\ No newline at end of file