poco icon indicating copy to clipboard operation
poco copied to clipboard

Add Path::self()

Open aleks-f opened this issue 6 years ago • 1 comments

Add an easy way to obtain the executable path. win/linux/mac only for now. https://stackoverflow.com/a/1024937/205386

aleks-f avatar Apr 11 '18 16:04 aleks-f

@aleks-f pls assgin to me.

JackyWoo avatar Aug 18 '22 09:08 JackyWoo

@matejk see if we can squeeze this into 1.13. (needs to be properly tested on all major platforms; if not, push to 1.14

aleks-f avatar Nov 29 '23 18:11 aleks-f

Just as curiosity:

GNU provides simpler way to get program name if _GNU_SOURCE is defined through a constant C string:

       extern char *program_invocation_name;
       extern char *program_invocation_short_name;

https://man7.org/linux/man-pages/man3/program_invocation_name.3.html

Linux, macOS and BSD also feature getprogname: https://www.unix.com/man-page/netbsd/3/getprogname/

On Windows, there is also __argv[0].

matejk avatar Dec 04 '23 11:12 matejk