Re: [Anjuta-list] Glade File Problem After Installation



Hello Naba!

> Hi Tony,
> 
> On Sun, 2007-01-07 at 21:04 -0500, Tony Freeman wrote:
> 
> > I built a 'glade' project and it works just fine when I compile it and
> > run it from my source directory.  However, after the install it does not
> > work properly.  I've traced it down to a couple of things ... 
> > 
> If you read the comments in your main.c file, it explains to set it to
> the right path.
> 
> Regards,
> -Naba
> 

I am using Anjuta 1.2.4a ... I created a new libglade project just so I
could see the comments in the main.c file ... but there wasn't anything
useful there.  Possibly you have comments generated in a newer Anjuta?

You have a great IDE  I'm using it to learn how to program.  It is my
very first IDE.  Thank you very much!

Anyway ... I just today figured out how to configure things via the text
files.  Now my application installs and works properly :-)


I'm including the steps that I took in the hope that it helps someone
else.  This may not be the best answer, but it works for me now.
Eventually I'll learn how to configure this stuff through Anjuta :-)
Maybe someone has an article that describes how to do this via Anjuta
somewhere?

Anyway ... 

The application files sit inside this directory --> XmainScript-1.0

Inside XmainScript-1.0 is the XmainScript.glade file.  I renamed this to
XmainScript.glade.in

I had to edit XmainScript.glade.in to place a directory path variable
called '@PACKAGE_PIXMAPS_DIR@' and a slash '/' in front of all custom
images.  I simply did a search for 'pixbuf' and made the appropriate
changes.  Here is an example:

<property
name="pixbuf">@PACKAGE_PIXMAPS_DIR@/xmainscript-icon.svg</property>


Next I had to edit configure.in.  I added 'XmainScript.glade' to the
AC_OUTPUT list at the bottom of the file:

AC_OUTPUT([
Makefile
po/Makefile.in
src/Makefile
pixmaps/Makefile
XmainScript.desktop
XmainScript.glade
])

The last thing I did was edit main.c and tell it how to find the .glade
file after it is installed.  I added this to the preprocessor stuff at
the top of the main.c file:

#define GLADE_FILE PACKAGE_DATA_DIR"/"PACKAGE"/glade/XmainScript.glade"

I then did the following (to set up a default install prefix):

 ./autogen --prefix=/awips/dev/localapps/xmainscript

I installed the application to a test area just to see if it works OK:

 ./configure --prefix=/tmp/apps/xmainscript
 make
 make install
 make depclean

I then ran the application located here: 
/tmp/apps/xmainscript/bin/xmainscript

... and everything worked great!

-- Tony






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