Removed SDK from the Engine repo as it's been extracted in its own repo
@ -1 +0,0 @@
|
||||
X-Comment: Created with jMonkeyPlatform
|
@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="BasicGameTemplate" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project BasicGameTemplate.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="BasicGameTemplate-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
|
||||
</project>
|
@ -1,22 +0,0 @@
|
||||
<jnlp spec="1.0+" codebase="${jnlp.codebase}" href="launch.jnlp">
|
||||
<information>
|
||||
<title>${APPLICATION.TITLE}</title>
|
||||
<vendor>${APPLICATION.VENDOR}</vendor>
|
||||
<homepage href="${APPLICATION.HOMEPAGE}"/>
|
||||
<description>${APPLICATION.DESC}</description>
|
||||
<description kind="short">${APPLICATION.DESC.SHORT}</description>
|
||||
<!--${JNLP.ICONS}-->
|
||||
<!--${JNLP.OFFLINE.ALLOWED}-->
|
||||
</information>
|
||||
<!--${JNLP.SECURITY}-->
|
||||
<resources>
|
||||
<!--${JNLP.RESOURCES.RUNTIME}-->
|
||||
<!--${JNLP.RESOURCES.MAIN.JAR}-->
|
||||
<!--${JNLP.RESOURCES.JARS}-->
|
||||
<jar href='lib/assets.jar'/>
|
||||
<!--${JNLP.RESOURCES.EXTENSIONS}-->
|
||||
</resources>
|
||||
<application-desc main-class="${jnlp.main.class}">
|
||||
<!--${JNLP.APPLICATION.ARGS}-->
|
||||
</application-desc>
|
||||
</jnlp>
|
@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=94bf7c61
|
||||
build.xml.script.CRC32=79a29eb7
|
||||
build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45
|
||||
# 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=1ac6e2f9
|
||||
nbproject/build-impl.xml.script.CRC32=28b1a2c2
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48
|
@ -1,92 +0,0 @@
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
annotation.processing.run.all.processors=true
|
||||
application.title=MyGame
|
||||
application.vendor=MyCompany
|
||||
assets.jar.name=assets.jar
|
||||
assets.excludes=**/*.j3odata,**/*.mesh,**/*.skeleton,**/*.mesh\.xml,**/*.skeleton\.xml,**/*.scene,**/*.material,**/*.obj,**/*.mtl,**/*.3ds,**/*.dae,**/*.blend,**/*.blend*[0-9]
|
||||
assets.folder.name=assets
|
||||
assets.compress=true
|
||||
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
|
||||
compile.on.save=true
|
||||
# Uncomment to specify the preferred debugger connection transport:
|
||||
#debug.transport=dt_socket
|
||||
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}/${application.title}.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${libs.jme3-jogg.classpath}:\
|
||||
${libs.jme3-blender.classpath}:\
|
||||
${libs.jme3-networking.classpath}:\
|
||||
${libs.jme3-plugins.classpath}:\
|
||||
${libs.jme3-core.classpath}:\
|
||||
${libs.jme3-desktop.classpath}:\
|
||||
${libs.jme3-lwjgl.classpath}:\
|
||||
${libs.jme3-niftygui.classpath}:\
|
||||
${libs.jme3-effects.classpath}:\
|
||||
${libs.jme3-terrain.classpath}:\
|
||||
${libs.jme3-jbullet.classpath}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.6
|
||||
javac.target=1.6
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
|
||||
jnlp.codebase.type=local
|
||||
jnlp.descriptor=application
|
||||
jnlp.enabled=false
|
||||
jnlp.offline-allowed=false
|
||||
jnlp.signed=false
|
||||
main.class=mygame.Main
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
manifest.file=MANIFEST.MF
|
||||
mkdist.disabled=false
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${assets.folder.name}
|
||||
# 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=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
@ -1,18 +0,0 @@
|
||||
<?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="assets-impl.xml" id="assets">
|
||||
<dependency dependsOn="-init-assets" target="-do-init"/>
|
||||
</extension>
|
||||
</buildExtensions>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>BasicGameTemplate</name>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
@ -1,43 +0,0 @@
|
||||
package mygame;
|
||||
|
||||
import com.jme3.app.SimpleApplication;
|
||||
import com.jme3.material.Material;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.jme3.renderer.RenderManager;
|
||||
import com.jme3.scene.Geometry;
|
||||
import com.jme3.scene.shape.Box;
|
||||
|
||||
/**
|
||||
* test
|
||||
* @author normenhansen
|
||||
*/
|
||||
public class Main extends SimpleApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Main app = new Main();
|
||||
app.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void simpleInitApp() {
|
||||
Box b = new Box(1, 1, 1);
|
||||
Geometry geom = new Geometry("Box", b);
|
||||
|
||||
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
|
||||
mat.setColor("Color", ColorRGBA.Blue);
|
||||
geom.setMaterial(mat);
|
||||
|
||||
rootNode.attachChild(geom);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void simpleUpdate(float tpf) {
|
||||
//TODO: add update code
|
||||
}
|
||||
|
||||
@Override
|
||||
public void simpleRender(RenderManager rm) {
|
||||
//TODO: add render code
|
||||
}
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="JME3TestsTemplate" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project JME3TestsTemplate.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar: JAR building
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="JME3TestsTemplate-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
@ -1,880 +0,0 @@
|
||||
<?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="JME3TestsTemplate-impl">
|
||||
<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-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-user" name="-init-project">
|
||||
<property file="nbproject/configs/${config}.properties"/>
|
||||
<property file="nbproject/project.properties"/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
|
||||
<available file="${manifest.file}" property="manifest.available"/>
|
||||
<available file="${application.splash}" property="splashscreen.available"/>
|
||||
<condition property="main.class.available">
|
||||
<and>
|
||||
<isset property="main.class"/>
|
||||
<not>
|
||||
<equals arg1="${main.class}" arg2="" trim="true"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<isset property="main.class.available"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.mkdist">
|
||||
<and>
|
||||
<isset property="libs.CopyLibs.classpath"/>
|
||||
<not>
|
||||
<istrue value="${mkdist.disabled}"/>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<isset property="do.mkdist"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available}"/>
|
||||
<istrue value="${splashscreen.available}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive">
|
||||
<not>
|
||||
<istrue value="${jar.archive.disabled}"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available">
|
||||
<and>
|
||||
<isset property="manifest.available"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class+mkdist.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
|
||||
<and>
|
||||
<istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
|
||||
<istrue value="${do.archive}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="have.tests">
|
||||
<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}"/>
|
||||
<property name="runtime.encoding" value="${source.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>
|
||||
<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
|
||||
<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
|
||||
<length length="0" string="${endorsed.classpath}" when="greater"/>
|
||||
</condition>
|
||||
<property name="javac.fork" value="false"/>
|
||||
<property name="jar.index" value="false"/>
|
||||
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
|
||||
</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-user,-init-project,-do-init" name="-init-check">
|
||||
<fail unless="src.dir">Must set 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 depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
|
||||
<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="${javac.processorpath}" name="processorpath"/>
|
||||
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
|
||||
<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}"/>
|
||||
<mkdir dir="@{apgeneratedsrcdir}"/>
|
||||
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
||||
<src>
|
||||
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
||||
<include name="*"/>
|
||||
</dirset>
|
||||
</src>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<compilerarg line="${javac.compilerargs}"/>
|
||||
<compilerarg value="-processorpath"/>
|
||||
<compilerarg path="@{processorpath}:${empty.dir}"/>
|
||||
<compilerarg line="${ap.processors.internal}"/>
|
||||
<compilerarg line="${annotation.processing.processor.options}"/>
|
||||
<compilerarg value="-s"/>
|
||||
<compilerarg path="@{apgeneratedsrcdir}"/>
|
||||
<compilerarg line="${ap.proc.none.internal}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
|
||||
<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="${javac.processorpath}" name="processorpath"/>
|
||||
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
|
||||
<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}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
|
||||
<src>
|
||||
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
|
||||
<include name="*"/>
|
||||
</dirset>
|
||||
</src>
|
||||
<classpath>
|
||||
<path path="@{classpath}"/>
|
||||
</classpath>
|
||||
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<compilerarg line="${javac.compilerargs}"/>
|
||||
<customize/>
|
||||
</javac>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
|
||||
<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" tempdir="${build.dir}">
|
||||
<batchtest todir="${build.test.results.dir}"/>
|
||||
<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="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<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="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<jvmarg line="${debug-args-line}"/>
|
||||
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.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 line="${endorsed.classpath.cmd.line.arg}"/>
|
||||
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
||||
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.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-copylibs">
|
||||
<macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<element name="customize" optional="true"/>
|
||||
<sequential>
|
||||
<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}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Class-Path" value="${jar.classpath}"/>
|
||||
<customize/>
|
||||
</manifest>
|
||||
</copylibs>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
</target>
|
||||
<target name="-init-presetdef-jar">
|
||||
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
|
||||
<j2seproject1:fileset dir="${build.classes.dir}"/>
|
||||
</jar>
|
||||
</presetdef>
|
||||
</target>
|
||||
<target name="-init-ap-cmdline-properties">
|
||||
<property name="annotation.processing.enabled" value="true"/>
|
||||
<property name="annotation.processing.processors.list" value=""/>
|
||||
<property name="annotation.processing.processor.options" value=""/>
|
||||
<property name="annotation.processing.run.all.processors" value="true"/>
|
||||
<property name="javac.processorpath" value="${javac.classpath}"/>
|
||||
<property name="javac.test.processorpath" value="${javac.test.classpath}"/>
|
||||
<condition property="ap.supported.internal" value="true">
|
||||
<not>
|
||||
<matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
|
||||
<condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
|
||||
<isfalse value="${annotation.processing.run.all.processors}"/>
|
||||
</condition>
|
||||
<condition else="" property="ap.proc.none.internal" value="-proc:none">
|
||||
<isfalse value="${annotation.processing.enabled}"/>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
|
||||
<property name="ap.cmd.line.internal" value=""/>
|
||||
</target>
|
||||
<target depends="-pre-init,-init-private,-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,-init-ap-cmdline" name="init"/>
|
||||
<!--
|
||||
===================
|
||||
COMPILATION SECTION
|
||||
===================
|
||||
-->
|
||||
<target name="-deps-jar-init" unless="built-jar.properties">
|
||||
<property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
|
||||
<delete file="${built-jar.properties}" quiet="true"/>
|
||||
</target>
|
||||
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
|
||||
<echo level="warn" message="Cycle detected: JME3TestsTemplate was already built"/>
|
||||
</target>
|
||||
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<touch file="${built-jar.properties}" verbose="false"/>
|
||||
<property file="${built-jar.properties}" prefix="already.built.jar."/>
|
||||
<antcall target="-warn-already-built-jar"/>
|
||||
<propertyfile file="${built-jar.properties}">
|
||||
<entry key="${basedir}" value=""/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
<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, -copy-persistence-xml,-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 if="has.persistence.xml" name="-copy-persistence-xml">
|
||||
<mkdir dir="${build.classes.dir}/META-INF"/>
|
||||
<copy todir="${build.classes.dir}/META-INF">
|
||||
<fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
|
||||
</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" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
|
||||
<j2seproject1:jar/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+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="do.archive+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,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
|
||||
<basename file="${application.splash}" property="splashscreen.basename"/>
|
||||
<mkdir dir="${build.classes.dir}/META-INF"/>
|
||||
<copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
|
||||
<j2seproject3:copylibs>
|
||||
<customize>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
|
||||
</customize>
|
||||
</j2seproject3: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,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
|
||||
<j2seproject3:copylibs>
|
||||
<customize>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
</customize>
|
||||
</j2seproject3: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 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-and-splashscreen,-do-jar-with-libraries,-post-jar" 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,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,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,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,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" if="have.sources" 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>
|
||||
<copy todir="${dist.javadoc.dir}">
|
||||
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
||||
<filename name="**/doc-files/**"/>
|
||||
</fileset>
|
||||
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
|
||||
<include name="**/doc-files/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</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=""/>
|
||||
</target>
|
||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
|
||||
<j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir=""/>
|
||||
<copy todir="${build.test.classes.dir}"/>
|
||||
</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 apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="" srcdir=""/>
|
||||
<copy todir="${build.test.classes.dir}"/>
|
||||
</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,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,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 name="-deps-clean-init" unless="built-clean.properties">
|
||||
<property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
|
||||
<delete file="${built-clean.properties}" quiet="true"/>
|
||||
</target>
|
||||
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
|
||||
<echo level="warn" message="Cycle detected: JME3TestsTemplate was already built"/>
|
||||
</target>
|
||||
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<touch file="${built-clean.properties}" verbose="false"/>
|
||||
<property file="${built-clean.properties}" prefix="already.built.clean."/>
|
||||
<antcall target="-warn-already-built-clean"/>
|
||||
<propertyfile file="${built-clean.properties}">
|
||||
<entry key="${basedir}" value=""/>
|
||||
</propertyfile>
|
||||
</target>
|
||||
<target depends="init" name="-do-clean">
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
|
||||
</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"/>
|
||||
<target name="-check-call-dep">
|
||||
<property file="${call.built.properties}" prefix="already.built."/>
|
||||
<condition property="should.call.dep">
|
||||
<not>
|
||||
<isset property="already.built.${call.subproject}"/>
|
||||
</not>
|
||||
</condition>
|
||||
</target>
|
||||
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
|
||||
<ant antfile="${call.script}" inheritall="false" target="${call.target}">
|
||||
<propertyset>
|
||||
<propertyref prefix="transfer."/>
|
||||
<mapper from="transfer.*" to="*" type="glob"/>
|
||||
</propertyset>
|
||||
</ant>
|
||||
</target>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=0f706f4a
|
||||
build.xml.script.CRC32=82b8b23d
|
||||
build.xml.stylesheet.CRC32=8064a381@1.75.2.48
|
||||
# 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=0f706f4a
|
||||
nbproject/build-impl.xml.script.CRC32=46d1a69a
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
|
@ -1,83 +0,0 @@
|
||||
application.title=JME3TestsTemplate
|
||||
application.vendor=jMonkeyEngine
|
||||
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
|
||||
# Uncomment to specify the preferred debugger connection transport:
|
||||
#debug.transport=dt_socket
|
||||
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}/JME3TestsTemplate.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${libs.jme3-jogg.classpath}:\
|
||||
${libs.jme3-blender.classpath}:\
|
||||
${libs.jme3-networking.classpath}:\
|
||||
${libs.jme3-plugins.classpath}:\
|
||||
${libs.jme3-core.classpath}:\
|
||||
${libs.jme3-desktop.classpath}:\
|
||||
${libs.jme3-lwjgl.classpath}:\
|
||||
${libs.jme3-niftygui.classpath}:\
|
||||
${libs.jme3-effects.classpath}:\
|
||||
${libs.jme3-terrain.classpath}:\
|
||||
${libs.jme3-jbullet.classpath}:\
|
||||
${libs.jme3-test-data.classpath}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.source=1.6
|
||||
javac.target=1.6
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
|
||||
jnlp.applet.class=jme3test.awt.TestApplet
|
||||
jnlp.applet.height=300
|
||||
jnlp.applet.width=300
|
||||
jnlp.codebase.type=local
|
||||
jnlp.descriptor=application
|
||||
jnlp.enabled=false
|
||||
jnlp.offline-allowed=false
|
||||
jnlp.signed=false
|
||||
main.class=jme3test.TestChooser
|
||||
manifest.file=manifest.mf
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# 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=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>JME3TestsTemplate</name>
|
||||
<source-roots>
|
||||
<root id="src.dir" name="JME3 Examples"/>
|
||||
</source-roots>
|
||||
<test-roots/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
@ -1 +0,0 @@
|
||||
X-Comment: Created with jMonkeyPlatform
|
@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="BasicGameTemplate" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project BasicGameTemplate.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="BasicGameTemplate-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
|
||||
</project>
|
@ -1,22 +0,0 @@
|
||||
<jnlp spec="1.0+" codebase="${jnlp.codebase}" href="launch.jnlp">
|
||||
<information>
|
||||
<title>${APPLICATION.TITLE}</title>
|
||||
<vendor>${APPLICATION.VENDOR}</vendor>
|
||||
<homepage href="${APPLICATION.HOMEPAGE}"/>
|
||||
<description>${APPLICATION.DESC}</description>
|
||||
<description kind="short">${APPLICATION.DESC.SHORT}</description>
|
||||
<!--${JNLP.ICONS}-->
|
||||
<!--${JNLP.OFFLINE.ALLOWED}-->
|
||||
</information>
|
||||
<!--${JNLP.SECURITY}-->
|
||||
<resources>
|
||||
<!--${JNLP.RESOURCES.RUNTIME}-->
|
||||
<!--${JNLP.RESOURCES.MAIN.JAR}-->
|
||||
<!--${JNLP.RESOURCES.JARS}-->
|
||||
<jar href='lib/assets.jar'/>
|
||||
<!--${JNLP.RESOURCES.EXTENSIONS}-->
|
||||
</resources>
|
||||
<application-desc main-class="${jnlp.main.class}">
|
||||
<!--${JNLP.APPLICATION.ARGS}-->
|
||||
</application-desc>
|
||||
</jnlp>
|
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.jmonkeyengine.tests">
|
||||
<application android:label="@string/app_name">
|
||||
<activity android:label="@string/app_name" android:name="MainActivity" android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:label="@string/app_name" android:name="TestsHarness" android:launchMode="singleTask" android:screenOrientation="landscape">
|
||||
</activity>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="8"/>
|
||||
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
|
||||
</manifest>
|
@ -1,17 +0,0 @@
|
||||
# This file is used to override default values used by the Ant build system.
|
||||
#
|
||||
# This file must be checked into Version Control Systems, as it is
|
||||
# integral to the build system of your project.
|
||||
|
||||
# This file is only used by the Ant script.
|
||||
|
||||
# You can use this to override default values such as
|
||||
# 'source.dir' for the location of your java source folder and
|
||||
# 'out.dir' for the location of your output folder.
|
||||
|
||||
# You can also use it define how the release builds are signed by declaring
|
||||
# the following properties:
|
||||
# 'key.store' for the location of your keystore and
|
||||
# 'key.alias' for the name of the key to use.
|
||||
# The password will be asked during the build when you use the 'release' target.
|
||||
|
@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="jMonkeyEngine Test Applications" default="help">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<property file="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- if sdk.dir was not set from one of the property file, then
|
||||
get it from the ANDROID_HOME env var.
|
||||
This must be done before we load project.properties since
|
||||
the proguard config can use sdk.dir -->
|
||||
<property environment="env" />
|
||||
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
|
||||
<isset property="env.ANDROID_HOME" />
|
||||
</condition>
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
<!--
|
||||
Import per project custom build rules if present at the root of the project.
|
||||
This is the place to put custom intermediary targets such as:
|
||||
-pre-build
|
||||
-pre-compile
|
||||
-post-compile (This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir})
|
||||
-post-package
|
||||
-post-build
|
||||
-pre-clean
|
||||
-->
|
||||
<import file="custom_rules.xml" optional="true" />
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
@ -1,20 +0,0 @@
|
||||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
@ -1,14 +0,0 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-8
|
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 124 B |
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World, MainActivity"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
@ -1,119 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layoutTestChooser"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#FFFFFF"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/strLblTitle"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000000"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutFilter"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/lblTitle"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblFindTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/strLblFindTitle"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000000"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/txtFilter"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="@string/strTxtFilterHint"
|
||||
android:inputType="text"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000000"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutButtons"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnOK"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/strBtnOK"
|
||||
android:layout_marginRight="20dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000000"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnCancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/strBtnCancel"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="#000000"
|
||||
/>
|
||||
<requestFocus/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/layoutButtons"
|
||||
android:layout_below="@id/layoutFilter"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/selected"
|
||||
>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listClasses"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:choiceMode="singleChoice"
|
||||
android:listSelector="@drawable/selected"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:scrollbars="vertical"
|
||||
android:fadeScrollbars="false"
|
||||
android:textFilterEnabled="true"
|
||||
>
|
||||
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layoutTestChooserRow"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:padding="10dp">
|
||||
|
||||
<!--
|
||||
<ImageView android:id="@+id/imgIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
-->
|
||||
|
||||
<TextView android:id="@+id/txtClassName"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:textStyle="bold"
|
||||
android:textSize="22sp"
|
||||
android:textColor="#000000"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
|
||||
</LinearLayout>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/optionEnableMouseEvents"
|
||||
android:title="@string/strOptionEnableMouseEventsTitle"
|
||||
/>
|
||||
<item android:id="@+id/optionEnableJoystickEvents"
|
||||
android:title="@string/strOptionEnableJoystickEventsTitle" />
|
||||
</menu>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<!-- Main Application Title -->
|
||||
<string name="app_name">jMonkeyEngine Test Applications</string>
|
||||
|
||||
<!-- MainActivity UIF Labels -->
|
||||
<string name="strLblTitle">Choose a demo to start:</string>
|
||||
<string name="strLblFindTitle">Find:</string>
|
||||
<string name="strTxtFilterHint">Enter a Filter</string>
|
||||
<string name="strBtnOK">OK</string>
|
||||
<string name="strBtnCancel">Cancel</string>
|
||||
|
||||
<!-- MainActivity Menu Labels -->
|
||||
<string name="strOptionEnableMouseEventsTitle">Enable Mouse Events</string>
|
||||
<string name="strOptionDisableMouseEventsTitle">Disable Mouse Events</string>
|
||||
<string name="strOptionEnableJoystickEventsTitle">Enable Joystick Events</string>
|
||||
<string name="strOptionDisableJoystickEventsTitle">Disable Joystick Events</string>
|
||||
</resources>
|
@ -1,169 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.jmonkeyengine.tests;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CustomArrayAdapter extends ArrayAdapter<String> {
|
||||
private static final String TAG = "CustomArrayAdapter";
|
||||
|
||||
/* List of items */
|
||||
private List<String> entries;
|
||||
private Context activity;
|
||||
|
||||
/* Position of selected answer */
|
||||
private int selectedPosition = -1;
|
||||
/* Background Color of selected item */
|
||||
private int selectedBackgroundColor = 0xffff00;
|
||||
/* Background Color of non selected item */
|
||||
private int nonselectedBackgroundColor = 0x000000;
|
||||
/* Background Drawable Resource ID of selected item */
|
||||
private int selectedBackgroundResource = 0;
|
||||
/* Background Drawable Resource ID of non selected items */
|
||||
private int nonselectedBackgroundResource = 0;
|
||||
|
||||
/* Variables to support list filtering */
|
||||
private ArrayList<String> filteredEntries;
|
||||
private Filter filter;
|
||||
|
||||
public CustomArrayAdapter(Context context, int textViewResourceId, List<String> objects) {
|
||||
super(context, textViewResourceId, objects);
|
||||
activity = context;
|
||||
entries = new ArrayList<String>(objects);
|
||||
filteredEntries = new ArrayList<String>(objects);
|
||||
filter = new ClassNameFilter();
|
||||
}
|
||||
|
||||
/** Setter for selected item position */
|
||||
public void setSelectedPosition(int selectedPosition) {
|
||||
this.selectedPosition = selectedPosition;
|
||||
Log.i(TAG, "Setting position to: " + this.selectedPosition);
|
||||
}
|
||||
|
||||
/** Setter for selected item background color */
|
||||
public void setSelectedBackgroundColor(int selectedBackgroundColor) {
|
||||
this.selectedBackgroundColor = selectedBackgroundColor;
|
||||
}
|
||||
|
||||
/** Setter for non selected background color */
|
||||
public void setNonSelectedBackgroundColor(int nonselectedBackgroundColor) {
|
||||
this.nonselectedBackgroundColor = nonselectedBackgroundColor;
|
||||
}
|
||||
|
||||
/** Setter for selected item background resource id*/
|
||||
public void setSelectedBackgroundResource(int selectedBackgroundResource) {
|
||||
this.selectedBackgroundResource = selectedBackgroundResource;
|
||||
}
|
||||
|
||||
/** Setter for non selected background resource id*/
|
||||
public void setNonSelectedBackgroundResource(int nonselectedBackgroundResource) {
|
||||
this.nonselectedBackgroundResource = nonselectedBackgroundResource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
Log.i(TAG, "getView for position: " + position + " with selectedItem: " + selectedPosition);
|
||||
|
||||
View v = convertView;
|
||||
ViewHolder holder;
|
||||
if (v == null) {
|
||||
LayoutInflater vi =
|
||||
(LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
v = vi.inflate(R.layout.test_chooser_row, null);
|
||||
holder = new ViewHolder();
|
||||
holder.textView = (TextView) v.findViewById(R.id.txtClassName);
|
||||
holder.layoutRow = (LinearLayout) v.findViewById(R.id.layoutTestChooserRow);
|
||||
v.setTag(holder);
|
||||
} else {
|
||||
holder=(ViewHolder)v.getTag();
|
||||
}
|
||||
|
||||
final String itemText = filteredEntries.get(position);
|
||||
if (itemText != null) {
|
||||
holder.textView.setText(itemText);
|
||||
if (position == selectedPosition) {
|
||||
Log.i(TAG, "setting Background Color to: " + selectedBackgroundColor);
|
||||
// holder.textView.setBackgroundColor(selectedBackgroundColor);
|
||||
// holder.textView.setBackgroundResource(selectedBackgroundResource);
|
||||
holder.layoutRow.setBackgroundResource(selectedBackgroundResource);
|
||||
} else {
|
||||
Log.i(TAG, "setting Background Color to: " + nonselectedBackgroundColor);
|
||||
// holder.textView.setBackgroundColor(nonselectedBackgroundColor);
|
||||
// holder.textView.setBackgroundResource(nonselectedBackgroundResource);
|
||||
holder.layoutRow.setBackgroundResource(nonselectedBackgroundResource);
|
||||
}
|
||||
}
|
||||
return v;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getFilter(){
|
||||
if(filter == null){
|
||||
filter = new ClassNameFilter();
|
||||
}
|
||||
return filter;
|
||||
}
|
||||
|
||||
public static class ViewHolder{
|
||||
public TextView textView;
|
||||
public LinearLayout layoutRow;
|
||||
}
|
||||
|
||||
private class ClassNameFilter extends Filter{
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence constraint){
|
||||
FilterResults results = new FilterResults();
|
||||
String prefix = constraint.toString().toLowerCase();
|
||||
Log.i(TAG, "performFiltering: entries size: " + entries.size());
|
||||
if (prefix == null || prefix.length() == 0){
|
||||
ArrayList<String> list = new ArrayList<String>(entries);
|
||||
results.values = list;
|
||||
results.count = list.size();
|
||||
Log.i(TAG, "clearing filter with size: " + list.size());
|
||||
}else{
|
||||
final ArrayList<String> list = new ArrayList<String>(entries);
|
||||
final ArrayList<String> nlist = new ArrayList<String>();
|
||||
int count = list.size();
|
||||
|
||||
for (int i = 0; i<count; i++){
|
||||
if(list.get(i).toLowerCase().contains(prefix)){
|
||||
nlist.add(list.get(i));
|
||||
}
|
||||
results.values = nlist;
|
||||
results.count = nlist.size();
|
||||
}
|
||||
Log.i(TAG, "filtered list size: " + nlist.size() + ", entries size: " + entries.size());
|
||||
}
|
||||
Log.i(TAG, "Returning filter count: " + results.count);
|
||||
return results;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
filteredEntries = (ArrayList<String>)results.values;
|
||||
notifyDataSetChanged();
|
||||
clear();
|
||||
int count = filteredEntries.size();
|
||||
for(int i = 0; i<count; i++){
|
||||
add(filteredEntries.get(i));
|
||||
notifyDataSetInvalidated();
|
||||
}
|
||||
Log.i(TAG, "publishing results with size: " + count);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,390 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.jmonkeyengine.tests;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import com.jme3.app.Application;
|
||||
import dalvik.system.DexFile;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
//TODO: Create onscreen virtual keypad for triggering normal mapped keys used by test apps or modify test apps for touch with onscreen keypad
|
||||
|
||||
/**
|
||||
* Main Activity started by the application. Users select different jME3 test
|
||||
* applications that are started via TestsHarness Activity.
|
||||
* @author iwgeric
|
||||
*/
|
||||
public class MainActivity extends Activity implements OnItemClickListener, View.OnClickListener, TextWatcher {
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
/**
|
||||
* Static String to pass the key for the selected test app to the
|
||||
* TestsHarness class to start the application. Also used to store the
|
||||
* current selection to the savedInstanceState Bundle.
|
||||
*/
|
||||
public static final String SELECTED_APP_CLASS = "Selected_App_Class";
|
||||
|
||||
/**
|
||||
* Static String to pass the key for the selected list position to the
|
||||
* savedInstanceState Bundle so the list position can be restored after
|
||||
* exiting the test application.
|
||||
*/
|
||||
public static final String SELECTED_LIST_POSITION = "Selected_List_Position";
|
||||
|
||||
/**
|
||||
* Static String to pass the key for the setting for enabling mouse events to the
|
||||
* savedInstanceState Bundle.
|
||||
*/
|
||||
public static final String ENABLE_MOUSE_EVENTS = "Enable_Mouse_Events";
|
||||
|
||||
/**
|
||||
* Static String to pass the key for the setting for enabling joystick events to the
|
||||
* savedInstanceState Bundle.
|
||||
*/
|
||||
public static final String ENABLE_JOYSTICK_EVENTS = "Enable_Joystick_Events";
|
||||
|
||||
/* Fields to contain the current position and display contents of the spinner */
|
||||
private int currentPosition = 0;
|
||||
private String currentSelection = "";
|
||||
private List<String> classNames = new ArrayList<String>();
|
||||
private List<String> exclusions = new ArrayList<String>();
|
||||
private String rootPackage;
|
||||
|
||||
/* ListView that displays the test application class names. */
|
||||
private ListView listClasses;
|
||||
|
||||
/* ArrayAdapter connects the spinner widget to array-based data. */
|
||||
private CustomArrayAdapter arrayAdapter;
|
||||
|
||||
/* Buttons to start application or stop the activity. */
|
||||
private Button btnOK;
|
||||
private Button btnCancel;
|
||||
|
||||
/* Filter Edit Box */
|
||||
EditText editFilterText;
|
||||
|
||||
/* Custom settings for the test app */
|
||||
private boolean enableMouseEvents = true;
|
||||
private boolean enableJoystickEvents = false;
|
||||
|
||||
|
||||
/**
|
||||
* Called when the activity is first created.
|
||||
*/
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
Log.i(TAG, "Restoring selections in onCreate: "
|
||||
+ "position: " + savedInstanceState.getInt(SELECTED_LIST_POSITION, 0)
|
||||
+ "class: " + savedInstanceState.getString(SELECTED_APP_CLASS)
|
||||
);
|
||||
currentPosition = savedInstanceState.getInt(SELECTED_LIST_POSITION, 0);
|
||||
currentSelection = savedInstanceState.getString(SELECTED_APP_CLASS);
|
||||
enableMouseEvents = savedInstanceState.getBoolean(ENABLE_MOUSE_EVENTS, true);
|
||||
enableJoystickEvents = savedInstanceState.getBoolean(ENABLE_JOYSTICK_EVENTS, false);
|
||||
}
|
||||
|
||||
|
||||
/* Set content view and register views */
|
||||
setContentView(R.layout.test_chooser_layout);
|
||||
btnOK = (Button) findViewById(R.id.btnOK);
|
||||
btnCancel = (Button) findViewById(R.id.btnCancel);
|
||||
listClasses = (ListView) findViewById(R.id.listClasses);
|
||||
editFilterText = (EditText) findViewById(R.id.txtFilter);
|
||||
|
||||
|
||||
/* Define the root package to start with */
|
||||
rootPackage = "jme3test";
|
||||
|
||||
/* Create an array of Strings to define which classes to exclude */
|
||||
exclusions.add("$"); // inner classes
|
||||
exclusions.add("TestChooser"); // Desktop test chooser class
|
||||
exclusions.add("awt"); // Desktop test chooser class
|
||||
|
||||
// mExclusions.add("");
|
||||
|
||||
/*
|
||||
* Read the class names from the dex file and filter based on
|
||||
* name and super class.
|
||||
*/
|
||||
|
||||
Log.i(TAG, "Composing Test list...");
|
||||
|
||||
ApplicationInfo ai = this.getApplicationInfo();
|
||||
String classPath = ai.sourceDir;
|
||||
DexFile dex = null;
|
||||
Enumeration<String> apkClassNames = null;
|
||||
try {
|
||||
dex = new DexFile(classPath);
|
||||
apkClassNames = dex.entries();
|
||||
while (apkClassNames.hasMoreElements()) {
|
||||
String className = apkClassNames.nextElement();
|
||||
if (checkClassName(className) && checkClassType(className)) {
|
||||
classNames.add(className);
|
||||
}
|
||||
// classNames.add(className);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
dex.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a backing Adapter for the List View from a list of the
|
||||
* classes. The list is defined by array of class names.
|
||||
*/
|
||||
arrayAdapter = new CustomArrayAdapter(
|
||||
this,
|
||||
R.layout.test_chooser_row, // text view to display selection
|
||||
classNames // array of strings to display
|
||||
);
|
||||
|
||||
/* Set the resource id for selected and non selected backgrounds */
|
||||
Log.i(TAG, "Setting Adapter Background Resource IDs");
|
||||
arrayAdapter.setSelectedBackgroundResource(R.drawable.selected);
|
||||
arrayAdapter.setNonSelectedBackgroundResource(R.drawable.nonselected);
|
||||
|
||||
/* Attach the Adapter to the spinner */
|
||||
Log.i(TAG, "Setting ListView Adapter");
|
||||
listClasses.setAdapter(arrayAdapter);
|
||||
|
||||
/* Set initial selection for the list */
|
||||
setSelection(currentPosition);
|
||||
|
||||
/* Set Click and Text Changed listeners */
|
||||
listClasses.setOnItemClickListener(this);
|
||||
btnOK.setOnClickListener(this);
|
||||
btnCancel.setOnClickListener(this);
|
||||
editFilterText.addTextChangedListener(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* User selected an application. Sets the current selection and redraws
|
||||
* the list view to highlight the selected item.
|
||||
* @param parent AdapterView tied to the list
|
||||
* @param view The ListView
|
||||
* @param position Selection position in the list of class names
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
setSelection(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* User clicked a view on the screen. Check for the OK and Cancel buttons
|
||||
* and either start the applicaiton or exit.
|
||||
* @param view
|
||||
*/
|
||||
public void onClick(View view) {
|
||||
if (view.equals(btnOK)) {
|
||||
/* Get selected class, pack it in the intent and start the test app */
|
||||
Log.i(TAG, "User selected OK for class: " + currentSelection);
|
||||
Intent intent = new Intent(this, TestsHarness.class);
|
||||
intent.putExtra(SELECTED_APP_CLASS, currentSelection);
|
||||
intent.putExtra(ENABLE_MOUSE_EVENTS, enableMouseEvents);
|
||||
intent.putExtra(ENABLE_JOYSTICK_EVENTS, enableJoystickEvents);
|
||||
startActivity(intent);
|
||||
} else if (view.equals(btnCancel)) {
|
||||
/* Exit */
|
||||
Log.i(TAG, "User selected Cancel");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check class name to see if the class is in the root package and if it
|
||||
* contains any of the exclusion strings
|
||||
* @param className Class name to check
|
||||
* @return true if the check passes, false otherwise
|
||||
*/
|
||||
private boolean checkClassName(String className) {
|
||||
boolean include = true;
|
||||
/* check to see if the class in inside the rootPackage package */
|
||||
if (className.startsWith(rootPackage)) {
|
||||
/* check to see if the class contains any of the exlusion strings */
|
||||
for (int i = 0; i < exclusions.size(); i++) {
|
||||
if (className.contains(exclusions.get(i))) {
|
||||
Log.i(TAG, "Skipping Class " + className + ". Includes exclusion string: " + exclusions.get(i) + ".");
|
||||
include = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
include = false;
|
||||
Log.i(TAG, "Skipping Class " + className + ". Not in the root package: " + rootPackage + ".");
|
||||
}
|
||||
return include;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the class extends Application or SimpleApplication
|
||||
* @param className Class name to check
|
||||
* @return true if the check passes, false otherwise
|
||||
*/
|
||||
private boolean checkClassType(String className) {
|
||||
boolean include = true;
|
||||
try {
|
||||
Class<?> clazz = (Class<?>)Class.forName(className);
|
||||
if (Application.class.isAssignableFrom(clazz)) {
|
||||
Log.i(TAG, "Class " + className + " is a jME Application");
|
||||
} else {
|
||||
include = false;
|
||||
Log.i(TAG, "Skipping Class " + className + ". Not a jME Application");
|
||||
}
|
||||
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
include = false;
|
||||
Log.i(TAG, "Skipping Class " + className + ". Class not found.");
|
||||
}
|
||||
return include;
|
||||
}
|
||||
|
||||
private void setSelection(int position) {
|
||||
if (position == -1) {
|
||||
arrayAdapter.setSelectedPosition(-1);
|
||||
currentPosition = -1;
|
||||
currentSelection = "";
|
||||
btnOK.setEnabled(false);
|
||||
listClasses.invalidateViews();
|
||||
} else {
|
||||
arrayAdapter.setSelectedPosition(position);
|
||||
currentPosition = position;
|
||||
currentSelection = arrayAdapter.getItem(position);
|
||||
btnOK.setEnabled(true);
|
||||
listClasses.invalidateViews();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle savedInstanceState) {
|
||||
super.onSaveInstanceState(savedInstanceState);
|
||||
Log.i(TAG, "Saving selections in onSaveInstanceState: "
|
||||
+ "position: " + currentPosition + ", "
|
||||
+ "class: " + currentSelection + ", "
|
||||
+ "mouseEvents: " + enableMouseEvents + ", "
|
||||
+ "joystickEvents: " + enableJoystickEvents + ", "
|
||||
);
|
||||
// Save current selections to the savedInstanceState.
|
||||
// This bundle will be passed to onCreate if the process is
|
||||
// killed and restarted.
|
||||
savedInstanceState.putString(SELECTED_APP_CLASS, currentSelection);
|
||||
savedInstanceState.putInt(SELECTED_LIST_POSITION, currentPosition);
|
||||
savedInstanceState.putBoolean(ENABLE_MOUSE_EVENTS, enableMouseEvents);
|
||||
savedInstanceState.putBoolean(ENABLE_JOYSTICK_EVENTS, enableJoystickEvents);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
// Log.i(TAG, "Restoring selections in onRestoreInstanceState: "
|
||||
// + "position: " + savedInstanceState.getInt(SELECTED_LIST_POSITION, 0)
|
||||
// + "class: " + savedInstanceState.getString(SELECTED_APP_CLASS)
|
||||
// );
|
||||
// //Restore selections from the savedInstanceState.
|
||||
// // This bundle has also been passed to onCreate.
|
||||
// currentPosition = savedInstanceState.getInt(SELECTED_LIST_POSITION, 0);
|
||||
// currentSelection = savedInstanceState.getString(SELECTED_APP_CLASS);
|
||||
}
|
||||
|
||||
public void beforeTextChanged(CharSequence cs, int i, int i1, int i2) {
|
||||
}
|
||||
|
||||
public void onTextChanged(CharSequence cs, int startPos, int beforePos, int count) {
|
||||
Log.i(TAG, "onTextChanged with cs: " + cs + ", startPos: " + startPos + ", beforePos: " + beforePos + ", count: " + count);
|
||||
arrayAdapter.getFilter().filter(cs.toString());
|
||||
setSelection(-1);
|
||||
}
|
||||
|
||||
public void afterTextChanged(Editable edtbl) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
editFilterText.removeTextChangedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.optionsmenu, menu);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu (Menu menu) {
|
||||
MenuItem item;
|
||||
|
||||
item = menu.findItem(R.id.optionEnableMouseEvents);
|
||||
if (item != null) {
|
||||
Log.i(TAG, "Found EnableMouseEvents menu item");
|
||||
if (enableMouseEvents) {
|
||||
item.setTitle(R.string.strOptionDisableMouseEventsTitle);
|
||||
} else {
|
||||
item.setTitle(R.string.strOptionEnableMouseEventsTitle);
|
||||
}
|
||||
}
|
||||
|
||||
item = menu.findItem(R.id.optionEnableJoystickEvents);
|
||||
if (item != null) {
|
||||
Log.i(TAG, "Found EnableJoystickEvents menu item");
|
||||
if (enableJoystickEvents) {
|
||||
item.setTitle(R.string.strOptionDisableJoystickEventsTitle);
|
||||
} else {
|
||||
item.setTitle(R.string.strOptionEnableJoystickEventsTitle);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.optionEnableMouseEvents:
|
||||
enableMouseEvents = !enableMouseEvents;
|
||||
Log.i(TAG, "enableMouseEvents set to: " + enableMouseEvents);
|
||||
break;
|
||||
case R.id.optionEnableJoystickEvents:
|
||||
enableJoystickEvents = !enableJoystickEvents;
|
||||
Log.i(TAG, "enableJoystickEvents set to: " + enableJoystickEvents);
|
||||
break;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package com.jmonkeyengine.tests;
|
||||
|
||||
import android.content.Intent;
|
||||
import com.jme3.app.AndroidHarness;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
import com.jme3.system.android.AndroidConfigChooser.ConfigType;
|
||||
|
||||
public class TestsHarness extends AndroidHarness{
|
||||
|
||||
/*
|
||||
* Note that you can ignore the errors displayed in this file,
|
||||
* the android project will build regardless.
|
||||
* Install the 'Android' plugin under Tools->Plugins->Available Plugins
|
||||
* to get error checks and code completion for the Android project files.
|
||||
*/
|
||||
|
||||
public TestsHarness(){
|
||||
// Set the application class to run
|
||||
appClass = "mygame.Main";
|
||||
// Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems
|
||||
eglConfigType = ConfigType.BEST;
|
||||
// Exit Dialog title & message
|
||||
exitDialogTitle = "Exit?";
|
||||
exitDialogMessage = "Press Yes";
|
||||
// Enable verbose logging
|
||||
eglConfigVerboseLogging = false;
|
||||
// Choose screen orientation
|
||||
// This test project also set the Activity to Landscape in the AndroidManifest.xml
|
||||
// If you modify this, also modify AndroidManifest.xml
|
||||
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||
// Invert the MouseEvents X (default = true)
|
||||
mouseEventsInvertX = true;
|
||||
// Invert the MouseEvents Y (default = true)
|
||||
mouseEventsInvertY = true;
|
||||
// Add splash screen drawable resource
|
||||
splashPicID = R.drawable.monkey256_9;
|
||||
// Simulate a joystick with Android device orientation data (default = false)
|
||||
joystickEventsEnabled = false;
|
||||
// Simulate mouse events with Android touch input (default = true)
|
||||
mouseEventsEnabled = true;
|
||||
mouseEventsInvertX = false;
|
||||
mouseEventsInvertY = false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Intent intent = getIntent();
|
||||
appClass = intent.getStringExtra(MainActivity.SELECTED_APP_CLASS);
|
||||
mouseEventsEnabled = intent.getBooleanExtra(MainActivity.ENABLE_MOUSE_EVENTS, mouseEventsEnabled);
|
||||
joystickEventsEnabled = intent.getBooleanExtra(MainActivity.ENABLE_JOYSTICK_EVENTS, joystickEventsEnabled);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--assets-impl.xml v1.0-->
|
||||
<project name="assets-impl" basedir="..">
|
||||
<target name="-init-assets">
|
||||
<jar jarfile="${build.dir}/${assets.jar.name}" excludes="${assets.excludes}" basedir="${assets.folder.name}" compress="${assets.compress}"/>
|
||||
<property location="${assets.folder.name}" name="assets.dir.resolved"/>
|
||||
<property location="${build.dir}/${assets.jar.name}" name="assets.jar.resolved"/>
|
||||
<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=""/>
|
||||
<map from="${assets.dir.resolved}" to="${assets.jar.resolved}"/>
|
||||
</pathconvert>
|
||||
</target>
|
||||
</project>
|
@ -1,4 +0,0 @@
|
||||
$label=Android Device
|
||||
$target.clean=clean clean-android
|
||||
$target.debug=run-android
|
||||
$target.run=run-android
|
@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=94bf7c61
|
||||
build.xml.script.CRC32=79a29eb7
|
||||
build.xml.stylesheet.CRC32=958a1d3e@1.32.1.45
|
||||
# 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=e2c7a974
|
||||
nbproject/build-impl.xml.script.CRC32=0bb68565
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
|
@ -1,132 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--mobile-impl.xml v0.18-->
|
||||
<project name="mobile-impl" basedir="..">
|
||||
<condition property="android-adb-name" value="${file.separator}platform-tools${file.separator}adb.exe" else="${file.separator}platform-tools${file.separator}adb">
|
||||
<os family="windows" />
|
||||
</condition>
|
||||
|
||||
<target name="run-android" depends="-flag-no-android, jar, -test-android-enabled, -copy-android-libs" if="is.android.enabled">
|
||||
<echo>Building debug android application version.</echo>
|
||||
<ant dir="mobile" target="debug" inheritall="false"/>
|
||||
<antcall target="-start-android-device"/>
|
||||
<ant dir="mobile" target="installd" inheritall="false"/>
|
||||
<antcall target="-run-android-device"/>
|
||||
</target>
|
||||
|
||||
<target name="clean-android">
|
||||
<ant dir="mobile" target="clean" inheritall="false"/>
|
||||
</target>
|
||||
|
||||
<target name="-mobile-deployment" depends="-test-android-enabled, -copy-android-libs" if="is.android.enabled" unless="no.android.build">
|
||||
<ant dir="mobile" target="release" inheritall="false"/>
|
||||
<copy todir="dist" verbose="false" flatten="true">
|
||||
<fileset dir="mobile/bin/">
|
||||
<include name="**/*.apk"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-copy-android-libs" if="is.android.enabled">
|
||||
<echo>Copying application libraries to android project.</echo>
|
||||
<delete dir="mobile/libs" failonerror="false"/>
|
||||
<mkdir dir="mobile/libs"/>
|
||||
<copy todir="mobile/libs" verbose="false" flatten="true">
|
||||
<fileset dir="dist/lib/">
|
||||
<exclude name="${assets.jar.name}"/>
|
||||
<exclude name="jME3-desktop.jar"/>
|
||||
<exclude name="jME3-blender.jar"/>
|
||||
<exclude name="jME3-lwjgl.jar"/>
|
||||
<exclude name="jME3-lwjgl-natives.jar"/>
|
||||
<exclude name="jME3-bullet-natives.jar"/>
|
||||
<exclude name="jME3-jbullet.jar"/>
|
||||
<exclude name="jME3-bullet.jar"/>
|
||||
<exclude name="jbullet.jar"/>
|
||||
<exclude name="stack-alloc.jar"/>
|
||||
<exclude name="vecmath.jar"/>
|
||||
<exclude name="lwjgl.jar"/>
|
||||
<exclude name="jinput.jar"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<antcall target="-add-android-lib"/>
|
||||
<antcall target="-unzip-bullet-libs"/>
|
||||
<antcall target="-unzip-assets"/>
|
||||
<copy file="${dist.jar}" todir="mobile/libs/" verbose="false"/>
|
||||
</target>
|
||||
|
||||
<target name="-add-android-lib">
|
||||
<echo>Adding libraries for android.</echo>
|
||||
<copy todir="mobile/libs" flatten="true">
|
||||
<path>
|
||||
<pathelement path="${libs.android-base.classpath}"/>
|
||||
</path>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-unzip-bullet-libs" depends="-delete-bullet-libs" if="bulletIsIncluded">
|
||||
<echo>Replacing bullet library with android native version.</echo>
|
||||
<unzip src="mobile/libs/jME3-bullet-natives-android.jar" dest="mobile/libs"/>
|
||||
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/>
|
||||
<delete dir="mobile/libs/x86"/>
|
||||
</target>
|
||||
|
||||
<target name="-delete-bullet-libs" depends="-test-bullet-included" unless="bulletIsIncluded">
|
||||
<delete file="mobile/libs/jME3-bullet.jar"/>
|
||||
<delete file="mobile/libs/jME3-bullet-natives-android.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="-unzip-assets">
|
||||
<echo>Unzipping Assets to Android Directories</echo>
|
||||
<delete dir="mobile/assets" failonerror="false"/>
|
||||
<mkdir dir="mobile/assets"/>
|
||||
<unzip src="dist/lib/${assets.jar.name}" dest="mobile/assets"/>
|
||||
<delete file="mobile/libs/${assets.jar.name}" failonerror="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-test-bullet-included">
|
||||
<condition property="bulletIsIncluded">
|
||||
<contains string="${javac.classpath}" substring="bullet.jar"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="-start-android-device">
|
||||
<property file="mobile/local.properties"/>
|
||||
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true">
|
||||
<arg value="start-server"/>
|
||||
</exec>
|
||||
<echo>Waiting for device to be ready.. Connect your device now if its not connected yet.</echo>
|
||||
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true">
|
||||
<arg value="wait-for-device"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-run-android-device">
|
||||
<property file="mobile/local.properties"/>
|
||||
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true">
|
||||
<arg value="logcat"/>
|
||||
<arg value="-c"/>
|
||||
</exec>
|
||||
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true">
|
||||
<arg value="shell"/>
|
||||
<arg value="am start -n ${mobile.android.package}/.MainActivity"/>
|
||||
</exec>
|
||||
<echo>Logging android device output, cancel build or disconnect device to stop logging.</echo>
|
||||
<exec executable="${sdk.dir}${android-adb-name}" failonerror="true">
|
||||
<arg value="logcat"/>
|
||||
<arg value="AndroidRuntime:E"/>
|
||||
<arg value="System.out:I"/>
|
||||
<arg value="System.err:W"/>
|
||||
<arg value="NSLog:*"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-test-android-enabled">
|
||||
<condition property="is.android.enabled">
|
||||
<istrue value="${mobile.android.enabled}"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="-flag-no-android">
|
||||
<property name="no.android.build" value="true"/>
|
||||
</target>
|
||||
</project>
|
@ -1,99 +0,0 @@
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
annotation.processing.run.all.processors=true
|
||||
ant.customtasks.libs=android-base
|
||||
application.homepage=http://jmonkeyenging.org
|
||||
application.title=jMonkeyEngine Test Applications
|
||||
application.vendor=jMonkeyEngine
|
||||
assets.jar.name=assets.jar
|
||||
assets.excludes=**/*.j3odata,**/*.mesh.xml,**/*.skeleton.xml,**/*.scene,**/*.material,**/*.obj,**/*.mtl,**/*.blend
|
||||
assets.folder.name=assets
|
||||
assets.compress=true
|
||||
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
|
||||
compile.on.save=false
|
||||
# Uncomment to specify the preferred debugger connection transport:
|
||||
#debug.transport=dt_socket
|
||||
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}/${application.title}.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
includes=**
|
||||
jar.archive.disabled=${jnlp.enabled}
|
||||
jar.compress=false
|
||||
jar.index=${jnlp.enabled}
|
||||
javac.classpath=\
|
||||
${libs.jme3.classpath}:\
|
||||
${libs.jme3-libraries.classpath}:\
|
||||
${libs.jme3-libraries-blender.classpath}:\
|
||||
${libs.jme3-test-data.classpath}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.6
|
||||
javac.target=1.6
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
|
||||
jnlp.applet.class=jme3test.awt.AppHarness
|
||||
jnlp.applet.height=300
|
||||
jnlp.applet.width=300
|
||||
jnlp.codebase.type=local
|
||||
jnlp.descriptor=application
|
||||
jnlp.enabled=false
|
||||
jnlp.mixed.code=default
|
||||
jnlp.offline-allowed=false
|
||||
jnlp.signed=false
|
||||
jnlp.signing=
|
||||
jnlp.signing.alias=
|
||||
jnlp.signing.keystore=
|
||||
main.class=jme3test.TestChooser
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
manifest.file=MANIFEST.MF
|
||||
mkdist.disabled=false
|
||||
mobile.android.enabled=true
|
||||
mobile.android.package=com.jmonkeyengine.tests
|
||||
mobile.android.target=android-8
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${assets.folder.name}
|
||||
# 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=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
@ -1,21 +0,0 @@
|
||||
<?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="assets-impl.xml" id="assets">
|
||||
<dependency dependsOn="-init-assets" target="-do-init"/>
|
||||
</extension>
|
||||
<extension file="mobile-impl.xml" id="mobile">
|
||||
<dependency dependsOn="-mobile-deployment" target="jar"/>
|
||||
</extension>
|
||||
</buildExtensions>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>jME3TestsTemplateAndroid</name>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See commented blocks below for -->
|
||||
<!-- some examples of how to customize the build. -->
|
||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||
<!-- the Compile on Save feature is turned off for the project. -->
|
||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||
<!-- in the project's Project Properties dialog box.-->
|
||||
<project name="LoadImagesAntTask" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project LoadImagesAntTask.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<target name="-post-jar">
|
||||
<copy file="${dist.jar}" todir="../ant-lib" overwrite="true"/>
|
||||
</target>
|
||||
<!--
|
||||
|
||||
There exist several targets which are by default empty and which can be
|
||||
used for execution of your tasks. These targets are usually executed
|
||||
before and after some main targets. They are:
|
||||
|
||||
-pre-init: called before initialization of project properties
|
||||
-post-init: called after initialization of project properties
|
||||
-pre-compile: called before javac compilation
|
||||
-post-compile: called after javac compilation
|
||||
-pre-compile-single: called before javac compilation of single file
|
||||
-post-compile-single: called after javac compilation of single file
|
||||
-pre-compile-test: called before javac compilation of JUnit tests
|
||||
-post-compile-test: called after javac compilation of JUnit tests
|
||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||
-pre-jar: called before JAR building
|
||||
-post-jar: called after JAR building
|
||||
-post-clean: called after cleaning build products
|
||||
|
||||
(Targets beginning with '-' are not intended to be called on their own.)
|
||||
|
||||
Example of inserting an obfuscator after compilation could look like this:
|
||||
|
||||
<target name="-post-compile">
|
||||
<obfuscate>
|
||||
<fileset dir="${build.classes.dir}"/>
|
||||
</obfuscate>
|
||||
</target>
|
||||
|
||||
For list of available properties check the imported
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
|
||||
Another way to customize the build is by overriding existing main targets.
|
||||
The targets of interest are:
|
||||
|
||||
-init-macrodef-javac: defines macro for javac compilation
|
||||
-init-macrodef-junit: defines macro for junit execution
|
||||
-init-macrodef-debug: defines macro for class debugging
|
||||
-init-macrodef-java: defines macro for class execution
|
||||
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
||||
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
||||
run: execution of project
|
||||
-javadoc-build: Javadoc generation
|
||||
test-report: JUnit report generation
|
||||
|
||||
An example of overriding the target for project execution could look like this:
|
||||
|
||||
<target name="run" depends="LoadImagesAntTask-impl.jar">
|
||||
<exec dir="bin" executable="launcher.exe">
|
||||
<arg file="${dist.jar}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
Notice that the overridden target depends on the jar target and not only on
|
||||
the compile target as the regular run target does. Again, for a list of available
|
||||
properties which you can use, check the target you are overriding in the
|
||||
nbproject/build-impl.xml file.
|
||||
|
||||
-->
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
libs.ANT.classpath=\
|
||||
${base}/ANT/ant.jar
|
||||
libs.CopyLibs.classpath=\
|
||||
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
|
||||
libs.CopyLibs.displayName=CopyLibs Task
|
||||
libs.CopyLibs.prop-version=2.0
|
@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=7f939454
|
||||
build.xml.script.CRC32=9384ed68
|
||||
build.xml.stylesheet.CRC32=28e38971@1.38.2.45
|
||||
# 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=dd1578ef
|
||||
nbproject/build-impl.xml.script.CRC32=f481ade2
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
|
@ -1,71 +0,0 @@
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
annotation.processing.run.all.processors=true
|
||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||
application.title=ant-jme
|
||||
application.vendor=normenhansen
|
||||
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
|
||||
# Uncomment to specify the preferred debugger connection transport:
|
||||
#debug.transport=dt_socket
|
||||
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}/ant-jme.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
endorsed.classpath=
|
||||
excludes=
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${libs.ANT.classpath}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.deprecation=false
|
||||
javac.processorpath=\
|
||||
${javac.classpath}
|
||||
javac.source=1.6
|
||||
javac.target=1.6
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
javac.test.processorpath=\
|
||||
${javac.test.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=${source.encoding}
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
mkdist.disabled=false
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# 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=
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
source.encoding=UTF-8
|
||||
src.dir=src
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>ant-jme</name>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots/>
|
||||
</data>
|
||||
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
|
||||
<definitions>./lib/nblibraries.properties</definitions>
|
||||
</libraries>
|
||||
</configuration>
|
||||
</project>
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.jme.ant;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.StringWriter;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author normenhansen
|
||||
*/
|
||||
public class FixWikiLinks extends Task {
|
||||
|
||||
File file;
|
||||
String helpPath;
|
||||
|
||||
@Override
|
||||
public void execute() throws BuildException {
|
||||
validate();
|
||||
BufferedReader rdr;
|
||||
try {
|
||||
rdr = new BufferedReader(new FileReader(file));
|
||||
StringWriter out = new StringWriter();
|
||||
String line = rdr.readLine();
|
||||
while (line != null) {
|
||||
//internal links
|
||||
line = line.replaceAll("doku\\.php/([^>]*):([^>]*):([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2/$3/$4.html");
|
||||
line = line.replaceAll("doku\\.php/([^>]*):([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2/$3.html");
|
||||
line = line.replaceAll("doku\\.php/([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2.html");
|
||||
line = line.replaceAll("doku\\.php/([^>]*)\\?do=export_xhtmlbody", helpPath + "$1.html");
|
||||
//images
|
||||
line = line.replaceAll("/lib/exe/fetch\\.php/([^>]*):([^>]*):([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2/$3/$4\"");
|
||||
line = line.replaceAll("/lib/exe/fetch\\.php/([^>]*):([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2/$3\"");
|
||||
line = line.replaceAll("/lib/exe/fetch\\.php/([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2\"");
|
||||
line = line.replaceAll("/lib/exe/fetch\\.php/([^>]*)\"", "nbdocs:/" + helpPath + "$1\"");
|
||||
// line = line.replaceAll("/lib/exe/fetch\\.php?([^>]*)\"", "nbdocs:/" + helpPath + "external/$1\"").replaceAll("[_[^\\w\\däüö:ÄÜÖ\\/\\+\\-\\. ]]", "_");
|
||||
|
||||
line = line.replaceAll("<a href=([^>]*)><img src=\"([^\"]*)\"([^>]*)></a>", "<img src=\"$2\">");
|
||||
line = line.replaceAll("<img src=\"([^>]*)\\?([^>]*)\">", "<img src=\"$1\">");
|
||||
// vvvv------v
|
||||
//line=line.replaceAll("<span([^>]*)>(.*(?<!/span>))</span>","$2");
|
||||
//remove class, name and id from tags
|
||||
line = line.replaceAll(" class=\"([^>]*)\">", ">");
|
||||
line = line.replaceAll(" name=\"([^>]*)\">", ">");
|
||||
line = line.replaceAll(" id=\"([^>]*)\">", ">");
|
||||
//remove obnoxious spans using negative look-behind..
|
||||
line = line.replaceAll("<span>([^>]*)</span>", "$1");
|
||||
//remove links to http://www.google.com/search added by wiki
|
||||
line = line.replaceAll("<a href=\"http://www\\.google\\.com/search([^\"]*)\"(.*)>(.*)</a>", "$3");
|
||||
//make external links netbeans help external links
|
||||
// line = line.replaceAll("<a href=\"http://([^\"]*)\"(.*)>(.*)</a>", "<object classid=\"java:org.netbeans.modules.javahelp.BrowserDisplayer\"><param name=\"content\" value=\"http://$1\"><param name=\"text\" value=\"<html><u>$3</u></html>\"><param name=\"textColor\" value=\"blue\"></object>");
|
||||
// line = line.replaceAll("<a href=\"https://([^\"]*)\"(.*)>(.*)</a>", "<object classid=\"java:org.netbeans.modules.javahelp.BrowserDisplayer\"><param name=\"content\" value=\"https://$1\"><param name=\"text\" value=\"<html><u>$3</u></html>\"><param name=\"textColor\" value=\"blue\"></object>");
|
||||
line = line.replaceAll("<a href=\"http://([^\"]*)\">([^<]*)</a>", "<object classid=\"java:org.netbeans.modules.javahelp.BrowserDisplayer\"><param name=\"content\" value=\"http://$1\"><param name=\"text\" value=\"<html><u>$2</u></html>\"><param name=\"textColor\" value=\"blue\"></object>");
|
||||
line = line.replaceAll("<a href=\"https://([^\"]*)\">([^<]*)</a>", "<object classid=\"java:org.netbeans.modules.javahelp.BrowserDisplayer\"><param name=\"content\" value=\"https://$1\"><param name=\"text\" value=\"<html><u>$2</u></html>\"><param name=\"textColor\" value=\"blue\"></object>");
|
||||
//other stuff
|
||||
// line = line.replaceAll("<note [^>]*>([^>]*)</note>", "<p>$2</p>");
|
||||
|
||||
out.write(line + "\n");
|
||||
line = rdr.readLine();
|
||||
}
|
||||
rdr.close();
|
||||
FileWriter outWriter = new FileWriter(file);
|
||||
out.flush();
|
||||
outWriter.write(out.toString());
|
||||
out.close();
|
||||
outWriter.close();
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e, getLocation());
|
||||
}
|
||||
}
|
||||
|
||||
protected void validate() {
|
||||
if (file == null) {
|
||||
throw new BuildException("You must specify a file to read.");
|
||||
}
|
||||
if (!file.canRead()) {
|
||||
throw new BuildException("Can not read file " + file.getAbsolutePath());
|
||||
}
|
||||
if (helpPath == null) {
|
||||
throw new BuildException("You must specify a help path.");
|
||||
}
|
||||
}
|
||||
|
||||
public void setFile(File file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
public void setHelpPath(String helpPath) {
|
||||
this.helpPath = helpPath;
|
||||
}
|
||||
}
|
@ -1,136 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.jme.ant;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author normenhansen
|
||||
*/
|
||||
public class LoadWikiImages extends Task {
|
||||
|
||||
File file;
|
||||
String targetFolder;
|
||||
private String host;
|
||||
|
||||
@Override
|
||||
public void execute() throws BuildException {
|
||||
validate();
|
||||
BufferedReader rdr;
|
||||
try {
|
||||
rdr = new BufferedReader(new FileReader(file));
|
||||
String line = rdr.readLine();
|
||||
while (line != null) {
|
||||
line = line.trim();
|
||||
int idx = line.indexOf("<img src=");
|
||||
while (idx >= 0) {
|
||||
int endIdx = line.indexOf("\"", idx + 10);
|
||||
if (endIdx >= 0) {
|
||||
String link = line.substring(idx + 10, endIdx);
|
||||
link = link.replace("&", "&");
|
||||
int wikidx = link.indexOf("/lib/exe/fetch.php/");
|
||||
//int extidx = link.indexOf("/lib/exe/fetch.php?");
|
||||
int extidx = -1;
|
||||
if (wikidx >= 0) {
|
||||
String name = link.replaceAll("/lib/exe/fetch\\.php/", "");
|
||||
int markIdx = name.indexOf("?");
|
||||
if (markIdx >= 0) {
|
||||
name = name.substring(0, markIdx);
|
||||
}
|
||||
name = name.replaceAll(":", "/");
|
||||
URL url = new URL(host + link);
|
||||
InputStream in = null;
|
||||
FileOutputStream out = null;
|
||||
try {
|
||||
|
||||
in = url.openStream();
|
||||
File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
|
||||
log("Getting image: " + host + link);
|
||||
log("To: " + file);
|
||||
File parent = file.getParentFile();
|
||||
parent.mkdirs();
|
||||
out = new FileOutputStream(file);
|
||||
int byte_ = in.read();
|
||||
while (byte_ != -1) {
|
||||
out.write(byte_);
|
||||
byte_ = in.read();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} else if (extidx >= 0) {
|
||||
String name = link.replaceAll("/lib/exe/fetch\\.php\\?([^>]*);media=([^>]*)\"", "");
|
||||
int markIdx = name.indexOf("?");
|
||||
if (markIdx >= 0) {
|
||||
name = name.substring(0, markIdx);
|
||||
}
|
||||
//make external folder and clean filename
|
||||
name = "external/" + name.replaceAll("[_[^\\w\\däüöÄÜÖ\\/\\+\\-\\. ]]", "_");
|
||||
URL url = new URL(host + link);
|
||||
InputStream in = url.openStream();
|
||||
File file = new File(getLocation().getFileName().replaceAll("build.xml", "") + File.separator + targetFolder + File.separator + name.replaceAll("/", File.separator));
|
||||
log("Getting external image: " + host + link);
|
||||
log("To: " + file);
|
||||
File parent = file.getParentFile();
|
||||
parent.mkdirs();
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
int byte_ = in.read();
|
||||
while (byte_ != -1) {
|
||||
out.write(byte_);
|
||||
byte_ = in.read();
|
||||
}
|
||||
in.close();
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
idx = line.indexOf("<img src=", idx + 1);
|
||||
}
|
||||
line = rdr.readLine();
|
||||
}
|
||||
rdr.close();
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e, getLocation());
|
||||
}
|
||||
}
|
||||
|
||||
protected void validate() {
|
||||
if (file == null) {
|
||||
throw new BuildException("You must specify a file to read.");
|
||||
}
|
||||
if (!file.canRead()) {
|
||||
throw new BuildException("Can not read file " + file.getAbsolutePath());
|
||||
}
|
||||
if (targetFolder == null) {
|
||||
throw new BuildException("You must specify a destination folder.");
|
||||
}
|
||||
}
|
||||
|
||||
public void setFile(File file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
public void setTarget(String targetFolder) {
|
||||
this.targetFolder = targetFolder;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
}
|
@ -1,173 +0,0 @@
|
||||
package com.jme.ant;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.types.LogLevel;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author normenhansen
|
||||
*/
|
||||
public class UpdateNetBeansDependencies extends Task {
|
||||
|
||||
File projectFile;
|
||||
File platformFolder;
|
||||
private HashMap<String, String> versionMap = new HashMap<String, String>();
|
||||
|
||||
@Override
|
||||
public void execute() throws BuildException {
|
||||
if (projectFile == null || platformFolder == null) {
|
||||
throw new BuildException("Please set projectfile and version");
|
||||
}
|
||||
clearVesionMap();
|
||||
gatherVersionMap(platformFolder);
|
||||
try {
|
||||
boolean change = false;
|
||||
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(projectFile);
|
||||
Element project = doc.getDocumentElement();
|
||||
if (project == null) {
|
||||
return;
|
||||
}
|
||||
Element configuration = findChildElement(project, "configuration");
|
||||
if (configuration == null) {
|
||||
return;
|
||||
}
|
||||
Element data = findChildElement(configuration, "data");
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
Element deps = findChildElement(data, "module-dependencies");
|
||||
if (deps == null) {
|
||||
return;
|
||||
}
|
||||
NodeList list = deps.getElementsByTagName("dependency");
|
||||
for (int i = 0; i < list.getLength(); i++) {
|
||||
Element elem = (Element) list.item(i);
|
||||
Element base = findChildElement(elem, "code-name-base");
|
||||
if (base != null) {
|
||||
Element runDep = findChildElement(elem, "run-dependency");
|
||||
if (runDep != null) {
|
||||
Element specVersion = findChildElement(runDep, "specification-version");
|
||||
if (specVersion != null) {
|
||||
String name = base.getTextContent().trim();
|
||||
String version = specVersion.getTextContent().trim();
|
||||
String newVersion = versionMap.get(name);
|
||||
if (newVersion != null && !newVersion.equals(version)) {
|
||||
specVersion.setTextContent(newVersion);
|
||||
change = true;
|
||||
log("Updating dependency in for " + name + " to " + newVersion);
|
||||
} else {
|
||||
if(newVersion == null){
|
||||
log("Unknown " + name + ", cannot update dependency.", LogLevel.WARN.getLevel());
|
||||
}else{
|
||||
log("Dependency " + name + " is up to date.", LogLevel.INFO.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (change) {
|
||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||
Transformer transformer = transformerFactory.newTransformer();
|
||||
DOMSource source = new DOMSource(doc);
|
||||
StreamResult result = new StreamResult(projectFile);
|
||||
transformer.transform(source, result);
|
||||
OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(projectFile, true)));
|
||||
out.write("\n");
|
||||
out.close();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BuildException("Error changing file: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void setProjectFile(File projectFile) {
|
||||
this.projectFile = projectFile;
|
||||
}
|
||||
|
||||
public void setPlatformFolder(File platformFolder) {
|
||||
this.platformFolder = platformFolder;
|
||||
}
|
||||
|
||||
private void clearVesionMap() {
|
||||
versionMap.clear();
|
||||
}
|
||||
|
||||
private void gatherVersionMap(File baseFolder) {
|
||||
File[] packages = baseFolder.listFiles();
|
||||
for (File pkg : packages) {
|
||||
if (pkg.isDirectory()) {
|
||||
for (File utr : pkg.listFiles()) {
|
||||
if (utr.isDirectory() && utr.getName().equals("update_tracking")) {
|
||||
File[] xmls = utr.listFiles();
|
||||
for (File file : xmls) {
|
||||
if (file.getName().toLowerCase().endsWith(".xml")) {
|
||||
parseModules(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void parseModules(File file) {
|
||||
try {
|
||||
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file);
|
||||
if (doc == null) {
|
||||
return;
|
||||
}
|
||||
Element moduleElement = doc.getDocumentElement();
|
||||
if (moduleElement == null || !moduleElement.getTagName().equalsIgnoreCase("module")) {
|
||||
return;
|
||||
}
|
||||
Element versionElement = findChildElement(moduleElement, "module_version");
|
||||
if (versionElement == null) {
|
||||
return;
|
||||
}
|
||||
String name = moduleElement.getAttribute("codename");
|
||||
int idx = name.indexOf("/");
|
||||
if (idx != -1) {
|
||||
name = name.substring(0, idx);
|
||||
}
|
||||
String version = versionElement.getAttribute("specification_version");
|
||||
versionMap.put(name, version);
|
||||
} catch (SAXException ex) {
|
||||
Logger.getLogger(UpdateNetBeansDependencies.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(UpdateNetBeansDependencies.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (ParserConfigurationException ex) {
|
||||
Logger.getLogger(UpdateNetBeansDependencies.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private Element findChildElement(Element parent, String name) {
|
||||
if (parent == null) {
|
||||
return null;
|
||||
}
|
||||
org.w3c.dom.Node ret = parent.getFirstChild();
|
||||
while (ret != null && (!(ret instanceof Element) || !ret.getNodeName().equals(name))) {
|
||||
ret = ret.getNextSibling();
|
||||
}
|
||||
return (Element) ret;
|
||||
}
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
package com.jme.ant;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author normenhansen
|
||||
*/
|
||||
public class UpdateSdkDependencies extends Task {
|
||||
|
||||
File projectFile;
|
||||
String version;
|
||||
String basePackage = "com.jme3.gde";
|
||||
|
||||
@Override
|
||||
public void execute() throws BuildException {
|
||||
if (projectFile == null || version == null) {
|
||||
throw new BuildException("Please set projectfile and version");
|
||||
}
|
||||
try {
|
||||
boolean change = false;
|
||||
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(projectFile);
|
||||
Element project = doc.getDocumentElement();
|
||||
if (project == null) {
|
||||
return;
|
||||
}
|
||||
Element configuration = findChildElement(project, "configuration");
|
||||
if (configuration == null) {
|
||||
return;
|
||||
}
|
||||
Element data = findChildElement(configuration, "data");
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
Element deps = findChildElement(data, "module-dependencies");
|
||||
if (deps == null) {
|
||||
return;
|
||||
}
|
||||
NodeList list = deps.getElementsByTagName("dependency");
|
||||
for (int i = 0; i < list.getLength(); i++) {
|
||||
Element elem = (Element) list.item(i);
|
||||
Element base = findChildElement(elem, "code-name-base");
|
||||
if (base != null) {
|
||||
if (base.getTextContent().trim().startsWith(basePackage)) {
|
||||
Element runDep = findChildElement(elem, "run-dependency");
|
||||
if (runDep != null) {
|
||||
Element specVersion = findChildElement(runDep, "specification-version");
|
||||
if (specVersion != null && !version.equals(specVersion.getTextContent().trim())) {
|
||||
specVersion.setTextContent(version);
|
||||
log("Updating plugin dependency in " + projectFile);
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (change) {
|
||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||
Transformer transformer = transformerFactory.newTransformer();
|
||||
DOMSource source = new DOMSource(doc);
|
||||
StreamResult result = new StreamResult(projectFile);
|
||||
transformer.transform(source, result);
|
||||
OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(projectFile, true)));
|
||||
out.write("\n");
|
||||
out.close();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new BuildException("Error changing file: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void setBasePackage(String basePackage) {
|
||||
this.basePackage = basePackage;
|
||||
}
|
||||
|
||||
public void setProjectFile(File projectFile) {
|
||||
this.projectFile = projectFile;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
private Element findChildElement(Element parent, String name) {
|
||||
if (parent == null) {
|
||||
return null;
|
||||
}
|
||||
org.w3c.dom.Node ret = parent.getFirstChild();
|
||||
while (ret != null && (!(ret instanceof Element) || !ret.getNodeName().equals(name))) {
|
||||
ret = ret.getNextSibling();
|
||||
}
|
||||
return (Element) ret;
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
loadwikiimages=com.jme.ant.LoadWikiImages
|
||||
fixwikilinks=com.jme.ant.FixWikiLinks
|
||||
updatesdkdeps=com.jme.ant.UpdateSdkDependencies
|
||||
updatenbdeps=com.jme.ant.UpdateNetBeansDependencies
|
@ -1,9 +0,0 @@
|
||||
#Updated by build script
|
||||
#Sat, 27 Aug 2011 22:46:29 +0200
|
||||
currentVersion=jMonkeyEngine SDK 3.1-snapshot-github
|
||||
LBL_splash_window_title=Starting jMonkeyEngine SDK
|
||||
SPLASH_HEIGHT=350
|
||||
SPLASH_WIDTH=500
|
||||
SplashProgressBarBounds=0,347,500,6
|
||||
SplashRunningTextBounds=3,335,497,12
|
||||
SplashRunningTextFontSize=10
|
Before Width: | Height: | Size: 966 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 26 KiB |
@ -1,2 +0,0 @@
|
||||
MSG_InstallJava6=Cannot run on older versions of Java than JDK 6.\nPlease install JDK 6 or newer or use --jdkhome\nswitch to point to its installation directory.
|
||||
MSG_NeedsJava6=JDK 6 or newer required
|
@ -1,21 +0,0 @@
|
||||
UpdaterFrame.TextBackground_R=0
|
||||
UpdaterFrame.TextBackground_G=0
|
||||
UpdaterFrame.TextBackground_B=0
|
||||
|
||||
UpdaterFrame.TextForeground_R=255
|
||||
UpdaterFrame.TextForeground_G=255
|
||||
UpdaterFrame.TextForeground_B=255
|
||||
|
||||
UpdaterFrame.Background_R=0
|
||||
UpdaterFrame.Background_G=0
|
||||
UpdaterFrame.Background_B=0
|
||||
|
||||
UpdaterFrame.outerColor_R=28
|
||||
UpdaterFrame.outerColor_G=43
|
||||
UpdaterFrame.outerColor_B=29
|
||||
|
||||
UpdaterFrame.centerColor_R=85
|
||||
UpdaterFrame.centerColor_G=73
|
||||
UpdaterFrame.centerColor_B=16
|
||||
|
||||
UpdaterFrame.isGradient=false
|
Before Width: | Height: | Size: 17 KiB |
@ -1,4 +0,0 @@
|
||||
#Updated by build script
|
||||
#Sat, 27 Aug 2011 22:46:29 +0200
|
||||
CTL_MainWindow_Title=jMonkeyEngine SDK 3.1-snapshot-github
|
||||
CTL_MainWindow_Title_No_Project=jMonkeyEngine SDK 3.1-snapshot-github
|
@ -1,3 +0,0 @@
|
||||
LBL_Copyright=<p><em>Copyright © 2015 jMonkeyEngine.\n<br>Please visit <a style="color: #1E2A60;" href="http://jmonkeyengine.org">http://jmonkeyengine.org</a> for more information.</em></p><p>Icons sets : <ul><li><a href="http://brankic1979.com/icons/">Brankic1979</a></li><li><a href="http://www.entypo.com/index.php">Entypo+</a></li><ul> </p>
|
||||
updates_not_found=<p style="margin: 0"><b>Updates:</b> jMonkeyEngine SDK is updated to version {0}</p>\n
|
||||
URL_ON_IMG=http://jmonkeyengine.org/
|
Before Width: | Height: | Size: 967 B |
@ -1 +0,0 @@
|
||||
OperationDescriptionStep_BrokenPackageDepInit=<h3>jMonkeyEngine SDK requires the JDK</h3>Currently, jMonkeyEngine SDK appears to be running with the JRE instead of the full JDK.<br><br>To use the SDK, edit the <code>--jdkhome</code> command line option in jmonkeyplatform/etc/jmonkeyplatform.conf to the location of a JDK installation. See <a href="http://jmonkeyengine.org/wiki/doku.php/sdk:troubleshooting">the jME wiki</a> for more information.<br><br>
|
@ -1,3 +0,0 @@
|
||||
LBL_NeedRestartTitle=Restart jMonkeyEngine SDK
|
||||
MSG_NeedsRestart=The jMonkeyEngine SDK Installer has successfully installed the JIRA plugin. You must restart the IDE to complete the plugin installation.
|
||||
MSG_PROJECT_NEEDS_JIRA=This project uses the JIRA issue tracking system. Click Download to install the JIRA plugin from the Update Center.
|
@ -1 +0,0 @@
|
||||
ERR_NotThere=The Java DB database installation was not found in your copy of jMonkeyEngine SDK.
|
@ -1 +0,0 @@
|
||||
GEN_copy=Generated by jMonkeyEngine SDK
|
@ -1 +0,0 @@
|
||||
TXT_ProjectUpdate=<html><b>Project Needs Upgrading</b></html>\nThis project was created in an earlier version of jMonkeyEngine SDK. If you\nedit its properties in jMonkeyEngine SDK {0}, the project will be upgraded and\n<html><b>will no longer work in earlier versions of the SDK.</b></html>\n\nDo you want to upgrade your project to version {0}?
|
Before Width: | Height: | Size: 966 B |
@ -1 +0,0 @@
|
||||
LBL_Pre_Delete_Warning=This will delete project "{0}" so that it cannot be opened in the jMonkeyEngine SDK anymore.
|
425
sdk/build.gradle
@ -1,425 +0,0 @@
|
||||
//ant.importBuild 'build.xml'
|
||||
import groovy.xml.MarkupBuilder
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
if (!hasProperty('mainClass')) {
|
||||
ext.mainClass = ''
|
||||
}
|
||||
|
||||
configurations {
|
||||
corelibs
|
||||
optlibs
|
||||
testdatalibs
|
||||
examplelibs
|
||||
}
|
||||
|
||||
dependencies {
|
||||
corelibs project(':jme3-blender')
|
||||
corelibs project(':jme3-core')
|
||||
corelibs project(':jme3-desktop')
|
||||
corelibs project(':jme3-effects')
|
||||
corelibs project(':jme3-jbullet')
|
||||
corelibs project(':jme3-jogg')
|
||||
corelibs project(':jme3-lwjgl')
|
||||
corelibs project(':jme3-networking')
|
||||
corelibs project(':jme3-niftygui')
|
||||
corelibs project(':jme3-plugins')
|
||||
corelibs project(':jme3-terrain')
|
||||
|
||||
optlibs project(':jme3-bullet')
|
||||
optlibs project(':jme3-jogl')
|
||||
optlibs project(':jme3-android')
|
||||
optlibs project(':jme3-ios')
|
||||
optlibs project(':jme3-android-native')
|
||||
optlibs project(':jme3-bullet-native')
|
||||
optlibs project(':jme3-bullet-native-android')
|
||||
testdatalibs project(':jme3-testdata')
|
||||
|
||||
examplelibs project(':jme3-examples')
|
||||
|
||||
}
|
||||
|
||||
artifacts {
|
||||
// jar null
|
||||
}
|
||||
|
||||
task checkPlatformConfig {
|
||||
description = "Downloads the NetBeans platform base and registers it in the SDK project if needed"
|
||||
def platformFile = file("nbproject/private/platform-private.properties")
|
||||
if(!platformFile.exists()){
|
||||
def netbeansFolder = file("../netbeans")
|
||||
if(!netbeansFolder.exists() || netbeansFolder.list().length == 0){
|
||||
println "Downloading NetBeans Platform base, this only has to be done once.."
|
||||
def f = file("netbeans.zip")
|
||||
new URL(netbeansUrl).withInputStream{ i -> f.withOutputStream{ it << i }}
|
||||
copy{
|
||||
from zipTree(f)
|
||||
into "../"
|
||||
}
|
||||
f.delete()
|
||||
}
|
||||
file("nbproject/private/").mkdirs()
|
||||
platformFile.createNewFile()
|
||||
platformFile.write("nbplatform.default.netbeans.dest.dir=${netbeansFolder.absolutePath.replace('\\','/')}\r\n"+\
|
||||
"nbplatform.default.harness.dir=${netbeansFolder.absolutePath.replace('\\','/')}/harness\r\n")
|
||||
}
|
||||
}
|
||||
|
||||
task copyBaseLibs(dependsOn:configurations.corelibs) <<{
|
||||
description "Copies the library files needed to run the SDK to "+
|
||||
"jme3-core-baselibs and jme3-core-libraries"
|
||||
|
||||
// for each dependency in corelibs..
|
||||
project.configurations.corelibs.dependencies.each {dep ->
|
||||
// copy built jme3 jar files to jme3-core-baselibs
|
||||
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
|
||||
if(artifact.classifier == "sources"){
|
||||
} else if(artifact.classifier == "javadoc"){
|
||||
} else{
|
||||
copy {
|
||||
from artifact.file
|
||||
into "jme3-core-baselibs/release/modules/ext/"
|
||||
}
|
||||
}
|
||||
}
|
||||
// copy external jar files to jme3-core-libraries
|
||||
copy {
|
||||
from dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve()
|
||||
into "jme3-core-libraries/release/modules/ext/"
|
||||
}
|
||||
}
|
||||
}
|
||||
copyBaseLibs.inputs.files configurations.corelibs.resolve()
|
||||
copyBaseLibs.outputs.dir "jme3-core-baselibs/release/modules/ext/"
|
||||
copyBaseLibs.outputs.dir "jme3-core-libraries/release/modules/ext/"
|
||||
|
||||
task createBaseXml(dependsOn: configurations.corelibs) <<{
|
||||
description "Creates the project.xml files for "+
|
||||
"jme3-core-baselibs and jme3-core-libraries"
|
||||
def jmeJarFiles = [] // jme3 jar files
|
||||
def externalJarFiles = [] // external jar files
|
||||
|
||||
// collect jar files
|
||||
project.configurations.corelibs.dependencies.each {dep ->
|
||||
// collect external jar files
|
||||
dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve().each{ file->
|
||||
externalJarFiles.add(file)
|
||||
}
|
||||
// collect internal jar files (classes, sources and javadoc)
|
||||
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
|
||||
if(artifact.classifier == "sources"){
|
||||
} else if(artifact.classifier == "javadoc"){
|
||||
} else if(artifact.file.name.endsWith('.pom')) {
|
||||
} else{
|
||||
if(!jmeJarFiles.contains(artifact.file)){
|
||||
jmeJarFiles.add(artifact.file)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// collect base packages
|
||||
def packages = []
|
||||
jmeJarFiles.each{jarFile ->
|
||||
ZipFile file = new ZipFile(jarFile)
|
||||
file.entries().each { entry ->
|
||||
if(entry.name.endsWith('.class')){
|
||||
// TODO: "/" works on windows?
|
||||
def pathPart = entry.name.substring(0,entry.name.lastIndexOf('/'))
|
||||
def classPath = pathPart.replace('/','.');
|
||||
if(!packages.contains(classPath)){
|
||||
packages.add(classPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// collect library packages
|
||||
def extPackages = []
|
||||
externalJarFiles.each{jarFile ->
|
||||
ZipFile file = new ZipFile(jarFile)
|
||||
file.entries().each { entry ->
|
||||
if(entry.name.endsWith('.class')){
|
||||
// TODO: "/" works on windows?
|
||||
def pathPart = entry.name.substring(0,entry.name.lastIndexOf('/'))
|
||||
def classPath = pathPart.replace('/','.');
|
||||
if(!extPackages.contains(classPath)){
|
||||
extPackages.add(classPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def writer = new StringWriter()
|
||||
def xml = new MarkupBuilder(writer)
|
||||
xml.mkp.xmlDeclaration(version:'1.0')
|
||||
xml.project(xmlns:"http://www.netbeans.org/ns/project/1"){
|
||||
type "org.netbeans.modules.apisupport.project"
|
||||
configuration {
|
||||
data(xmlns:"http://www.netbeans.org/ns/nb-module-project/3") {
|
||||
"code-name-base" "com.jme3.gde.core.baselibs"
|
||||
"suite-component"{}
|
||||
"module-dependencies"{
|
||||
dependency{
|
||||
"code-name-base" "com.jme3.gde.core.libraries"
|
||||
"build-prerequisite"{}
|
||||
"compile-dependency"{}
|
||||
"run-dependency"{
|
||||
"release-version" "1"
|
||||
"specification-version" jmeVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
"public-packages"{
|
||||
packages.each{
|
||||
"package" it
|
||||
}
|
||||
}
|
||||
jmeJarFiles.each{jarFile ->
|
||||
"class-path-extension"{
|
||||
"runtime-relative-path" "ext/${jarFile.name}"
|
||||
"binary-origin" "release/modules/ext/${jarFile.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// write XML file
|
||||
File baselibsProjectFile = file("jme3-core-baselibs/nbproject/project.xml");
|
||||
baselibsProjectFile.write(writer.toString())
|
||||
|
||||
def extWriter = new StringWriter()
|
||||
def extXml = new MarkupBuilder(extWriter)
|
||||
// extXml.mkp.xmlDeclaration(version:'1.0')
|
||||
extXml.project(xmlns:"http://www.netbeans.org/ns/project/1"){
|
||||
type "org.netbeans.modules.apisupport.project"
|
||||
configuration {
|
||||
data(xmlns:"http://www.netbeans.org/ns/nb-module-project/3") {
|
||||
"code-name-base" "com.jme3.gde.core.libraries"
|
||||
"suite-component"{}
|
||||
"module-dependencies"{}
|
||||
"public-packages"{
|
||||
extPackages.each{
|
||||
"package" it
|
||||
}
|
||||
}
|
||||
externalJarFiles.each{jarFile ->
|
||||
"class-path-extension"{
|
||||
"runtime-relative-path" "ext/${jarFile.name}"
|
||||
"binary-origin" "release/modules/ext/${jarFile.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// write XML file
|
||||
File librariesProjectFile = file("jme3-core-libraries/nbproject/project.xml");
|
||||
librariesProjectFile.write(extWriter.toString())
|
||||
}
|
||||
createBaseXml.inputs.files configurations.corelibs.resolve()
|
||||
createBaseXml.outputs.file "jme3-core-baselibs/nbproject/project.xml"
|
||||
createBaseXml.outputs.file "jme3-core-libraries/nbproject/project.xml"
|
||||
|
||||
task copyProjectLibs(dependsOn: [configurations.corelibs, configurations.testdatalibs]) <<{
|
||||
description "Copies the jar files needed to supply the J2SE Libraries in the "+
|
||||
"SDK to jme3-project-baselibs and jme3-project-libraries"
|
||||
|
||||
// for each dependency in corelibs and optlibs..
|
||||
def deps = []
|
||||
deps.addAll(project.configurations.corelibs.dependencies)
|
||||
deps.addAll(project.configurations.optlibs.dependencies)
|
||||
deps.each {dep ->
|
||||
// copy jme3 jar files, sources and javadocs to jme3-project-baselibs
|
||||
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
|
||||
if(artifact.classifier == "sources"){
|
||||
copy {
|
||||
from artifact.file
|
||||
into "jme3-project-baselibs/release/libs/"
|
||||
}
|
||||
} else if(artifact.classifier == "javadoc"){
|
||||
copy {
|
||||
from artifact.file
|
||||
into "jme3-project-baselibs/release/libs/"
|
||||
}
|
||||
} else{
|
||||
copy {
|
||||
from artifact.file
|
||||
into "jme3-project-baselibs/release/libs/"
|
||||
}
|
||||
}
|
||||
}
|
||||
// copy external jar files to jme3-project-libraries
|
||||
copy {
|
||||
from dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve()
|
||||
into "jme3-project-libraries/release/libs/"
|
||||
}
|
||||
}
|
||||
|
||||
project.configurations.testdatalibs.dependencies.each {dep ->
|
||||
// copy jme3 test data to jme3-project-testdata
|
||||
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
|
||||
if(artifact.classifier == "sources"){
|
||||
} else if(artifact.classifier == "javadoc"){
|
||||
} else{
|
||||
copy {
|
||||
from artifact.file
|
||||
into "jme3-project-testdata/release/libs/"
|
||||
rename ("jme3-testdata(.*)", "jme3-testdata.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
copyProjectLibs.inputs.files configurations.corelibs.resolve()
|
||||
copyProjectLibs.inputs.files configurations.optlibs.resolve()
|
||||
copyProjectLibs.inputs.files configurations.testdatalibs.resolve()
|
||||
copyProjectLibs.outputs.dir "jme3-project-baselibs/release/libs/"
|
||||
copyProjectLibs.outputs.dir "jme3-project-libraries/release/libs/"
|
||||
copyProjectLibs.outputs.dir "jme3-project-testdata/release/libs/"
|
||||
|
||||
// workaround method to add a tag with the name "name" and "file" to an XML MarkupBuilder
|
||||
def makeName(builder, nameR) { builder.name nameR }
|
||||
def makeFile(builder, nameR) { builder.file(name:nameR, url:nameR) }
|
||||
|
||||
task createProjectXml(dependsOn: configurations.corelibs) <<{
|
||||
description "Creates needed J2SE library and layer XML files in jme3-project-baselibs"
|
||||
|
||||
def eol = System.properties.'line.separator'
|
||||
def j2seLibraries = [] // created J2SE library descriptors
|
||||
|
||||
// for each dependency in corelibs..
|
||||
def deps = []
|
||||
deps.addAll(project.configurations.corelibs.dependencies)
|
||||
deps.addAll(project.configurations.optlibs.dependencies)
|
||||
deps.each {dep ->
|
||||
def jmeJarFiles = [] // jme3 jar files
|
||||
def jmeSourceFiles = [] // jme3 sources
|
||||
def jmeJavadocFiles = [] // jme3 javadoc
|
||||
def externalJarFiles = [] // external jar files
|
||||
j2seLibraries.add(dep.dependencyProject.name+".xml")
|
||||
// collect external jar files
|
||||
dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve().each{ file->
|
||||
externalJarFiles.add(file.name)
|
||||
}
|
||||
// collect internal jar files (classes, sources and javadoc)
|
||||
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
|
||||
if(artifact.classifier == "sources"){
|
||||
jmeSourceFiles.add(artifact.file.name)
|
||||
} else if(artifact.classifier == "javadoc"){
|
||||
jmeJavadocFiles.add(artifact.file.name)
|
||||
} else{
|
||||
if(!jmeJarFiles.contains(artifact.file.name)){
|
||||
jmeJarFiles.add(artifact.file.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
// create J2SE library descriptor xml file
|
||||
def libraryWriter = new StringWriter()
|
||||
def libraryXml = new MarkupBuilder(libraryWriter)
|
||||
// xml.mkp.xmlDeclaration(version:'1.0')
|
||||
libraryWriter << '<?xml version="1.0" encoding="UTF-8"?>' << eol
|
||||
libraryWriter << '<!DOCTYPE library PUBLIC "-//NetBeans//DTD Library Declaration 1.0//EN" "http://www.netbeans.org/dtds/library-declaration-1_0.dtd">' << eol
|
||||
libraryXml.library(version:"1.0", encoding: "UTF-8"){
|
||||
makeName(libraryXml, "${dep.dependencyProject.name}")
|
||||
type "j2se"
|
||||
"localizing-bundle" "com.jme3.gde.project.baselibs.Bundle"
|
||||
volume{
|
||||
type "classpath"
|
||||
jmeJarFiles.each{jar ->
|
||||
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/"
|
||||
}
|
||||
externalJarFiles.each{jar ->
|
||||
resource "jar:nbinst://com.jme3.gde.project.libraries/libs/${jar}!/"
|
||||
}
|
||||
}
|
||||
volume{
|
||||
type "src"
|
||||
jmeSourceFiles.each{jar ->
|
||||
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/"
|
||||
}
|
||||
}
|
||||
volume{
|
||||
type "javadoc"
|
||||
jmeJavadocFiles.each{jar ->
|
||||
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/"
|
||||
}
|
||||
}
|
||||
}
|
||||
// write XML file
|
||||
File libraryXmlFile = file("jme3-project-baselibs/src/com/jme3/gde/project/baselibs/${dep.dependencyProject.name}.xml");
|
||||
libraryXmlFile.write(libraryWriter.toString())
|
||||
}
|
||||
|
||||
// create layer.xml file with entries of library xml files
|
||||
def layerWriter = new StringWriter()
|
||||
def layerXml = new MarkupBuilder(layerWriter)
|
||||
// layerXml.mkp.xmlDeclaration(version:'1.0')
|
||||
layerWriter << '<?xml version="1.0" encoding="UTF-8"?>' << eol
|
||||
layerWriter << '<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">' << eol
|
||||
layerXml.filesystem{
|
||||
folder(name:"org-netbeans-api-project-libraries"){
|
||||
folder(name:"Libraries"){
|
||||
j2seLibraries.each{lib ->
|
||||
makeFile(layerXml, lib)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File layerXmlFile = file("jme3-project-baselibs/src/com/jme3/gde/project/baselibs/layer.xml");
|
||||
layerXmlFile.write(layerWriter.toString())
|
||||
}
|
||||
createProjectXml.inputs.files configurations.corelibs.resolve()
|
||||
createProjectXml.inputs.files configurations.optlibs.resolve()
|
||||
createProjectXml.outputs.dir "jme3-project-baselibs/src/com/jme3/gde/project/baselibs/"
|
||||
|
||||
task copyTestSources <<{
|
||||
project.configurations.examplelibs.dependencies.each{dep ->
|
||||
copy{
|
||||
from dep.dependencyProject.sourceSets*.allSource
|
||||
into "JME3TestsTemplate/src/"
|
||||
}
|
||||
copy{
|
||||
from dep.dependencyProject.sourceSets*.allSource
|
||||
into "JME3TestsTemplateAndroid/src/"
|
||||
}
|
||||
}
|
||||
}
|
||||
copyTestSources.inputs.files project.configurations.examplelibs
|
||||
copyTestSources.outputs.dir "JME3TestsTemplate/src/"
|
||||
copyTestSources.outputs.dir "JME3TestsTemplateAndroid/src/"
|
||||
|
||||
ant.properties['plugins.version'] = jmeVersion
|
||||
ant.properties['app.version']= jmeFullVersion
|
||||
ant.properties['nbm.revision']= jmeNbmRevision
|
||||
|
||||
task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources]) <<{
|
||||
ant.propertyfile(file: "nbproject/project.properties") {
|
||||
entry( key: "plugins.version", value: "${jmeVersion}")
|
||||
entry( key: "app.version", value: "${jmeFullVersion}")
|
||||
entry( key: "nbm.revision", value: "${jmeNbmRevision}")
|
||||
}
|
||||
ant.ant(dir: ".", antfile: "build.xml", target: "build")
|
||||
}
|
||||
buildSdk.inputs.files configurations.corelibs.resolve()
|
||||
buildSdk.inputs.files configurations.optlibs.resolve()
|
||||
file('.').eachDir{
|
||||
if(it.name.startsWith("jme3-") && it.isDirectory()){
|
||||
buildSdk.inputs.dir it
|
||||
}
|
||||
}
|
||||
buildSdk.outputs.dir "build"
|
||||
|
||||
task cleanSdk() <<{
|
||||
ant.ant(dir: ".", antfile: "build.xml", target: "clean")
|
||||
file("jme3-core-baselibs/release/").deleteDir()
|
||||
file("jme3-core-libraries/release/").deleteDir()
|
||||
file("jme3-project-baselibs/release/").deleteDir()
|
||||
file("jme3-project-libraries/release/").deleteDir()
|
||||
file("JME3TestsTemplate/src/jmetest/").deleteDir()
|
||||
file("JME3TestsTemplateAndroid/src/jmetest/").deleteDir()
|
||||
}
|
||||
|
||||
tasks.remove(uploadArchives)
|
||||
|
||||
jar.dependsOn(buildSdk)
|
||||
clean.dependsOn(cleanSdk)
|
275
sdk/build.xml
@ -1,275 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="jme-gde" basedir=".">
|
||||
<description>Builds the module suite jme-gde.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<!--Load ant extensions-->
|
||||
<path id="ant-import.classpath">
|
||||
<fileset dir="ant-lib/" includes="*.jar"/>
|
||||
</path>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="ant-import.classpath"/>
|
||||
<taskdef resource="com/jme/ant/ant-jme.properties" classpathref="ant-import.classpath"/>
|
||||
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="ant-import.classpath"/>
|
||||
<taskdef name="desktopentry" classname="com.googlecode.ant_deb_task.DesktopEntry" classpathref="ant-import.classpath"/>
|
||||
|
||||
<!--override branding target to include netbeans config file creation, using this target makes sure init was called-->
|
||||
<target name="branding" depends="-create-netbeans-config, -set-base-version, -zip-templates, suite.branding"/>
|
||||
|
||||
<!--updates the help sets-->
|
||||
<target name="update-help-sets" description="Loads the wiki pages from the web and converts them to JavaHelp html for manual.">
|
||||
<ant antfile="build.xml" target="update-help-sets" inheritall="false" inheritrefs="false" dir="jme3-documentation/"/>
|
||||
</target>
|
||||
|
||||
<target name="update-nb-dependencies" description="Updates the dependencies of all projects to the currently used platform module versions">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<foreach target="-update-nb-dep" list="${modules}" delimiter=":" param="module_dir" inheritall="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-update-nb-dep">
|
||||
<updatenbdeps projectFile="${module_dir}/nbproject/project.xml" platformFolder="../netbeans"/>
|
||||
</target>
|
||||
|
||||
<target name="-create-netbeans-config">
|
||||
<!--replaces default values in jmonkeyplatform.conf file with run.args.extra from project.properties-->
|
||||
<mkdir dir="build/launcher/etc"/>
|
||||
<property name="jdkhome.string" value='#jdkhome="/path/to/jdk"'/>
|
||||
<copy file="${harness.dir}/etc/app.conf" tofile="build/launcher/etc/${app.name}.conf" overwrite="true">
|
||||
<filterchain>
|
||||
<replacestring from="$${branding.token}" to="${branding.token}"/>
|
||||
<replacestring from="$${APPNAME}/dev" to="$${APPNAME}/${app.version}"/>
|
||||
<replacestring from="-J-Xmx64m" to="${run.args.extra}"/>
|
||||
<replacestring from='#jdkhome="/path/to/jdk"' to ='${jdkhome.string}'/>
|
||||
</filterchain>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!--zips up the templates and adds them to the template project-->
|
||||
<target name="-zip-templates" description="Updates the template zip files">
|
||||
<zip basedir="BasicGameTemplate/" destfile="jme3-templates/src/com/jme3/gde/templates/BasicGameProject.zip">
|
||||
<exclude name="**/build/"/>
|
||||
<exclude name="**/dist/"/>
|
||||
<exclude name="**/nbproject/private/"/>
|
||||
<exclude name="**/*.keep"/>
|
||||
</zip>
|
||||
<zip basedir="JME3TestsTemplate/" destfile="jme3-tests-template/src/com/jme3/gde/templates/tests/JmeTestsProject.zip">
|
||||
<exclude name="**/build/"/>
|
||||
<exclude name="**/dist/"/>
|
||||
<exclude name="**/nbproject/private/"/>
|
||||
</zip>
|
||||
<zip basedir="JME3TestsTemplateAndroid/" destfile="jme3-tests-template/src/com/jme3/gde/templates/tests/JME3TestsAndroidProject.zip">
|
||||
<exclude name="**/build/"/>
|
||||
<exclude name="**/dist/"/>
|
||||
<exclude name="**/mobile/assets/"/>
|
||||
<exclude name="**/mobile/bin/"/>
|
||||
<exclude name="**/mobile/gen/"/>
|
||||
<exclude name="**/mobile/libs/"/>
|
||||
<exclude name="**/mobile/local.properties"/>
|
||||
<exclude name="**/mobile/private/"/>
|
||||
<exclude name="**/nbproject/private/"/>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<target name="-set-base-version" description ="sets/unsets base version to major version for all plugins, updates branding version">
|
||||
<!--sets/unsets base version to major version (e.g. 3.0.1) for all plugins-->
|
||||
<foreach target="-do-base-version" list="${modules}" delimiter=":" param="module_dir" inheritall="true"/>
|
||||
<!--sets version to application branding files-->
|
||||
<replaceregexp file="${basedir}/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
||||
match="currentVersion=(.*)"
|
||||
replace="currentVersion=${app.title} ${app.version}"
|
||||
byline="true"/>
|
||||
<replaceregexp file="${basedir}/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||
match="CTL_MainWindow_Title=(.*)"
|
||||
replace="CTL_MainWindow_Title=${app.title} ${app.version}"
|
||||
byline="true"/>
|
||||
<replaceregexp file="${basedir}/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||
match="CTL_MainWindow_Title_No_Project=(.*)"
|
||||
replace="CTL_MainWindow_Title_No_Project=${app.title} ${app.version}"
|
||||
byline="true"/>
|
||||
<!--propertyfile
|
||||
file="${basedir}/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="currentVersion" value="${app.title} ${app.version}" />
|
||||
</propertyfile-->
|
||||
<!--propertyfile
|
||||
file="${basedir}/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="CTL_MainWindow_Title" value="${app.title} ${app.version}" />
|
||||
<entry key="CTL_MainWindow_Title_No_Project" value="${app.title} ${app.version}" />
|
||||
</propertyfile-->
|
||||
</target>
|
||||
|
||||
<target name="-do-base-version">
|
||||
<!--propertyfile
|
||||
file="${module_dir}/nbproject/project.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="spec.version.base" value="${plugins.version}" />
|
||||
</propertyfile-->
|
||||
<updatesdkdeps projectfile="${module_dir}/nbproject/project.xml" version="${plugins.version}" basepackage="com.jme3.gde"/>
|
||||
<replace file="${module_dir}/nbproject/project.xml" token=' standalone="no"?>' value="?>${line.separator}"/>
|
||||
<replaceregexp file="${module_dir}/nbproject/project.properties"
|
||||
match="spec.version.base=(.*)"
|
||||
replace="spec.version.base=${plugins.version}"
|
||||
byline="true"/>
|
||||
</target>
|
||||
|
||||
<!--
|
||||
****************************************************************
|
||||
Only Relevant for building nightly on Hudson server from here on
|
||||
****************************************************************
|
||||
-->
|
||||
|
||||
<!--creates update center version via hudson build server (update-help-sets, )-->
|
||||
<target name="hudson-nightly" depends="suite.clean, set-impl-version, suite.nbms, unset-impl-version">
|
||||
</target>
|
||||
|
||||
<!--to be used after release, sets version number sans svn revision-->
|
||||
<target name="hudson-stable" depends="suite.clean, set-spec-version, suite.nbms, unset-spec-version">
|
||||
</target>
|
||||
|
||||
<!--builds release installers-->
|
||||
<target name="hudson-release" depends="suite.clean, set-spec-version, build-installers, unset-spec-version">
|
||||
</target>
|
||||
|
||||
<target name="set-spec-version">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<foreach target="-do-spec-version" list="${modules}" delimiter=":" param="module_dir" inheritall="true">
|
||||
<param name="set_spec_version" value="true"/>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<target name="unset-spec-version">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<foreach target="-do-spec-version" list="${modules}" delimiter=":" param="module_dir" inheritall="true">
|
||||
<param name="set_spec_version" value="false"/>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<!--sets/unsets specification version to major version (e.g. 3.0.1) for all plugins-->
|
||||
<target name="-do-spec-version">
|
||||
<if>
|
||||
<equals arg1="${set_spec_version}" arg2="true"/>
|
||||
<then>
|
||||
<replaceregexp file="${module_dir}/manifest.mf"
|
||||
match="OpenIDE-Module-Implementation-Version:(.*)"
|
||||
replace="OpenIDE-Module-Specification-Version: ${plugins.version}"
|
||||
byline="true"/>
|
||||
<replaceregexp file="${module_dir}/nbproject/project.properties"
|
||||
match="#*spec\.version\.base"
|
||||
replace="#spec.version.base"
|
||||
byline="true"/>
|
||||
</then>
|
||||
<else>
|
||||
<replaceregexp file="${module_dir}/manifest.mf"
|
||||
match="OpenIDE-Module-Specification-Version:(.*)"
|
||||
replace="OpenIDE-Module-Implementation-Version: 0"
|
||||
byline="true"/>
|
||||
<replaceregexp file="${module_dir}/nbproject/project.properties"
|
||||
match="#*spec\.version\.base"
|
||||
replace="spec.version.base"
|
||||
byline="true"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<target name="set-impl-version">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<foreach target="-do-impl-version" list="${modules}" delimiter=":" param="module_dir" inheritall="true">
|
||||
<param name="set_impl_version" value="true"/>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<target name="unset-impl-version">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<foreach target="-do-impl-version" list="${modules}" delimiter=":" param="module_dir" inheritall="true">
|
||||
<param name="set_impl_version" value="false"/>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<!--sets/unsets implementation version to GIT revision for plugins-->
|
||||
<target name="-do-impl-version">
|
||||
<if>
|
||||
<equals arg1="${set_impl_version}" arg2="true"/>
|
||||
<then>
|
||||
<echo>Setting implementation version for ${module_dir} to revision: ${nbm.revision}</echo>
|
||||
<replace file="${module_dir}/manifest.mf" token="OpenIDE-Module-Implementation-Version: 0" value="OpenIDE-Module-Implementation-Version: ${nbm.revision}"/>
|
||||
</then>
|
||||
<else>
|
||||
<echo>Removing implementation version for ${module_dir} from revision: ${nbm.revision}</echo>
|
||||
<replace file="${module_dir}/manifest.mf" token="OpenIDE-Module-Implementation-Version: ${nbm.revision}" value="OpenIDE-Module-Implementation-Version: 0"/>
|
||||
</else>
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<target name="build-installers">
|
||||
<property file="nbproject/project.properties"/>
|
||||
<ant antfile="template.xml" dir="nbi/stub">
|
||||
<property name="suite.location" value="${basedir}"/>
|
||||
<property name="suite.nbi.product.uid" value="${app.name}"/>
|
||||
<!--TODO: this is .0.2 because of the pre-release static 3.0.0, else the RCs could not be installed next to a beta-->
|
||||
<property name="suite.nbi.product.version" value="${plugins.version}.0.${nbm.revision}"/>
|
||||
<property name="nbi.stub.location" value="${basedir}/nbi/stub"/>
|
||||
<property name="nbi.stub.common.location" value="${basedir}/nbi/.common"/>
|
||||
<property name="nbi.ant.tasks.jar" value="${basedir}/nbi/antlib/nbi-ant-tasks.jar"/>
|
||||
<property name="nbi.registries.management.jar" value="${basedir}/nbi/antlib/nbi-registries-management.jar"/>
|
||||
<property name="nbi.engine.jar" value="${basedir}/nbi/antlib/nbi-engine.jar"/>
|
||||
<property name="nbi.license.file" value="${basedir}/licenses-sdk.txt"/>
|
||||
<property name="generate.installer.for.platforms" value="windows-x86 windows-x64 linux-x86 linux-x64 macosx"/>
|
||||
<property name="generator-jdk-location-forward-slashes" value="${java.home}"/>
|
||||
<property name="generated-installers-location-forward-slashes" value="${basedir}/build/installer"/>
|
||||
<property name="pack200.enabled" value="true"/>
|
||||
<property name="nbi.icon.file" value="${basedir}/jmonkeyplatform.png"/>
|
||||
<property name="nbi.dock.icon.file" value="${basedir}/jmonkeyplatform.icns"/>
|
||||
<property name="product.description" value="${app.description}"/>
|
||||
<property name="product.categories" value="${app.categories}"/>
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="build-zip-for-installer" depends="-set-bundled-jdkhome, suite.build-zip"/>
|
||||
|
||||
<target name="-set-bundled-jdkhome">
|
||||
<property name="jdkhome.string" value='jdkhome="jdk"'/>
|
||||
</target>
|
||||
|
||||
<!--creates a debian package from the installer-->
|
||||
<target name="create-deb-package" depends="suite.build-zip">
|
||||
<unzip src="${dist.dir}/${app.name}.zip" dest="${dist.dir}/${app.name}">
|
||||
<globmapper from="${app.name}/*" to="*"/>
|
||||
</unzip>
|
||||
<desktopentry
|
||||
toFile="build/${app.name}.desktop"
|
||||
name="${app.title}"
|
||||
comment="${app.title}"
|
||||
exec="/opt/${app.name}/bin/${app.name}"
|
||||
icon="/opt/${app.name}/${app.name}.png"
|
||||
categories="Development;Java"
|
||||
/>
|
||||
<deb toDir="dist"
|
||||
package="jme3-sdk"
|
||||
version="${app.version}"
|
||||
section="devel"
|
||||
depends="sun-java6-jdk"
|
||||
maintainer="jMonkeyEngine"
|
||||
homepage="http://www.jmonkeyengine.org"
|
||||
postrm="debscripts/postrm"
|
||||
>
|
||||
<tarfileset dir="dist/${app.name}/" prefix="opt/${app.name}">
|
||||
<exclude name="bin/**"/>
|
||||
</tarfileset>
|
||||
<tarfileset dir="dist/${app.name}/bin" prefix="opt/${app.name}/bin" filemode="755">
|
||||
<exclude name="*.exe"/>
|
||||
</tarfileset>
|
||||
<tarfileset file="build/${app.name}.desktop" prefix="usr/share/applications"/>
|
||||
<tarfileset file="${app.name}.png" prefix="opt/${app.name}"/>
|
||||
<description synopsis="jMonkeyEngine3 SDK is a complete solution for Java OpenGL game development.">
|
||||
jMonkeyEngine 3 was rebuilt from the ground up to be a modern 3D game engine,
|
||||
compatible with OpenGL 2.0 and above.
|
||||
Its architecture is shader-based, making it fully capable of current and
|
||||
next generation graphics standards. The jMonkeyEngine SDK gives you a complete IDE
|
||||
for coding and for managing and creating game assets.
|
||||
</description>
|
||||
</deb>
|
||||
</target>
|
||||
|
||||
</project>
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
rm -rf $HOME/.jmonkeyplatform
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
#(c) jmonkeyengine.org
|
||||
#Author Normen Hansen
|
||||
set -e
|
||||
rm -rf jdk-macosx.zip
|
||||
cp -r local/jdk7u11-macosx ./jdk
|
||||
zip -9 -r -y ./jdk-macosx.zip ./jdk
|
||||
rm -rf jdk
|
@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#(c) jmonkeyengine.org
|
||||
#This script creates SFX binaries of the JDK for the specified platform
|
||||
#Author Normen Hansen
|
||||
|
||||
#gather options
|
||||
os="$1"
|
||||
source="$2"
|
||||
if [ -z "$1" ]; then
|
||||
echo "No platform supplied"
|
||||
echo "Specify a platform like macosx, windows-x86, linux-x64 and a source like /path/to/jdk/home"
|
||||
echo "If no source is specified, local/jdk-(platform) will be used"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ]; then
|
||||
source="local/jdk-$os"
|
||||
fi
|
||||
if [ ! -d "$source" ]; then
|
||||
echo "Source JDK directory $source was not found, specify another source folder as second parameter or copy the needed JDK to $source"
|
||||
exit 1
|
||||
fi
|
||||
unzipsfxname="unzipsfx/unzipsfx-$os"
|
||||
if [ ! -f "$unzipsfxname" ]; then
|
||||
echo "No unzipsfx for platform $os found at $unzipsfxname, cannot continue"
|
||||
exit 1
|
||||
fi
|
||||
suffix="bin"
|
||||
if [[ "$os" == *"windows"* ]]; then
|
||||
suffix="exe"
|
||||
fi
|
||||
name="jdk-$os.$suffix"
|
||||
|
||||
echo "Creating SFX JDK package $name for $os with source $source."
|
||||
|
||||
#code logic
|
||||
rm -rf $name
|
||||
cp -r $source ./jdk_tmp
|
||||
cd jdk_tmp/jre
|
||||
pack200 -J-Xmx1024m lib/rt.jar.pack.gz lib/rt.jar
|
||||
rm -rf lib/rt.jar
|
||||
cd ..
|
||||
zip -9 -r -y ../jdk_tmp_sfx.zip .
|
||||
cd ..
|
||||
cat $unzipsfxname jdk_tmp_sfx.zip > $name
|
||||
chmod +x $name
|
||||
rm -rf jdk_tmp
|
||||
rm -rf jdk_tmp_sfx.zip
|
@ -1,5 +0,0 @@
|
||||
MacOSX: 1.7u51
|
||||
Win32: 1.7u51
|
||||
Win64: 1.7u51
|
||||
Linux32: 1.7u51
|
||||
Linux64: 1.7u51
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="com.jme3.gde.android" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project com.jme3.gde.android.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
OpenIDE-Module: com.jme3.gde.android
|
||||
OpenIDE-Module-Implementation-Version: 0
|
||||
OpenIDE-Module-Layer: com/jme3/gde/android/layer.xml
|
||||
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/android/Bundle.properties
|
||||
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="com.jme3.gde.android-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
build.xml.data.CRC32=01aeea16
|
||||
build.xml.script.CRC32=6461359b
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
|
||||
# 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=01aeea16
|
||||
nbproject/build-impl.xml.script.CRC32=abd1e01a
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
|
@ -1,89 +0,0 @@
|
||||
cluster.path=\
|
||||
${nbplatform.active.dir}/extra:\
|
||||
${nbplatform.active.dir}/harness:\
|
||||
${nbplatform.active.dir}/ide:\
|
||||
${nbplatform.active.dir}/java:\
|
||||
${nbplatform.active.dir}/platform
|
||||
disabled.modules=\
|
||||
org.netbeans.libs.bugtracking,\
|
||||
org.netbeans.libs.bugzilla,\
|
||||
org.netbeans.libs.jsr223,\
|
||||
org.netbeans.libs.smack,\
|
||||
org.netbeans.libs.springframework,\
|
||||
org.netbeans.libs.swingx,\
|
||||
org.netbeans.modules.apisupport.apidocs,\
|
||||
org.netbeans.modules.bugtracking,\
|
||||
org.netbeans.modules.bugtracking.bridge,\
|
||||
org.netbeans.modules.bugzilla,\
|
||||
org.netbeans.modules.db,\
|
||||
org.netbeans.modules.db.core,\
|
||||
org.netbeans.modules.db.dataview,\
|
||||
org.netbeans.modules.db.drivers,\
|
||||
org.netbeans.modules.db.kit,\
|
||||
org.netbeans.modules.db.metadata.model,\
|
||||
org.netbeans.modules.db.mysql,\
|
||||
org.netbeans.modules.db.sql.editor,\
|
||||
org.netbeans.modules.db.sql.visualeditor,\
|
||||
org.netbeans.modules.dbapi,\
|
||||
org.netbeans.modules.dbschema,\
|
||||
org.netbeans.modules.derby,\
|
||||
org.netbeans.modules.form,\
|
||||
org.netbeans.modules.form.binding,\
|
||||
org.netbeans.modules.form.j2ee,\
|
||||
org.netbeans.modules.form.kit,\
|
||||
org.netbeans.modules.form.nb,\
|
||||
org.netbeans.modules.form.refactoring,\
|
||||
org.netbeans.modules.glassfish.common,\
|
||||
org.netbeans.modules.hibernate,\
|
||||
org.netbeans.modules.hibernatelib,\
|
||||
org.netbeans.modules.hudson,\
|
||||
org.netbeans.modules.hudson.ant,\
|
||||
org.netbeans.modules.hudson.git,\
|
||||
org.netbeans.modules.hudson.maven,\
|
||||
org.netbeans.modules.hudson.mercurial,\
|
||||
org.netbeans.modules.hudson.subversion,\
|
||||
org.netbeans.modules.hudson.tasklist,\
|
||||
org.netbeans.modules.i18n.form,\
|
||||
org.netbeans.modules.j2ee.core.utilities,\
|
||||
org.netbeans.modules.j2ee.jpa.refactoring,\
|
||||
org.netbeans.modules.j2ee.jpa.verification,\
|
||||
org.netbeans.modules.j2ee.persistence,\
|
||||
org.netbeans.modules.j2ee.persistence.kit,\
|
||||
org.netbeans.modules.j2ee.toplinklib,\
|
||||
org.netbeans.modules.jellytools,\
|
||||
org.netbeans.modules.jellytools.ide,\
|
||||
org.netbeans.modules.jellytools.java,\
|
||||
org.netbeans.modules.jellytools.platform,\
|
||||
org.netbeans.modules.jemmy,\
|
||||
org.netbeans.modules.languages,\
|
||||
org.netbeans.modules.maven,\
|
||||
org.netbeans.modules.maven.checkstyle,\
|
||||
org.netbeans.modules.maven.coverage,\
|
||||
org.netbeans.modules.maven.embedder,\
|
||||
org.netbeans.modules.maven.grammar,\
|
||||
org.netbeans.modules.maven.graph,\
|
||||
org.netbeans.modules.maven.hints,\
|
||||
org.netbeans.modules.maven.indexer,\
|
||||
org.netbeans.modules.maven.junit,\
|
||||
org.netbeans.modules.maven.kit,\
|
||||
org.netbeans.modules.maven.model,\
|
||||
org.netbeans.modules.maven.osgi,\
|
||||
org.netbeans.modules.maven.persistence,\
|
||||
org.netbeans.modules.maven.refactoring,\
|
||||
org.netbeans.modules.maven.repository,\
|
||||
org.netbeans.modules.maven.search,\
|
||||
org.netbeans.modules.maven.spring,\
|
||||
org.netbeans.modules.server,\
|
||||
org.netbeans.modules.spellchecker,\
|
||||
org.netbeans.modules.spellchecker.bindings.htmlxml,\
|
||||
org.netbeans.modules.spellchecker.bindings.properties,\
|
||||
org.netbeans.modules.spellchecker.dictionary_en,\
|
||||
org.netbeans.modules.spellchecker.kit,\
|
||||
org.netbeans.modules.spring.beans,\
|
||||
org.netbeans.modules.websvc.saas.codegen.java,\
|
||||
org.netbeans.modules.xml.wsdl.model,\
|
||||
org.openide.compat,\
|
||||
org.openide.options,\
|
||||
org.openide.util.enumerations
|
||||
nbjdk.active=default
|
||||
nbplatform.active=default
|