Single exe apps are indeed possible.
Urho3D’s PackageFile->Open(fileName[,startOffset]) method checks first for the package ID (“UPAK” or “ULZ4”) at the beginning of the exe, and then gets the package file length from the end of the exe (in this case a file which has exe+pak copied together as one singleexe), and then seeks to the beginning of the pak file inside the singleexe.
So, first I compile my app, and then copy the exe+pak into one single exe:
In my app’s Setup method, I do this:
engineParameters_["ResourcePaths"] = ""; // we need to clear this, so that "Data" resource path is not used
SharedPtr<PackageFile> package(new PackageFile(context_));
package->Open("AppFinal.exe");
GetSubsystem<ResourceCache>()->AddPackageFile(package);
And then I have in CodeBlocks’ linker options the -static option also, so that the app doesn’t need the MinGW runtime dll’s either.