mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 12:36:07 -05:00
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.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<!-- version properties -->
|
<!-- version properties -->
|
||||||
<property name="major" value="0"/>
|
<property name="major" value="0"/>
|
||||||
<property name="minor" value="3"/>
|
<property name="minor" value="3"/>
|
||||||
<property name="patch" value="0"/>
|
<property name="patch" value="1"/>
|
||||||
<property name="release" value=""/>
|
<property name="release" value=""/>
|
||||||
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
|
||||||
|
|
||||||
@@ -37,10 +37,32 @@
|
|||||||
<echo message="${major}.${minor}.${patch}-${release}" file="${output.classes}/sdrtrunk-version"/>
|
<echo message="${major}.${minor}.${patch}-${release}" file="${output.classes}/sdrtrunk-version"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="clean,init" description="Compile java classes" >
|
<target name="compile" depends="clean,init,compile-java-8,compile-java-9"
|
||||||
|
description="Compile java classes" />
|
||||||
|
|
||||||
|
<target name="compile-java-8" depends="check-java-version" if="java.8" description="Compiles code with Java 8 arguments">
|
||||||
|
<echo message="Compiling with Java 8 Options"/>
|
||||||
<javac srcdir="${source.code}" destdir="${output.classes}" classpathref="classpath" includeantruntime="false"/>
|
<javac srcdir="${source.code}" destdir="${output.classes}" classpathref="classpath" includeantruntime="false"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="compile-java-9" depends="check-java-version" if="java.9" description="Compiles code with Java 9 arguments">
|
||||||
|
<echo message="Compiling with Java 9 Options"/>
|
||||||
|
<javac srcdir="${source.code}" destdir="${output.classes}" classpathref="classpath" includeantruntime="false">
|
||||||
|
<compilerarg value="--add-modules"/>
|
||||||
|
<compilerarg value="java.xml.bind"/>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="check-java-version" description="Determines if the compiler is Java 8 or 9">
|
||||||
|
<condition property="java.8" value="true">
|
||||||
|
<contains string="${java.version}" substring="1.8"/>
|
||||||
|
</condition>
|
||||||
|
<condition property="java.9" value="true">
|
||||||
|
<equals arg1="${java.version}" arg2="9"/>
|
||||||
|
</condition>
|
||||||
|
<echo message="Java Version: ${java.version}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="SDRTrunk" depends="compile" description="Create SDRTrunk application">
|
<target name="SDRTrunk" depends="compile" description="Create SDRTrunk application">
|
||||||
<!-- Create the distribution directory -->
|
<!-- Create the distribution directory -->
|
||||||
<mkdir dir="${output.folder}"/>
|
<mkdir dir="${output.folder}"/>
|
||||||
|
|||||||
@@ -1,2 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
java -XX:+UseG1GC -cp "*:libs/*" gui.SDRTrunk
|
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user