hi, I've nearly accomplished a small QT app that makes ballistic calculations for small arms, draws graphics, prints charts, has multilanguage support and all the usual stuff. But , since I Am The Real Dumbass Newbie I am getting crazy with a really silly problem: I have to find the path where my application is, I've tried argv[0], I've messed with char *realpath and getcwd, but I always keep getting stuck into my home (like in real life...) the question is: when I launch the app from a shell window,
[jagerhans@shangri-la jagerhans]$ cd qtballit
[jagerhans@shangri-la qtballit]$ ./Qtballit
everything runs fine, but if I simply click the app icon, the app only knows that the cwd is my home and *not* /somedirectory/strangepath/puppa/qtballit/ and therefore isn't able to find the language files, the html manpage, etc.
is there something like $0 in bash?
thanks a lot