diff options
author | Michael Bien <[email protected]> | 2009-09-15 11:53:20 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-09-15 11:53:20 +0200 |
commit | 85bd6a6eca6691a7b215e36e09800d410d4a695e (patch) | |
tree | 7ba2d2e74b559bf9d7d1b5f74e826c07f9c1634e /src/redbook/nbproject | |
parent | 293fda5dca0f22d93c9d3019ca12724c67de5c9d (diff) |
Initial import of JOGL 2 redbook sample projects
-project builds stand alone, all dependencies including doc are downloaded automatically
-a full build will create a slideshow applet in dist/
-project can be opened with NetBeans
-original credits go to Kiet Le, ported to JOGL 2 by Claudio E. Goes
Diffstat (limited to 'src/redbook/nbproject')
-rw-r--r-- | src/redbook/nbproject/build-impl.xml | 722 | ||||
-rw-r--r-- | src/redbook/nbproject/build-jogl-template-impl.xml | 204 | ||||
-rw-r--r-- | src/redbook/nbproject/configs/JWS_generated.properties | 7 | ||||
-rw-r--r-- | src/redbook/nbproject/genfiles.properties | 5 | ||||
-rw-r--r-- | src/redbook/nbproject/jnlp-impl.xml | 293 | ||||
-rw-r--r-- | src/redbook/nbproject/project.properties | 106 | ||||
-rw-r--r-- | src/redbook/nbproject/project.xml | 24 |
7 files changed, 1361 insertions, 0 deletions
diff --git a/src/redbook/nbproject/build-impl.xml b/src/redbook/nbproject/build-impl.xml new file mode 100644 index 0000000..1f8d07b --- /dev/null +++ b/src/redbook/nbproject/build-impl.xml @@ -0,0 +1,722 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - junit compilation + - junit execution + - junit debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="RedBook_Samples-impl"> + <import file="jnlp-impl.xml"/> + <fail message="Please build using Ant 1.7.1 or higher."> + <condition> + <not> + <antversion atleast="1.7.1"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-libraries"> + <property location="./lib/nblibraries.properties" name="libraries.1.path"/> + <dirname file="${libraries.1.path}" property="libraries.1.dir.nativedirsep"/> + <pathconvert dirsep="/" property="libraries.1.dir"> + <path path="${libraries.1.dir.nativedirsep}"/> + </pathconvert> + <basename file="${libraries.1.path}" property="libraries.1.basename" suffix=".properties"/> + <touch file="${libraries.1.dir}/${libraries.1.basename}-private.properties"/> + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.1.dir}/${libraries.1.basename}-private.properties"> + <filterchain> + <replacestring from="$${base}" to="${libraries.1.dir}"/> + <escapeunicode/> + </filterchain> + </loadproperties> + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.1.path}"> + <filterchain> + <replacestring from="$${base}" to="${libraries.1.dir}"/> + <escapeunicode/> + </filterchain> + </loadproperties> + </target> + <target depends="-pre-init,-init-private,-init-libraries" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.4"/> + <property name="default.javac.target" value="1.4"/> + </target> + <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="manifest.available+main.class"> + <and> + <isset property="manifest.available"/> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="manifest.available+main.class+mkdist.available"> + <and> + <istrue value="${manifest.available+main.class}"/> + <isset property="libs.CopyLibs.classpath"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'"> + <and> + <isset property="jaxws.endorsed.dir"/> + <available file="nbproject/jaxws-build.xml"/> + </and> + </condition> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-javac"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> + <customize/> + </javac> + </sequential> + </macrodef> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="," property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <delete> + <files includes="${javac.includes.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-junit"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <sequential> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </batchtest> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${run.jvmargs}"/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${source.encoding}"/> + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg value="-Dfile.encoding=${source.encoding}"/> + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" jarfile="${dist.jar}"> + <j2seproject1:fileset dir="${build.classes.dir}"/> + </jar> + </presetdef> + </target> + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target depends="init" name="deps-jar" unless="no.deps"/> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available"> + <j2seproject1:jar/> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> + <j2seproject1:jar manifest="${manifest.file}"/> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> + <j2seproject1:jar manifest="${manifest.file}"> + <j2seproject1:manifest> + <j2seproject1:attribute name="Main-Class" value="${main.class}"/> + </j2seproject1:manifest> + </j2seproject1:jar> + <echo>To run this application from the command line without Ant, try:</echo> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries"> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}"/> + <manifest> + <attribute name="Main-Class" value="${main.class}"/> + <attribute name="Class-Path" value="${jar.classpath}"/> + </manifest> + </copylibs> + <echo>To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo>java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class"> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}"/> + </copylibs> + </target> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar,jnlp" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,-do-not-recompile,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + </fileset> + </javadoc> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + JUNIT COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + JUNIT EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:junit testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:junit excludes="" includes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <!-- + ======================= + JUNIT DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> + <delete file="${test.report.file}"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}"> + <customize> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <arg value="${test.class}"/> + <arg value="showoutput=true"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target depends="init" name="deps-clean" unless="no.deps"/> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> +</project> diff --git a/src/redbook/nbproject/build-jogl-template-impl.xml b/src/redbook/nbproject/build-jogl-template-impl.xml new file mode 100644 index 0000000..1f69eb2 --- /dev/null +++ b/src/redbook/nbproject/build-jogl-template-impl.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM jogl-projects module - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+-->
+<project name="jogl-template-impl" default="default" basedir=".." >
+
+ <description>Ant targets for JOGL2 projects.</description>
+
+ <target name="-jogl-template-post-jar">
+ <echo message="Creating native distibutions"/>
+
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="linux-i586"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="linux-amd64"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="macosx-ppc"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="macosx-universal"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="solaris-sparc"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="solaris-sparcv9"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="solaris-i586"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="windows-i586"/>
+ </antcall>
+ <antcall target="-create-native-distribution" inheritall="true">
+ <param name="platform.name" value="windows-amd64"/>
+ </antcall>
+
+ </target>
+
+ <target name="-create-native-distribution">
+ <unzip dest="${dist.dir}/lib" overwrite="true">
+ <patternset>
+ <include name="**-natives-${platform.name}.jar"/>
+ </patternset>
+ <fileset dir="jogl-dist">
+ <include name="jogl-2.0-webstart.zip"/>
+ <include name="nativewindow-2.0-webstart.zip"/>
+ <include name="newt-2.0-webstart.zip"/>
+ <include name="gluegen-rt-2.0-webstart.zip"/>
+ </fileset>
+ </unzip>
+ <unzip dest="${dist.dir}/lib/natives-${platform.name}" overwrite="true">
+ <patternset>
+ <exclude name="META-INF/**"/>
+ </patternset>
+ <fileset dir="${dist.dir}/lib">
+ <include name="**-natives-${platform.name}.jar"/>
+ </fileset>
+ </unzip>
+ <delete>
+ <fileset dir="${dist.dir}/lib">
+ <include name="**-natives-${platform.name}.jar"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="-jogl-template-post-clean">
+ <echo message="Removing native distibutions"/>
+ <delete dir="${dist.dir}/lib/natives-linux-i586"/>
+ <delete dir="${dist.dir}/lib/natives-linux-amd64"/>
+ <delete dir="${dist.dir}/lib/natives-macosx-ppc"/>
+ <delete dir="${dist.dir}/lib/natives-macosx-universal"/>
+ <delete dir="${dist.dir}/lib/natives-solaris-sparc"/>
+ <delete dir="${dist.dir}/lib/natives-solaris-sparcv9"/>
+ <delete dir="${dist.dir}/lib/natives-solaris-i586"/>
+ <delete dir="${dist.dir}/lib/natives-windows-i586"/>
+ <delete dir="${dist.dir}/lib/natives-windows-amd64"/>
+ </target>
+
+ <!-- remove jogl libraries from jnlp and jars from distribution -->
+ <target name="-jogl-template-jnlp" depends="-jogl-template-test-jnlp-enabled,-jogl-template-patch-master-jnlp,jnlp-impl.jnlp" if="is.jnlp.enabled">
+
+ <!--remove jogl from dist/lib folder-->
+ <antcall target="-jogl-template-post-clean" inheritall="true"/>
+
+ <delete file="${dist.dir}/lib/jogl.all.jar"/>
+ <delete file="${dist.dir}/lib/nativewindow.all.jar"/>
+ <delete file="${dist.dir}/lib/newt.all.jar"/>
+ <delete file="${dist.dir}/lib/gluegen-rt.jar"/>
+
+ <!--remove jogl dependency from jnlp to add it later as jnlp extention-->
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/jogl.all.jar"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/nativewindow.all.jar"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/newt.all.jar"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/gluegen-rt.jar"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/jogl.all.jar" download="eager"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/nativewindow.all.jar" download="eager"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/newt.all.jar" download="eager"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[<jar href="lib/gluegen-rt.jar" download="eager"/>]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${dist.dir}/launch.jnlp">
+ <replacetoken><![CDATA[-Djava.library.path="lib"]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+
+ </target>
+
+ <!--noop in case jnlp-impl.xml is not available-->
+ <target name="jnlp-impl.jnlp" ></target>
+
+ <!--inserts jogl jnlp extensions into the jnlp master-->
+ <target name="-jogl-template-patch-master-jnlp" depends="-jogl-template-check-master-jnlp" if="is.jnlp.unpatched">
+ <replace file="master-${jnlp.descriptor}.jnlp">
+ <replacetoken><![CDATA[</resources>]]></replacetoken>
+ <replacevalue><![CDATA[ <extension name="jogl-all-awt" href="http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-all-awt.jnlp" />
+ </resources>]]></replacevalue>
+ </replace>
+ </target>
+
+ <target name="-jogl-template-check-master-jnlp" if="is.jnlp.enabled">
+ <loadfile property="master.jnlp.content" srcfile="master-${jnlp.descriptor}.jnlp"/>
+ <condition property="is.jnlp.unpatched">
+ <not>
+ <contains string="${master.jnlp.content}" substring='extension name="jogl-all-awt"'/>
+ </not>
+ </condition>
+ </target>
+
+ <target name="-jogl-template-test-jnlp-enabled">
+ <condition property="is.jnlp.enabled">
+ <equals arg1="${jnlp.enabled}" arg2="true" casesensitive="false" trim="true"/>
+ </condition>
+ </target>
+
+ <!-- deploys JOGL and its dependencies to the projects lib folder,
+ platform dependent natives are deployed as well -->
+ <target name="jogl-template-deploy-jogl">
+
+ <echo message="Deploying JOGL"/>
+
+ <unzip src="jogl-dist/jogl-2.0-webstart.zip" dest="lib" overwrite="true">
+ <patternset>
+ <include name="jogl.all.jar"/>
+ <include name="jogl-natives-${natives.platform}.jar"/>
+ </patternset>
+ </unzip>
+ <unzip src="lib/jogl-natives-${natives.platform}.jar" dest="lib" overwrite="true"/>
+ <delete file="lib/jogl-natives-${natives.platform}.jar"/>
+
+ <unzip src="jogl-dist/nativewindow-2.0-webstart.zip" dest="lib" overwrite="true">
+ <patternset>
+ <include name="nativewindow.all.jar"/>
+ <include name="nativewindow-natives-${natives.platform}.jar"/>
+ </patternset>
+ </unzip>
+ <unzip src="lib/nativewindow-natives-${natives.platform}.jar" dest="lib" overwrite="true"/>
+ <delete file="lib/nativewindow-natives-${natives.platform}.jar"/>
+
+ <unzip src="jogl-dist/newt-2.0-webstart.zip" dest="lib" overwrite="true">
+ <patternset>
+ <include name="newt.all.jar"/>
+ <include name="newt-natives-${natives.platform}.jar"/>
+ </patternset>
+ </unzip>
+ <unzip src="lib/newt-natives-${natives.platform}.jar" dest="lib" overwrite="true"/>
+ <delete file="lib/newt-natives-${natives.platform}.jar"/>
+
+ <unzip src="jogl-dist/gluegen-rt-2.0-webstart.zip" dest="lib" overwrite="true">
+ <patternset>
+ <include name="gluegen-rt.jar"/>
+ <include name="gluegen-rt-natives-${natives.platform}.jar"/>
+ </patternset>
+ </unzip>
+ <unzip src="lib/gluegen-rt-natives-${natives.platform}.jar" dest="lib" overwrite="true"/>
+ <delete file="lib/gluegen-rt-natives-${natives.platform}.jar"/>
+ </target>
+
+</project>
diff --git a/src/redbook/nbproject/configs/JWS_generated.properties b/src/redbook/nbproject/configs/JWS_generated.properties new file mode 100644 index 0000000..ec91cd6 --- /dev/null +++ b/src/redbook/nbproject/configs/JWS_generated.properties @@ -0,0 +1,7 @@ +#Sat Sep 05 02:53:57 CEST 2009 +$label=Web Start +$target.debug=jws-debug +compile.on.save.unsupported.javawebstart=true +$target.run=jws-run +main.class=glredbood.JOGLApplet +run.jvmargs= diff --git a/src/redbook/nbproject/genfiles.properties b/src/redbook/nbproject/genfiles.properties new file mode 100644 index 0000000..e3256a4 --- /dev/null +++ b/src/redbook/nbproject/genfiles.properties @@ -0,0 +1,5 @@ +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=f7c0fcba +nbproject/build-impl.xml.script.CRC32=138943b7 +nbproject/[email protected] diff --git a/src/redbook/nbproject/jnlp-impl.xml b/src/redbook/nbproject/jnlp-impl.xml new file mode 100644 index 0000000..497e1f5 --- /dev/null +++ b/src/redbook/nbproject/jnlp-impl.xml @@ -0,0 +1,293 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + +Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. + + +The contents of this file are subject to the terms of either the GNU +General Public License Version 2 only ("GPL") or the Common +Development and Distribution License("CDDL") (collectively, the +"License"). You may not use this file except in compliance with the +License. You can obtain a copy of the License at +http://www.netbeans.org/cddl-gplv2.html +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the +specific language governing permissions and limitations under the +License. When distributing the software, include this License Header +Notice in each file and include the License file at +nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this +particular file as subject to the "Classpath" exception as provided +by Sun in the GPL Version 2 section of the License file that +accompanied this code. If applicable, add the following below the +License Header, with the fields enclosed by brackets [] replaced by +your own identifying information: +"Portions Copyrighted [year] [name of copyright owner]" + +Contributor(s): + +The Original Software is NetBeans. The Initial Developer of the Original +Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun +Microsystems, Inc. All Rights Reserved. + +If you wish your version of this file to be governed by only the CDDL +or only the GPL Version 2, indicate your decision by adding +"[Contributor] elects to include this software in this distribution +under the [CDDL or GPL Version 2] license." If you do not indicate a +single choice of license, a recipient has the option to distribute +your version of this file under either the CDDL, the GPL Version 2 or +to extend the choice of license to its licensees as provided above. +However, if you add GPL Version 2 code and therefore, elected the GPL +Version 2 license, then the option applies only if the new code is +made subject to such option by the copyright holder. +--> + +<project name="jnlp-impl" default="default" basedir=".."> + + <property name="jnlp.file.name.default" value="launch.jnlp"/> + <property name="jnlp.dest.dir" location="dist"/> + + <!-- helper file to create list of arguments, etc. --> + <property name="helper.file" location="helper.txt"/> + + <target name="default"> + <echo message="Default target is not set, you must specify which target you want to run."/> + </target> + + <!-- Main target --> + + <target name="jnlp" depends="-init-filename,-test-jnlp-enabled" if="is.jnlp.enabled"> + <delete file="dist/lib/javaws.jar" failonerror="false"/> + <antcall target="generate-jnlp"/> + <antcall target="generate-html-preview"/> + </target> + + <!-- Init jnlp filename --> + + <target name="-init-filename" depends="-check-filename-prop,-set-jnlp-filename-custom,-set-jnlp-filename-default"/> + + <target name="-set-jnlp-filename-custom" if="jnlp.file.name.set"> + <property name="jnlp.file" value="${jnlp.file.name}"/> + </target> + + <target name="-set-jnlp-filename-default" unless="jnlp.file.name.set"> + <property name="jnlp.file" value="${jnlp.file.name.default}"/> + </target> + + <target name="-check-filename-prop"> + <condition property="jnlp.file.name.set"> + <and> + <isset property="jnlp.file.name"/> + <not> + <equals arg1="jnlp.file.name" arg2="" trim="true"/> + </not> + </and> + </condition> + </target> + + <!-- Test JNLP enabled--> + + <target name="-test-jnlp-enabled"> + <condition property="is.jnlp.enabled"> + <istrue value="${jnlp.enabled}"/> + </condition> + </target> + + <!-- Generating JNLP file --> + + <target name="generate-jnlp" depends="sign-jars,-test-generate-task-available,-unavailable-generate-task" if="generate.task.available"> + <taskdef name="generate-jnlp" classname="org.netbeans.modules.javawebstart.anttasks.GenerateJnlpFileTask" + classpath="${libs.JWSAntTasks.classpath}"/> + <generate-jnlp destfile="${jnlp.dest.dir}/${jnlp.file}_" template="master-${jnlp.descriptor}.jnlp" destdir="dist"/> + <antcall target="-strip-empty-lines"/> + </target> + + <target name="-strip-empty-lines"> + <copy file="${jnlp.dest.dir}/${jnlp.file}_" tofile="${jnlp.dest.dir}/${jnlp.file}" overwrite="true" encoding="UTF-8"> + <filterchain> + <linecontainsregexp> + <regexp pattern=".+"/> + </linecontainsregexp> + </filterchain> + </copy> + <delete file="${jnlp.dest.dir}/${jnlp.file}_" failonerror="false"/> + </target> + + <target name="-test-generate-task-available"> + <available property="generate.task.available" classname="org.netbeans.modules.javawebstart.anttasks.GenerateJnlpFileTask" + classpath="${libs.JWSAntTasks.classpath}"/> + </target> + + <target name="-unavailable-generate-task" unless="generate.task.available"> + <echo message="Task required to generate JNLP file is missing, probably the library 'JWS Ant Tasks' is missing either from shared folder or from IDE installation."/> + <fail/> + </target> + + <!-- Codebase processing --> + + <target name="-codebase-props-check"> + <condition property="local.codebase"> + <or> + <not> + <isset property="jnlp.codebase.type"/> + </not> + <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> + </or> + </condition> + <condition property="non.user.codebase"> + <or> + <not> + <isset property="jnlp.codebase.type"/> + </not> + <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> + <equals arg1="${jnlp.codebase.type}" arg2="web" trim="true"/> + </or> + </condition> + <condition property="user.codebase"> + <equals arg1="${jnlp.codebase.type}" arg2="user" trim="true"/> + </condition> + </target> + + <target name="-init-non-user-codebase" if="non.user.codebase"> + <property name="jnlp.codebase.value" value="${jnlp.codebase.url}"/> + </target> + + <target name="-init-user-codebase" if="user.codebase"> + <property name="jnlp.codebase.value" value="${jnlp.codebase.user}"/> + </target> + + <!-- Security --> + + <target name="-security-props-check"> + <condition property="jnlp.signed.true"> + <istrue value="${jnlp.signed}"/> + </condition> + </target> + + <target name="-jnlp-init-keystore" depends="-jnlp-init-keystore-props,-check-keystore-exists" unless="jnlp.signjar.keystore.exists"> + <echo message="${application.vendor}" file="${helper.file}"/> + <loadfile property="application.vendor.filtered" srcfile="${helper.file}"> + <filterchain> + <deletecharacters chars=","/> + </filterchain> + </loadfile> + <delete file="${helper.file}"/> + <property name="jnlp.signjar.vendor" value="CN=${application.vendor.filtered}"/> + <echo message="Going to create default keystore in ${jnlp.signjar.keystore}"/> + <genkey dname="${jnlp.signjar.vendor}" alias="${jnlp.signjar.alias}" keystore="${jnlp.signjar.keystore}" + storepass="${jnlp.signjar.storepass}" keypass="${jnlp.signjar.keypass}"/> + </target> + + <target name="-check-keystore-exists"> + <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}"/> + </target> + + <target name="-jnlp-init-keystore-props"> + <property name="jnlp.signjar.keystore" value="${basedir}/build/nb-jws.ks"/> + <property name="jnlp.signjar.storepass" value="storepass"/> + <property name="jnlp.signjar.keypass" value="keypass"/> + <property name="jnlp.signjar.alias" value="nb-jws"/> + </target> + + <!-- Signing --> + + <target name="-test-signjars-task-available"> + <available property="signjars.task.available" + classname="org.netbeans.modules.javawebstart.anttasks.SignJarsTask" + classpath="${libs.JWSAntTasks.classpath}"/> + </target> + + <target name="-check-signing-possible" depends="-security-props-check,-test-signjars-task-available,-unavailable-signjars-task"> + <condition property="jnlp.signed.true+signjars.task.available"> + <and> + <isset property="jnlp.signed.true"/> + <isset property="signjars.task.available"/> + </and> + </condition> + </target> + + <target name="-unavailable-signjars-task" depends="-test-signjars-task-available" unless="signjars.task.available"> + <echo message="Task required to sign JAR file is missing, probably the library 'JWS Ant Tasks' is missing either from shared folder or from IDE installation. JAR files will not be signed."/> + </target> + + <target name="sign-jars" depends="-jnlp-init-keystore,-check-signing-possible" if="jnlp.signed.true+signjars.task.available"> + <taskdef name="sign-jars" classname="org.netbeans.modules.javawebstart.anttasks.SignJarsTask" + classpath="${libs.JWSAntTasks.classpath}"/> + <sign-jars keystore="${jnlp.signjar.keystore}" storepass="${jnlp.signjar.storepass}" + keypass="${jnlp.signjar.keypass}" alias="${jnlp.signjar.alias}" mainjar="${dist.jar}" destdir="dist" + codebase="${jnlp.codebase.value}" signedjarsprop="jnlp.signed.jars" + componentsprop="jnlp.components"> + <fileset dir="dist/lib"> + <include name="*.jar"/> + </fileset> + </sign-jars> + </target> + + <!-- Running/Debugging --> + + <target name="jws-run" depends="jar,-verify-jnlp-enabled,-verify-codebase" description="Start javaws execution"> + <exec executable="${java.home}/bin/javaws"> + <arg file="${jnlp.dest.dir}/${jnlp.file}"/> + </exec> + </target> + + <target name="jws-debug" if="netbeans.home" depends="jar,-verify-jnlp-enabled,-verify-codebase,-debug-start-debugger,-debug-javaws-debuggee" + description="Debug javaws project in IDE"/> + + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + + <target name="-debug-javaws-debuggee" depends="-init-debug-args"> + <exec executable="${java.home}/bin/javaws"> + <env key="JAVAWS_VM_ARGS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <arg file="${jnlp.dest.dir}/${jnlp.file}"/> + </exec> + </target> + + <target name="-verify-codebase" depends="-codebase-props-check" unless="local.codebase"> + <fail message="Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution."/> + </target> + + <target name="-verify-jnlp-enabled" depends="-test-jnlp-enabled" unless="is.jnlp.enabled"> + <fail message="Project cannot be run with selected Run Configuration when Java Web Start is disabled."/> + </target> + + <!-- Generate simple HTML preview page --> + + <target name="-check-html-preview"> + <condition property="generate.html.preview"> + <or> + <equals arg1="${jnlp.descriptor}" arg2="application"/> + <equals arg1="${jnlp.descriptor}" arg2="applet"/> + </or> + </condition> + </target> + + <target name="generate-html-preview" depends="-check-html-preview" if="generate.html.preview"> + <copy file="preview-${jnlp.descriptor}.html" tofile="${jnlp.dest.dir}/launch.html" overwrite="true" encoding="UTF-8"> + <filterchain> + <replacestring from="${JNLP.FILE}" to="${jnlp.file}"/> + <replacestring from="${JNLP.APPLET.WIDTH}" to="${jnlp.applet.width}"/> + <replacestring from="${JNLP.APPLET.HEIGHT}" to="${jnlp.applet.height}"/> + </filterchain> + </copy> + </target> + +</project> diff --git a/src/redbook/nbproject/project.properties b/src/redbook/nbproject/project.properties new file mode 100644 index 0000000..173b026 --- /dev/null +++ b/src/redbook/nbproject/project.properties @@ -0,0 +1,106 @@ +#platform to run this project on; supported values: +# linux-i586 +# linux-amd64 +# macosx-ppc +# macosx-universal +# solaris-sparc +# solaris-sparcv9 +# solaris-i586 +# windows-i586 +# windows-amd64 +#natives.platform=linux-amd64 + +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs=-Djava.library.path="lib" -Djava.security.policy=applet.policy + +jogl.webres=http://download.java.net/media/jogl/builds/nightly + +source.reference.jogl.all.jar=jogl-dist/jogl-2.0-src.zip +source.reference.gluegen-rt.jar=jogl-dist/gluegen-rt-2.0-src.zip +source.reference.nativewindow.all.jar=jogl-dist/nativewindow-2.0-src.zip +source.reference.newt.all.jar=jogl-dist/newt-2.0-src.zip + +javadoc.reference.jogl.all.jar=jogl-dist/jogl-2.0-doc.zip!/jogl-2.0-docs/ +javadoc.reference.gluegen-rt.jar=jogl-dist/jogl-2.0-doc.zip!/jogl-2.0-docs/ +javadoc.reference.nativewindow.all.jar=jogl-dist/jogl-2.0-doc.zip!/jogl-2.0-docs/ +javadoc.reference.newt.all.jar=jogl-dist/jogl-2.0-doc.zip!/jogl-2.0-docs/ + +file.reference.gluegen-rt.jar=lib/gluegen-rt.jar +file.reference.jogl.all.jar=lib/jogl.all.jar +file.reference.nativewindow.all.jar=lib/nativewindow.all.jar +file.reference.newt.all.jar=lib/newt.all.jar + +jnlp.applet.class=glredbook.JOGLApplet +jnlp.applet.height=400 +jnlp.applet.width=400 +jnlp.codebase.type=local +jnlp.codebase.url=file:/home/mbien/NetBeansProjects/redbook/dist/ +jnlp.descriptor=applet +jnlp.enabled=true +jnlp.offline-allowed=false +jnlp.signed=false + +ant.customtasks.libs=JWSAntTasks +application.args= +application.title=redbook +application.vendor=mbien +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/RedBook_Samples.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= + +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.jogl.all.jar}:\ + ${file.reference.gluegen-rt.jar}:\ + ${file.reference.nativewindow.all.jar}:\ + ${file.reference.newt.all.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=org.yourorghere.Redbook +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +src.dir=src +test.src.dir=test diff --git a/src/redbook/nbproject/project.xml b/src/redbook/nbproject/project.xml new file mode 100644 index 0000000..3ba8d37 --- /dev/null +++ b/src/redbook/nbproject/project.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"> + <extension file="jnlp-impl.xml" id="jws"> + <dependency dependsOn="jnlp" target="jar"/> + </extension> + </buildExtensions> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>RedBook Samples</name> + <minimum-ant-version>1.6.5</minimum-ant-version> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1"> + <definitions>./lib/nblibraries.properties</definitions> + </libraries> + </configuration> +</project> |