[Glade-users] practical question: apps locating glade file
- From: Neil Zanella <nzanella gmail com> (Neil Zanella)
- Subject: [Glade-users] practical question: apps locating glade file
- Date: Thu, 2 Dec 2004 12:43:48 -0700
So this means that, with the example you have provided, it is not
possible to run
the program once make is issued without issuing a make install, and that this is
the standard way. So either Makefile.am is configured with GLADEDIR bound
to a directory that works after issuing a make, or it is configured to
be bound to
a directory that works after doing a make install.
Is this right? So the final user cannot test the application prior to
doing a make install with most standard ways of packaging glade files?
Thanks,
Neil
On Thu, 02 Dec 2004 18:32:33 +0000, Keith Sharp <kms passback co uk> wrote:
On Thu, 2004-12-02 at 00:31 -0700, Neil Zanella wrote:
Hello,
I have a very practical concern I would like to address:
I am building an application which uses glade. This means, when the application
runs, it should load the glade file. Well, I want users to be able to
run the application
before doing a "make install" to test it. So, when I do make install,
the binary will
go under /usr/local/bin and the glade file under
/usr/local/share/fooapp or similar.
Right now I hardcode the location of the glade file in a veriable.
This could be a
relative path, so I could have ../share/fooapp/foo.glade as the relative path?
That way I can keep a similar directory structure in my tarball and test before
install in this way? How do most people do it?
Most people use an Autotools based build system. The C source code uses
something like:
GladeXML *xml;
xml = glade_xml_new(GLADEDIR "/application.glade", NULL, NULL);
In the Makefile.am in your source directory your have:
INCLUDES = -DGLADEDIR=\"$(datadir)/myappname\"
And then at the top level you have another directory called, for
example, ui. In this directory you have your glade file and a
Makefile.am. In this Makefile.am you would have:
gladedir = $(datadir)/myappname
glade_DATA = application.glade
EXTRA_DIST = $(glade_DATA)
This means that the directory from which you load your glade file is
defined at build and install time.
Keith.
_______________________________________________
Glade-users maillist - Glade-users 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]