Re: [Pyobjc-dev] py2app: unable to load nib-file
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-04-14 08:37:56
|
On 14 Apr, 2009, at 10:28, Johan Rydberg wrote: > I'll try that. Thanks for the suggestion. > > Can I modify my setup.py to automaticly convert my xib's to nibs, > using ibtool? > I suppose I need to hook up in the build phase. There is a hook in the build phase, but that hook is not yet used in alias mode. If you don't mind waiting a little longer during builds you can use "python setup.py py2app" instead of "python setup.py py2app -A" and then the XIB file should automaticly be converted once you install the version of py2app that's in the subversion repository at http://svn.pythonmac.org/py2app/py2app/trunk. I want to finish some work I've done at Pycon sometime soon, which is rather invasive and would require changes for alias mode as well. I'll fix the file conversion hooks during that merge as well. I am afraid that the work I need to finish is one of those "80% done in 20% of the time"-jobs, which means I don't have a estimate on when this will be finished. You could always add a bit of Python code to your setup.py file that calls ibtool to convert the xib files and include the converted files as your resource_data. That's not as clean as proper support in py2app, but would keep you going for now. > > I have a feeling that XIB's work better with my version control > software (bazaar). IIRC bazaar has one metadata directory at the toplevel of a project, rather than a metadata directory in every directory in your project (which subversion uses), which means both XIB's and NIB's should work just fine with bazaar. Ronald > > > > On Tue, Apr 14, 2009 at 9:51 AM, Ronald Oussoren <ron...@ma... > > wrote: >> >> On 14 Apr, 2009, at 9:46, Johan Rydberg wrote: >> >>> Looking in the dist/Foo.app/Resources, English.lproj is there and it >>> contains the MainMenu.xib file. >>> How does the code know to look into the English.lproj directory? >>> >>> When I get back from work I'll try to assemble a small tarball >>> with a >>> non-working example. >> >> Could you try if converting the ".xib" file to a ".nib" file works >> (IIRC you >> can use Save As... in Interface Builder for that, otherwise it is a >> property >> in the NIB settings)? >> >> The ".xib" files cannot be loaded directly by Cocoa but need to be >> compiled >> before they can be used. Xcode automaticly does this for you, >> released >> versions of py2app do no yet do that. The version of py2app in >> subversion >> fixes this issue for regular builds, but not for alias builds (the - >> A flag). >> >> Ronald >> >>> >>> On Tue, Apr 14, 2009 at 9:40 AM, Ronald Oussoren <ron...@ma... >>> > >>> wrote: >>>> >>>> On 14 Apr, 2009, at 8:54, Johan Rydberg wrote: >>>> >>>>> Odd, because I've seen people just add English.lproj to >>>>> data_files. >>>>> For example, look at >>>>> /Developer/Examples/Python/PyObjC/Cocoa/AppKit/Todo/setup.py. >>>> >>>> Adding English.lproj to data_files should just work, if it >>>> doesn't you >>>> have >>>> found a bug in py2app. >>>> >>>> Ronald >>>> >>>> >> >> |