[Mono-dev] How to determine the executable directory in a mkbundle-packaged app?
robertj at gmx.net
Tue Nov 15 05:09:06 EST 2011
On 15.11.2011 07:13, Deniska wrote:
> So the question is: how can I determine the _real_ location of a
> mkbundle-packaged app during runtime? Is there are a way? If no - why?
You may want to get this info from the "proc" file system:
static void Main ()
static class BundleEnvironment
public static string GetExecutablePath ()
var builder = new StringBuilder (8192);
if (Syscall.readlink("/proc/self/exe", builder) >= 0)
return builder.ToString ();
More information about the Mono-devel-list