Hi,
We are looking at building a PC version for the Microsoft store.
I have just started looking at building using ‘WinGDK’ but after doing some searching I find that GDK builds under 5.6 are now legacy and you should be using UE5.7.
I’m sure you can do GDK builds with 5.6 but what should I do to get setup for a WinGDK build, which plugins should I bring in, will it create XVC’s automatically etc.
Any pointers to step-by-step would be great or any info if there isn’t one.
Thanks,
Simon
[Attachment Removed]
Hi
The WinGDK target is working fine in 5.6, you can create a package by running the command below for Lyra. Since a couple of UE releases, we are refactoring the WinGDK platform to be a plugin to the Win64 platform. The main advantage is that Win64 and WinGDK can share the cooked data and most compiled code. I think this work is 5.7 but it’s fully completed in 5.8. In 5.6, it was not ready yet, so you can package the platform as following:
.\RunUAT.bat BuildCookRun -project=Lyra -clientconfig="Development" -platform=WinGDK -build -cook -stage -pak -iostore -packageThis command still works in 5.7 too (I think, I’m running a build to verify, it it fails, I’ll let you know, but assume it works for now).
Regards,
Patrick
[Attachment Removed]
Hi,
Yes, it is expected to work in 5.5.4. The WinGDK platform has been supported since at least 4.27.
Regards,
Patrick
[Attachment Removed]
Hi,
Just to clarify what I said earlier, it might have been unclear:
- Before 5.8, the WinGDK et Win64 are two distinct platforms and you need to cook/build for both, doubling the work.
- In 5.8 and later, you will be able to use the PC GDK plugin to build a Windows Microsoft Store game. Since the PC GDK plugin is a Win64 plugin, you can reuse the cooked output/binaries of your regular Win64 build, saving processing resources (build time, disk space, etc).
Regards,
Patrick
[Attachment Removed]
Have a side question.
Is there a write up on how to get a GDK version built with UE incorporate Easy Anti-Cheat?
Thanks.
[Attachment Removed]
Hey,
We don’t have a write-up on specifics for WinGDK and Anti-Cheat. I’d recommend reading through the Anti-Cheat documentation here, and specifically for WinGDK you will need to be mindful of the following:
- Installing the Anti-Cheat service. You can add a custom install action to your WinGDK build under Project Settings → Platforms → Windows (GDK) → Under Packaging → Custom Install Actions.
- Having the game launched via the EAC bootstrapper. For Anti-Cheat to function your game must be launched via the bootstrapper. You’ll need to modify our AutomationTool to get this working. You can follow the guidance I gave [Content removed] Note that the thread is about the EOS bootstrapper, but the approach with the AC bootstrapper would be the same.
Let us know if you run into any issues.
Thanks,
Seb
[Attachment Removed]
I looked at the link you sent, the function has changed.
This is what I have changed it to
using(ModuleResourceUpdate Update = new ModuleResourceUpdate(IntermediateFile.FullName, false))
{
const int IconResourceId = 101;
if(GroupIcon != null) Update.SetIcons(IconResourceId, GroupIcon);
if (PerArchitectureStagedRelativeTargetPath == null)
{
const int ExecFileResourceId = 201;
Update.SetData(ExecFileResourceId, ResourceType.RawData, Encoding.Unicode.GetBytes(StagedRelativeTargetPath.ToString().Replace('/', '\\') + "\0"));
}
else
{
foreach (KeyValuePair<UnrealArch,StagedFileReference> ExtraTargetPath in PerArchitectureStagedRelativeTargetPath)
{
if (ExtraTargetPath.Key == UnrealArch.X64)
{
const int ExecFileResourceId_X64 = 201;
Update.SetData(ExecFileResourceId_X64, ResourceType.RawData, Encoding.Unicode.GetBytes(ExtraTargetPath.Value.ToString().Replace('/', '\\') + "\0"));
}
else if (ExtraTargetPath.Key == UnrealArch.Arm64)
{
const int ExecFileResourceId_ARM64 = 203;
Update.SetData(ExecFileResourceId_ARM64, ResourceType.RawData, Encoding.Unicode.GetBytes(ExtraTargetPath.Value.ToString().Replace('/', '\\') + "\0"));
}
else if (ExtraTargetPath.Key == UnrealArch.Arm64ec)
{
const int ExecFileResourceId_ARM64EC = 204;
Update.SetData(ExecFileResourceId_ARM64EC, ResourceType.RawData, Encoding.Unicode.GetBytes(ExtraTargetPath.Value.ToString().Replace('/', '\\') + "\0"));
}
else
{
throw new AutomationException("Unexpected architecture {arch} for bootstrap executable", ExtraTargetPath.Key);
}
}
}
// [@PBP] - Override executable that the "bootstrapper" launches
ConfigHierarchy EngineIni = ConfigCache.ReadHierarchy(ConfigHierarchyType.Engine, SC.RawProjectPath.Directory, PlatformType, SC.CustomConfig);
EngineIni.GetString("/Script/WindowsTargetPlatform.WindowsTargetSettings", "BootstrapperFileToLaunchOverride", out string FileToLaunch);
if (FileToLaunch == "")
{
FileToLaunch = StagedRelativeTargetPath.ToString().Replace('/', '\\') + "\0";
}
Update.SetData(201, ResourceType.RawData, Encoding.Unicode.GetBytes(FileToLaunch));
// [@PBP]
const int ExecArgsResourceId = 202;
Update.SetData(ExecArgsResourceId, ResourceType.RawData, Encoding.Unicode.GetBytes(StagedArguments + "\0"));
}
Does this look correct.
Not sure why if file to launch is null it fills in a path but the adding of the function is outside the ‘if’ statement?
[Attachment Removed]
Sorry for the delay here, I was on vacation and just got back today.
You need to add EasyAntiCheat_EOS_Setup.exe install <Your ProductId> and EasyAntiCheat_EOS_Setup.exe uninstall <Your ProductId>
to the Custom Install Actions. You can find more information in our EOS documentation here.
We should have the code change documented in a KB. I think this should work, can you test it on your end and confirm?
// Write the exec file override resource - used to insert an anti-cheat
// bootstrapper or other launcher between this bootstrap and the game executable.
const int ExecFileOverrideResourceId = 205;
string ExecFileOverride = string.Empty;
ConfigHierarchy EngineIni = ConfigCache.ReadHierarchy(
ConfigHierarchyType.Engine,
SC.RawProjectPath.Directory,
SC.StageTargetPlatform.PlatformType,
SC.CustomConfig);
if (EngineIni.GetString(
"/Script/WindowsTargetPlatform.WindowsTargetSettings",
"BootstrapperFileToLaunchOverride",
out string FileToLaunchOverride)
&& !string.IsNullOrEmpty(FileToLaunchOverride))
{
ExecFileOverride = FileToLaunchOverride.Replace('/', '\\');
Logger.LogInformation("Bootstrap exec file override: {Override}", ExecFileOverride);
}
Update.SetData(ExecFileOverrideResourceId, ResourceType.RawData,
Encoding.Unicode.GetBytes(ExecFileOverride + "\0"));
In the WinGDKEngine.ini file:
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
BootstrapperFileToLaunchOverride=EasyAntiCheat\start_protected_game.exe
What is best way after the injection of all the EAC files what is the best way to pick up the “makepkg” part, or does this have to be done manually?
We haven’t helped a ton of games using EAC on WinGDK. I think the following is the right approach:
- Build, Cook, Stage (no package)
- Inject EAC files into staged build
- %BuildsDir%\Windows\start_protected_game.exe
- %BuildsDir%\Windows\EasyAntiCheat\EasyAntiCheat_EOS_Setup.exe
- %BuildsDir%\Windows\EasyAntiCheat\EasyAntiCheat_EOS.exe
- %BuildsDir%\Windows\EasyAntiCheat\Settings.json
- %BuildsDir%\Windows\EasyAntiCheat\SplashScreen.png
- %BuildsDir%\Windows\EasyAntiCheat\Localization\ (if needed)
- Run the Anti-Cheat Integrity Tool
- Package (Rerun UAT with -skipcook -skipstage -package)
Please let me know if you run into any issues.
[Attachment Removed]
Can you try swapping 1 and 2 from the steps I shared above?
[Attachment Removed]
Happy to help. I documented the process in a KB article to help other developers in the future: https://eoshelp.epicgames.com/s/article/How\-to\-package\-a\-WinGDK\-game\-with\-Anti\-Cheat\-in\-UE?language\=en\_US
[Attachment Removed]
Hello [mention removed],
Sorry to barge in but is it also working for UE 5.5.4 ?
Thx for your time.
[Attachment Removed]
Thank you Patrick.
Good to know all is good to go.
[Attachment Removed]
[mention removed] sorry side question: can we reuse the OnlineSubsystemGDK (used for XSX/XSS) for the WinGDK (microsoft store) version of the game on 5.5.4 ?
Or do we have to create a new OnlineSubsystem from scratch and connect it to the WinGDK functions ?
[Attachment Removed]
One more question.
With ‘WinGDK’ builds you have to manually create an XVC package?
As I got a build but not an xvc
[Attachment Removed]
Hi Simon,
This is what I get when I package Lyra. You get a ‘.msixvc’. The ‘install_Lyra.bat’ runs the following command:
%WDAPP% install "%~dp0436609B6.ProjectLyra_1.0.0.0_x64__9ncxwbgmmv7m8.msixvc"Here a screenshot of the package folder:
[Image Removed]Regards,
Patrick
[Attachment Removed]
Hi Vincent,
I’m not a specialist of the Online systems, but in practice, the generic GDK code is shared between XSX and WinGDK. So I expect the OnlineSubsysteGDK to work for both XSX and WinGDK. You may need different configuration in .ini, but from an API point of view, I expect it to work.
Regards,
Patrick
[Attachment Removed]
I found the package it created in the saved directory like you showed above, just need it to put it somewhere else.
I just need to add below like an XBOX build.
-archive -archivedirectory=%BuildsDir%
Looks like all good.
Thanks Patrick.
[Attachment Removed]
Hi Seb,
Thank you for the info will check it out.
Best,
Simon
[Attachment Removed]