Building for Windows on Linux

We have a Continuous Integration server (TeamCity) running on Linux. Now I want to use that server to auto-build our UE4 projects as well.

Is there an easy way to compile a UE4 project for Windows on Linux?

2 Likes

Hey -

It is possible to use a cross compile toolchain to compile for Linux using Windows. Here is documentation on the setup and process:

Cheers

Thanks, but I was asking for the other way round – we have a Linux server, and I want to build for Windows on that Linux server, if there is any chance to do so.

My apologies for misunderstanding. Unfortunately it is possible to only build for Linux when working on Linux. To build/package for Windows you would likely need to copy the project to a Windows machine.

Too bad, I was hoping we could use our existing CI infrastructure … Anyways, thanks for your feedback.

1 Like

Can anyone explain why? What would be needed (theoretically) to cross-compile for windows on linux?

Hey codywohlers-

You would need to find a Linux-to-Windows cross-compile toolchain. Additionally, an HLSL compiler would be necessary to compile the shaders as well.

One year on, may I ask how epics official take on this matter is?
A Windows compiler for Linux exists for 20 years now :

An UE HLSL cross compiler is defined here:

I have just a little cross compiling experience. But generally you could compile for a toaster on Linux system. Everything is there. Will there ever be a a feature “compile for Windows” in the unreal editor or not?

1 Like

Any Updates on this?
I´m searching for a cross compiler to use my linux server for compiling WindowsNoEditor and automatically deploy the project.
I hope there will be a solution!
Thanks.

Im too am curios if this is possible or not

I too am hoping for an official chain/integration path.

Thank you.

I too am strongly hoping for this possibility.

Best regards,
Zananok

1 Like

Bump?
I’m trying to permanently switch to Linux for desktop usage and i keep having to switch back to Windows after a few weeks because of Unreal Engine
I’ve found the engine to actually be very stable and reliable on Linux so far (minus the fact the UI is a little slow) but the fact we can’t export our games to Windows is absolutely catastrophic, seeing Windows is over 90% of the market.

Bumping once again. Was hoping to run Unreal Engine 5 in a Linux container and be able to package for Windows considering it’s much easier to run the engine in a Linux container than a Windows container, but it’s looking like the only option would be to use a Windows container (which luckily does have support but does not have NVIDIA container toolkit).

It would be interesting, we created a ticket on the Unreal Engine github, requesting the creation of this feature (https://github.com/EpicGames/UnrealEngine). I think the binaries could be created using Vulkan as an option to DirectX, making it cross-platform.

same problem here, using linux cause its much better to work but can´t build for windows.

i would switch to linux in a heartbeat if this were possible

Bump - having this would really help