| 25 | } |
| 26 | |
| 27 | int main(int argc, char* argv[]) |
| 28 | { |
| 29 | if (argc < 4) { |
| 30 | usage(argv[0]); |
| 31 | } |
| 32 | const std::string mode = argv[1]; |
| 33 | const std::string json_file = argv[2]; |
| 34 | const std::string template_file = argc > 4 ? argv[3] : ""; |
| 35 | const std::string output_file = argc > 4 ? argv[4] : argv[3]; |
| 36 | |
| 37 | if (mode == "loader") { |
| 38 | buildLoader(json_file, output_file); |
| 39 | } else if (mode == "csharp") { |
| 40 | buildCSharp(json_file, template_file, output_file); |
| 41 | } else if (mode == "osx" || mode == "linux") { |
| 42 | buildExport(mode, json_file, output_file); |
| 43 | } else if (mode == "include") { |
| 44 | buildInclude(mode, json_file, output_file); |
| 45 | } else { |
| 46 | usage(argv[0], "Unknown mode"); |
| 47 | } |
| 48 | |
| 49 | return 0; |
| 50 | } |
nothing calls this directly
no test coverage detected