Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Core - App.cpp - GetDataFile
Re: Core - App.cpp - GetDataFile [message #3193 is a reply to message #3174] |
Thu, 11 May 2006 13:24  |
guido
Messages: 169 Registered: April 2006
|
Experienced Member |
|
|
The POSIX convention is ../share/<appname> relativ to the executable. But as the exe could be symlinked, you need to call realpath() to resolve the symlink:
http://www.opengroup.org/onlinepubs/7990989775/xsh/realpath. html
Both Gnome and KDE have an API for resource location.
In the case of KDE you can add the datadir to the KDEDIRS env variable (in an startup script), to make the app relocatable.
Most Gnome apps are sadly not relocatable at all. Even though Gnome has an API for that, most programmers don't bother and simply hardcode the pathes through the standard autotools mechanism (DATADIR, LOCALEDIR...).
|
|
|
Goto Forum:
Current Time: Mon Jul 07 11:49:03 CEST 2025
Total time taken to generate the page: 0.03099 seconds
|