Easy to follow tutorial for encrypting your PCK file

So I’ve been trying this with 4.3 and I’ve run into several issues:

  1. ld.lld: error: duplicate symbol: PKEY_Device_FriendlyName wwhich is solved by renaming the variable
  2. When exporting the template its as if the set key either in cmd or powershell isn’t read so then the game can’t unencrypt at runtime.

Is there any similar guide? Seems this one is not working for newer builds.

The first issue was a bug in the code, which has been fixed, see:

As for the second one, I’m not sure what happened, but the guide works even to this day with the newest version of godot, as I’ve had to do it a few days ago.
You need to set the key before you build the release template, then you need to put that same key in Godot’s export window, and making sure you use the template you built, not the official ones.

Thanks for this, been trying to get through all this but kept bumping into errors. Eventually deciding to use a VM with fedora 36 like they do for the official builds to create build environments: GitHub - godotengine/build-containers: Godot engine build containers

My question is though, I’m also planning on releasing for steam and it appears I need to compile the steam extension as well. Do I need the encryption for that as well?

Alright, after much trial and error with that method eventually scrapped it and went back to the building it on my machine.

All of this stuff worked fine, my issue was strictly related to compiling the GodotSteam extension to work with it, which I had lumped in together as part of the process. For the windows release template, using MingW actually breaks it so you have to use the Visual Studio Compiler for that part.