Re: where are the files...



What is the right, elegant, safe, etc...
way to indicate my app where actually are
the help files that the app should read
when the user asks for help?

Hardcoding the absolute file path, or just
a relative path doesn't look reasonable.

setting it by ./configure is the right way, so the user can choose the
$prefix

Thanks for your answer. Yes, autoconf and automake
are our friends. However, I am still in the shadows: 
in my C code, when I want to open a help file,
(to read help information and show it in a gtktext 
inside a gtk dialog) with, say, fopen (filename, "r");
what should I actually put in the filename string?

How to do this:
open_help_file_in_path_later_defined_by_configure?

I can ask my C code to look for the help files
in a path defined by an evironment variable
which will be subsequently defined by the 
configure script, according to --prefix,
or someother variable. Is that your suggestion? 
(I suspect it isn't...)

Even that seems less than safe, as I suppose
these days package managers tend to put documentation 
and executables in different places, for
example /usr/bin/app for executables
and /usr/doc/app for documentation.
The environment variable would have 
to point to the documentation path,
in case this is unrelated with the
executable path.

Adding symlinks in /usr/bin/local to app
executables makes the whole thing even more 
problematic.

Sorry, I am still confused, could you
clarify this a bit more for me?

Many thanks for your help,
Carlos



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