mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-12 20:49:16 +03:00
Split IDE into 2 projects.
BEWARE: HIGHLY EXPERIMENTAL BRANCH
This commit is contained in:
29
arduino-core/src/processing/app/helpers/OSUtils.java
Normal file
29
arduino-core/src/processing/app/helpers/OSUtils.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package processing.app.helpers;
|
||||
|
||||
public class OSUtils {
|
||||
|
||||
/**
|
||||
* returns true if running on windows.
|
||||
*/
|
||||
static public boolean isWindows() {
|
||||
//return PApplet.platform == PConstants.WINDOWS;
|
||||
return System.getProperty("os.name").indexOf("Windows") != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* true if running on linux.
|
||||
*/
|
||||
static public boolean isLinux() {
|
||||
//return PApplet.platform == PConstants.LINUX;
|
||||
return System.getProperty("os.name").indexOf("Linux") != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if Processing is running on a Mac OS X machine.
|
||||
*/
|
||||
static public boolean isMacOS() {
|
||||
//return PApplet.platform == PConstants.MACOSX;
|
||||
return System.getProperty("os.name").indexOf("Mac") != -1;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user