Creating an installer for my project

Hi

I have some questions about how to create an installer for projects made in Panda3d. I am rather new to both Panda3d and Visual Studio but I have managed to create a Setup Project within Visual Studio and added my executable for my game to the Setup Project. Everything works fine on my computer. However, when I tested this on another computer which doesn’t have Panda3d SDK installed I got an error message when executing:

Error executing on another computer

So my question is how to include that DLL file, and possibly other files needed for the game being able to execute, in the Setup Project. Preferably, I would not like to solve this issue by just installing Panda3d on the other computer because I plan to release this game and would like to make it as simple as possible to get it running!

Sorry if this isn’t the right category to post in.

/Isak

There’s a whole section in the manual on distributing Panda3D applications. It explains how to use Panda’s deployment tool, which automatically includes any required DLLs. As long as you ship all the DLLs it includes with your installer, it should work on any other computer.

I know there is a section about this in the manual but to me it looks like it would only work for Python projects and my code is written in C++. If it is possible, can you explain a little bit more about how to include the Panda3d DLLs and other dependencies in the Setup Project I made in Visual Studio.

/Isak

I see three stages.

  1. Compile panda with the necessary plugins for a specific operating system.
  2. Adding your own binaries and resources.
  3. Creating an installer, for example, using NSIS.

I have already made an installer with the Setup Project in Visual Studio so now my question is where I should put the DLLs in the Setup Project and how to do it. I prefer using the Setup Project in Visual Studio and I am only targeting the Windows platform for now. Do I need to compile Panda3d on my own?

In your case, manual copying of the dll is unavoidable from the bin folder. To avoid this, build panda with the necessary plugins.

Then add this to the project or assign the built panda folder to the project.

Is there a section in the manual or some guide on how to build Panda3d, serega-kkz? What are the negative consequences of copying the DLLs from the bin folder and how can building Panda3d on my own prevent this?

What do you mean by “build panda with the necessary plugins”? Which plugins?

/Isak

There are no negative consequences, but you need to know what specific dlls are needed to run.

If you build a panda with the necessary libraries(plugins), then this question will disappear by itself, you will have the necessary dlls in the build folder.

If you will use makepanda, please refer to the help to clarify the list of plugins.

Thanks for the clarification! Now I understand a bit more. I will build Panda3d with the guide you provided and come back to this topic if there is any problems.

Is there any other way to find out which DLLs are needed to run? Like a list of some sort?

/Isak

I do not know any other way, the way i described is the most reliable.

Okay, I will stick to that method. Thanks for the help!

/Isak

It generally depends on what you are targeting, bullet physics or ODE. And so on.
If you used a bullet, then you need to enable the bullet dll.

Ah, yes, sorry, I didn’t notice this was in the C++ section.

You don’t need to build Panda from source, but it is a good idea. You can build it with optimizations enabled (--optimize 4) which means that Panda will be smaller and faster, and you can disable thirdparty packages that you’re not using.

You can also compile a static build of Panda (--static) which means it will be smaller further and won’t come with all these DLL files, but can rather directly be linked into your game.

Thanks for the tips, rdb. I will try those the next time I compile Panda3d. I followed the section in the Readme file on GitHub and the build seems to work great. I have some questions about the arguments for makepanda though. What does --everything mean and what is Eigen? If I compile with --static, what will happen with the DLLs? Will they be included in the build but just not visible as a separate file. I actually don’t really know what DLL files are!

/Isak

Your option? To get the necessary libraries to release the game in C++

--everything
It’s like a check mark that includes all the libraries to build. You need to build --nothing + necessary libraries.

DLL files are self-contained files containing compiled machine code that can be loaded and used by another exe or DLL.

If you build with --static, Panda instead only produces .lib files, and pulling those into your project causes the compiler to copy the machine code in them into your .exe, instead of sitting as a separate DLL file on disk.

Eigen is used to speed up certain math operations in Panda.

Also see this page: https://docs.panda3d.org/1.10/python/distribution/thirdparty-licenses

You could just copy the DLLs from the SDK into your game folder. That will work fine.

Yes, I know this option, but how to understand what you need from this pile, that’s what the question was originally.