Distributing Panda3D Applications

Hello

I made a game (c++ , Panda3D-1.9.1-x64, Microsoft Visual C++ 2010 Express (Release 64) ). It runs fine.
I would like to distribute it. I made a main.py file ( when i click on it it starts the game and no problem)

import sys, string, os 
os.system("noserland_win_01.exe")

packp3d.exe -n exe -x exe -c platform_specific=1 -o noserland_win_64.p3d -d D:\noserland_win_01\x64\Release

pdeploy.exe -s -N “NoserLand” -v 1.0.0 noserland_win_64.win_i386.p3d installer

finaly i got win_amd64\NoserLand 1.0.0.exe
i installed it into my system but when i try run it, it does not work. i can see it in the process list but it only 9 mb (while the game is 200 mb).

also if we look at C:\Program Files\NoserLand
there are
noserland_win_01.exe
noserland_win_64.win_i386.exe

I do not know maybe there is an easy way to get an installer or how can i get it work? Maybe there is a critical point or …?

Also, my game save some information in the main folder so i am not sure how it will work with *.p3d

Hi -

First of all, what is the error produced when you run the game?

Not sure how it can help you, but there are maybe a few checks I would suggest (if not already performed or if relevant in your context):

  • Have you checked that the ‘noserland_win_64.p3d’ is working?
panda3d noserland_win_64.p3d
  • If not, have you checked the content of the .p3d file?
multify -tvf noserland_win_64.p3d
  • if the above checks are not relevant, have you tried to use pdeploy with the ‘standalone’ option instead of the ‘installer’?
  • Last thing is that I don’t use the same commands as the ones you are mentionning (assuming you are developping under 1.9):
    I use panda3d packp3d1.9.p3d…instead of packp3d.exe…
    I use panda3d pdeploy1.9.p3d… instead of pdeploy.exe…

Hello

yes it does not work
I think I need to learn python to get my game work
my main.py does not work

Should you need any additional help, please don’t hesitate to provide the error message(s) you get: it will help to know what is causing the issue.

hello
yes i need help
as i get i need a main.py file that will start the game. Unfortunately, to write it i need to know python but i do not know it. I have some help from IRC chat “Filename(base.appRunner.multifileRoot, “noserland_win_01.exe”).to0sSpecific()” but i do not know python.

i think my main.py file must get were it is and get the path to start my exe file or something like this.

panda3d.org/manual/index.php/Using_packp3d "If your application is written entirely in C++, it must still have a Python entry point to be used by the Panda3D plugin system, so you will need to provide a trivial bit of Python code to load and start your C++ application. "

If you can share a main.py file that starts an exe file it will be nice.
My game ready to go but i need to make an installer to distribute it.

I do want to warn you (again) that the system is designed to work for Python programs, not C++ programs. You will probably have less trouble if you generated an installer for your C++ program the other way.

These are the difficulties faced with running a C++ program in the runtime environment:
(1) .exe files or .dll files cannot be run from a. p3d file. If you want to run them from a .p3d file, you must extract them. Using the -x option will help if you use pdeploy since extensions marked -x will be extracted to disk by pdeploy.
(2) The runtime distribution of Panda3D uses a different set of DLLs that I’m not 100% sure are compatible with the ones in the SDK, since they are compiled in release mode with NDEBUG set.
(3) Panda needs a Python entry point, as you have already discovered.

You can run an .exe program with one of the Python os.exec* functions. The code I gave you should provide the path to the .exe file, but I’m not 100% sure. I suggest printing it out to check if it’s the right location.

Again, I want to emphasise that using a third-party tool to generate the installation wizard is probably going to be less effort than trying to get packp3d to work for C++ programs.