I had migrated my development environment to a laptop with very good specs. Recently, I tried compiling my program to .exe, in which it fails. I tried to include a log_filename, which was the method of getting it to work on my older development environment, and it would still fail. The problem remains the same - the program refuses to start; it does not even displays the log that is specified from log_filename.
While this seems to be the issue related to me compiling Panda3D to .exe, I believe that newer developers, who wish to publish their Panda3D works, will face the same issue.
Have you tried running your program from the terminal/command-line/cmd? That might perhaps show output that could be useful in diagnosing the problem, and that’s not shown when running from the Windows GUI.
Running through CMD still does not change the issue, nor displays any additional error, but I found that I forgot to rename the log file’s directory. Because the directory does not exist for log_filename, it will not create one. Instead, it will refuse to write the log.
Which in this case, it is somewhat mandatory for gui_apps to have its console output be written somewhere. In any case, I found the solution:
- If you choose “gui_apps”, you need to include “log_filename” in “build_apps”.
- If you choose “console_apps”, log_filename can be omitted. If you choose to include it anyways, it will choose to write its console output towards the log file. Otherwise, it will display it towards the command prompt.