| 9 | #include <cstdio> |
| 10 | |
| 11 | int app_main(int argc, char* argv[]) |
| 12 | { |
| 13 | base::Platform p = base::get_platform(); |
| 14 | switch (p.os) { |
| 15 | #if LAF_WINDOWS |
| 16 | case base::Platform::OS::Windows: |
| 17 | std::printf("Windows v%s%s%s", |
| 18 | p.osVer.str().c_str(), |
| 19 | p.isWow64 ? " WoW64" : "", |
| 20 | (p.wineVer ? (std::string(" WINE v") + p.wineVer).c_str() : "")); |
| 21 | break; |
| 22 | #endif |
| 23 | case base::Platform::OS::macOS: std::printf("macOS v%s", p.osVer.str().c_str()); break; |
| 24 | #if LAF_LINUX |
| 25 | case base::Platform::OS::Linux: |
| 26 | std::printf("Linux %s", p.distroName.c_str()); |
| 27 | if (!p.distroVer.empty()) |
| 28 | std::printf(" %s", p.distroVer.c_str()); |
| 29 | break; |
| 30 | #endif |
| 31 | } |
| 32 | switch (p.arch) { |
| 33 | case base::Platform::Arch::x86: std::printf(" (x86)"); break; |
| 34 | case base::Platform::Arch::x64: std::printf(" (x64)"); break; |
| 35 | case base::Platform::Arch::arm64: std::printf(" (arm64)"); break; |
| 36 | case base::Platform::Arch::riscv64: std::printf(" (riscv64)"); break; |
| 37 | } |
| 38 | std::printf("\n"); |
| 39 | return 0; |
| 40 | } |
nothing calls this directly
no test coverage detected