From 181dc8ae227cd5cbecf60ab8d973bb8eef7c45f0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 13 Dec 2014 06:38:59 +0100 Subject: [PATCH] Bug 1108 - Fix difficulties to determine executable access permission on Windows via BATCH file execution Batch file execution test via direct call, i.e.'a.bat', does not work on some Windows machine, not reproducible here! A workaround would be to call the batch file explicit via 'CMD /c a.bat': - works when using 'Software Restriction Policies' (Bug 1015 Comment 2) - does _not_ work when denying ACL "Traverse Folder / Execute File" permission (Bug 1015 Comment 3) Due to this bug, we need to use a native execution: - Performing executable test w/ native exe file instead of batch file on Windows x86 32bit and 64bit, - using [1] TinyPE XP-W8 Compatible - x86 32bit and 64bit - 268 bytes - Tested on: WinXP-32bit, Win7-64bit and Win8-64bit - Author/License: Ange Albertini, BSD Licence, 2010-2013 - On all other Windows machines (ARM, ..), we still use direct execution of 'a.bat' but may add native exe files for missing platforms. +++ This patch injects said binaries within the java jar file and copies it into the 'to be tested' temp folder for execution. [1] TinyPE XP-W8 Compatible - x86 32bit and 64bit - 268 bytes is included within 'src/native/tinype-corkami', build manually and imported as 'src/java/com/jogamp/common/util/bin/exe-windows-i586-268b.bin'. +++ --- make/build.xml | 9 + src/java/com/jogamp/common/util/IOUtil.java | 100 ++- .../common/util/bin/exe-windows-i586-268b.bin | Bin 0 -> 268 bytes src/native/tinype-corkami/consts.inc | 675 ++++++++++++++++++ src/native/tinype-corkami/make.bat | 13 + src/native/tinype-corkami/readme.txt | 25 + src/native/tinype-corkami/tiny-simple.asm | 102 +++ src/native/tinype-corkami/tiny.asm | 117 +++ 8 files changed, 1020 insertions(+), 21 deletions(-) create mode 100644 src/java/com/jogamp/common/util/bin/exe-windows-i586-268b.bin create mode 100644 src/native/tinype-corkami/consts.inc create mode 100755 src/native/tinype-corkami/make.bat create mode 100644 src/native/tinype-corkami/readme.txt create mode 100644 src/native/tinype-corkami/tiny-simple.asm create mode 100644 src/native/tinype-corkami/tiny.asm diff --git a/make/build.xml b/make/build.xml index 534f1226..ae448518 100644 --- a/make/build.xml +++ b/make/build.xml @@ -59,6 +59,7 @@ + @@ -138,6 +139,7 @@ + @@ -718,6 +720,13 @@ + + + + +