I started to code a small game few months ago, but now it grew and became to big to use a single p3d file, so I looked at package, but I ran into some issues I don’t understand.
I tried with a small test program, and I have the same problem, so if you can take five minutes to take a look, I will thank you.
I wrote this in my main.py :
from direct.showbase.DirectObject import DirectObject from direct.gui.OnscreenText import OnscreenText import direct.directbase.DirectStart import sys class ArcnsApp(DirectObject): def __init__(self): self.accept("escape",sys.exit,) OnscreenText(text="test1",pos=(0,0,0),fg=(0,0,0,1),bg=(1,1,1,0.8)) print "good" app = ArcnsApp() run()
and in a separate directory, this firstClassTest.py :
from direct.gui.OnscreenText import OnscreenText class firstClassTest: def __init__(self): print "firstClassTest" OnscreenText(text="test2",pos=(-0.5,0,0),fg=(1,1,1,1))
And for the end, firstTest.pdef :
class firstTestPack(package): config(version="0.0") file("firstClassTest.py")
The main.py and the two others files are in separate folders, like this :
. _ main _ main.py _testpack _ firstTest.pdef _ firstClassTest.py
I used this command for my package :
/home/me/workspace_panda/tools/ppackage.p3d -i /var/www/testingpack/ firstTest.pdef
And this one for the p3d file :
/home/me/workspace_panda/tools/pack3d.p3d -o test_pack.p3d -d /home/workspace_panda/testpack/main/ -r firstTestPack,0.0,http://localhost/testingpack/
The commands ran correctly, with some missing modules like “panda3d.core” and “direct.gui.onscreenText”, but they passed.
when I tried “./test_pack.p3d”, the program freeze, and I have the window with the panda and a warning sign. In the shell, the program stay with :
:downloader: [0xb43c90] begin GET [ https://runtime.panda3d.org/contents.xml?1377073795 ]
and in the log/p3dcore.log, I can read this:
Couldn't find package firstTestPack.0.0 in contents file.
When I close the window, I have this output:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0" after 36 requests (30 known processed) with 0 events remaining.
The number of request can change.
I don’t understand what’s happen. Thanks for your help.