You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
443 B

package org.jetbrains.compose.desktop.application.internal
internal enum class OS {
Linux, Windows, MacOS
}
internal val currentOS: OS by lazy {
val os = System.getProperty("os.name")
when {
os.equals("Mac OS X", ignoreCase = true) -> OS.MacOS
os.startsWith("Win", ignoreCase = true) -> OS.Windows
os.startsWith("Linux", ignoreCase = true) -> OS.Linux
else -> error("Unknown OS name: $os")
}
}