Files
OrcaSlicer-bambulab/src/slic3r/Utils/Platform.hpp
Vojtech Bubnik 33b63b35a2 Added detection of Microsoft WSL/WSL2 Linux flavors.
Added tracing of the platform detection.
2021-03-15 09:55:57 +01:00

45 lines
775 B
C++

#ifndef SLIC3R_GUI_Utils_Platform_HPP
#define SLIC3R_GUI_Utils_Platform_HPP
namespace Slic3r {
namespace GUI {
enum class Platform
{
Uninitialized,
Unknown,
Windows,
OSX,
Linux,
BSDUnix,
};
enum class PlatformFlavor
{
Uninitialized,
Unknown,
// For Windows and OSX, until we need to be more specific.
Generic,
// For Platform::Linux
GenericLinux,
LinuxOnChromium,
// Microsoft's Windows on Linux (Linux kernel simulated on NTFS kernel)
WSL,
// Microsoft's Windows on Linux, version 2 (virtual machine)
WSL2,
// For Platform::BSDUnix
OpenBSD,
};
// To be called on program start-up.
void detect_platform();
Platform platform();
PlatformFlavor platform_flavor();
} // namespace GUI
} // namespace Slic3r
#endif // SLIC3R_GUI_Utils_Platform_HPP