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
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)
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
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
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
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
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
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
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