Re: how to find configuration files
- From: Hongli Lai <h lai chello nl>
- To: gnome-devel-list gnome org
- Subject: Re: how to find configuration files
- Date: Sat, 31 Jul 2004 23:11:01 +0200
danny van elsen wrote:
hello all,
I'm working on a gnome program in c++, for which I store configuration
data in a separate file.
The Makefile installs this file in $(datadir)/myapp/.
On my system this translates to '/opt/gnome/share/myapp/ but what is
the 'correct' way in a gnome program to determine the directory with
configuration files?
Actually, that *is* the "correct" way. Or should I say: the defacto
standard way.
A problem with hardcoding the path in the executable is that it makes
your app non-relocatable. Windows app usually find their data files
relative to the executable's folder. But you can do the same thing on
Linux too. See http://autopackage.org/docs/binreloc/
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]