* A tool for parsing Steamworks headers and generating a lookup map of its interfaces. * Optionally accepts a list of folder names that filters which sdk versions will be parsed. * No list means all versions will be parsed. */
| 221 | * No list means all versions will be parsed. |
| 222 | */ |
| 223 | int MAIN(const int argc, const TCHAR* argv[]) { // NOLINT(*-use-internal-linkage) |
| 224 | try { |
| 225 | koalabox::logger::init_console_logger(); |
| 226 | |
| 227 | std::set<std::string> sdk_filter; |
| 228 | if(argc > 1) { |
| 229 | for(auto i = 1; i < argc; i++) { |
| 230 | const auto version = koalabox::str::to_str(argv[i]); |
| 231 | sdk_filter.insert(version); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | const auto steamworks_dir = fs::path("steamworks"); |
| 236 | |
| 237 | if(!fs::exists(steamworks_dir)) { |
| 238 | throw std::runtime_error("Expected to find 'steamworks' in current working directory."); |
| 239 | } |
| 240 | |
| 241 | const auto start = std::chrono::steady_clock::now(); |
| 242 | generate_lookup_json(steamworks_dir, sdk_filter); |
| 243 | const auto end = std::chrono::steady_clock::now(); |
| 244 | const auto elapsed = duration_cast<std::chrono::seconds>(end - start); |
| 245 | |
| 246 | LOG_INFO("Finished parsing steamworks in {} seconds", elapsed.count()); |
| 247 | } catch(const std::exception& e) { |
| 248 | LOG_CRITICAL("Error: {}", e.what()); |
| 249 | return 1; |
| 250 | } |
| 251 | } |
nothing calls this directly
no test coverage detected