I'm having some problems with 'fire.png' (the default particle image)
loading when the game is packaged with py2app. When I run the app, it
throws the error:

pyglet.resource.ResourceNotFoundException: Resource "fire.png" was not
found on the path.  Ensure that the filename has the correct
captialisation.

Interestingly, it works fine when running the .py file not packaged.
Now I thought that this was due to the paths changing once packaged
inside an app. However the hierarchy is the same, and my resources
(which are in the same directory as fire.png) are loading and playing
fine.

I initialize the paths with:
>> pyglet.resource.path = ['images', 'music']
>> pyglet.resource.reindex()
This is done at the very beginning of the main.py file.

If I add this line to my main.py:
>> pyglet.resources.image('fire.png')
The resource loads fine, even when packaged. However, when trying to
import/use the particle system, it throws an error. Looking through
the source code of cocos/particle.py, I found the only reference to
fire.png:
>> texture = pyglet.resource.image('fire.png').texture
So it seems that somewhere the resource paths are getting lost.

Any ideas/help would be appreciated :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to