Good day, all! I’m an experienced developer in other engines but relatively new to UE4 (loving it so far), and I have a workflow question. I hope the subject line has enough TLAs (three-letter acronyms) to satisfy my fellow geeks.
I boot Windows 10 Pro, 64 bit, but I’m a long-time (20+ years) Linux sysadmin and do a lot of my work using the WSL 2 command line with Ubuntu or Debian distros. I’m a whole lot more comfortable with Linux shells and tool chains and haven’t done any C/C++ development on Windows since the late 1990s.
Microsoft offers VS Code for free, but I’m happy with JetBrains Rider as a source code editor and don’t really want to have to learn another IDE.
Has anyone built a UE4 dev environment where UE4 runs in native Windows but C++ code is compiled using GCC from a WSL 2 instance? There are sections in the UE4 docs on using GCC, but my “read” is that the docs are intended for when UE4 editor is being run under Linux, or if one is building UE4 from source. I didn’t see any mention of WSL in that section.
One obstacle I could see is how to invoke the compiler from UE4. WSL can invoke Linux executables from the Windows host, but doing something as complicated as a C++ compile and link is more challenging than just running a little bash script to automate system housekeeping, etc. I’m confident I can resolve that part of things on my own, because I’ve already dealt with similar challenges for my non-UE4 work.
The parts that I don’t know on my own, and am hoping someone else can enlighten me, are:
- How hard is it to decouple UE4 editor from its default expectation of VS as the C++ build chain?
- If I am able to invoke GCC instead of VS, does UE4 expose all the needed Unreal headers and linkable libraries in a GCC-accessible way?
- Under WSL, the path to a given Windows folder maps as /mnt/${DRIVE_LETTER}/${PATH}.Will that cause an insurmountable problem if I’m trying to invoke the compiler from UE4, because of hardwired paths?
- Finally, if it’s not feasible to have GCC invoked transparently (either directly, or through a build script) from the UE4 editor, would UE4 editor acknowledge C++ code having been compiled from outside the editor (IOW, if I just run the compile from a WSL bash window while UE4 editor is open, will the latter be aware of the former and reload what it needs to reload)?
It’s entirely possible that this is all documented somewhere, and I missed it when I read the sections I thought were most relevant. If so, I apologize for missing the obvious, and I would gladly RTFM if someone can refer me to the section I missed.
Thanks for any recommendations or case history from anyone who’s tried this.
(Background notes below, not directly part of question but possibly of interest…)
Although I boot Windows on my mobile workstation currently, almost all my tools now have native Linux editions, and I’m seriously considering switching to a Linux development environment with Windows 10 available via VMware Workstation for the few times when I really need it. I’m not a game developer, but a computer engineer using game engine tools for 3D simulation and visualization, and I have two decades of Linux sysadmin experience but am only a little beyond “end user” in Windows. I’m much more comfortable in Linux. I also already use bash and Python scripts to automate my workflow in other 3D tools, so if possible I would rather adapt my existing scripts to UE4 than start over.