Re: [Gtk-osx-users] ige-mac-bundler and gtk_image_new_from_file




Ah now the fog is lifting from my Swiss Cheese mind.

I switch the relevant parts of the code to use cairo so it all works now. To address your question, here are the snipits from the input file to ige-mac-bundler and the subsequent script it creates. I don't see anything wrong; I have verified that the exported variables are pointing to the right place (the files do exist in the bundle).



Here is what orderdesk.bundle looks like (truncated):
....

  <plist>${project}/Info.plist</plist>

  <main-binary>${prefix}/bin/orderdesk</main-binary>
  <binary>${prefix}/bin/scanner</binary>
  <binary>${prefix}/bin/isiutil</binary>

  <binary>
    ${prefix}/lib/gtk-2.0/*
  </binary>


  <binary>
    ${prefix}/lib/gdk-pixbuf-2.0/*
  </binary>

 ....


I use ige-mac-bundler which than creates this (truncated):
....

name="`basename $0`"
tmp="`pwd`/$0"
tmp=`dirname "$tmp"`
tmp=`dirname "$tmp"`
bundle=`dirname "$tmp"`
bundle_contents="$bundle"/Contents
bundle_res="$bundle_contents"/Resources
bundle_lib="$bundle_res"/lib
bundle_bin="$bundle_res"/bin
bundle_data="$bundle_res"/share
bundle_etc="$bundle_res"/etc

export DYLD_LIBRARY_PATH="$bundle_lib"
export XDG_CONFIG_DIRS="$bundle_etc"/xdg
export XDG_DATA_DIRS="$bundle_data"
export GTK_DATA_PREFIX="$bundle_res"
export GTK_EXE_PREFIX="$bundle_res"
export GTK_PATH="$bundle_res"

export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
export PANGO_RC_FILE="$bundle_etc/pango/pangorc"

.....

$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS


Thanks as always :)




From: jralls ceridwen us
Date: Fri, 25 Mar 2011 11:28:23 -0700
To: gtk-osx-users lists sourceforge net
Subject: Re: [Gtk-osx-users] ige-mac-bundler and gtk_image_new_from_file


On Mar 25, 2011, at 10:28 AM, Shawn Bakhtiar wrote:

Thanks as always John,

But I did try importing everything in the {prefix}/lib and it still did not work. That was my first though. At this point I am just leaving it the way it is, and move on, I am assuming that pixbuf is not the same as cairo? Doesn't that cause bloat? To have two libraries that do the same thing?


Yes, there's a fair amount of overlap, which has I think been removed from Gtk3, IIRC what's in that thread. But gdk-pixbuf does some other stuff to prepare an image to put on the cairo surface and to cache it, and that part is still in place.

Anyway, if it works in the build directory and not in the bundle, it surely means that either something is missing from the bundle or the app can't find it. (Do you have LD_LIBRARY_PATH exported in your bundle? OSX uses that to find loadable modules. I don't think it normally needs to be set for gdk-pixbuf, though.) There should be some messages about not being able to find something in the console log; if there isn't, try a lower loglevel setting for the Gtk log domain.

Regards,
John Ralls


------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________ Gtk-osx-users mailing list Gtk-osx-users lists sourceforge net https://lists.sourceforge.net/lists/listinfo/gtk-osx-users






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