[Gimp-developer] OSX app-bundle-ability of gimp and other gtk2 apps

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

 



I am porting a GTK+-2.0 -based application to OS X as an X11 application. I was trying to ship the app as an OS X "application bundle" with all non-system shared libraries included within the app bundle.

I originally planned on achieving this based on someone's suggestion of using the otool -L output to drive a script that uses install_name_tool to permit me to relocate the shared libraries to a different directory, also utilizing the @executable_path mechanism to permit the new directory to be located inside the app bundle.

Upon attempting to do this I ran into some problems and posted a question to the darwinports mailing list (because I currently build GTK+-2.0 via the darwinports "gtk2" port). Someone replied to my query with the information that the GIMP application had achieved the application-bundle-relative situation that I have been trying to achieve.

So I'm posting this question here not to find out more about how GIMP achieved that and whether it will be easy for me to do the same thing GIMP did in the gtk app that I am porting, and whether I can continue to use darwinports to do my build or whether I need to go another route. I am hoping that it is a simple matter of configuring the gtk build differently (something I'm hoping darwinports will allow) and that little or no application source changes are needed to support this. I'd be glad to switch from darwinports if necessary as long as there is a known way to do the build. Prior to using darwinports I spent a whole month trying to do the build and failed miserably.

I have already ironed out the problems of creating an X11 application bundle (with a helper app that launches the real x11 app), so I need no help with that part.

So the problems lie with allowing the shared libraries to exist within the app bundle, *plus* any other files (e.g. stuff in an etc directory) that gtk2 or any of its components require. Actually I *might* have the library side of the problem solved although I can't be sure that I have covered all of the code that might load libraries (possibly in the form of plugins) at run-time, possibly based on hard-coded constant pathnames. But for sure I have some "etc" problems. These are the errors I am currently getting:

(scalamod:1650): GdkPixbuf-WARNING **: Can not open pixbuf loader module file '/opt/local/etc/gtk-2.0/gdk-pixbuf.loaders': No such file or directory

(scalamod:1650): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported
Fontconfig error: Cannot load default config file
No fonts found; this probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org

I am hoping that someone here has been through the whole gamut of possible problems and has come up with a complete solution for relocating gtk2 and all its required libraries and associated data into an app bundle.


Just in case it is relevant I'll mention that the app is written in Ada and utilizes the gtkada glue layer over gtk2.

Thanks for any help.

-Kurt Bigler


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux