Re: How to use pixmaps in GTK+ applications?



On 10/17/05, Iago Rubio <iago iagorubio com> wrote:

[snip: some overcomplicated auto*-foo stuff]

Gee, almost "overcomplicated" ... :)

I'd suggest just defining a simple directory under $datadir.  No need to
touch configure.ac at all, and this method is easy to use and relatively
easy to remember.  In the directory in your source tree with the image
file, put this in Makefile.am:

imagedir = $(datadir)/myappname/pixmaps
image_DATA = image.png
EXTRA_DIST = $(image_DATA)

You'll need to touch configure.ac then to make it to play with this
directory's Makefile.am, right ?

AC_OUTPUT([
...
imagedir/Makefile
...
])

ITOH just eight lines of shell script is not something so mad to call it
"overcomplicated", isn't it ?  ;)

No, not at all. Just another way :)
I saw the scripts before, but didn't know why they can use macros like
"mkinstalldirs" and thought the macros might be defined somewhere
else. :) Now I know I can use them freely.
But in fact, if the Makefile.am is created in the imagedir directory,
the line imagedir/Makefile in AC_OUTPUT macro will be automatically
generated by autoscan. Maybe you always write configure.ac by hand? I
often use autoscan to generate configure.scan, do some modifications,
and rename it to configure.ac

Thank you!

Zhou Qingbo



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