+void Application::set_startup_info(const char *argv0, void *data)
+{
+ if(argv0_)
+ throw logic_error("startup info already set");
+
+ static FS::Path exe;
+
+ 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();
+ data_ = data;
+}
+