2021-03-15 16:19:22 +01:00
|
|
|
#ifndef SLIC3R_Platform_HPP
|
|
|
|
#define SLIC3R_Platform_HPP
|
2021-03-11 13:45:45 +01:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
enum class Platform
|
|
|
|
{
|
|
|
|
Uninitialized,
|
|
|
|
Unknown,
|
|
|
|
Windows,
|
|
|
|
OSX,
|
|
|
|
Linux,
|
2021-03-11 15:21:58 +01:00
|
|
|
BSDUnix,
|
2021-03-11 13:45:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class PlatformFlavor
|
|
|
|
{
|
|
|
|
Uninitialized,
|
|
|
|
Unknown,
|
|
|
|
// For Windows and OSX, until we need to be more specific.
|
|
|
|
Generic,
|
|
|
|
// For Platform::Linux
|
|
|
|
GenericLinux,
|
|
|
|
LinuxOnChromium,
|
2021-03-11 16:15:22 +01:00
|
|
|
// Microsoft's Windows on Linux (Linux kernel simulated on NTFS kernel)
|
|
|
|
WSL,
|
|
|
|
// Microsoft's Windows on Linux, version 2 (virtual machine)
|
|
|
|
WSL2,
|
2021-03-11 15:21:58 +01:00
|
|
|
// For Platform::BSDUnix
|
2021-03-11 13:45:45 +01:00
|
|
|
OpenBSD,
|
2021-08-02 14:03:17 +02:00
|
|
|
// For Platform::OSX
|
|
|
|
GenericOSX,
|
|
|
|
// For Apple's on Intel X86 CPU
|
|
|
|
OSXOnX86,
|
|
|
|
// For Apple's on Arm CPU
|
|
|
|
OSXOnArm,
|
2021-03-11 13:45:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// To be called on program start-up.
|
|
|
|
void detect_platform();
|
|
|
|
|
|
|
|
Platform platform();
|
|
|
|
PlatformFlavor platform_flavor();
|
|
|
|
|
|
|
|
} // namespace Slic3r
|
|
|
|
|
2021-03-15 16:19:22 +01:00
|
|
|
#endif // SLIC3R_Platform_HPP
|