Packing and encrypting runtime into a single file?

When I export my game as a runtime, I get an .exe along with a bunch of python libraries and DLLs and whatnot. Is it possible to take everything inside the game folder and then further pack it into a single executable? I know there are some exe packers out there like UPX but I am not sure how to do that with the game engine runtime, and I don’t know if it will work properly. Also, if it is possible, can one encrypt the contents within the packed .exe?

The game will be free, but I want to properly secure everything within the game. If it is possible I want to furthermore, hide the fact that the game was made with blender or contains evidence of containing .blend files so that it is more difficult to decompile.

Basically my goal is to export the game and pack (and/or compress) it into a single file. If it is possible, I want to make all of the contents within the game opaque, or unlockable with a specific key code. And I want to make it difficult to tell that it was made with the BGE, to make it difficult to “crack”, so it will be difficult to access the models, code, and assets within my game.

Call me paranoid, but I just don’t want people poking around in my game files. I’m pretty much like this with all of my data.

Yeah dude, I also had this question in my mind, all the other files exported with the .exe file look very messy, it would be nice to have only one .exe file which contains EVERYTHINHG, lets hope someone answers your question

There are some applications that can do that… Like ThinApp($) or EnigmaVirtualBox(fw).

2 Likes

Omg thank you dude, the second app which you gave does what I want, thank you, I guess festive_enthusiast should close the topic now!
Thank you dude!

Gonna try it myself right now and I’ll update if works for me.
UPDATE - it didn’t work for me, the executable immediately closes.
@ANSH which version of Enigma did you download?


then it just closes
Or, sometimes I get this error:
image

Hey,

maybe you can use the BPPlayer. This tool will encrypt your whole game. You only have to put some Blender .dll in the game folder. I made a tutorial how to use it with UPBGE a few days ago. Maybe this will help you. The problem with the Export as Runtime addon is that you have to publish your game under the GPL. This can be a big problem. With the BPPlayer
you can publish your game under the license you want.

1 Like

Can you provide a link to the tutorial?

Here is the link to the tutorial

You can find the BPPlayer here:

1 Like

Thank you for the tutorial, but it doesn’t really pack everything into one file.
I’m pretty much back to square one, while this does encrypt the game, it doesn’t pack the directory into a single executeable which is what I am still looking for.

IIRC, the exported runtime is literally just the player and the blend in one file. It was so simple that there was a script floating around that just cut the two in half to get the original blend.

I wouldn’t be surprised if the Blender player expected the second half of the file to be the blend, and thus not work if you pack other files in with it. You even had to be careful how you changed the icon, because that could ruin where it did the split.

1 Like

I changed the icon for my game by changing the icon for the blender player and blender itself, since when it exports it copies the icon and I have never really had any problems with that.

Using the “export game as runtime” works fine for me, and it only works if all of the necessary files are included in the game folder along with the exe.

image

Essentially what I want to do is take all of these files and bundle them into a single executeable and have it work. Enigma box kind of intended (unsuccessfully though) to do what I needed, but I don’t think it worked because the python within the packed executable could not be read properly.

I guess encrypting it is a separate goal, for now I just want to focus on finding a way of packing all of these files into one executable file if it is possible.

Hey dude, if we are talking about exe files over here, so i think I can ask a question related to it over here, so, one day lordloki/exxil ( a dev of UPBGE) told me that when you export a game from UPBGE, there is an option to change the icon inside UPBGE, but I was not able to find it, do u know where is it?

No idea, sorry. I use the regular BGE for my projects.
Whenever I’ve changed the icon in the past, I used a program called ResourceHacker and changed the Blender player icon prior to exporting as a runtime.

1 Like

Oh ok, I will use the app whose name you just told, thanks

From what I’ve read around, DLLs must be in the root folder for them to work properly in EnigmaVirtualBox…
You can try to move the Python35.dll to the root folder (which should still be found by blender.exe, and won’t mess up with EVB).

1 Like

IT WORKS!! I didn’t know it made a difference but I selected “add root folder” instead of the default add folder option and dragged everything into the app instead of manually going through the dialogues. Weird. Regardless, all of the DLLs were always in the same folder as the exe yesterday, just the python libraries were in their own folder. I am not entirely sure how that happened but it worked

EDIT - the packed file will only work if its name is identical to the original

1 Like

Hey if it works, can you give me step by step instructions on how to do it?

yeah:

  1. open enigma virtual box
  2. select “add” and select “new root folder” from the dropdown
  3. open explorer
  4. ctrl+a everything in your game folder
  5. drop and drag it into virtual box
  6. go into file explorer and copypaste the location of the vanilla exe into the first text box
  7. type the new location where you want the pack exe to live. for me, it only worked if it had the same name as the original exe file, so it had to be located in another folder
  8. click process and after a few minutes it should work
  9. you can choose file options > compress if you want to make the exe smaller. I find this useful, though it can slow down the game somewhat.
1 Like

Thanks dude!