Re: [gtk-osx-users] using gtk-mac-bundler with glade/ui file

On Jun 13, 2015, at 11:21 PM, kapal kardus <kapal kardus gmail com> wrote:

Dear all,

I'm new comer in gtk,
I have problem when create os x  app bundle using gtk-mac-bundler,,

I have included the ui/glade file in <data> like this:
  <data dest="${bundle}/Contents/Resources/builder">

but when i run the app, the followeing error was issued:

 WARNING **: Failed to open file 'builder/builder.ui': No such file or directory

in my .cpp file, i load builder using:

if( ! gtk_builder_add_from_file( pcGBuilder, "builder/builder.ui", &pcGError )     )


        g_warning( "%s", pcGError->message );

        g_free( pcGError );


As a general rule you want to use the installed paths in ${prefix} as the source for everything that isn’t specific to bundling the app and you want to let the bundler put it in the analogous place in Resources, so that e.g. $PREFIX/share/foo goes to ${bundle}/Contents/Resources/share/foo. You do that by not specifying a dest attribute.

UI files are usually installed in $PREFIX/share/<appname>/, in one or more of builder, gtkbuilder, ui, or glade. Since most apps need most everything in their share directories it’s normal to do this with 

making the obvious substitution. You may need to do likewise with some of the apps dependencies.

John Ralls

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