Am Wed, 10 Jul 2013 07:14:27 -0700 schrieb "H. S. Teoh" <hst...@quickfur.ath.cx>:
> I actually thought about this before I wrote what I did; the reason I > didn't do it, was because what the original script *appeared* to be > doing (I didn't check, so I'm not sure) is to first identify itself > (find the path to itself) then use that path to locate gdc. Getting the real application path is not simple and not portable, but if you really want to do that: http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937