Force UE4 to package for linux?

I’ve been fighting with ue for some time, trying to find a way to package any project for linux from windows.
Yes I know about this manual, but at 3rd sections it intends I’m building it from sources, which I don’t want to do.
I could not believe, that ue4 version, downloaded with EpicGames Luncher (with enabled linux target) can’t actually package project for it. It seemed it has some missconfiguration, or just old article in documents hub.

The link that you pointed to does not require building the editor from source. It indeed covers only that process, but cross-toolchain needs to be downloaded and installed as described there to package from a launcher build, too.

cross-toolchain needs to be downloaded and installed as described there
Of course I did that, so I already have cross-toolchain installed, and Environment Variable set.
But my ue4 still didn’t see it, and sending me to this articles instead packaging.
What over thing I missing (except compiling unreal editor)?

It is sometimes easy to make a typo in an environment variable, or forget to restart the editor after adding the environment variable. For the former, please open cmd.exe prompt, and make sure that if you type %LINUX_MULTIARCH_ROOT%x86_64-unknown-linux-gnu\bin\clang++ -v (verbatim, please just copy-paste this to the cmd window) you get some output. If you can see the clang version, then restart the editor (to make sure its environment includes the new variable) and try packaging again.

If you don’t get clang version after typing this, please correct LINUX_MULTIARCH_ROOT variable until you start getting one. Also, please avoid having spaces in the cross-toolchain path (i.e. place it in a folder like C:\CrossToolchain, not C:\Cross Toolchain).

%LINUX_MULTIARCH_ROOT%x86_64-unknown-linux-gnu\bin\clang++ -v
Nailed it! This simple command, which simulates cross-toolchain call, told me what I’m doing wrong:
I have spaces in path to clang’s folder. So I moved it to the root of my hard drive. And now I can package for linux.

then restart the editor
In my case (Windows 10 Pro), just adding\editing environment variables was not enough,
but restarting whole windows helped.

Maybe you know how can I ask documentation team, make those changes in previously mentioned article?

  • Section 2 (“Setting up the Toolchain”), Paragraph 1: Remove “If this is your first time packaging UE4 projects for the Linux platform, you’ll also have to build the engine in Visual Studio for Linux.”
  • Section 2, Subsection 1 (“Downloading the Toolchain”), Step 3: Add the sentence: “Make sure, you don’t have any spaces and other prohibited (by the command line) symbols in your path to clang’s folder”
  • Section 2, Subsection 2 (“Setting the Environment Variable”), Step 8, highlighted block: Add the sentence: “It’s strongly recommended to restart your system, to make sure that windows applied your new environment variables to all processes”
  • Section 2, Subsection 2 (“Setting the Environment Variable”), Add Step 9: With text: “To make sure, everything done right, open your command prompt (Press “Win+R”, than type “cmd”, than hit “Enter”), write (or just copy) this command “%LINUX_MULTIARCH_ROOT%x86_64-unknown-linux-gnu\bin\clang++ -v”, (without quotes), and see what will be printed. I you first string starting with “clang version X.X.X …”, than you did everything right, so you can start packaging your games for linux. If something else, just redone previous steps more careful. [!] These step apply only if you have a launcher build of Unreal Engine with linux target enabled. If you have github version of it, please proceed to next section.”

Work’s for me, thanks! =)