mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Getting rid of other unused jna stuff
This commit is contained in:
@ -22,8 +22,6 @@
|
||||
|
||||
package processing.app.windows;
|
||||
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Native;
|
||||
import org.apache.commons.exec.CommandLine;
|
||||
import org.apache.commons.exec.Executor;
|
||||
import processing.app.PreferencesData;
|
||||
@ -31,7 +29,6 @@ import processing.app.debug.TargetPackage;
|
||||
import processing.app.legacy.PApplet;
|
||||
import processing.app.legacy.PConstants;
|
||||
import processing.app.tools.CollectStdOutExecutor;
|
||||
import processing.app.tools.CollectStdOutStdErrExecutor;
|
||||
import processing.app.windows.Registry.REGISTRY_ROOT_KEY;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@ -282,36 +279,6 @@ public class Platform extends processing.app.Platform {
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
// Code partially thanks to Richard Quirk from:
|
||||
// http://quirkygba.blogspot.com/2009/11/setting-environment-variables-in-java.html
|
||||
|
||||
static WinLibC clib = (WinLibC) Native.loadLibrary("msvcrt", WinLibC.class);
|
||||
|
||||
public interface WinLibC extends Library {
|
||||
//WinLibC INSTANCE = (WinLibC) Native.loadLibrary("msvcrt", WinLibC.class);
|
||||
//libc = Native.loadLibrary("msvcrt", WinLibC.class);
|
||||
public int _putenv(String name);
|
||||
}
|
||||
|
||||
|
||||
public void setenv(String variable, String value) {
|
||||
//WinLibC clib = WinLibC.INSTANCE;
|
||||
clib._putenv(variable + "=" + value);
|
||||
}
|
||||
|
||||
|
||||
public String getenv(String variable) {
|
||||
return System.getenv(variable);
|
||||
}
|
||||
|
||||
|
||||
public int unsetenv(String variable) {
|
||||
//WinLibC clib = WinLibC.INSTANCE;
|
||||
//clib._putenv(variable + "=");
|
||||
//return 0;
|
||||
return clib._putenv(variable + "=");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return PConstants.platformNames[PConstants.WINDOWS];
|
||||
|
Reference in New Issue
Block a user