Re: Packages the images and tmx files

41 views
Skip to first unread message

Winston Wolff

unread,
Jan 4, 2013, 2:33:36 PM1/4/13
to cocos-...@googlegroups.com
I'm curious about this too. I looked briefly at py2exe and pyinstaller but I need to spend more time on it to get it to work. cx_freeze was another option I read about.

-Winston

On Jan 4, 2013, at 5:55 AM, Shiran <g0k0...@gmail.com> wrote:

> Sorry for my poor English, I hope I describe accurately.>_<
>
> Is there any way to package images and tmx files?(tmx files also has image file paths in content)
> It's really not pretty left them under folders.
> Even zip or other method is helpful.
>
> I found callable like
> cocos.load_tmx(filename)
> cocos.load_tiles(filename)
> Both these need filename instead of file-like object or string.
>
> And in these callable
> path = resource.find_file(tag.attrib['source'])
> self.path = self.find_file(filename)
> ,also need file path to load
>
> I try to use cPickle.dumps the cocos.tiles.Resource object what these callable return, but when cPickle.loads it dosen't work well.
>
>
> Then I thought , is there a solution in py2exe or pyinstaller?
> But I'm not good at these.Is there any solution for package these file?
>
> --
> You received this message because you are subscribed to the Google Groups "cocos2d discuss" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/cocos-discuss/-/lHNJ01gX6aYJ.
> To post to this group, send email to cocos-...@googlegroups.com.
> To unsubscribe from this group, send email to cocos-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.

Shiran

unread,
Jan 5, 2013, 7:45:06 AM1/5/13
to cocos-...@googlegroups.com
cx_freeze looks like could include data files in addition to .py.
Anyway, thanks  a lot.
I'll try it. Hope it works.XD

在 2013年1月5日星期六UTC+8上午3时33分36秒,Winston写道:

Nitneroc

unread,
Jan 7, 2013, 3:26:57 PM1/7/13
to cocos-...@googlegroups.com
I don't really know anything useful to your purpose (except that I have used pyinstaller with success and it was really easy to use), but I'm not sure you should care about this. No-one really care if your folder structure is "pretty" and games like Battle for wesnoth use this kind of structure. If you're concerned with copyrights I can understand, but don't worry to much about this.

You could also look for help in py2exe, pyInstaller or cx_freeze forums 
Reply all
Reply to author
Forward
0 new messages