Hi Juan, On Mon, Sep 30, 2013 at 12:57 PM, "Juan J. Martínez" <[email protected]> wrote: > On 30/09/13 10:49, Paul Colomiets wrote: >> Hi Juan, >> >> On Mon, Sep 30, 2013 at 12:42 PM, "Juan J. Martínez" <[email protected]> wrote: >>> On 30/09/13 10:36, Paul Colomiets wrote: >>> I'll take a look when I'm home, but your help with Mac part would be >>> very appreciated. >>> >>> The code is: >>> >>> http://code.google.com/p/pyglet/source/browse/pyglet/resource.py#105 >>> >>> script_home may need some love, the comments don't refer to cx_Freeze; >>> or do you think the local lib patch is wrong? >> >> I'm not sure. I would do a patch if I know. If we change script_home >> it may influence some users. But since it's plain wrong, maybe it >> doesn't matter? Also looking at the code it seems it should return >> "Contents/Resources" dir for some reason (is it how py2app works?) but >> I need it return "Contents/MacOS" since it's where cx_Freeze puts >> everything. >> > > Well, looks like we need to add support for cx_Freeze if the default of > returning '' doesn't work. > > See this: > > http://cx-freeze.readthedocs.org/en/latest/faq.html#using-data-files > > What is the value of getattr(sys, 'frozen', None)? > > Looks like using os.path.dirname(sys.executable) is the right thing to > do for cx_Freeze. > > Does os.environ['RESOURCEPATH'] exist? >
Will check. (I'm usually work in Linux, so rebooting to OS X takes time) > script_home is really useful, I'd like it to work properly in most cases. > Where should it point to? According to the docs py2app points to "Contents/Resources" dir (does py2app puts *.py files there?). But for cx_Freeze it's useless. But it would be strange that py2app and cx_Freeze use different dirs on the same platform. Also according to the docs: Get the directory containing the program entry module. And this "dir" is "Contents/MacOS/library.zip". Is it consistent to strip the "library.zip" prefix? I.e. this is *script* home not a *data* home, right? -- Paul -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
