It says this feature was deprecated for panda3d versions 1.10.0 and up, my panda3d sdk is 1.10.0, so, does anyone have any ideas what to do? I wanted to make standalone versions for both mac and windows machines so that I can get feedback from anyone. any help would be appreciated.
hmm… well, how would you use Deploy-NG? and would with Mac OS X? I ask because a another issue is comes up if using PDeploy, because the instructions for it seemed be design for command prompt (windows) in mind, not terminal (mac).
okay, thanks wezu and Thaumaturge I will take a look at the articles.
Edit: so I got it to compile, but when I loaded it up in my windows XP virtual machine to test the build I got a error message “The procedure entry point GetFinalPathNameByHandleW could not be located in the dynamic link library KERNEL.32.dll” and the executable will not start.
Does anyone have any clues to what this means?
Edit2: well I decided to do 5 minutes of research and found out the issue is windows XP is not compatible, so I ask another question, how do I build a XP build of panda3d or is XP deprecated?
I typed in “win32” into the setup.py, I thought win32 was universal for all x86 window machines.
Hey, I was just wondering if anyone can answer if a compiled build of a panda3d game (standalone app) can be tested on the same system as it was built on (with the panda3d sdk)? or would ruin (interfere with) the sdk?
I thank anyone who is willing to help.
Edit: so I went ahead and tried it myself on my mac OS X, the window popped up briefly was all black, then closed up, no error messages either, did I do something wrong? I,m going to research but I will leave this here if anyone has any clues
I don’t know whether this works under Mac, but what I do under Linux is to run the game via command-line within a terminal. This may allow you to see any terminal output that’s printed before or as a result of the game’s crash, and thus perhaps give a clue as to the problem. (If there’s no output in the terminal, then look for a log-file, instead.)
I’ve had such experiences with distributable builds a number of times–in my case, there’s often some small mistake that I’ve made, such as not instructing setup.py to include a particular resource, or some such minor thing.
hmm… okay, I’ll try to run with terminal, but there was a issue that I did not notice during the building process but did notice when I rebuilt right now, and that was a warning message just before it starting the file copy process, here is a paste of what it said.
“There are some missing modules: [‘builtin’, ‘_winapi’]”
Do you think that this is the problem? do you know what this means?
Edit: so I tired your suggestion Thaumaturge, and yes I got a error output, it says that the files for the level cannot be found, is because they are in the resources folder?
Edit2: I.m going to post the error below
Warning: pandac.PandaModules is deprecated, import from panda3d.core instead
Known pipe types:
(all display modules loaded.)
:audio(error): load_dso(libp3fmod_audio.so) failed, will use NullAudioManager
:audio(error): No error.
Traceback (most recent call last):
File “Main.py”, line 11982, in load
FileNotFoundError: [Errno 2] No such file or directory: ‘room/room1.txt’
:task(error): Exception occurred in PythonTask TXTLoader
So what do you think? (also sorry for posting so frequently thanks Thaumaturge.)
I don’t know about the “missing modules” error, myself–I’ll leave that to others who may have a better idea.
As to the missing file, does that file exist within the folder of the game, in that specific sub-folder?
If not, you may not have instructed the build-system to include them in the distributable version. In this case, go and have another look at the tutorial to which I believe that I linked above; note in particular the “include_patterns” section of “setup.py”, and the discussion of it in the tutorial-text. With that, you should, I believe, be able to include such files in the distributable version of your project.
No the files are all there in the resource folder of the package, I,m going to take a another look at the setup.py though, thanks for the suggestion.
Edit: so in the guide you showed me, it said “These can be specific file-names, or file-patterns” for patterns, can I use folder names to include whole folders?
So as I was rerunning the program and messing with files, I noticed that the models and music and images were loading or anything under panda’s loaders, the thing is txt files are loaded in with the python command “open”.
So txt files are not loaded through panda3d but python, maybe python itself cannot find the files?
I doubt it, unless you’re using absolute paths instead of relative ones, or your paths are somehow incorrect in a way that happens to be unproblematic in your development folder.
It’s tempting to suggest that the problem might be that your paths aren’t correct for the OS–but you say that you’re using the SDK on a Mac, and that this problem is also occurring on a Mac. Further, you say that other files are being loaded correctly. So that seems unlikely.
Would you please show me the code-section in which you load your text-files, and a screenshot or two (as appropriate) of the directory into which you installed/unzipped your distributable build of your game?
Try loading files relative to ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR") (also saved as base.mainDir). This is set to the resources directory when running in a frozen macOS environment. The resources directory is already on Panda’s model path, which is why it can find the various assets via the loader.
I am not sure what MAIN_DIR is set to when not using a frozen environment, so you may need some code similar to this that checks a couple of places.
Thaumaturge, here the function is small enough to post
def load(self, task):
if not job:
if load is 0:
job = True
if not sload:
run = False
if load is 0 and cleanup is 0:
inop = True
analyze = True
txt = open('room/room'+str(room)+'.txt')
rlf = txt.readlines()
load = 1
There seems to be nothing wrong about it, hmmm, oh and your 2nd post, I already tried using file paths for the patterns but without good syntax examples I couldn’t get it to work.
sorry, I,m not a experienced coder, so I used what works, though I said before that I would look into taking programming more seriously after I get this project published, would “open with” do anything different then “open”?
EDIT: okay, I get it, open with is far safer, I’ll look into it once my project is published, thanks for the tip.