Re: [Gtk-osx-users] Library dependencies of PyGTK on Mac OS X



Hi John

John Ralls wrote:
> On Dec 18, 2009, at 11:12 PM, John Pye wrote:
>
>   
>> John Pye wrote:
>>     
>>> tool -L /Users/john/gtk-temp/inst/lib/libgtk-quartz-2.0.0.dylib
>>> /Users/john/gtk-temp/inst/lib/libgtk-quartz-2.0.0.dylib:
>>>    /Users/john/gtk/inst/lib/libgtk-quartz-2.0.0.dylib (compatibility 
>>> version 1601.0.0, current version 1601.2.0)
>>>    /Users/john/gtk/inst/lib/libgdk_pixbuf-2.0.0.dylib (compatibility 
>>> version 1601.0.0, current version 1601.2.0)
>>>    /Users/john/gtk/inst/lib/libgdk-quartz-2.0.0.dylib (compatibility 
>>> version 1601.0.0, current version 1601.2.0)
>>> [...and many more...]
>>>
>>> So basically, I need a way for this linking to be done without absolute 
>>> pathnames, somehow (as it is in Linux, in general).
>>>
>>>       
>> Looks like the solution to this problem involves hacking with the shared 
>> libraries as described here:
>>
>> http://blogs.sun.com/dipol/entry/dynamic_libraries_rpath_and_mac
>>
>> I'll see how that goes.
>>
>>     
>
> There's already a python program, ige-mac-bundler, which is part of Gtk-OSX and takes care of packaging the files, including adjusting the installed names. There's a sample bundle file for bundling PyGtk Demo in the examples directory -- but not in the released version on sourceforge, so get it from git://github.com/jralls/ige-mac-bundler.git. More information at http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle
>
> Do note, however, that different versions of OSX come with different versions of Python, and that can cause trouble when you distribute a Python-based bundle. I recommend building Python with jhbuild (set  _gtk_osx_use_jhbuild_python = True in your .jhbuildrc-custom) and including that Python in your bundle.
>   

I'd like to have a more careful look at ige-mac-bundler. I tried to work 
through it but found the documentation a bit patchy. I tried to improve 
it a bit -- perhaps you could take a look and maybe you are able to 
address some of the FIXME comments I added there on the wiki.

One problem I have is that my application is built using SCons, which is 
not suported by jhbuild. That makes the nice streamlined dependency 
tracking of jhbuild inaccessible to me (unless there's some nice 
workaround hack?)

Another issue is that there is not simple 'hello world' example for 
ige-mac-bundler. Could there not be a simple (very short) hello-world 
application included in the jhbuild modulesets that we could use as an 
example of mac bundling? The 'giggle.bundle' example didn't seem to 
reference something that exists in the default jhbuild repository.

A final query -- are there any instructions for how to build the GTK 
Framework? I know that you're not officially releasing this at the 
moment, but I'd like to try out the bleeding edge version if possible. 
Does it require a lot of manual hacking? I have a feeling that I'd be 
more happy distributing our application as an installer that downloads 
and installs a GTK framework in /Library, rather than including it with 
our package. I'd also like our application to depend on a 
system-installed version of Python, because we have reusable components 
that I would ultimately also like to install in /Library rather than 
hiding within our .app.

Cheers
JP





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]