Source Build File Size Issue

So I’m using a 4.24.1 source build. The whole folder’s size is over 140GB. My previous engine of 4.21.2 was also around 80GB. I don’t have anything custom in the engine apart from a few plugins that are 3GB total.

Is this size normal or did I do something wrong? The enormous size is becoming a problem for my PC.

Yeah, 4.24 really expanded binary footprint compared to 4.23. On mine 4.24 is about 116GB, 4.23 was 85GB.

Yes, it’s a little bit of everything going from 4.23 to 4.24.

Engine\Intermediate +8GB
Engine\Plugins +13GB
Engine\Source +4GB

Lots of it is obj files, Unity build intermediates, PDB files, and DLLs for new code modules. Like in Plugins\Experimental, it adds 3GB of footprint not really from any one thing but just because a bunch of plugins were added.

I removed majority of plugins, reverted the addition of Datasmith stuff and manually patched the unreal build program (I deleted all the source files and commented out code) to not look for and not generate binaries for any platforms I am not touching (XR, VR, iOS, etc) specially the WEB stuff.
I think I removed tens of thousands of files, even before making a first binary build.

I think Unity engine has a modular installer nowadays, Unreal only let us select platforms if you are installing from launcher and that doesn’t help much.

I wish the file “setup.bat” was better documented. This is one of the worst offenders for disc footprint. It downloads a colossal amount of stuff, either by default or perhaps it makes some guess about what targets you want to build for. PhysX, for example, expands greatly after setup.bat is run because it downloads binaries for a ton of possible platforms.

The command line parameters for setup.bat seem to have been changed without notice? They do not seem to work properly. I have not been able to limit it to downloading Win64 libs, for instance.

If you have NDK installed it downloads all the things Android just because.
This is not exactly the kind of automation I like.

So excluding things manually from Setup.bat sort of works, but with warnings. I suspect Epic does not test this way and just includes everything.

./setup.bat --exclude=Mac --exclude=iOS --exclude=Linux --exclude=Android --exclude=HoloLens --exclude=TVOS --exclude=Win32

That reduces binary footprint after Setup.bat from 47 to 22 GB, but the build now has new warnings coming from AutomationUtils, which seems to have its own idea of what platforms to build for:

55>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “BouncyCastle.Crypto”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
55> IOS.Automation -> E:\dev\Unreal_4_24_1\UESetupPartial\Engine\Binaries\DotNET\AutomationScripts\IOS\IOS.Automation.dll

[COLOR=#fff]↵[/COLOR]

Hi Bruno, would you be able to provide some tips on how to do this? Especially excluding Datasmith and other plugins from the source build, that would be very helpful…

lol no, there’s a billion hardcoded things changed/moved/removed.
I have no way to document something like that, you just sit in front of source code and edit it…

Ah, they don’t make it easy for us, of course.

I just wish I could exclude Datasmith and a lot of the useless plugins…such a waste of space.