From 41660e1881d9e2656f783cd717e8af694664753e Mon Sep 17 00:00:00 2001 From: Denny Date: Sun, 8 Oct 2017 09:00:10 -0400 Subject: [PATCH 1/3] Updates the build number to 0.3.1 for the next patch release Updates the build script for conditional compilation using either Java 8 or Java 9 options. Java 9 deprecated the java.xml.bind package and removed it as a default Java SE package, so we have to reference it via the --add-modules argument. Updates the linux/mac launch script to check the java runtime version and use either a Java 8 or Java 9 launch command. --- build/build.xml | 232 +++++++++++++++++++--------------- scripts/run_sdrtrunk_linux.sh | 16 ++- 2 files changed, 142 insertions(+), 106 deletions(-) diff --git a/build/build.xml b/build/build.xml index 46f46e1b..6e830507 100644 --- a/build/build.xml +++ b/build/build.xml @@ -1,120 +1,142 @@ - - Ant build script for SDRTrunk Decoder Application - + + Ant build script for SDRTrunk Decoder Application + - - - - - - - - - - - - - - + + + + + + - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - - - - - - - - - + + + + + + + - - - - + + + + + + + \ No newline at end of file diff --git a/scripts/run_sdrtrunk_linux.sh b/scripts/run_sdrtrunk_linux.sh index c95741eb..b0d2ff65 100755 --- a/scripts/run_sdrtrunk_linux.sh +++ b/scripts/run_sdrtrunk_linux.sh @@ -1,2 +1,16 @@ #!/bin/bash -java -XX:+UseG1GC -cp "*:libs/*" gui.SDRTrunk \ No newline at end of file + +java -version + +# Test for java version 9 +JAVA_9=$(java -version 2>&1 | grep -i version | sed 's/.* "\([9]\).*/\1/') + +if [ -z ${JAVA_9+x} ]; then + echo Using Java 9 program options + # Java 9 uses the G1 garbage collector by default and requires that we specify the + # java.xml.bind package since it's been removed from the java se core library + java -cp "*:libs/*" --add-modules java.xml.bind gui.SDRTrunk; +else + echo Using Java 8 program options + java -XX:+UseG1GC -cp "*:libs/*" gui.SDRTrunk; +fi From d608834214b70af499da2a775d55063a3b12c51f Mon Sep 17 00:00:00 2001 From: Denny Date: Mon, 9 Oct 2017 16:33:58 +0000 Subject: [PATCH 2/3] Resolves #272. Updates the windows launch script to perform conditional launching based on the JRE version 8 or 9. --- scripts/run_sdrtrunk_windows.bat | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/run_sdrtrunk_windows.bat b/scripts/run_sdrtrunk_windows.bat index 1206e039..1c38bd44 100644 --- a/scripts/run_sdrtrunk_windows.bat +++ b/scripts/run_sdrtrunk_windows.bat @@ -1 +1,25 @@ -java -XX:+UseG1GC -cp "SDRTrunk.jar;*;libs/*;config/*;images/*" gui.SDRTrunk \ No newline at end of file +@echo off + +java -version + +SETLOCAL ENABLEDELAYEDEXPANSION + +for /f "usebackq tokens=3" %%a in (`java -version 2^>^&1 ^| find "version"`) do ( + rem set b to the unquoted version string parsed from the java version command + set b=%%~a + + rem set c to the first character of the unquoted version string + set c=!b:~0,1! + + if !c! equ 9 ( + echo Using Java 9 options + java -cp "SDRTrunk.jar;*;libs/*;config/*;images/*" --add-modules java.xml.bind gui.SDRTrunk + ) else ( + echo Using Java 8 options + java -XX:+UseG1GC -cp "SDRTrunk.jar;*;libs/*;config/*;images/*" gui.SDRTrunk + ) +) + +ENDLOCAL + +@echo on From 455aa9728612299ed54b07109faa4f21b86ec9d9 Mon Sep 17 00:00:00 2001 From: Denny Date: Mon, 9 Oct 2017 12:35:28 -0400 Subject: [PATCH 3/3] Updates build number to 'final' --- build/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.xml b/build/build.xml index 6e830507..be632b2b 100644 --- a/build/build.xml +++ b/build/build.xml @@ -7,7 +7,7 @@ - +