[Glade-users] Where should the .glade file go?



On Tue, Aug 2, 2011 at 2:48 PM, Carlos Franke
<carlos_franke at taunusstein.net> wrote:
What is the right place in the system to put an application's .glade file,
the application being regularly installed (i. e. not in development)? Sorry
if this is trivial ? I have not found any definitve information on the web
though.

On my Linux system, two apps store their glade file in
/usr/share/app-name/app-name.glade . Is this the right place? According to
which standard? And where should the .glade files go on non-unix systems?

I don't know what exact standard but ${prefix}/share is usually where you
put shared application data (read-only data that your application needs,
which is shared among the users which use the application, configuration
files go in to ${prefix}/etc, binaries in ${prefix}/bin, hidden
binaries, processes
spawned as services by libraries can be found in ${prefix}/libexec...)

Perhaps there is some unix standard that describes all of this.

At any rate, to answer your questions...

  o On osx you have 2 methods of deployment, traditional 'mac ports' which
     will work the same as on a unix system (ports will maintain a virtual root
     filesystem or 'sandbox' for all the ports apps to run inside).

     And, you can distribute GTK+ apps compiled for the quartz backend using
     ige-mac-integration package which includes an integration library and
     a packager... When you 'package' a GTK+ app generally you pull all
     the dependencies into a virtual root and distribute the whole virtual
     root as a .dmg file (with some special directory inside describing
     the application entry point).

  o On win32 the same kind of choices present themselves.

     You can use cygwin to compile most anything and cygwin will
     provide an api to the posix api, in this scenario you generally
     share all your apps in the same virtual root and run them
     from there.

     When you use a packager and create an installer, it will
     be a matter of package voodoo to install the whole virtual
     root of all the dependencies into a relocated path and
     have all the paths worked out when launching the application

In all of these scenarios, whether working with a shared virtual
root / sandbox on the system or installing a package with all
the dependencies... it's generally fine to put the glade file
into ${prefix}/share and then make sure all the paths/files needed
to actually run your app end up in the final package.


A certain video tutorial* (the text version is off-line, unfortunately)
demonstrates a way to embed .glade files in executable files. Is this
recommended?
* http://www.youtube.com/watch?v=5-8h6eOwKwA

Sure you can do that, unfortunately it means any graphic files in the Glade file
need to be specified by full path, because GtkBuilder currently only uses the
file load location to resolve relative paths for loaded resources
(something that
could/should be easily fixed in GtkBuilder).

Cheers,
          -Tristan



Any advice appreciated!

Carlos Franke
_______________________________________________
Glade-users maillist ?- ?Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users






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