U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
guido is currently offline  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...).
 
Read Message icon13.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: TrayIcon for linux
Next Topic: how to listnen to File System Events?
Goto Forum:
  


Current Time: Sun Apr 26 10:40:35 GMT+2 2026

Total time taken to generate the page: 0.00563 seconds