+ static FS::Path exe;
+
+ if(!argv0 || !*argv0)
+ {
+#ifdef _WIN32
+ argv0 = "application.exe";
+#else
+ argv0 = "./application";
+#endif
+ }
+
+ bool has_slash = strchr(argv0, FS::DIRSEP);
+ if(!has_slash)
+ exe = FS::path_lookup(argv0);
+ if(exe.empty())
+ exe = FS::realpath(argv0);
+
+ argv0_ = exe.c_str();