| 64 | } |
| 65 | |
| 66 | static std::string ResolveDefaultRuntimeExePath() { |
| 67 | wchar_t self[MAX_PATH]{}; |
| 68 | DWORD len = GetModuleFileNameW(nullptr, self, MAX_PATH); |
| 69 | if (len == 0 || len >= MAX_PATH) { |
| 70 | return "tenbox-vm-runtime.exe"; |
| 71 | } |
| 72 | std::string path = i18n::wide_to_utf8(self); |
| 73 | size_t sep = path.find_last_of("\\/"); |
| 74 | if (sep == std::string::npos) { |
| 75 | return "tenbox-vm-runtime.exe"; |
| 76 | } |
| 77 | path.resize(sep + 1); |
| 78 | path += "tenbox-vm-runtime.exe"; |
| 79 | return path; |
| 80 | } |
| 81 | |
| 82 | static void PrintUsage(const char* prog, const char* default_runtime) { |
| 83 | fprintf(stderr, |
no test coverage detected