Unrealpak.exe error as a standalone exe

I’m trying to build upack files of non unreal assets (no uassets or umaps, just json files and raw images) on a virtual machine. Having a minimal installation would be beneficial in many ways - adding GPU requirements will add virtual machine cost (this is on the cloud).

Putting Unrealpak.exe in its own folder I get a DLL error. This happens even if I copy the entire C:\Program Files (x86)\Epic Games\4.11\Engine\Binaries\Win64 folder.

C:\Users\\Documents\Visual Studio 2015\Projects\CookStager\CookStager\bin\Debug\UPack>UnrealPak.exe -Create="C:/Users//AppData/Local/Temp/Matchoo/Stager/stagedpackages/packagedata/languages/manifest.txt" -compress
LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
LogWindows:Error: === Critical error: ===
Assertion failed: DLLHandle != nullptr [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Core\Private\Internationalization\ICUInternationalization.cpp] [Line: 214]

Any ideas how to get this working? Decent alternative solutions might be a minimal install (no GPU requirements preferable) on the remote machine, or possibly moving to zlib or similar packaging, though I like a lot of the unreal pack file behavior and don’t want to add too much new technology to the client app.

A GPU machine will cost 70-100x a bare bones machine on AWS and most of my expected content can be packaged without need of unreal assets so I’d REALLY like to avoid full unreal installs on most of my build machines if possible.

I’ve also tried copying the entire binaries directory, so that the relevant ICU dlls are included.

On the machine I’m testing on there is a full Unreal installation, but the DLLHandle error happens if UnrealPak.exe is moved out of the normal directory. I was hoping the the pathing inside the exe might be relative to its location.

On that same machine if I invoke the same UnreakPak call from the same directory but using the tool exe in the normal installation directory then it works as expected.

#if NEEDS_ICU_DLLS
void FICUInternationalization::LoadDLLs()
{
	// The base directory for ICU binaries is consistent on all platforms.
	FString ICUBinariesRoot = FPaths::EngineDir() / TEXT("Binaries") / TEXT("ThirdParty") / TEXT("ICU") / TEXT("icu4c-53_1");

I’m not sure why the tool needs these dlls.

How do I build my own tool - at the very least it would be nice to print out where it’s looking for the dlls.

Got further - used process monitor to snoop what UnrealPak was looking for…

… then ran the installer to get the rest.

  1. Place UnrealPak.exe inside some Engine\Binaries\Win64 directory, then in the same Engine folder copy your unreal installations Engine\Programs\UnrealPak folder. This is looked for relative to the UnrealPak.exe file you are deploying.
  2. Copy YOURUNREALENGINEINSTALL\Engine\Binaries\Thirdparty\ICU to your drive root. This should give you a C:\Engine\Binaries\ThirdParty\ICU\icu4c-53_1 folder with some subfolders containing platform specific dlls (you can trim to your virtual machine’s platform).
  3. Copy the Engine\Content\Internationalization to the Engine folder you put your UnrealPak exe in.
  4. Run the prerequisites installer found somewhere like this: C:\Program Files (x86)\Epic Games\4.11\Engine\Extras\Redist\en-us
  5. Pack away!

Edit - Step 2 you actually can put the directory within the Engine folder you create for the exe, seems it searches 1) relative to the exe then 2) from the root.