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?

Hey haimat-

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

Cheers

Doug Wilson

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.

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 : c++ - How to compile for Windows on Linux with gcc/g++? - Stack Overflow

An UE HLSL cross compiler is defined here: HLSL Cross Compiler | Unreal Engine Documentation

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?

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