From 3b95f2e4349de366901de44d6fcd04bf0b7c61b8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 21 Nov 2016 16:39:43 -0500 Subject: [PATCH] Hatch windows bat script / path fixes Signed-off-by: Bill Erickson --- .../host/org.evergreen_ils.hatch.json.WINDOWS | 2 +- hatch.bat | 34 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/extension/host/org.evergreen_ils.hatch.json.WINDOWS b/extension/host/org.evergreen_ils.hatch.json.WINDOWS index 7335af72cb..c15698c74d 100644 --- a/extension/host/org.evergreen_ils.hatch.json.WINDOWS +++ b/extension/host/org.evergreen_ils.hatch.json.WINDOWS @@ -1,7 +1,7 @@ { "name": "org.evergreen_ils.hatch", "description": "Hatch Native Messaging Host", - "path": "C:\\Users\berick\Code\Hatch\hatch.bat", + "path": "C:\\Users\\berick\\Code\\Hatch\\hatch.bat", "type": "stdio", "allowed_origins": [ "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/" diff --git a/hatch.bat b/hatch.bat index 125bc3c31f..279d6e415c 100755 --- a/hatch.bat +++ b/hatch.bat @@ -1,7 +1,35 @@ +@echo off REM Windows Hatch Execution Script +REM @echo off required for STDIO to work with the browser. +SET JAVA_HOME="C:\Program Files\Java\jdk1.8.0_111" +SET JAVA="%JAVA_HOME%\bin\java" +SET JAVAC="%JAVA_HOME%\bin\javac" -SET JAVA_HOME="C:\Program Files\Java\jdk1.8.0_60" +IF EXIST "%1" ( + + IF "%1" == "compile" ( + %JAVAC% -cp "lib\*" -Xdiags:verbose^ + -d lib src\org\evergreen_ils\hatch\*.java + ) + + IF "%1" == "test" ( + + %JAVA% -cp "lib\*;lib"^ + -Djava.util.logging.config.file=logging.properties^ + org.evergreen_ils.hatch.TestHatch^ + | %JAVA% -cp "lib\*;lib"^ + -Djava.util.logging.config.file=logging.properties^ + org.evergreen_ils.hatch.Hatch^ + | %JAVA% -cp "lib\*;lib"^ + -Djava.util.logging.config.file=logging.properties^ + org.evergreen_ils.hatch.TestHatch receive + ) + +) ELSE ( + + %JAVA% -cp "lib\*;lib"^ + -Djava.util.logging.config.file=logging.properties^ + org.evergreen_ils.hatch.Hatch +) -%JAVA_HOME%\bin\javac -cp "lib\*" -Xdiags:verbose -d lib src\org\evergreen_ils\hatch\*.java -%JAVA_HOME%\bin\java -cp "lib\*;lib" org.evergreen_ils.hatch.Hatch -- 2.11.0