diff options
author | Sven Gothel <[email protected]> | 2010-04-28 05:55:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-28 05:55:38 +0200 |
commit | e5720ee629fba06bc266265b42eb559150f7d7a3 (patch) | |
tree | 767e3da76d48ed46879c1b78a186d1b5d44ca2e2 | |
parent | a08c3c054a6b9cfe892d2516c66362083dc72290 (diff) |
Integrate deployment scripts. jar: copy-repack200-sign-pack200. jnlp: copy-filter
-rw-r--r-- | make/build-common.xml | 1 | ||||
-rw-r--r-- | make/build.xml | 30 | ||||
-rwxr-xr-x | make/scripts/all-deploy-webstarttest.sh | 23 | ||||
-rwxr-xr-x | make/scripts/deploy-jars-pack200.sh (renamed from make/scripts/deploy-jars-webstarttest_pack200.sh) | 14 | ||||
-rwxr-xr-x | make/scripts/deploy-jars-repack200.sh | 30 | ||||
-rwxr-xr-x | make/scripts/deploy-jars-sign.sh | 47 | ||||
-rwxr-xr-x | make/scripts/deploy-jars-webstarttest.sh | 12 | ||||
-rwxr-xr-x | make/scripts/deploy-jnlp-webstarttest-filter.sh | 6 |
8 files changed, 134 insertions, 29 deletions
diff --git a/make/build-common.xml b/make/build-common.xml index be323398e..ca4e9aa79 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -67,6 +67,7 @@ <property name="build" value="${project.root}/${rootrel.build}" /> <property name="src" value="${project.root}/src" /> <property name="lib" value="${build}/lib" /> + <property name="jar" value="${build}/jar" /> <property name="archive.name" value="jogl-${jogl.version}-${os.and.arch}" /> <property name="archive" value="${build}/${archive.name}" /> diff --git a/make/build.xml b/make/build.xml index 5a0952289..de1b31115 100644 --- a/make/build.xml +++ b/make/build.xml @@ -52,6 +52,34 @@ </copy> </target> + <target name="one-jar-dir" depends="init,gluegen.cpptasks.detect.os"> + <delete includeEmptyDirs="true" quiet="true" dir="${jar}" failonerror="false" /> + <mkdir dir="${jar}" /> + <copy todir="${jar}"> + <fileset dir="${gluegen.root}/${rootrel.build}" includes="gluegen-rt*.jar" /> + <fileset dir="${build}/jogl" includes="*.jar" /> + <fileset dir="${build}/nativewindow" includes="*.jar" /> + <fileset dir="${build}/newt" includes="*.jar" /> + </copy> + </target> + + <target name="repack-jars" depends="one-jar-dir"> + <!-- Re-pack jars we have the intent to compress later, after signing --> + <mkdir dir="${jar}/orig" /> + <copy todir="${jar}/orig"> + <fileset dir="${jar}" includes="*.jar" /> + </copy> + <apply dir="${jar}" executable="${java.home}/bin/pack200" + parallel="false" + vmlauncher="false" + relative="true" + failonerror="false"> + <arg line="--repack"/> + <srcfile/> + <fileset dir="${jar}" includes="*.jar" /> + </apply> + </target> + <!-- ================================================================== --> <!-- - Build the per-platform binary zip archive for developers. @@ -125,7 +153,7 @@ - Main build target. --> - <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,junit.compile,one-lib-dir,developer-zip-archive,source-archive" /> + <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,junit.compile,one-lib-dir,one-jar-dir,developer-zip-archive,source-archive" /> <target name="junit.compile"> <ant antfile="build-junit.xml" target="junit.compile" inheritRefs="true" inheritAll="true"/> diff --git a/make/scripts/all-deploy-webstarttest.sh b/make/scripts/all-deploy-webstarttest.sh index e3ee24a6d..e947c3f3d 100755 --- a/make/scripts/all-deploy-webstarttest.sh +++ b/make/scripts/all-deploy-webstarttest.sh @@ -33,6 +33,25 @@ if [ ! -e $wsdir ] ; then fi sh scripts/deploy-jars-webstarttest.sh $joglbuilddir $wsdir -# sh scripts/deploy-jars-webstarttest_pack200.sh $wsdir +# +# repack it .. so the signed jars can be pack200'ed +# sh scripts/deploy-jars-repack200.sh $wsdir +# +# sign it +# sh scripts/deploy-jars-sign.sh $wsdir KEY_STORE_FILE STORE_PASSWORD SOME_ARGUMENT +# +# pack200 +# sh scripts/deploy-jars-pack200.sh $wsdir +# sh scripts/deploy-jnlp-webstarttest.sh $url $joglbuilddir $wsdir -sh scripts/deploy-jnlp-webstarttest-filter.sh $wsdir +# +# In case you don't sign it .. +# +# sh scripts/deploy-jnlp-webstarttest-filter.sh $wsdir +# +# Add to HOME/.java.policy +# +# grant codeBase "file:////usr/local/projects/JOGL/webstart/-" { +# permission java.security.AllPermission; +# }; + diff --git a/make/scripts/deploy-jars-webstarttest_pack200.sh b/make/scripts/deploy-jars-pack200.sh index fd9e215a9..471e8ab7b 100755 --- a/make/scripts/deploy-jars-webstarttest_pack200.sh +++ b/make/scripts/deploy-jars-pack200.sh @@ -18,26 +18,16 @@ THISDIR=`pwd` cd $wsdir mkdir -p DLLS -mv *linux*.jar DLLS/ -mv *windows*.jar DLLS/ -mv *macosx*.jar DLLS/ - -mkdir -p JAVAS -mv *.jar JAVAS - -cd JAVAS +mv *natives*.jar DLLS/ for i in *.jar ; do echo pack200 -E9 $i.pack.gz $i pack200 -E9 $i.pack.gz $i done -cd $wsdir - -mv JAVAS/* . mv DLLS/* . -rm -rf JAVAS DLLS +rm -rf DLLS cd $THISDIR diff --git a/make/scripts/deploy-jars-repack200.sh b/make/scripts/deploy-jars-repack200.sh new file mode 100755 index 000000000..1169d63c3 --- /dev/null +++ b/make/scripts/deploy-jars-repack200.sh @@ -0,0 +1,30 @@ +#! /bin/sh + +wsdir=$1 +shift + +if [ -z "$wsdir" ] ; then + echo usage $0 webstartdir + exit 1 +fi + +if [ ! -e $wsdir ] ; then + echo $wsdir does not exist + exit 1 +fi + +THISDIR=`pwd` + +cd $wsdir + +rm -rf orig-jars +mkdir -p orig-jars + +for i in *.jar ; do + cp -a $i orig-jars + echo pack200 --repack $i + pack200 --repack $i +done + +cd $THISDIR + diff --git a/make/scripts/deploy-jars-sign.sh b/make/scripts/deploy-jars-sign.sh new file mode 100755 index 000000000..1a4421aa9 --- /dev/null +++ b/make/scripts/deploy-jars-sign.sh @@ -0,0 +1,47 @@ +#! /bin/sh + +wsdir=$1 +shift + +keystore=$1 +shift + +storepass=$1 +shift + +signarg=$1 +shift + +if [ -z "$wsdir" -o -z "$keystore" -o -z "$storepass" ] ; then + echo "usage $0 webstartdir pkcs12-keystore storepass [signarg]" + exit 1 +fi + +if [ ! -e $wsdir ] ; then + echo $wsdir does not exist + exit 1 +fi + +if [ ! -e $keystore ] ; then + echo $keystore does not exist + exit 1 +fi + +THISDIR=`pwd` + +cd $wsdir + +rm -rf demo-jars +mkdir -p demo-jars +mv jogl.test.jar jogl-demos*jar demo-jars/ + +for i in *.jar ; do + echo jarsigner -storetype pkcs12 -keystore $keystore $i \"$signarg\" + jarsigner -storetype pkcs12 -keystore $THISDIR/$keystore -storepass $storepass $i "$signarg" +done + +mv demo-jars/* . +rm -rf demo-jars + +cd $THISDIR + diff --git a/make/scripts/deploy-jars-webstarttest.sh b/make/scripts/deploy-jars-webstarttest.sh index 60a59b2a4..8a98f5d3f 100755 --- a/make/scripts/deploy-jars-webstarttest.sh +++ b/make/scripts/deploy-jars-webstarttest.sh @@ -45,16 +45,6 @@ if [ ! -e $jnlpdir_demos ] ; then exit 1 fi -cp -v $gluegenroot/$builddirbase/*.jar $wsdir -#cp -v $gluegenroot/$builddirbase/obj/lib*.so $wsdir - -cp -v $joglbuilddir/nativewindow/*.jar $wsdir -cp -v $joglbuilddir/jogl/*.jar $wsdir -cp -v $joglbuilddir/newt/*.jar $wsdir - -#cp -v $joglbuilddir/nativewindow/obj/lib*.so $wsdir -#cp -v $joglbuilddir/jogl/obj/lib*.so $wsdir -#cp -v $joglbuilddir/newt/obj/lib*.so $wsdir - +cp -v $joglbuilddir/jar/*.jar $wsdir cp -v $demosroot/$builddirbase/*.jar $wsdir diff --git a/make/scripts/deploy-jnlp-webstarttest-filter.sh b/make/scripts/deploy-jnlp-webstarttest-filter.sh index e95be29cb..58191bcb7 100755 --- a/make/scripts/deploy-jnlp-webstarttest-filter.sh +++ b/make/scripts/deploy-jnlp-webstarttest-filter.sh @@ -15,11 +15,11 @@ fi cd $wsdir -rm -rf orig -mkdir orig +rm -rf orig-jnlp +mkdir orig-jnlp for i in *.jnlp ; do - mv $i orig + mv $i orig-jnlp sed -e 's/<security>//g' -e 's/<\/security>//g' -e 's/<all-permissions\/>//g' orig/$i > $i done |