How to package C++ project to Linux on Windows

Hi there,

Could somebody point me in the direction of any exacting documentation covering exactly how to properly package a C++ project to Linux on a Windows platform?

I’ve so far followed the set up process of the UE-Toolchain successfully as you would to package a non-code based project to Linux from Windows. As outlined here : A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

After this I went back in to the C++ project to just see what happens. Instead of it opening the web page, it gave me a message saying that exporting to Linux wasn’t supported in code based projects. So that was expected, and at least confirmed that I was in the right direction and that it is at least properly set up for non-code based projects.

I’m now building the engine from source as advised.

The documentation trail goes dry at that point though. Can somebody point out any other steps I need to take? Or will I be able to just export C++ projects to Linux in Windows fine through the newly built editor?

On a side note, would I actually better off just installing a copy of Linux on my computer and just have a complete Linux environment set-up (Dual boot)? At least then I would be able to actually test the game in it’s aimed platform. Would love to hear from somebody who has tried both approaches.

Anybody out there able to help?

I’m curious about this as well.

I’ve managed to dig up some clues and testing a few things out. I’ll leave a post when I have something definitive.

Firstly, you need save PowerShell script from this page Powershell function to help setting up the Linux toolchain for UE4 · GitHub and run it[Compiling On Linux wiki page also has this link. Strange that you missed it. You can to Google how to run PowerShell scripts, it’s not so hard].
Secondly, you need UE sources from Github. When you run Setup.bat and GeneratedProjectFiles.bat installer find out that your machine has Linux toolchain.
When UE is builded, you can package code projects with no problem.

Hey, thank you for the help, but like I mentioned in the first post I’ve already done all of that and UE4 is still failing to package.

The packaging starts but it fails.

I’ve started from scratch and packaging a blank C++ project. It’s doing something, but it’s taking HOURS to pack :confused:

I’ll let you guys know what happens

Compiling shaders for OpenGL appears to be taking quite a bit of time, but I think it doesn’t happen each time – just the first time you do packaging.

It’s still not working. I tried a current project and it failed.

The empty project didn’t fail, but it hung. It hung while cooking for at least 14 hours before I cancelled it. This is an empty project. No starter content, materials or anything. Just the default map.

Just another note, it doesn’t seem to be freezing or anything. The task manager is showing my CPU doing a lot of work and the animation in the editor is playing. It’s just getting stuck.

Surely there must just be a critical step I’m missing.

I’ve run the power shell script, I’ve set up the environment variable etc etc. I’ve built the editor Linux - Development, and then Win64 - Development editor.

After that I have tried both to package a completely blank and empty C++ project and I have opened a copy of an existing project with the above results.

Is there something I need to do in Visual studio with the actual games project? Like, do I need to copy the build in Linux and in Win64 steps?

Or maybe I need to copy the binaries from the editor folder and in to the Linux binary folder for the game?

Like I say, surely there is something I’m missing here.

Edit: I just re-checked the Linux->Binaries folder for the empty C++ project. Despite me cancelling, there is now ‘MyProject-Linux-Shipping’ in that folder.

I think I may have figured it out.

AS mentioned, I built the editor as Linux- Development, which is fine. In the project though, in project settings->packaging, it was set to shipping. I changed that to development and it has finally packaged the empty project :smiley:

Now I need to try and get an existing project to pack!