copy sdk to gradle branch

git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@11105 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
nor..67 11 years ago
parent 64c732451a
commit 8514ece94e
  1. 1
      sdk/BasicGameTemplate/MANIFEST.MF
  2. 76
      sdk/BasicGameTemplate/build.xml
  3. 22
      sdk/BasicGameTemplate/master-application.jnlp
  4. 8
      sdk/BasicGameTemplate/nbproject/genfiles.properties
  5. 76
      sdk/BasicGameTemplate/nbproject/project.properties
  6. 18
      sdk/BasicGameTemplate/nbproject/project.xml
  7. 43
      sdk/BasicGameTemplate/src/mygame/Main.java
  8. 74
      sdk/JME3TestsTemplate/build.xml
  9. 880
      sdk/JME3TestsTemplate/nbproject/build-impl.xml
  10. 8
      sdk/JME3TestsTemplate/nbproject/genfiles.properties
  11. 77
      sdk/JME3TestsTemplate/nbproject/project.properties
  12. 13
      sdk/JME3TestsTemplate/nbproject/project.xml
  13. 1
      sdk/JME3TestsTemplateAndroid/MANIFEST.MF
  14. 76
      sdk/JME3TestsTemplateAndroid/build.xml
  15. 22
      sdk/JME3TestsTemplateAndroid/master-application.jnlp
  16. 15
      sdk/JME3TestsTemplateAndroid/mobile/AndroidManifest.xml
  17. 17
      sdk/JME3TestsTemplateAndroid/mobile/ant.properties
  18. 92
      sdk/JME3TestsTemplateAndroid/mobile/build.xml
  19. 20
      sdk/JME3TestsTemplateAndroid/mobile/proguard-project.txt
  20. 14
      sdk/JME3TestsTemplateAndroid/mobile/project.properties
  21. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/monkey256.png
  22. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/monkey256_9.9.png
  23. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/monkey512.png
  24. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/monkey512_9.9.png
  25. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/nonselected.png
  26. BIN
      sdk/JME3TestsTemplateAndroid/mobile/res/drawable/selected.png
  27. 13
      sdk/JME3TestsTemplateAndroid/mobile/res/layout/main.xml
  28. 119
      sdk/JME3TestsTemplateAndroid/mobile/res/layout/test_chooser_layout.xml
  29. 30
      sdk/JME3TestsTemplateAndroid/mobile/res/layout/test_chooser_row.xml
  30. 9
      sdk/JME3TestsTemplateAndroid/mobile/res/menu/optionsmenu.xml
  31. 18
      sdk/JME3TestsTemplateAndroid/mobile/res/values/strings.xml
  32. 169
      sdk/JME3TestsTemplateAndroid/mobile/src/com/jmonkeyengine/tests/CustomArrayAdapter.java
  33. 390
      sdk/JME3TestsTemplateAndroid/mobile/src/com/jmonkeyengine/tests/MainActivity.java
  34. 57
      sdk/JME3TestsTemplateAndroid/mobile/src/com/jmonkeyengine/tests/TestsHarness.java
  35. 15
      sdk/JME3TestsTemplateAndroid/nbproject/assets-impl.xml
  36. 1383
      sdk/JME3TestsTemplateAndroid/nbproject/build-impl.xml
  37. 4
      sdk/JME3TestsTemplateAndroid/nbproject/configs/run-android.properties
  38. 8
      sdk/JME3TestsTemplateAndroid/nbproject/genfiles.properties
  39. 132
      sdk/JME3TestsTemplateAndroid/nbproject/mobile-impl.xml
  40. 99
      sdk/JME3TestsTemplateAndroid/nbproject/project.properties
  41. 21
      sdk/JME3TestsTemplateAndroid/nbproject/project.xml
  42. 41
      sdk/README.TXT
  43. 77
      sdk/ant-jme/build.xml
  44. BIN
      sdk/ant-jme/lib/ANT/ant.jar
  45. BIN
      sdk/ant-jme/lib/CopyLibs-2/org-netbeans-modules-java-j2seproject-copylibstask.jar
  46. 6
      sdk/ant-jme/lib/nblibraries.properties
  47. 1419
      sdk/ant-jme/nbproject/build-impl.xml
  48. 8
      sdk/ant-jme/nbproject/genfiles.properties
  49. 71
      sdk/ant-jme/nbproject/project.properties
  50. 16
      sdk/ant-jme/nbproject/project.xml
  51. 98
      sdk/ant-jme/src/com/jme/ant/FixWikiLinks.java
  52. 135
      sdk/ant-jme/src/com/jme/ant/LoadWikiImages.java
  53. 169
      sdk/ant-jme/src/com/jme/ant/UpdateNetBeansDependencies.java
  54. 108
      sdk/ant-jme/src/com/jme/ant/UpdateSdkDependencies.java
  55. 4
      sdk/ant-jme/src/com/jme/ant/ant-jme.properties
  56. BIN
      sdk/ant-lib/ant-contrib.jar
  57. BIN
      sdk/ant-lib/ant-deb.jar
  58. BIN
      sdk/ant-lib/ant-googlecode-0.0.3.jar
  59. BIN
      sdk/ant-lib/ant-jme.jar
  60. 9
      sdk/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
  61. BIN
      sdk/branding/core/core.jar/org/netbeans/core/startup/frame.gif
  62. BIN
      sdk/branding/core/core.jar/org/netbeans/core/startup/frame32.gif
  63. BIN
      sdk/branding/core/core.jar/org/netbeans/core/startup/frame48.gif
  64. BIN
      sdk/branding/core/core.jar/org/netbeans/core/startup/splash.gif
  65. 2
      sdk/branding/lib/boot.jar/org/netbeans/Bundle.properties
  66. 21
      sdk/branding/modules/ext/updater.jar/org/netbeans/updater/Bundle.properties
  67. BIN
      sdk/branding/modules/ext/updater.jar/org/netbeans/updater/resources/updatersplash.gif
  68. 4
      sdk/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
  69. 3
      sdk/branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties
  70. BIN
      sdk/branding/modules/org-netbeans-modules-autoupdate-services.jar/org/netbeans/modules/autoupdate/services/resources/icon-standard.png
  71. 1
      sdk/branding/modules/org-netbeans-modules-autoupdate-ui.jar/org/netbeans/modules/autoupdate/ui/wizards/Bundle.properties
  72. 3
      sdk/branding/modules/org-netbeans-modules-bugtracking.jar/org/netbeans/modules/bugtracking/jira/Bundle.properties
  73. 1
      sdk/branding/modules/org-netbeans-modules-derby.jar/org/netbeans/modules/derby/Bundle.properties
  74. 1
      sdk/branding/modules/org-netbeans-modules-java-api-common.jar/org/netbeans/modules/java/api/common/applet/Bundle.properties
  75. 1
      sdk/branding/modules/org-netbeans-modules-java-j2seproject.jar/org/netbeans/modules/java/j2seproject/Bundle.properties
  76. BIN
      sdk/branding/modules/org-netbeans-modules-java-j2seproject.jar/org/netbeans/modules/java/j2seproject/ui/resources/j2seProject.png
  77. 1
      sdk/branding/modules/org-netbeans-modules-projectuiapi.jar/org/netbeans/modules/project/uiapi/Bundle.properties
  78. 417
      sdk/build.xml
  79. 2
      sdk/debscripts/postrm
  80. 8
      sdk/jdks/build-osx-zip.sh
  81. 48
      sdk/jdks/build-package.sh
  82. BIN
      sdk/jdks/unzipsfx/unzipsfx-linux-x64
  83. BIN
      sdk/jdks/unzipsfx/unzipsfx-linux-x86
  84. BIN
      sdk/jdks/unzipsfx/unzipsfx-macosx
  85. BIN
      sdk/jdks/unzipsfx/unzipsfx-windows-x64
  86. BIN
      sdk/jdks/unzipsfx/unzipsfx-windows-x86
  87. 5
      sdk/jdks/versions
  88. 8
      sdk/jme3-android/build.xml
  89. 6
      sdk/jme3-android/manifest.mf
  90. 45
      sdk/jme3-android/nbproject/build-impl.xml
  91. 8
      sdk/jme3-android/nbproject/genfiles.properties
  92. 89
      sdk/jme3-android/nbproject/platform.properties
  93. 9
      sdk/jme3-android/nbproject/project.properties
  94. 149
      sdk/jme3-android/nbproject/project.xml
  95. 1
      sdk/jme3-android/nbproject/suite.properties
  96. 83
      sdk/jme3-android/src/com/jme3/gde/android/AndroidImportantFiles.java
  97. 544
      sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java
  98. 18
      sdk/jme3-android/src/com/jme3/gde/android/Bundle.properties
  99. 93
      sdk/jme3-android/src/com/jme3/gde/android/ListReader.java
  100. 103
      sdk/jme3-android/src/com/jme3/gde/android/MobileCompositeProvider.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1 @@
X-Comment: Created with jMonkeyPlatform

@ -0,0 +1,76 @@
<?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>

@ -0,0 +1,22 @@
<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>

@ -0,0 +1,8 @@
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=13834f8c
nbproject/build-impl.xml.script.CRC32=d1cfc99b
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46

@ -0,0 +1,76 @@
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.classpath}:\
${libs.jme3-libraries.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${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
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

@ -0,0 +1,18 @@
<?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>

@ -0,0 +1,43 @@
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
}
}

@ -0,0 +1,74 @@
<?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-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="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>

@ -0,0 +1,880 @@
<?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 &quot;${ant.java.version}"/>
<condition property="have-jdk-older-than-1.4">
<or>
<contains string="${version-output}" substring="java version &quot;1.0"/>
<contains string="${version-output}" substring="java version &quot;1.1"/>
<contains string="${version-output}" substring="java version &quot;1.2"/>
<contains string="${version-output}" substring="java version &quot;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>

@ -0,0 +1,8 @@
build.xml.data.CRC32=0f706f4a
build.xml.script.CRC32=0b0b23c4
build.xml.stylesheet.CRC32=28e38971@1.38.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=0f706f4a
nbproject/build-impl.xml.script.CRC32=46d1a69a
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45

@ -0,0 +1,77 @@
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.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.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}:\
${libs.junit_4.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=
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

@ -0,0 +1,13 @@
<?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>

@ -0,0 +1 @@
X-Comment: Created with jMonkeyPlatform

@ -0,0 +1,76 @@
<?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>

@ -0,0 +1,22 @@
<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>

@ -0,0 +1,15 @@
<?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>

@ -0,0 +1,17 @@
# 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.

@ -0,0 +1,92 @@
<?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>

@ -0,0 +1,20 @@
# 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 *;
#}

@ -0,0 +1,14 @@
# 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

@ -0,0 +1,13 @@
<?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>

@ -0,0 +1,119 @@
<?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>

@ -0,0 +1,30 @@
<?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>

@ -0,0 +1,9 @@
<?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>

@ -0,0 +1,18 @@
<?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>

@ -0,0 +1,169 @@
/*
* 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);
}
}
}

@ -0,0 +1,390 @@
/*
* 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;
}
}

@ -0,0 +1,57 @@
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);
}
}

@ -0,0 +1,15 @@
<?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>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,4 @@
$label=Android Device
$target.clean=clean clean-android
$target.debug=run-android
$target.run=run-android

@ -0,0 +1,8 @@
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

@ -0,0 +1,132 @@
<?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>

@ -0,0 +1,99 @@
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.5
javac.target=1.5
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

@ -0,0 +1,21 @@
<?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>

@ -0,0 +1,41 @@
What is the jMonkeyEngine SDK?
------------------------------
The jMonkeyEngine 3 SDK is a software development kit for Java 3-D game developers.
It contains the jMonkeyEngine3 library and the jMonkeyPlatform, a game development environment.
The jMonkeyEngine and the jMonkeyPlatform are platform-independent, open-source and free.
This is an alpha release (May 2010). If you encounter any issues, please tell us!
http://www.jmonkeyengine.com/wiki/doku.php/report_bugs
We are looking forward to your feedback.
Starting the jMonkeyPlatform
----------------------------
Windows: Double-Click the "bin/jmonkeyplatform.exe" file
Mac OS: Double-Click the "jmonkeyplatform.app" Application
Linux: chmod u+x bin/jmonkeyplatform; ./bin/jmonkeyplatform &
Running jMonkeyEngine Demos
---------------------------
Choose File > New Project in the jMonkeyPlatform and create a "JME3 Tests" project.
Run the test project to see JME3 feature demos.
Browse the demo source code to learn from examples.
Creating 3-D Games with the jMonkeyPlatform
-------------------------------------------
Using the jMonkeyPlatform is the easiest method to develop jMonkeyEngine-based 3-D games.
Choose File > New Project and create a "Base Game" project to get started.
See the online Documentation for jMonkeyPlatform at
http://www.jmonkeyengine.com/wiki/doku.php/jme3:jmonkeyplatform
Get jMonkeyEngine 3 tutorials at
http://www.jmonkeyengine.com/wiki/doku.php/jme3

@ -0,0 +1,77 @@
<?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>

Binary file not shown.

@ -0,0 +1,6 @@
libs.ANT.classpath=\
${base}/ANT/ant.jar
libs.CopyLibs.classpath=\
${base}/CopyLibs-2/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.CopyLibs.displayName=CopyLibs Task
libs.CopyLibs.prop-version=1.0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,8 @@
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=53d14a5f
nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46

@ -0,0 +1,71 @@
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.5
javac.target=1.5
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

@ -0,0 +1,16 @@
<?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>

@ -0,0 +1,98 @@
/*
* 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("wiki/doku\\.php/([^>]*):([^>]*):([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2/$3/$4.html");
line = line.replaceAll("wiki/doku\\.php/([^>]*):([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2/$3.html");
line = line.replaceAll("wiki/doku\\.php/([^>]*):([^>]*)\\?do=export_xhtmlbody", helpPath + "$1/$2.html");
line = line.replaceAll("wiki/doku\\.php/([^>]*)\\?do=export_xhtmlbody", helpPath + "$1.html");
//images
line = line.replaceAll("/wiki/lib/exe/fetch\\.php/([^>]*):([^>]*):([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2/$3/$4\"");
line = line.replaceAll("/wiki/lib/exe/fetch\\.php/([^>]*):([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2/$3\"");
line = line.replaceAll("/wiki/lib/exe/fetch\\.php/([^>]*):([^>]*)\"", "nbdocs:/" + helpPath + "$1/$2\"");
line = line.replaceAll("/wiki/lib/exe/fetch\\.php/([^>]*)\"", "nbdocs:/" + helpPath + "$1\"");
// line = line.replaceAll("/wiki/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;
}
}

@ -0,0 +1,135 @@
/*
* 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);
int wikidx = link.indexOf("/wiki/lib/exe/fetch.php/");
//int extidx = link.indexOf("/wiki/lib/exe/fetch.php?");
int extidx = -1;
if (wikidx >= 0) {
String name = link.replaceAll("/wiki/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("/wiki/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;
}
}

@ -0,0 +1,169 @@
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 {
log("Unknown " + name + ", cannot update dependency.", LogLevel.WARN.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;
}
}

@ -0,0 +1,108 @@
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;
}
}

@ -0,0 +1,4 @@
loadwikiimages=com.jme.ant.LoadWikiImages
fixwikilinks=com.jme.ant.FixWikiLinks
updatesdkdeps=com.jme.ant.UpdateSdkDependencies
updatenbdeps=com.jme.ant.UpdateNetBeansDependencies

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,9 @@
#Updated by build script
#Sat, 27 Aug 2011 22:46:29 +0200
currentVersion=jMonkeyEngine SDK 3.0
LBL_splash_window_title=Starting jMonkeyEngine SDK
SPLASH_HEIGHT=350
SPLASH_WIDTH=500
SplashProgressBarBounds=0,344,500,6
SplashRunningTextBounds=3,330,497,12
SplashRunningTextFontSize=12

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

@ -0,0 +1,2 @@
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

@ -0,0 +1,21 @@
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

@ -0,0 +1,4 @@
#Updated by build script
#Sat, 27 Aug 2011 22:46:29 +0200
CTL_MainWindow_Title=jMonkeyEngine SDK 3.0
CTL_MainWindow_Title_No_Project=jMonkeyEngine SDK 3.0

@ -0,0 +1,3 @@
LBL_Copyright=<p><em>Copyright &copy; 2012 jMonkeyEngine.\n<br>Please visit <a style="color: #1E2A60;" href="http://www.jmonkeyengine.com">http://www.jmonkeyengine.com</a> for more information.</em></p>
updates_not_found=<p style="margin: 0"><b>Updates:</b> jMonkeyEngine SDK is updated to version {0}</p>\n
URL_ON_IMG=http://www.jmonkeyengine.com/

@ -0,0 +1 @@
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>

@ -0,0 +1,3 @@
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.

@ -0,0 +1 @@
ERR_NotThere=The Java DB database installation was not found in your copy of jMonkeyEngine SDK.

@ -0,0 +1 @@
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}?

@ -0,0 +1 @@
LBL_Pre_Delete_Warning=This will delete project "{0}" so that it cannot be opened in the jMonkeyEngine SDK anymore.

@ -0,0 +1,417 @@
<?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="gcupload" classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" 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>
<copy file="jmonkeyplatform.import" tofile="build/launcher/etc/jmonkeyplatform.import"/>
<copy file="jmonkeyplatform.import" tofile="build/etc/jmonkeyplatform.import"/>
</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/"/>
</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-templates/src/com/jme3/gde/templates/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"/>
<antcall target="-create-jme3-svn-properties" inheritall="true">
<param name="jme3_dir" value="../engine/"/>
</antcall>
<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 svn revision for plugins-->
<target name="-do-impl-version">
<!--jme3 libraries-->
<if>
<or>
<equals arg1="${module_dir}" arg2="jme3-core-libraries"/>
<equals arg1="${module_dir}" arg2="jme3-project-libraries"/>
</or>
<then>
<!--set jme3 libraries svn revision-->
<property prefix="svn" file="build/jme3-lib-svn.properties"/>
</then>
<else>
<!--jme3 core-->
<if>
<or>
<equals arg1="${module_dir}" arg2="jme3-core-baselibs"/>
<equals arg1="${module_dir}" arg2="jme3-project-baselibs"/>
</or>
<then>
<!--set jme3 svn revision-->
<property prefix="svn" file="build/jme3-svn.properties"/>
</then>
<else>
<!--jme3 test data-->
<if>
<equals arg1="${module_dir}" arg2="jme3-project-testdata"/>
<then>
<!--set jme3 testdata svn revision-->
<property prefix="svn" file="build/jme3-testdata-svn.properties"/>
</then>
<else>
<!--jme3 tests-->
<if>
<equals arg1="${module_dir}" arg2="jme3-tests-template"/>
<then>
<!--set jme3 tests svn revision-->
<property prefix="svn" file="build/jme3-tests-svn.properties"/>
</then>
<!--"normal" module-->
<else>
<!--load svn revision of this modules folder if we are setting the value-->
<if>
<equals arg1="${set_impl_version}" arg2="true"/>
<then>
<exec executable="svn" output="build/${module_dir}-svn.properties" dir="${module_dir}">
<arg value="info" />
</exec>
<replace file="build/${module_dir}-svn.properties" token=" " value=""/>
</then>
</if>
<!--set svn revision of module-->
<property prefix="svn" file="build/${module_dir}-svn.properties"/>
</else>
</if>
</else>
</if>
</else>
</if>
</else>
</if>
<if>
<equals arg1="${set_impl_version}" arg2="true"/>
<then>
<echo>Setting implementation version for ${module_dir} to revision: ${svn.LastChangedRev}</echo>
<replace file="${module_dir}/manifest.mf" token="OpenIDE-Module-Implementation-Version: 0" value="OpenIDE-Module-Implementation-Version: ${svn.LastChangedRev}"/>
</then>
<else>
<echo>Removing implementation version for ${module_dir} from revision: ${svn.LastChangedRev}</echo>
<replace file="${module_dir}/manifest.mf" token="OpenIDE-Module-Implementation-Version: ${svn.LastChangedRev}" value="OpenIDE-Module-Implementation-Version: 0"/>
</else>
</if>
</target>
<!--creates properties files containing svn info for the jme3 folders-->
<target name="-create-jme3-svn-properties">
<mkdir dir="build"/>
<!--jme3 svn properties-->
<exec executable="svn" dir="${jme3_dir}/src/" output="build/jme3-svn.properties">
<arg value="info" />
</exec>
<replace file="build/jme3-svn.properties" token=" " value=""/>
<!--jme3 test data svn properties-->
<exec executable="svn" dir="${jme3_dir}/test-data/" output="build/jme3-testdata-svn.properties">
<arg value="info" />
</exec>
<replace file="build/jme3-testdata-svn.properties" token=" " value=""/>
<!--jme3 libraries svn properties-->
<exec executable="svn" dir="${jme3_dir}/lib/" output="build/jme3-lib-svn.properties">
<arg value="info" />
</exec>
<replace file="build/jme3-lib-svn.properties" token=" " value=""/>
<!--jme3 tests svn properties-->
<exec executable="svn" dir="${jme3_dir}/src/test/" output="build/jme3-tests-svn.properties">
<arg value="info" />
</exec>
<replace file="build/jme3-tests-svn.properties" token=" " value=""/>
</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.4"/>
<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"/>
</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.com"
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>
<target name="-upload-googlecode" depends="-check-googlecode" if="googlecode.credentials.present">
<property file="nbproject/project.properties"/>
<property file="../../../googlecode.properties" prefix="googlecode"/>
<echo>Upload windows installers to googlecode..</echo>
<gcupload projectname="jmonkeyengine"
labels="Type-Installer, OpSys-Windows, jMonkeyEngine3, Featured"
summary="jMonkeyEngine3 SDK ${app.version} for Windows32"
filename="${basedir}/dist/${app.name}-windows-x86.exe"
targetfilename="jME3_SDK_${app.version}-windows-x86.exe"
username="${googlecode.username}"
password="${googlecode.password}"
/>
<gcupload projectname="jmonkeyengine"
labels="Type-Installer, OpSys-Windows, jMonkeyEngine3, Featured"
summary="jMonkeyEngine3 SDK ${app.version} for Windows64"
filename="${basedir}/dist/${app.name}-windows-x64.exe"
targetfilename="jME3_SDK_${app.version}-windows-x64.exe"
username="${googlecode.username}"
password="${googlecode.password}"
/>
<echo>Upload linux installers to googlecode..</echo>
<gcupload projectname="jmonkeyengine"
labels="Type-Installer, OpSys-Linux, jMonkeyEngine3, Featured"
summary="jMonkeyEngine3 SDK ${app.version} for Linux32"
filename="${basedir}/dist/${app.name}-linux-x86.sh"
targetfilename="jME3_SDK_${app.version}-linux-x86.sh"
username="${googlecode.username}"
password="${googlecode.password}"
/>
<gcupload projectname="jmonkeyengine"
labels="Type-Installer, OpSys-Linux, jMonkeyEngine3, Featured"
summary="jMonkeyEngine3 SDK ${app.version} for Linux64"
filename="${basedir}/dist/${app.name}-linux-x64.sh"
targetfilename="jME3_SDK_${app.version}-linux-x64.sh"
username="${googlecode.username}"
password="${googlecode.password}"
/>
<echo>Upload mac installer to googlecode..</echo>
<gcupload projectname="jmonkeyengine"
labels="Type-Installer, OpSys-OSX, jMonkeyEngine3, Featured"
summary="jMonkeyEngine3 SDK ${app.version} for MacOS X"
filename="${basedir}/dist/${app.name}-macosx.tgz"
targetfilename="jME3_SDK_${app.version}-macosx.tgz"
username="${googlecode.username}"
password="${googlecode.password}"
/>
</target>
<target name="-check-googlecode">
<available file="../../../googlecode.properties" property="googlecode.credentials.present"/>
</target>
</project>

@ -0,0 +1,2 @@
#!/bin/bash
rm -rf $HOME/.jmonkeyplatform

@ -0,0 +1,8 @@
#!/bin/sh
#(c) jMonkeyEngine.com
#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

@ -0,0 +1,48 @@
#!/bin/bash
set -e
#(c) jMonkeyEngine.com
#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

Binary file not shown.

@ -0,0 +1,5 @@
MacOSX: 1.7u51
Win32: 1.7u51
Win64: 1.7u51
Linux32: 1.7u51
Linux64: 1.7u51

@ -0,0 +1,8 @@
<?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>

@ -0,0 +1,6 @@
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

@ -0,0 +1,45 @@
<?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>

@ -0,0 +1,8 @@
build.xml.data.CRC32=daa2838d
build.xml.script.CRC32=6461359b
build.xml.stylesheet.CRC32=a56c6a5b@2.56.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=daa2838d
nbproject/build-impl.xml.script.CRC32=abd1e01a
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.56.1

@ -0,0 +1,89 @@
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

@ -0,0 +1,9 @@
#Updated by build script
#Thu, 25 Aug 2011 21:00:54 +0200
javac.source=1.6
javac.compilerargs=-Xlint -Xlint:-serial
license.file=../license-jme.txt
nbm.homepage=http://www.jmonkeyengine.com
nbm.module.author=Normen Hansen
nbm.needs.restart=true
spec.version.base=3.0.0

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
<code-name-base>com.jme3.gde.android</code-name-base>
<suite-component/>
<module-dependencies>
<dependency>
<code-name-base>com.jme3.gde.core</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>3.0.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.api.progress</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.32.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
<run-dependency>
<specification-version>1.39.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.java.j2seproject</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.java.project</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.50.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.options.api</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.31.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.51.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.50.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.65.1.8</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.awt</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.55.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.dialogs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.28.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.filesystems</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.5.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.loaders</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.44.3</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.nodes</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.33.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.29.3</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.lookup</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.19.1</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages>
<package>com.jme3.gde.android</package>
</public-packages>
</data>
</configuration>
</project>

@ -0,0 +1,83 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.gde.android;
import com.jme3.gde.core.importantfiles.ImportantFiles;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import org.netbeans.api.project.Project;
import org.openide.filesystems.FileObject;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.xml.XMLUtil;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
/**
*
* @author normenhansen
*/
@org.openide.util.lookup.ServiceProvider(service = ImportantFiles.class)
public class AndroidImportantFiles implements ImportantFiles {
@Override
public Node[] getNodes(Project project) {
FileObject manifest = project.getProjectDirectory().getFileObject("mobile/AndroidManifest.xml");
String mainActivity = "mobile/src";
if (manifest != null) {
InputStream in = null;
try {
in = manifest.getInputStream();
Document configuration = XMLUtil.parse(new InputSource(in), false, false, null, null);
mainActivity = "mobile/src/" + configuration.getDocumentElement().getAttribute("package").replaceAll("\\.", "/") + "/MainActivity.java";
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
}
ArrayList<Node> list = new ArrayList<Node>();
try {
FileObject mainAct = project.getProjectDirectory().getFileObject(mainActivity);
if (mainAct != null) {
Node node = DataObject.find(mainAct).getNodeDelegate();
node.setDisplayName("Android Main Activity");
list.add(node);
}
FileObject manif = project.getProjectDirectory().getFileObject("mobile/AndroidManifest.xml");
if (manif != null) {
Node node = DataObject.find(manif).getNodeDelegate();
node.setDisplayName("Android Manifest");
list.add(node);
}
FileObject buildProp = project.getProjectDirectory().getFileObject("mobile/ant.properties");
if (buildProp != null) {
Node node = DataObject.find(buildProp).getNodeDelegate();
node.setDisplayName("Android Properties");
list.add(node);
}
} catch (DataObjectNotFoundException ex) {
Exceptions.printStackTrace(ex);
}
return list.toArray(new Node[list.size()]);
}
@Override
public boolean hasFiles(Project proj) {
if (proj.getProjectDirectory().getFileObject("mobile/AndroidManifest.xml") != null) {
return true;
}
return false;
}
}

@ -0,0 +1,544 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.gde.android;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.api.project.Project;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.NotifyDescriptor.Message;
import org.openide.filesystems.FileChooserBuilder;
import org.openide.filesystems.FileLock;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.util.Exceptions;
import org.openide.util.NbPreferences;
import org.openide.util.Utilities;
import org.openide.xml.XMLUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
*
* @author normenhansen
*/
public class AndroidSdkTool {
/**
* Starts the Android target configuration utility.
*/
public static void startAndroidTool() {
startAndroidTool(false);
}
public static void startAndroidTool(boolean modal) {
final String path = getAndroidToolPath();
if (path == null) {
return;
}
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
String[] command = new String[]{path};
ProcessBuilder builder = new ProcessBuilder(command);
try {
Process proc = builder.start();
OutputReader outReader = new OutputReader(proc.getInputStream());
OutputReader errReader = new OutputReader(proc.getErrorStream());
outReader.start();
errReader.start();
proc.waitFor();
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
});
if (modal) {
thread.run();
} else {
thread.start();
}
}
/**
* Returns a FileObject for the android SDK folder, null if none is specified
* @return
*/
public static FileObject getSdkFolder() {
String path = getSdkPath();
if (path == null) {
return null;
}
FileObject fileObj = FileUtil.toFileObject(new File(path));
if (fileObj == null) {
return null;
}
return fileObj;
}
/**
* Returns a String with the path to the SDK or null if none is specified.
* @return
*/
public static String getSdkPath() {
String path = NbPreferences.forModule(AndroidSdkTool.class).get("sdk_path", null);
if (path == null) {
FileChooserBuilder builder = new FileChooserBuilder(AndroidSdkTool.class);
builder.setTitle("Please select Android SDK Folder");
builder.setDirectoriesOnly(true);
File file = builder.showOpenDialog();
if (file != null) {
FileObject folder = FileUtil.toFileObject(file);
if (folder.getFileObject("tools") == null) {
Message msg = new NotifyDescriptor.Message(
"Not a valid SDK folder!",
NotifyDescriptor.ERROR_MESSAGE);
DialogDisplayer.getDefault().notifyLater(msg);
} else {
String name = file.getPath();
NbPreferences.forModule(AndroidSdkTool.class).put("sdk_path", name);
return name;
}
}
} else {
return path;
}
return null;
}
/**
* Returns a string with the path to the android tool, specific for platform (.exe for windows)
* @return
*/
public static String getAndroidToolPath() {
FileObject executable = null;
FileObject folder = getSdkFolder();
if (folder == null) {
return null;
}
if (Utilities.isWindows()) {
executable = folder.getFileObject("tools/android.bat");
} else {
executable = folder.getFileObject("tools/android");
}
if (executable != null) {
return FileUtil.toFile(executable).getPath();
} else {
return null;
}
}
/**
* Gets a list of android targets registered in the SDK
* @return
*/
public static List<AndroidTarget> getTargetList() {
ArrayList<AndroidTarget> list = new ArrayList<AndroidTarget>();
final String path = getAndroidToolPath();
if (path == null) {
return list;
}
String[] command = new String[]{path, "list", "targets"};
ProcessBuilder builder = new ProcessBuilder(command);
try {
Process proc = builder.start();
ListReader outReader = new ListReader(proc.getInputStream(), list);
OutputReader errReader = new OutputReader(proc.getErrorStream());
outReader.start();
errReader.start();
proc.waitFor();
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
return list;
}
//TODO: check mainJmeClass
public static void checkProject(Project project, String target, String name, String activity, String packag, String mainJmeClass) {
final String path = getAndroidToolPath();
if (path == null) {
return;
}
FileObject folder = project.getProjectDirectory().getFileObject("mobile");
if (folder == null) {
try {
folder = project.getProjectDirectory().createFolder("mobile");
createProject(project, target, name, activity, packag, mainJmeClass);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
return;
}
} else {
updateProject(project, target, name);
}
}
public static void createProject(Project project, String target, String name, String activity, String packag, String mainJmeClass) {
final String path = getAndroidToolPath();
if (path == null) {
return;
}
FileObject folder = project.getProjectDirectory().getFileObject("mobile");
if (folder == null) {
try {
folder = project.getProjectDirectory().createFolder("mobile");
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
return;
}
}
String[] command = new String[]{path, "create", "project",
"--target", target,
"--name", name,
"--path", FileUtil.toFile(folder).getPath(),
"--activity", activity,
"--package", packag};
ProcessBuilder builder = new ProcessBuilder(command);
FileLock lock = null;
try {
Process proc = builder.start();
OutputReader outReader = new OutputReader(proc.getInputStream());
OutputReader errReader = new OutputReader(proc.getErrorStream());
outReader.start();
errReader.start();
proc.waitFor();
folder.refresh();
String mainActName = "mobile/src/" + packag.replaceAll("\\.", "/") + "/MainActivity.java";
FileObject mainAct = project.getProjectDirectory().getFileObject(mainActName);
if (mainAct != null) {
lock = mainAct.lock();
OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(mainAct.getOutputStream(lock)));
out.write(mainActivityString(mainJmeClass, packag));
out.close();
lock.releaseLock();
} else {
Logger.getLogger(AndroidSdkTool.class.getName()).log(Level.WARNING, "Cannot find {0}", mainActName);
}
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
if (lock != null) {
lock.releaseLock();
}
Exceptions.printStackTrace(ex);
}
updateAndroidManifest(project);
updateAndroidApplicationName(project, name);
}
public static void updateProject(Project project, String target, String name) {
final String path = getAndroidToolPath();
if (path == null) {
return;
}
FileObject folder = project.getProjectDirectory().getFileObject("mobile");
if (folder == null) {
return;
}
String[] command = new String[]{path, "update", "project",
"--target", target,
"--name", name,
"--path", FileUtil.toFile(folder).getPath()};
ProcessBuilder builder = new ProcessBuilder(command);
try {
Process proc = builder.start();
OutputReader outReader = new OutputReader(proc.getInputStream());
OutputReader errReader = new OutputReader(proc.getErrorStream());
outReader.start();
errReader.start();
proc.waitFor();
folder.refresh();
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
updateAndroidApplicationName(project, name);
}
private static void updateAndroidManifest(Project project) {
FileObject manifest = project.getProjectDirectory().getFileObject("mobile/AndroidManifest.xml");
if (manifest == null) {
Logger.getLogger(AndroidSdkTool.class.getName()).log(Level.WARNING, "Could not find AndroidManifest.xml");
return;
}
InputStream in = null;
FileLock lock = null;
OutputStream out = null;
try {
in = manifest.getInputStream();
Document configuration = XMLUtil.parse(new InputSource(in), false, false, null, null);
in.close();
in = null;
boolean changed = false;
Element sdkApplication = XmlHelper.findChildElement(configuration.getDocumentElement(), "application");
if (sdkApplication != null) {
Element sdkActivity = XmlHelper.findChildElement(sdkApplication, "activity");
if (sdkActivity != null) {
if (!sdkActivity.hasAttribute("android:launchMode")) {
sdkActivity.setAttribute("android:launchMode", "singleTask");
changed = true;
}
}
// add the following after AndroidHarness.screenOrientation is depreciated
// for jME 3.1
// if (sdkActivity != null) {
// if (sdkActivity.hasAttribute("android:screenOrientation")) {
// String attrScreenOrientation = sdkActivity.getAttribute("android:screenOrientation");
// } else {
// Logger.getLogger(AndroidSdkTool.class.getName()).log(Level.INFO, "creating attrScreenOrientation");
// sdkActivity.setAttribute("android:screenOrientation", "landscape");
// changed = true;
// }
// }
}
Element sdkElement = XmlHelper.findChildElement(configuration.getDocumentElement(), "uses-sdk");
if (sdkElement == null) {
sdkElement = configuration.createElement("uses-sdk");
configuration.getDocumentElement().appendChild(sdkElement);
changed = true;
}
if (!"8".equals(sdkElement.getAttribute("android:minSdkVersion"))) {
sdkElement.setAttribute("android:minSdkVersion", "8");
changed = true;
}
Element screensElement = XmlHelper.findChildElement(configuration.getDocumentElement(), "supports-screens");
if (screensElement == null) {
screensElement = configuration.createElement("supports-screens");
screensElement.setAttribute("android:anyDensity", "true");
// screensElement.setAttribute("android:xlargeScreens", "true");
screensElement.setAttribute("android:largeScreens", "true");
screensElement.setAttribute("android:smallScreens", "true");
screensElement.setAttribute("android:normalScreens", "true");
configuration.getDocumentElement().appendChild(screensElement);
changed = true;
}
if (changed) {
lock = manifest.lock();
out = manifest.getOutputStream(lock);
XMLUtil.write(configuration, out, "UTF-8");
out.close();
out = null;
lock.releaseLock();
lock = null;
}
} catch (SAXException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
} finally {
if (lock != null) {
lock.releaseLock();
}
try {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
} catch (IOException ex1) {
Exceptions.printStackTrace(ex1);
}
}
}
private static void updateAndroidApplicationName(Project project, String name) {
FileObject manifest = project.getProjectDirectory().getFileObject("mobile/res/values/strings.xml");
if (manifest == null) {
return;
}
InputStream in = null;
FileLock lock = null;
OutputStream out = null;
try {
in = manifest.getInputStream();
Document configuration = XMLUtil.parse(new InputSource(in), false, false, null, null);
in.close();
in = null;
Element sdkElement = XmlHelper.findChildElementWithAttribute(configuration.getDocumentElement(), "string", "name", "app_name");
if (sdkElement == null) {
sdkElement = configuration.createElement("string");
sdkElement.setAttribute("name", "app_name");
configuration.getDocumentElement().appendChild(sdkElement);
}
if (!sdkElement.getTextContent().trim().equals(name)) {
sdkElement.setTextContent(name);
lock = manifest.lock();
out = manifest.getOutputStream(lock);
XMLUtil.write(configuration, out, "UTF-8");
out.close();
out = null;
lock.releaseLock();
lock = null;
}
} catch (SAXException ex) {
Exceptions.printStackTrace(ex);
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
} finally {
if (lock != null) {
lock.releaseLock();
}
try {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
} catch (IOException ex1) {
Exceptions.printStackTrace(ex1);
}
}
}
private static String mainActivityString(String mainClass, String packag) {
String str =
"package " + packag + ";\n"
+ " \n"
+ "import android.content.pm.ActivityInfo;\n"
+ "import com.jme3.app.AndroidHarness;\n"
+ "import com.jme3.system.android.AndroidConfigChooser.ConfigType;\n"
+ "import java.util.logging.Level;\n"
+ "import java.util.logging.LogManager;\n"
+ " \n"
+ "public class MainActivity extends AndroidHarness{\n"
+ " \n"
+ " /*\n"
+ " * Note that you can ignore the errors displayed in this file,\n"
+ " * the android project will build regardless.\n"
+ " * Install the 'Android' plugin under Tools->Plugins->Available Plugins\n"
+ " * to get error checks and code completion for the Android project files.\n"
+ " */\n"
+ " \n"
+ " public MainActivity(){\n"
+ " // Set the application class to run\n"
+ " appClass = \"" + mainClass + "\";\n"
+ " // Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems\n"
+ " eglConfigType = ConfigType.BEST;\n"
+ " // Exit Dialog title & message\n"
+ " exitDialogTitle = \"Exit?\";\n"
+ " exitDialogMessage = \"Press Yes\";\n"
+ " // Enable verbose logging\n"
+ " eglConfigVerboseLogging = false;\n"
+ " // Choose screen orientation\n"
+ " screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;\n"
+ " // Enable MouseEvents being generated from TouchEvents (default = true)\n"
+ " mouseEventsEnabled = true;\n"
+ " // Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)\n"
+ " LogManager.getLogManager().getLogger(\"\").setLevel(Level.INFO);\n"
+ " }\n"
+ " \n"
+ "}\n";
return str;
}
public static class AndroidTarget {
private int id;
private String name;
private String title;
private String platform;
private int apiLevel;
private int revision;
private String skins;
public AndroidTarget() {
}
public AndroidTarget(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public int getApiLevel() {
return apiLevel;
}
public void setApiLevel(int apiLevel) {
this.apiLevel = apiLevel;
}
public int getRevision() {
return revision;
}
public void setRevision(int revision) {
this.revision = revision;
}
public String getSkins() {
return skins;
}
public void setSkins(String skins) {
this.skins = skins;
}
@Override
public String toString() {
return getTitle();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof String && getName() != null) {
return getName().equals(obj);
} else {
return super.equals(obj);
}
}
}
}

@ -0,0 +1,18 @@
com_jme3_gde_android_update_center=http://nbandroid.org/release73/updates/updates.xml
android-base=android-base
OpenIDE-Module-Display-Category=jMonkeyEngine
OpenIDE-Module-Name=Android Support
OpenIDE-Module-Short-Description=Provides Android deployment for jMonkeyEngine SDK
LBL_Category_Mobile=Android
MobileCustomizerPanel.jLabel2.text=Mobile Deployment
MobileCustomizerPanel.jCheckBox1.text=Enable Android Deployment
MobileCustomizerPanel.jLabel1.text=Android Target
MobileCustomizerPanel.jLabel3.text=Application Package
MobileCustomizerPanel.jTextField1.text=jTextField1
MobileCustomizerPanel.jButton2.text=Run Android Target Configuration Utility
MobileCustomizerPanel.jTextArea1.text=Notes (Press F1 for more information)\n\nThe android application package name can be freely chosen and differ from the main projects package name.\n\nYou have to disable "Compile on Save" under "Compiling" on the left to be able to run the project on a device using the "Android Device" configuration.\n\nThe android project ("mobile" folder) will be deleted when Android deployment is disabled.
MobileCustomizerPanel.jTextField1.toolTipText=The package name used when creating the MainActivity
MobileCustomizerPanel.jComboBox1.toolTipText=The android target platform of this project
MobileCustomizerPanel.jButton2.toolTipText=Run the android target configuration utility
MobileCustomizerPanel.jCheckBox1.toolTipText=Creates a "mobile" folder with an android project that is embedded in the build process
Services/AutoupdateType/com_jme3_gde_android_update_center.instance=NBAndroid Updates

@ -0,0 +1,93 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.gde.android;
import com.jme3.gde.android.AndroidSdkTool.AndroidTarget;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.api.progress.ProgressHandle;
import org.openide.util.Exceptions;
/**
*
* @author normenhansen
*/
public class ListReader implements Runnable {
private Thread thread;
private BufferedReader in;
private ProgressHandle progress;
private ArrayList<AndroidTarget> list;
public ListReader(InputStream in, ArrayList<AndroidTarget> list) {
this.in = new BufferedReader(new InputStreamReader(in));
this.list = list;
}
public ListReader(BufferedReader in, ArrayList<AndroidTarget> list) {
this.in = in;
this.list = list;
}
public void start() {
thread = new Thread(this);
thread.start();
}
public void run() {
try {
String line;
AndroidTarget target = null;
while ((line = in.readLine()) != null) {
line = line.trim();
if (line.length() > 0) {
try {
if (line.startsWith("id:")) {
target = new AndroidTarget();
int idstart = line.indexOf(":") + 1;
int idend = line.indexOf("or");
int start = line.indexOf("\"") + 1;
int end = line.lastIndexOf("\"");
target.setId(Integer.parseInt(line.substring(idstart, idend).trim()));
target.setName(line.substring(start, end));
list.add(target);
} else if (line.startsWith("Name:") && target != null) {
target.setTitle(line.split(":")[1].trim());
} else if (line.startsWith("Type:") && target != null) {
target.setPlatform(line.split(":")[1].trim());
} else if (line.startsWith("API level:") && target != null) {
target.setApiLevel(Integer.parseInt(line.split(":")[1].trim()));
} else if (line.startsWith("Revision:") && target != null) {
target.setRevision(Integer.parseInt(line.split(":")[1].trim()));
} else if (line.startsWith("Skins:") && target != null) {
target.setSkins(line.split(":")[1].trim());
}
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
if (progress != null) {
progress.progress(line);
} else {
Logger.getLogger(this.getClass().getName()).log(Level.INFO, line);
}
}
}
} catch (Exception e) {
Exceptions.printStackTrace(e);
}
}
/**
* @param progress the progress to set
*/
public void setProgress(ProgressHandle progress) {
this.progress = progress;
}
}

@ -0,0 +1,103 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.gde.android;
import com.jme3.gde.core.j2seproject.ProjectExtensionManager;
import com.jme3.gde.core.j2seproject.ProjectExtensionProperties;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JComponent;
import org.netbeans.api.project.Project;
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
import org.openide.filesystems.FileObject;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
/**
*
* @author normenhansen
*/
@ProjectCustomizer.CompositeCategoryProvider.Registration(projectType = "org-netbeans-modules-java-j2seproject", category = "Application", position = 400)
public class MobileCompositeProvider implements ProjectCustomizer.CompositeCategoryProvider {
private static final String CAT_MOBILE = "MobileDeployment"; // NOI18N
private static ProjectExtensionProperties jwsProps = null;
private String[] keyList = new String[]{
"application.title",
"main.class",
"mobile.android.enabled",
"mobile.android.package",
"mobile.android.target"
};
public MobileCompositeProvider() {
}
@Override
public ProjectCustomizer.Category createCategory(Lookup context) {
return ProjectCustomizer.Category.create(CAT_MOBILE,
NbBundle.getMessage(MobileCompositeProvider.class, "LBL_Category_Mobile"), null);
}
@Override
public JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {
jwsProps = new ProjectExtensionProperties(context.lookup(Project.class), keyList);
MobileCustomizerPanel panel = new MobileCustomizerPanel(jwsProps);
category.setStoreListener(new SavePropsListener(jwsProps, context.lookup(Project.class)));
category.setOkButtonListener(panel);
return panel;
}
private class SavePropsListener implements ActionListener {
private String extensionName = "mobile";
private String extensionVersion = "v0.20";
private String[] extensionDependencies = new String[]{"jar", "-mobile-deployment"};
private ProjectExtensionManager manager = new ProjectExtensionManager(extensionName, extensionVersion, extensionDependencies);
private ProjectExtensionProperties properties;
private Project project;
public SavePropsListener(ProjectExtensionProperties props, Project project) {
this.properties = props;
this.project = project;
manager.setAntTaskLibrary("android-base");
}
public void actionPerformed(ActionEvent e) {
if ("true".equals(properties.getProperty("mobile.android.enabled"))) {
manager.loadTargets("nbres:/com/jme3/gde/android/mobile-targets.xml");
manager.checkExtension(project);
manager.addRunConfiguration(project, "run-android", "Android Device", "run-android", "run-android", "clean clean-android");
AndroidSdkTool.checkProject(project,
properties.getProperty("mobile.android.target"),
properties.getProperty("application.title"),
"MainActivity",
properties.getProperty("mobile.android.package"),
properties.getProperty("main.class"));
} else {
manager.removeExtension(project);
try {
FileObject folder = project.getProjectDirectory().getFileObject("mobile");
if (folder != null) {
folder.delete();
}
project.getProjectDirectory().refresh();
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
try {
properties.store();
} catch (IOException ioe) {
Exceptions.printStackTrace(ioe);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save