Add a routine to attempt to get the absolute pathname of the executable
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Feb 2006 03:15:29 +0000 (03:15 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Feb 2006 03:15:29 +0000 (03:15 +0000)
commit3bad829edc9b08a95b5e2003a4262bde5c20201c
treef9d78126da180e876f8d40f12089268530ce1aca
parent1e7f07527ba49a0da29c688d34f2822115dd0947
Add a routine to attempt to get the absolute pathname of the executable
file, strip off the last component to get the pathname of the directory
containing the executable file, and save it for future use.  On Windows,
you can get that from the OS, but, on UN*X, you have to look at argv[0]
and derive the absolute path from that (argv[0] is not guaranteed to be
an absolute path, or even a path at all).  (In addition, if you're
running from the build directory, you might have to strip off a ".libs/"
added to argv[0] as an artifact of the libtoolizing script.)

Use that in the About dialog, and use it to construct the path of
dumpcap.

Don't put quotes into the path of dumpcap; you don't have to quote
strings with spaces in them when handing them to execvp and, in fact,
you *mustn't* quote them, as the quotes will be treated as part of the
pathname.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17267 f5534014-38df-0310-8fa8-9805f1628bb7
capture_sync.c
epan/filesystem.c
epan/filesystem.h
globals.h
gtk/about_dlg.c
gtk/main.c