diff --git a/app/.classpath b/app/.classpath index b7dd58fc4..315612244 100644 --- a/app/.classpath +++ b/app/.classpath @@ -42,7 +42,7 @@ - + diff --git a/app/lib/jssc-2.8.0.jar b/app/lib/jssc-2.8.0-arduino1.jar old mode 100644 new mode 100755 similarity index 86% rename from app/lib/jssc-2.8.0.jar rename to app/lib/jssc-2.8.0-arduino1.jar index d2b5c070a..3cf257ea6 Binary files a/app/lib/jssc-2.8.0.jar and b/app/lib/jssc-2.8.0-arduino1.jar differ diff --git a/arduino-core/.classpath b/arduino-core/.classpath index 4167a9dd3..99329d1b8 100644 --- a/arduino-core/.classpath +++ b/arduino-core/.classpath @@ -8,7 +8,7 @@ - + diff --git a/arduino-core/lib/jssc-2.8.0.jar b/arduino-core/lib/jssc-2.8.0-arduino1.jar old mode 100644 new mode 100755 similarity index 86% rename from arduino-core/lib/jssc-2.8.0.jar rename to arduino-core/lib/jssc-2.8.0-arduino1.jar index d2b5c070a..3cf257ea6 Binary files a/arduino-core/lib/jssc-2.8.0.jar and b/arduino-core/lib/jssc-2.8.0-arduino1.jar differ diff --git a/arduino-core/src/processing/app/windows/Platform.java b/arduino-core/src/processing/app/windows/Platform.java index 349415b2b..2b426f728 100644 --- a/arduino-core/src/processing/app/windows/Platform.java +++ b/arduino-core/src/processing/app/windows/Platform.java @@ -37,6 +37,7 @@ import java.util.List; import com.sun.jna.Native; import com.sun.jna.Pointer; +import com.sun.jna.platform.win32.Shell32; import com.sun.jna.win32.StdCallLibrary; import com.sun.jna.win32.W32APIOptions; @@ -129,11 +130,15 @@ public class Platform extends processing.app.Platform { if (file.exists()) { // in this case convert the path to a "file:" url url = file.toURI().toString(); - - // this allows to open the file on Windows 10 that - // has a more strict permission policy for cmd.exe } } + if (url.startsWith("http") || url.startsWith("file:")) { + // this allows to open the file on Windows 10 that + // has a more strict permission policy for cmd.exe + final int SW_SHOW = 5; + Shell32.INSTANCE.ShellExecute(null, null, url, null, null, SW_SHOW); + return; + } // this is not guaranteed to work, because who knows if the // path will always be c:\progra~1 et al. also if the user has @@ -150,18 +155,12 @@ public class Platform extends processing.app.Platform { // "Access is denied" in both cygwin and the "dos" prompt. //Runtime.getRuntime().exec("cmd /c " + currentDir + "\\reference\\" + // referenceFile + ".html"); - if (url.startsWith("http") || url.startsWith("file:")) { - // open dos prompt, give it 'start' command, which will - // open the url properly. start by itself won't work since - // it appears to need cmd - Runtime.getRuntime().exec("cmd /c start \"\" \"" + url + "\""); - } else { - // just launching the .html file via the shell works - // but make sure to chmod +x the .html files first - // also place quotes around it in case there's a space - // in the user.dir part of the url - Runtime.getRuntime().exec("cmd /c \"" + url + "\""); - } + + // just launching the .html file via the shell works + // but make sure to chmod +x the .html files first + // also place quotes around it in case there's a space + // in the user.dir part of the url + Runtime.getRuntime().exec("cmd /c \"" + url + "\""); } diff --git a/build/build.xml b/build/build.xml index 95f6e66b4..c5fcfb678 100644 --- a/build/build.xml +++ b/build/build.xml @@ -1037,6 +1037,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/windows/launcher/config.xml b/build/windows/launcher/config.xml index 2abf18455..9b9faf4c0 100644 --- a/build/windows/launcher/config.xml +++ b/build/windows/launcher/config.xml @@ -47,7 +47,7 @@ %EXEDIR%/lib/jna-4.2.2.jar %EXEDIR%/lib/jna-platform-4.2.2.jar %EXEDIR%/lib/jsch-0.1.50.jar - %EXEDIR%/lib/jssc-2.8.0.jar + %EXEDIR%/lib/jssc-2.8.0-arduino1.jar %EXEDIR%/lib/pde.jar %EXEDIR%/lib/rsyntaxtextarea-2.6.1.jar %EXEDIR%/lib/xml-apis-1.3.04.jar @@ -63,6 +63,7 @@ -Djna.nounpack=true -Djna.boot.library.name=jnidispatch-4.2.2-win32-x86 -Djna.boot.library.path="%EXEDIR%"/lib + -Djssc.library.path="%EXEDIR%"/lib -DAPP_DIR="%EXEDIR%" diff --git a/build/windows/launcher/config_debug.xml b/build/windows/launcher/config_debug.xml index 043866663..fb7cebe87 100644 --- a/build/windows/launcher/config_debug.xml +++ b/build/windows/launcher/config_debug.xml @@ -47,7 +47,7 @@ %EXEDIR%/lib/jna-4.2.2.jar %EXEDIR%/lib/jna-platform-4.2.2.jar %EXEDIR%/lib/jsch-0.1.50.jar - %EXEDIR%/lib/jssc-2.8.0.jar + %EXEDIR%/lib/jssc-2.8.0-arduino1.jar %EXEDIR%/lib/pde.jar %EXEDIR%/lib/rsyntaxtextarea-2.6.1.jar %EXEDIR%/lib/xml-apis-1.3.04.jar @@ -62,6 +62,7 @@ -Djna.nounpack=true -Djna.boot.library.name=jnidispatch-4.2.2-win32-x86 -Djna.boot.library.path="%EXEDIR%"/lib + -Djssc.library.path="%EXEDIR%"/lib -Djna.debug_load=true -DAPP_DIR="%EXEDIR%" -DDEBUG=true