Skip to content

Commit

Permalink
Bug 758: Fix scripts and ant build files to work w/ Java7 (default no…
Browse files Browse the repository at this point in the history
…w) producing Java6 bytecode ; Apply JAR Manifest tags: Sealed, Permissions and Codebase
  • Loading branch information
sgothel committed Jun 20, 2013
1 parent 6c30050 commit 6704fab
Show file tree
Hide file tree
Showing 27 changed files with 202 additions and 142 deletions.
4 changes: 4 additions & 0 deletions make/Manifest-android-launcher
Expand Up @@ -12,3 +12,7 @@ Implementation-Vendor-Id: com.jogamp
Implementation-URL: http://jogamp.org/
Extension-Name: jogamp.android.launcher
Trusted-Library: true
Permissions: all-permissions
Name: jogamp/android/launcher/
Sealed: true
@JAR_CODEBASE_TAG@
4 changes: 4 additions & 0 deletions make/Manifest-rt
Expand Up @@ -12,3 +12,7 @@ Implementation-Vendor-Id: com.jogamp
Implementation-URL: http://jogamp.org/
Extension-Name: com.jogamp.common
Trusted-Library: true
Permissions: all-permissions
Name: jogamp/common/
Sealed: true
@JAR_CODEBASE_TAG@
4 changes: 4 additions & 0 deletions make/Manifest-rt-android
Expand Up @@ -12,3 +12,7 @@ Implementation-Vendor-Id: com.jogamp
Implementation-URL: http://jogamp.org/
Extension-Name: com.jogamp.common
Trusted-Library: true
Permissions: all-permissions
Name: jogamp/common/
Sealed: true
@JAR_CODEBASE_TAG@
16 changes: 16 additions & 0 deletions make/Manifest-rt-natives
@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Specification-Title: GlueGen Java Bindings Generator
Specification-Version: @BASEVERSION@
Specification-Vendor: JogAmp Community
Implementation-Title: GlueGen Run-Time
Implementation-Version: @VERSION@
Implementation-Build: @BUILD_VERSION@
Implementation-Branch: @SCM_BRANCH@
Implementation-Commit: @SCM_COMMIT@
Implementation-Vendor: JogAmp Community
Implementation-Vendor-Id: com.jogamp
Implementation-URL: http://jogamp.org/
Extension-Name: com.jogamp.common
Trusted-Library: true
Permissions: all-permissions
@JAR_CODEBASE_TAG@
4 changes: 4 additions & 0 deletions make/Manifest-rt.cdc
Expand Up @@ -12,3 +12,7 @@ Implementation-Vendor-Id: com.jogamp
Implementation-URL: http://jogamp.org/
Extension-Name: com.jogamp.common
Trusted-Library: true
Permissions: all-permissions
Name: jogamp/common/
Sealed: true
@JAR_CODEBASE_TAG@
19 changes: 18 additions & 1 deletion make/build.xml
Expand Up @@ -517,7 +517,7 @@

<antcall target="c.manifest" inheritRefs="true" />

<jar destfile="${build}/gluegen-rt-natives-${os.and.arch}.jar" manifest="${build}/Manifest-rt.temp">
<jar destfile="${build}/gluegen-rt-natives-${os.and.arch}.jar" manifest="${build}/Manifest-rt-natives.temp">
<fileset dir="${build}/obj">
<include name="*gluegen-rt.${native.library.suffix}" />
</fileset>
Expand Down Expand Up @@ -743,6 +743,7 @@
<filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
<filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
<filter token="BASEVERSION" value="${jogamp.version.base}"/>
<filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
</filterset>
</copy>

Expand Down Expand Up @@ -770,6 +771,20 @@
<filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
<filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
<filter token="BASEVERSION" value="${jogamp.version.base}"/>
<filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
</filterset>
</copy>

<copy file="Manifest-rt-natives"
tofile="${build}/Manifest-rt-natives.temp"
overwrite="true">
<filterset>
<filter token="VERSION" value="${jogamp.version}"/>
<filter token="BUILD_VERSION" value="${gluegen.version}"/>
<filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
<filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
<filter token="BASEVERSION" value="${jogamp.version.base}"/>
<filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
</filterset>
</copy>

Expand Down Expand Up @@ -830,6 +845,7 @@
<filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
<filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
<filter token="BASEVERSION" value="${jogamp.version.base}"/>
<filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
</filterset>
</copy>

Expand Down Expand Up @@ -889,6 +905,7 @@
<filter token="SCM_BRANCH" value="${gluegen.build.branch}"/>
<filter token="SCM_COMMIT" value="${gluegen.build.commit}"/>
<filter token="BASEVERSION" value="${jogamp.version.base}"/>
<filter token="JAR_CODEBASE_TAG" value="${jogamp.jar.codebase}"/>
</filterset>
</copy>

Expand Down
2 changes: 1 addition & 1 deletion make/gluegen-properties.xml
Expand Up @@ -73,7 +73,7 @@
</fail>

<property name="android.keystore.file" value="/non.existing.user.keystore.file"/> <!-- default - maybe overriden by the gluegen.user.properties.file -->
<property name="android.keystore.alias" value="debug"/>
<property name="android.keystore.alias" value="debug_alias"/>
<property name="android.keystore.storepass" value="jogamp"/>
<property name="android.keystore.keypass" value="jogamp"/>

Expand Down
2 changes: 1 addition & 1 deletion make/jogamp-androidtasks.xml
Expand Up @@ -193,7 +193,7 @@
<arg value="@{keystore.alias}" />

<arg value="-dname" />
<arg value="CN=JogAmp Debug,O=JogAmp,C=DE" />
<arg value='CN=JogAmp Debug,O=JogAmp,C=DE' />

<arg value="-keypass" />
<arg value="@{keystore.keypass}" />
Expand Down
8 changes: 8 additions & 0 deletions make/jogamp-env.xml
Expand Up @@ -68,6 +68,14 @@
<format property="version.timestamp" pattern="yyyyMMdd"/>
</tstamp>

<condition property="jogamp.jar.codebase" value="${env.JOGAMP_JAR_CODEBASE}">
<not>
<equals arg1="${env.JOGAMP_JAR_CODEBASE}" arg2="$${env.JOGAMP_JAR_CODEBASE}" casesensitive="true" />
</not>
</condition>
<property name="jogamp.jar.codebase" value=""/> <!-- A jogamp build uses value "Codebase: *.jogamp.org" -->
<echo message="jogamp.jar.codebase ${jogamp.jar.codebase}"/>

<property name="jogamp.version.major" value="2"/>
<property name="jogamp.version.minor" value="0"/>
<property name="jogamp.version.submi" value="2"/>
Expand Down
6 changes: 6 additions & 0 deletions make/scripts/make.gluegen.all.android-armv6-cross.sh
@@ -1,5 +1,9 @@
#! /bin/sh

if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
. $SDIR/setenv-build-jogl-x86_64.sh
fi

export NODE_LABEL=.

export HOST_UID=jogamp
Expand Down Expand Up @@ -88,6 +92,8 @@ export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-armv6.xml"

which gcc 2>&1 | tee make.gluegen.all.android-armv6-cross.log

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

#BUILD_ARCHIVE=true \
ant \
-Drootrel.build=build-android-armv6 \
Expand Down
6 changes: 6 additions & 0 deletions make/scripts/make.gluegen.all.android-armv7-cross.sh
@@ -1,5 +1,9 @@
#! /bin/sh

if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
. $SDIR/setenv-build-jogl-x86_64.sh
fi

export NODE_LABEL=.

export HOST_UID=jogamp
Expand Down Expand Up @@ -88,6 +92,8 @@ export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-armv7.xml"

which gcc 2>&1 | tee make.gluegen.all.android-armv7-cross.log

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

#BUILD_ARCHIVE=true \
ant \
-Drootrel.build=build-android-armv7 \
Expand Down
6 changes: 6 additions & 0 deletions make/scripts/make.gluegen.all.linux-armv6-cross.sh
Expand Up @@ -37,6 +37,12 @@ export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.xml"
#export JUNIT_DISABLED="true"
export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"

export SOURCE_LEVEL=1.6
export TARGET_LEVEL=1.6
export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-linux-armv6 \
$* 2>&1 | tee make.gluegen.all.linux-armv6-cross.log
Expand Down
2 changes: 2 additions & 0 deletions make/scripts/make.gluegen.all.linux-armv6.sh
Expand Up @@ -13,6 +13,8 @@ export TARGET_JAVA_LIBS=/usr/lib/jvm/default-java/jre/lib/arm

export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.xml"

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-linux-armv6 \
$* 2>&1 | tee make.gluegen.all.linux-armv6.log
5 changes: 5 additions & 0 deletions make/scripts/make.gluegen.all.linux-armv6hf-cross.sh
Expand Up @@ -37,6 +37,11 @@ export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"
#export JUNIT_DISABLED="true"
export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode"

export SOURCE_LEVEL=1.6
export TARGET_LEVEL=1.6
export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar
export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-linux-armv6hf \
$* 2>&1 | tee make.gluegen.all.linux-armv6hf-cross.log
Expand Down
2 changes: 2 additions & 0 deletions make/scripts/make.gluegen.all.linux-armv6hf.sh
Expand Up @@ -13,6 +13,8 @@ export TARGET_JAVA_LIBS=/usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm

export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6hf.xml"

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-linux-armv6hf \
$* 2>&1 | tee make.gluegen.all.linux-armv6hf.log
6 changes: 6 additions & 0 deletions make/scripts/make.gluegen.all.linux-x86.sh
Expand Up @@ -15,6 +15,12 @@ fi
# -Dgluegen-cpptasks.file=`pwd`/lib/gluegen-cpptasks-linux-32bit.xml \
#

export SOURCE_LEVEL=1.6
export TARGET_LEVEL=1.6
export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-x86 \
$* 2>&1 | tee make.gluegen.all.linux-x86.log
25 changes: 0 additions & 25 deletions make/scripts/make.gluegen.all.linux-x86_64.java7.sh

This file was deleted.

13 changes: 9 additions & 4 deletions make/scripts/make.gluegen.all.linux-x86_64.sh
Expand Up @@ -16,12 +16,17 @@ fi
# -Dtarget.sourcelevel=1.6 \
# -Dtarget.targetlevel=1.6 \
# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
#
# -Dc.compiler.debug=true \
# -Djavacdebuglevel="source,lines,vars" \

export SOURCE_LEVEL=1.6
export TARGET_LEVEL=1.6
export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

# BUILD_ARCHIVE=true \
ant \
-Dtarget.sourcelevel=1.6 \
-Dtarget.targetlevel=1.6 \
-Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-Djavacdebuglevel="source,lines,vars" \
-Drootrel.build=build-x86_64 \
$* 2>&1 | tee make.gluegen.all.linux-x86_64.log
2 changes: 2 additions & 0 deletions make/scripts/make.gluegen.all.macosx-java7.sh
Expand Up @@ -14,6 +14,8 @@ JAVA_HOME=`/usr/libexec/java_home -version 1.7`
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Drootrel.build=build-macosx-java7 \
$* 2>&1 | tee make.gluegen.all.macosx-java7.log
22 changes: 0 additions & 22 deletions make/scripts/make.gluegen.all.macosx-java7_target16.sh

This file was deleted.

16 changes: 11 additions & 5 deletions make/scripts/make.gluegen.all.macosx.sh
Expand Up @@ -10,10 +10,16 @@ fi
# -Dtarget.targetlevel=1.6 \
# -Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \

JAVA_HOME=`/usr/libexec/java_home -version 1.7`
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH

export SOURCE_LEVEL=1.6
export TARGET_LEVEL=1.6
export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant \
-Dtarget.sourcelevel=1.6 \
-Dtarget.targetlevel=1.6 \
-Dtarget.rt.jar=/opt-share/jre1.6.0_30/lib/rt.jar \
-Drootrel.build=build-macosx \
$* 2>&1 | tee make.gluegen.all.macosx.log
-Drootrel.build=build-macosx-java7_target16 \
$* 2>&1 | tee make.gluegen.all.macosx-java7_target16.log
10 changes: 8 additions & 2 deletions make/scripts/make.gluegen.all.win32.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"

set J2RE_HOME=c:\jre1.6.0_35_x32
set JAVA_HOME=c:\jdk1.6.0_35_x32
set J2RE_HOME=c:\jre1.7.0_25_x32
set JAVA_HOME=c:\jdk1.7.0_25_x32
set ANT_PATH=C:\apache-ant-1.8.2

set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
Expand All @@ -13,5 +13,11 @@ REM -DuseOpenMAX=true
REM -DuseKD=true
REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2

set SOURCE_LEVEL=1.6
set TARGET_LEVEL=1.6
set TARGET_RT_JAR=C:\jre1.6.0_30\lib\rt.jar

set JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.gluegen.all.win32.log 2>&1

10 changes: 8 additions & 2 deletions make/scripts/make.gluegen.all.win64.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"

set J2RE_HOME=c:\jre1.6.0_35_x64
set JAVA_HOME=c:\jdk1.6.0_35_x64
set J2RE_HOME=c:\jre1.7.0_25_x64
set JAVA_HOME=c:\jdk1.7.0_25_x64
set ANT_PATH=C:\apache-ant-1.8.2

set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
Expand All @@ -13,5 +13,11 @@ REM -DuseOpenMAX=true
REM -DuseKD=true
REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2

set SOURCE_LEVEL=1.6
set TARGET_LEVEL=1.6
set TARGET_RT_JAR=C:\jre1.6.0_30\lib\rt.jar

set JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

ant -Drootrel.build=build-win64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.gluegen.all.win64.log 2>&1

4 changes: 2 additions & 2 deletions make/scripts/runtest.sh
Expand Up @@ -75,7 +75,7 @@ function onetest() {
echo
}
#
#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
Expand Down Expand Up @@ -107,5 +107,5 @@ function onetest() {
#onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
#onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
#onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
onetest com.jogamp.common.net.URLCompositionTest 2>&1 | tee -a $LOG
#onetest com.jogamp.common.net.URLCompositionTest 2>&1 | tee -a $LOG
#onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG

0 comments on commit 6704fab

Please sign in to comment.