Re: How to detect current executable file name?

2014-08-01 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 18 February 2013 at 03:28:59 UTC, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I tried core.runtime.Runtime.args[0], but failed. Is there a standard method of Phobos to do that? I only know the way of Windows

Re: How to detect current executable file name?

2014-07-31 Thread shuji via Digitalmars-d-learn
There is a solution already for this: http://dlang.org/phobos/std_file.html#.thisExePath (just for future reference, it's seriously hard to search on google)

Re: How to detect current executable file name?

2013-02-18 Thread eGust
On Monday, 18 February 2013 at 07:32:06 UTC, Jacob Carlborg wrote: On 2013-02-18 04:28, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I tried core.runtime.Runtime.args[0], but failed. Is there a standard method of Phobos to

Re: How to detect current executable file name?

2013-02-18 Thread Jacob Carlborg
On 2013-02-18 09:21, eGust wrote: Thanks for your reply. Does anyone know, will it be added into D2's standard library? Not until someone makes a pull request. p.s. About the code, I don't know how it work on other platform, but on windows it will get a bad result if the path contains any

Re: How to detect current executable file name?

2013-02-18 Thread Marco Leise
Am Mon, 18 Feb 2013 10:07:45 +0100 schrieb Jacob Carlborg d...@me.com: Yeah, GetModuleFileNameW should be used. I'm pretty sure the other platforms will return UTF-8. I also found that console output on Windows works best with wchars. Linux doesn't have any official support to get the module

Re: How to detect current executable file name?

2013-02-17 Thread SaltySugar
On Monday, 18 February 2013 at 03:28:59 UTC, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I tried core.runtime.Runtime.args[0], but failed. Is there a standard method of Phobos to do that? I only know the way of Windows

Re: How to detect current executable file name?

2013-02-17 Thread Jonathan M Davis
On Monday, February 18, 2013 07:59:08 SaltySugar wrote: On Monday, 18 February 2013 at 03:28:59 UTC, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I tried core.runtime.Runtime.args[0], but failed. Is there a standard

Re: How to detect current executable file name?

2013-02-17 Thread Jacob Carlborg
On 2013-02-18 04:28, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I tried core.runtime.Runtime.args[0], but failed. Is there a standard method of Phobos to do that? I only know the way of Windows (GetModuleFileName), but I

Re: How to detect current executable file name?

2013-02-17 Thread eGust
On Monday, 18 February 2013 at 07:07:42 UTC, Jonathan M Davis wrote: On Monday, February 18, 2013 07:59:08 SaltySugar wrote: On Monday, 18 February 2013 at 03:28:59 UTC, eGust wrote: I need to locate the directory of current executable file, but I can't find how to do that in Phobos. I