[added] Build script to make extension JARs.
<!-- \r
\r
libgdx distribution ant build file. Performs the compilation of the modules\r
- gdx, gdx-backend-android, gdx-backend-jogl\r
+ gdx, gdx-backend-android, gdx-backend-jogl, gdx-backend-lwjgl\r
and creates a distribution out of this mess. \r
\r
-->\r
<property name="env.NDK_HOME" value="/opt/android-ndk-r4b"/>\r
\r
<!-- output directory for distribution -->\r
- <property name="stable" value="libgdx-nightly"/>\r
+ <property name="stable" value="target"/>\r
\r
<!-- clean output directories -->\r
<target name="clean">\r
<delete dir="${stable}"/>\r
<delete dir="gdx/bin"/>\r
<delete dir="backends/gdx-backend-jogl/bin"/> \r
+ <delete dir="backends/gdx-backend-lwjgl/bin"/> \r
<delete dir="backends/gdx-backend-android/bin"/>\r
</target>\r
\r
<mkdir dir="gdx/bin"/> \r
<mkdir dir="backends/gdx-backend-android/bin"/>\r
<mkdir dir="backends/gdx-backend-jogl/bin"/>\r
+ <mkdir dir="backends/gdx-backend-lwjgl/bin"/>\r
</target>\r
\r
<!-- compiles the java code of all modules -->\r
</classpath>\r
</javac>\r
\r
+ <!-- build lwjgl backend -->\r
+ <javac srcdir="backends/gdx-backend-lwjgl/src" destdir="backends/gdx-backend-lwjgl/bin">\r
+ <classpath>\r
+ <pathelement location="gdx/bin"/>\r
+ <pathelement location="backends/dependencies/lwjgl.jar"/>\r
+ <pathelement location="backends/dependencies/javazoom-spi.jar"/>\r
+ <pathelement location="backends/dependencies/jl1.0.1.jar"/>\r
+ <pathelement location="backends/dependencies/jorbis.jar"/>\r
+ <pathelement location="backends/dependencies/tritonus-utils.jar"/>\r
+ </classpath>\r
+ </javac>\r
+ \r
<!-- build android backend -->\r
<javac srcdir="backends/gdx-backend-android/src" destdir="backends/gdx-backend-android/bin">\r
<classpath>\r
<exclude name="com/badlogic/gdx/utils/arial-15.png" />\r
</fileset>\r
<fileset dir="backends" includes="gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglApplication.java"/>\r
+ <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>\r
+ <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>\r
+ <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>\r
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/> \r
</javadoc>\r
</target>\r
<zipfileset src="backends/dependencies/jogl.jar"/>\r
<zipfileset src="backends/dependencies/jorbis.jar"/>\r
<zipfileset src="backends/dependencies/tritonus-utils.jar"/>\r
- </jar> \r
+ </jar>\r
+ <jar destfile="${stable}/gdx-backend-lwjgl.jar">\r
+ <fileset dir="backends/gdx-backend-lwjgl/bin"/>\r
+ <zipfileset src="backends/dependencies/lwjgl.jar"/>\r
+ <zipfileset src="backends/dependencies/javazoom-spi.jar"/>\r
+ <zipfileset src="backends/dependencies/jl1.0.1.jar"/>\r
+ <zipfileset src="backends/dependencies/jorbis.jar"/>\r
+ <zipfileset src="backends/dependencies/tritonus-utils.jar"/>\r
+ </jar>\r
<jar destfile="${stable}/gdx-backend-android.jar" basedir="backends/gdx-backend-android/bin"/>\r
\r
<copy tofile="${stable}/gdx.dll" file="gdx/windows/gdx.dll" failonerror="false"/>\r
<copy tofile="${stable}/armeabi-v7a/libgdx.so" file="gdx/libs/armeabi-v7a/libgdx.so"/> \r
<copy tofile="${stable}/README" file="gdx/dist/README"/>\r
<copy tofile="${stable}/LICENSE-2.0.html" file="gdx/dist/LICENSE-2.0.html"/>\r
- <zip destfile="${stable}.zip" basedir="${stable}"/>\r
+ <zip destfile="libgdx-nightly.zip" basedir="${stable}"/>\r
</target>\r
\r
<!-- updates dependencies of hello-world, invaders and tests android-->\r
<!-- do everything -->\r
<target name="all" depends="update-demos,update-android-tests">\r
</target>\r
-</project>
\ No newline at end of file
+</project>\r
--- /dev/null
+<!-- \r
+\r
+ libgdx extension distribution ant build file.\r
+ Performs the compilation of the extension modules\r
+ and creates a distribution out of this mess. \r
+\r
+-->\r
+<project name="gdx-extensions" default="dist" basedir=".">\r
+ <description>libgdx extension distribution build file</description>\r
+ \r
+ <!-- output directory for distribution -->\r
+ <property name="output" value="target"/>\r
+ <property name="stable" value="../target"/>\r
+ \r
+ <!-- clean output directories -->\r
+ <target name="clean">\r
+ <delete dir="${output}"/>\r
+ </target>\r
+ \r
+ <!-- init task, creates all necessary directories -->\r
+ <target name="init" depends="clean">\r
+ <mkdir dir="${output}"/>\r
+ <mkdir dir="${output}/docs/api"/>\r
+ <mkdir dir="${output}/classes/beans"/>\r
+ <mkdir dir="${output}/classes/hiero"/>\r
+ <mkdir dir="${output}/classes/image-packer"/>\r
+ <mkdir dir="${output}/classes/particle-editor"/>\r
+ <mkdir dir="${output}/classes/gdx-twl"/>\r
+ </target>\r
+ \r
+ <!-- compiles the java code of all extension modules -->\r
+ <target name="compile" depends="init">\r
+ <javac srcdir="beans/src" destdir="${output}/classes/beans"/>\r
+ \r
+ <javac srcdir="hiero/src" destdir="${output}/classes/hiero">\r
+ <classpath>\r
+ <pathelement location="${stable}/gdx.jar"/>\r
+ <pathelement location="${stable}/gdx-backend-lwjgl.jar"/>\r
+ </classpath>\r
+ </javac>\r
+ \r
+ <javac srcdir="image-packer/src" destdir="${output}/classes/image-packer">\r
+ <classpath>\r
+ <pathelement location="${stable}/gdx.jar"/>\r
+ </classpath>\r
+ </javac>\r
+ \r
+ <javac srcdir="particle-editor/src" destdir="${output}/classes/particle-editor">\r
+ <classpath>\r
+ <pathelement location="${stable}/gdx.jar"/>\r
+ <pathelement location="${stable}/gdx-backend-lwjgl.jar"/>\r
+ </classpath>\r
+ </javac>\r
+ \r
+ <javac srcdir="twl/gdx-twl/src" destdir="${output}/classes/gdx-twl">\r
+ <classpath>\r
+ <pathelement location="${stable}/gdx.jar"/>\r
+ <pathelement location="${stable}/gdx-backend-lwjgl.jar"/>\r
+ <pathelement location="twl/gdx-twl/libs/twl.jar"/>\r
+ <pathelement location="twl/gdx-twl/libs/xpp3-1.1.4c.jar"/>\r
+ </classpath>\r
+ </javac>\r
+ </target>\r
+\r
+ <!-- generates the javadoc for the extensions api -->\r
+ <target name="docs" depends="init">\r
+ <javadoc destdir="${output}/docs/api" author="true" version="true" use="true" windowtitle="Extensions API">\r
+ <fileset dir="twl/gdx-twl/src" defaultexcludes="yes">\r
+ <include name="com/badlogic/gdx/**" />\r
+ </fileset>\r
+ <fileset dir="image-packer/src" defaultexcludes="yes">\r
+ <include name="com/badlogic/gdx/**" />\r
+ </fileset>\r
+ </javadoc>\r
+ </target>\r
+ \r
+ <target name="dist" depends="compile,docs">\r
+ <jar destfile="${output}/beans.jar" basedir="${output}/classes/beans"/>\r
+ <exec executable="java">\r
+ <arg line="-jar beans/build/jarjar-1.0.jar process beans/build/rules.txt ${output}/beans.jar ${output}/beans-android.jar"/>\r
+ </exec>\r
+ <delete file="${output}/beans.jar"/>\r
+ \r
+ <jar destfile="${output}/hiero.jar">\r
+ <manifest>\r
+ <attribute name="Main-Class" value="com.badlogic.gdx.hiero.Hiero"/>\r
+ </manifest>\r
+ <fileset dir="${output}/classes/hiero"/>\r
+ <fileset dir="hiero/data"/>\r
+ <zipfileset src="${stable}/gdx.jar"/>\r
+ <zipfileset src="${stable}/gdx-backend-lwjgl.jar"/>\r
+ </jar>\r
+\r
+ <jar destfile="${output}/image-packer.jar" basedir="${output}/classes/image-packer">\r
+ <manifest>\r
+ <attribute name="Main-Class" value="com.badlogic.gdx.imagepacker.SpriteSheetPacker"/>\r
+ </manifest>\r
+ <zipfileset src="${stable}/gdx.jar"/>\r
+ </jar>\r
+ \r
+ <jar destfile="${output}/particle-editor.jar">\r
+ <manifest>\r
+ <attribute name="Main-Class" value="com.badlogic.gdx.graphics.particles.ParticleEditor"/>\r
+ </manifest>\r
+ <fileset dir="${output}/classes/particle-editor"/>\r
+ <fileset dir="particle-editor/data"/>\r
+ <zipfileset src="${stable}/gdx.jar"/>\r
+ <zipfileset src="${stable}/gdx-backend-lwjgl.jar"/>\r
+ </jar>\r
+\r
+ <jar destfile="${output}/gdx-twl.jar">\r
+ <fileset dir="${output}/classes/gdx-twl"/>\r
+ <zipfileset src="${output}/beans-android.jar"/>\r
+ <zipfileset src="twl/gdx-twl/libs/twl.jar"/>\r
+ <zipfileset src="twl/gdx-twl/libs/xpp3-1.1.4c.jar"/>\r
+ </jar>\r
+ \r
+ <copy tofile="${output}/LICENSE-2.0.html" file="../gdx/dist/LICENSE-2.0.html"/>\r
+ <zip destfile="../libgdx-extensions.zip" basedir="${output}"/>\r
+ </target>\r
+</project>\r
\r
emitter.setFlip(false, true);\r
emitter.setMaxParticleCount(15);\r
- emitter.setImagePath("data/particle.png");\r
+ emitter.setImagePath("particle.png");\r
\r
ArrayList<ParticleEmitter> emitters = editor.effect.getEmitters();\r
if (emitters.isEmpty())\r
\r
spriteBatch = new SpriteBatch();\r
\r
- font = new BitmapFont(Gdx.files.getFileHandle("data/default.fnt", FileType.Internal), Gdx.files.getFileHandle(\r
- "data/default.png", FileType.Internal), true);\r
+ font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle(\r
+ "default.png", FileType.Internal), true);\r
effectPanel.newEmitter("Untitled", true);\r
// if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");\r
Gdx.input.setInputProcessor(this);\r