Runtime vs. static?

Is it possible to compile my game with a single executable, without the Panda runtime or any other dependency?

I don’t want users to install Panda or Python or anything else. Just run the game.

Yes. Use pdeploy in installer mode with the -s option.

Would that bundle an installer with my exe? That’s not what i’m looking for.

Use the installer to install it into a directory of your choosing, and then zip up that directory any way you want to.

That’s the thing: i don’t want to package panda 3d or anything. I want to build the engine along with my game code, for the platform i need. So i can just call the executable on the platform.

Are you looking to make a single executable with no other external files?

Only the game files: main.py, data, assets, etc. I don’t want to bundle a runtime or anything else with my game. Is there a way to statically link Panda3D? For example: game.exe / panda3d.dll

If you use pdeploy then it will put the panda3d dlls in a subdirectory. In theory it’s possible to statically link. You’d have to compile Panda3D from source, though.

Still, you will end up with additional dlls since we can’t statically link things like NVIDIA Cg or DirectX.

You could, for what it’s worth, build a self-extracting exe, which creates a temp folder. But as rdb says, some libraries cannot realistically be linked at runtime