diff --git a/.gitignore b/.gitignore index 6b6f30e2d..848b5f9fb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ /dist/ /build/ /netbeans/ +/sdk/jdks/local/ /jme3-core/build/ -/jme3-core/src/main/java/com/jme3/system/JmeVersion.java +/jme3-core/src/main/resources/com/jme3/system/version.properties /jme3-plugins/build/ /jme3-desktop/build/ /jme3-android-native/build/ @@ -132,3 +133,10 @@ !/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib !/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so !/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so +/.nb-gradle/ +/sdk/ant-jme/nbproject/private/ +/sdk/nbi/stub/ext/components/products/jdk/nbproject/private/ +/sdk/nbi/stub/ext/components/products/blender/nbproject/private/ +/sdk/BasicGameTemplate/nbproject/private/ +/sdk/nbi/stub/ext/components/products/jdk/build/ +/sdk/nbi/stub/ext/components/products/jdk/dist/ diff --git a/.travis.yml b/.travis.yml index 71c3b576f..25f23fcac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,9 +8,9 @@ cache: - gradle-cache - netbeans -branches: - only: - - master +# branches: +# only: +# - master notifications: slack: @@ -29,10 +29,11 @@ script: deploy: provider: releases api_key: - secure: "KbFiMt0a8FxUKvCJUYwikLYaqqGMn1p6k4OsXnGqwptQZEUIayabNLHeaD2kTNT3e6AY1ETwQLff/lB2LttmIo4g5NWW63g1K3A/HwgnhJwETengiProZ/Udl+ugPeDL/+ar43HUhFq4knBnzFKnEcHAThTPVqH/RMDvZf1UUYI=" - file: build/distributions/jME3.1.0_snapshot-github_2015-06-20.zip + secure: PuEsJd6juXBH29ByITW3ntSAyrwWs0IeFvXJ5Y2YlhojhSMtTwkoWeB6YmDJWP4fhzbajk4TQ1HlOX2IxJXSW/8ShOEIUlGXz9fHiST0dkSM+iRAUgC5enCLW5ITPTiem7eY9ZhS9miIam7ngce9jHNMh75PTzZrEJtezoALT9w= + file: build/distributions/jME3.1.0_snapshot-github_2015-08-02.zip skip_cleanup: true on: + repo: jMonkeyEngine/jmonkeyengine tags: true # before_install: diff --git a/build.gradle b/build.gradle index 8e6790230..7cbe10525 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,16 @@ import org.gradle.api.artifacts.* buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.1.0' - } + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.1.0' + } } apply plugin: 'base' +apply from: file('version.gradle') // This is applied to all sub projects subprojects { @@ -114,7 +115,12 @@ task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper gradleVersion = '2.2.1' } -String findNDK() { +ext { + ndkCommandPath = "" + ndkExists = false +} + +task configureAndroidNDK { def ndkBuildFile = "ndk-build" // if windows, use ndk-build.cmd instead if (System.properties['os.name'].toLowerCase().contains('windows')) { @@ -127,27 +133,13 @@ String findNDK() { if (System.env.ANDROID_NDK != null) { ndkBuildPath = System.env.ANDROID_NDK + File.separator + ndkBuildFile } + if (new File(ndkBuildPath).exists()) { - return ndkBuildPath - } else { - return null + ndkExists = true + ndkCommandPath = ndkBuildPath } } -boolean checkNdkExists(String ndkCommandPath) { -// String ndkCommandPath = findNDK() - if (ndkCommandPath != null && new File(ndkCommandPath).exists()) { - return true - } else { - return false - } -} - -ext { - ndkCommandPath = findNDK() - ndkExists = checkNdkExists(ndkCommandPath) -} - //class IncrementalReverseTask extends DefaultTask { // @InputDirectory // def File inputDir diff --git a/common.gradle b/common.gradle index 6af4c664f..cda51dbed 100644 --- a/common.gradle +++ b/common.gradle @@ -6,8 +6,8 @@ apply plugin: 'java' apply plugin: 'maven' apply plugin: 'maven-publish' -group = 'com.jme3' -version = jmeVersion + '-' + jmeVersionTag +group = 'com.jme3' +version = jmePomVersion sourceCompatibility = '1.6' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' @@ -24,6 +24,13 @@ dependencies { testCompile group: 'junit', name: 'junit', version: '4.10' } +jar { + manifest { + attributes 'Implementation-Title': 'jMonkeyEngine', + 'Implementation-Version': version + } +} + javadoc { failOnError = false options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED diff --git a/gradle.properties b/gradle.properties index a00139bdf..69670e660 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ jmeVersion = 3.1.0 # Version used for application and settings folder, no spaces! jmeMainVersion = 3.1 # Version addition pre-alpha-svn, Stable, Beta -jmeVersionTag = snapshot-github +jmeVersionTag = SNAPSHOT # specify if JavaDoc should be built buildJavaDoc = true diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java index f5113129f..6665752b7 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java +++ b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/animations/Ipo.java @@ -145,7 +145,7 @@ public class Ipo { float[] times = new float[framesAmount + 1]; Vector3f[] translations = new Vector3f[framesAmount + 1]; - float[] translation = new float[] { localTranslation.x, localTranslation.y, localTranslation.z }; + float[] translation = new float[3]; Quaternion[] rotations = new Quaternion[framesAmount + 1]; float[] quaternionRotation = new float[] { localRotation.getX(), localRotation.getY(), localRotation.getZ(), localRotation.getW(), }; float[] eulerRotation = localRotation.toAngles(null); @@ -165,6 +165,8 @@ public class Ipo { // calculating track data for (int frame = startFrame; frame <= stopFrame; ++frame) { + boolean translationSet = false; + translation[0] = translation[1] = translation[2] = 0; int index = frame - startFrame; times[index] = index * timeBetweenFrames;// start + (frame - 1) * timeBetweenFrames; for (int j = 0; j < bezierCurves.length; ++j) { @@ -173,15 +175,18 @@ public class Ipo { // LOCATION case AC_LOC_X: translation[0] = (float) value; + translationSet = true; break; case AC_LOC_Y: if (swapAxes && value != 0) { value = -value; } translation[yIndex] = (float) value; + translationSet = true; break; case AC_LOC_Z: translation[zIndex] = (float) value; + translationSet = true; break; // EULER ROTATION @@ -235,7 +240,11 @@ public class Ipo { LOGGER.log(Level.WARNING, "Unknown ipo curve type: {0}.", bezierCurves[j].getType()); } } - translations[index] = localRotation.multLocal(new Vector3f(translation[0], translation[1], translation[2])); + if(translationSet) { + translations[index] = localRotation.multLocal(new Vector3f(translation[0], translation[1], translation[2])); + } else { + translations[index] = new Vector3f(); + } if(boneContext != null) { if(boneContext.getBone().getParent() == null && boneContext.is(BoneContext.NO_LOCAL_LOCATION)) { diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp index 0d9621bb8..c9fef97cb 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp @@ -811,39 +811,72 @@ extern "C" { /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: getAngularFactor - * Signature: (J)F + * Signature: (JLcom/jme3/math/Vector3f;)V */ - JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor - (JNIEnv *env, jobject object, jlong bodyId) { + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { btRigidBody* body = reinterpret_cast(bodyId); if (body == NULL) { jclass newExc = env->FindClass("java/lang/NullPointerException"); env->ThrowNew(newExc, "The native object does not exist."); - return 0; + return; } - return body->getAngularFactor().getX(); + jmeBulletUtil::convert(env, &body->getAngularFactor(), factor); } + /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: setAngularFactor - * Signature: (JF)V + * Signature: (JLcom/jme3/math/Vector3f;)V */ JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *env, jobject object, jlong bodyId, jfloat value) { + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { btRigidBody* body = reinterpret_cast(bodyId); if (body == NULL) { jclass newExc = env->FindClass("java/lang/NullPointerException"); env->ThrowNew(newExc, "The native object does not exist."); return; } - btVector3 vec1 = btVector3(); - vec1.setX(value); - vec1.setY(value); - vec1.setZ(value); - body->setAngularFactor(vec1); + btVector3 vec = btVector3(); + jmeBulletUtil::convert(env, factor, &vec); + body->setAngularFactor(vec); } + /* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: getLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { + btRigidBody* body = reinterpret_cast(bodyId); + if (body == NULL) { + jclass newExc = env->FindClass("java/lang/NullPointerException"); + env->ThrowNew(newExc, "The native object does not exist."); + return; + } + jmeBulletUtil::convert(env, &body->getLinearFactor(), factor); + } + + /* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: setLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ + JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearFactor + (JNIEnv *env, jobject object, jlong bodyId, jobject factor) { + btRigidBody* body = reinterpret_cast(bodyId); + if (body == NULL) { + jclass newExc = env->FindClass("java/lang/NullPointerException"); + env->ThrowNew(newExc, "The native object does not exist."); + return; + } + btVector3 vec = btVector3(); + jmeBulletUtil::convert(env, factor, &vec); + body->setLinearFactor(vec); + } + #ifdef __cplusplus } #endif diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h index aa09a620a..67ba9e609 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h +++ b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h @@ -396,18 +396,35 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngula /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: getAngularFactor - * Signature: (J)F + * Signature: (JLcom/jme3/math/Vector3f;)V */ -JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor - (JNIEnv *, jobject, jlong); +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor + (JNIEnv *, jobject, jlong, jobject); + /* * Class: com_jme3_bullet_objects_PhysicsRigidBody * Method: setAngularFactor - * Signature: (JF)V + * Signature: (JLcom/jme3/math/Vector3f;)V */ JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor - (JNIEnv *, jobject, jlong, jfloat); + (JNIEnv *, jobject, jlong, jobject); + +/* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: getLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearFactor + (JNIEnv *, jobject, jlong, jobject); + +/* + * Class: com_jme3_bullet_objects_PhysicsRigidBody + * Method: setLinearFactor + * Signature: (JLcom/jme3/math/Vector3f;)V + */ +JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearFactor + (JNIEnv *, jobject, jlong, jobject); #ifdef __cplusplus } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java index 40417c775..6f6eb4d76 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java @@ -627,16 +627,44 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { private native float getAngularSleepingThreshold(long objectId); public float getAngularFactor() { - return getAngularFactor(objectId); + return getAngularFactor(null).getX(); } - private native float getAngularFactor(long objectId); + public Vector3f getAngularFactor(Vector3f store) { + // doing like this prevent from breaking the API + if (store == null) { + store = new Vector3f(); + } + getAngularFactor(objectId, store); + return store; + } + + private native void getAngularFactor(long objectId, Vector3f vec); public void setAngularFactor(float factor) { - setAngularFactor(objectId, factor); + setAngularFactor(objectId, new Vector3f(factor, factor, factor)); + } + + public void setAngularFactor(Vector3f factor) { + setAngularFactor(objectId, factor); + } + + private native void setAngularFactor(long objectId, Vector3f factor); + + public Vector3f getLinearFactor() { + Vector3f vec = new Vector3f(); + getLinearFactor(objectId, vec); + return vec; } - private native void setAngularFactor(long objectId, float factor); + private native void getLinearFactor(long objectId, Vector3f vec); + + public void setLinearFactor(Vector3f factor) { + setLinearFactor(objectId, factor); + } + + private native void setLinearFactor(long objectId, Vector3f factor); + /** * do not use manually, joints are added automatically @@ -673,7 +701,13 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { capsule.write(getGravity(), "gravity", Vector3f.ZERO); capsule.write(getFriction(), "friction", 0.5f); capsule.write(getRestitution(), "restitution", 0); - capsule.write(getAngularFactor(), "angularFactor", 1); + Vector3f angularFactor = getAngularFactor(null); + if (angularFactor.x == angularFactor.y && angularFactor.y == angularFactor.z) { + capsule.write(getAngularFactor(), "angularFactor", 1); + } else { + capsule.write(getAngularFactor(null), "angularFactor", Vector3f.UNIT_XYZ); + capsule.write(getLinearFactor(), "linearFactor", Vector3f.UNIT_XYZ); + } capsule.write(kinematic, "kinematic", false); capsule.write(getLinearDamping(), "linearDamping", 0); @@ -703,7 +737,13 @@ public class PhysicsRigidBody extends PhysicsCollisionObject { setKinematic(capsule.readBoolean("kinematic", false)); setRestitution(capsule.readFloat("restitution", 0)); - setAngularFactor(capsule.readFloat("angularFactor", 1)); + Vector3f angularFactor = (Vector3f) capsule.readSavable("angularFactor", Vector3f.NAN.clone()); + if(angularFactor == Vector3f.NAN) { + setAngularFactor(capsule.readFloat("angularFactor", 1)); + } else { + setAngularFactor(angularFactor); + setLinearFactor((Vector3f) capsule.readSavable("linearFactor", Vector3f.UNIT_XYZ.clone())); + } setDamping(capsule.readFloat("linearDamping", 0), capsule.readFloat("angularDamping", 0)); setSleepingThresholds(capsule.readFloat("linearSleepingThreshold", 0.8f), capsule.readFloat("angularSleepingThreshold", 1.0f)); setCcdMotionThreshold(capsule.readFloat("ccdMotionThreshold", 0)); diff --git a/jme3-core/build.gradle b/jme3-core/build.gradle index bd699f52a..2a45d440b 100644 --- a/jme3-core/build.gradle +++ b/jme3-core/build.gradle @@ -12,55 +12,23 @@ sourceSets { } } -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'org.ajoberstar:gradle-git:1.0.0-rc.1' - } -} - -import java.text.SimpleDateFormat -import org.ajoberstar.grgit.* - -task updateVersion << { - - def verfile = file('src/main/java/com/jme3/system/JmeVersion.java') - def jmeGitHash - def jmeShortGitHash - def jmeBuildDate - def jmeBranchName - - try { - def grgit = Grgit.open(project.file('.').parent) - jmeGitHash = grgit.head().id - jmeShortGitHash = grgit.head().abbreviatedId - jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) - jmeBranchName = grgit.branch.current.name - } catch (ex) { - // Failed to get repo info - logger.warn("Failed to get repository info: " + ex.message + ". " + \ - "Only partial build info will be generated.") - - jmeGitHash = "" - jmeShortGitHash = "" - jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) - jmeBranchName = "unknown" - } - - verfile.text = "\npackage com.jme3.system;\n\n" + - "/**\n * THIS IS AN AUTO-GENERATED FILE..\n * DO NOT MODIFY!\n */\n" + - "public class JmeVersion {\n" + - " public static final String BUILD_DATE = \"${jmeBuildDate}\";\n" + - " public static final String BRANCH_NAME = \"${jmeBranchName}\";\n" + - " public static final String GIT_HASH = \"${jmeGitHash}\";\n" + - " public static final String GIT_SHORT_HASH = \"${jmeShortGitHash}\";\n" + - " public static final String FULL_NAME = \"jMonkeyEngine ${jmeVersion} (${jmeVersionTag})\";\n" + - "}\n" +task updateVersionPropertiesFile << { + def verfile = file('src/main/resources/com/jme3/system/version.properties') + verfile.text = "# THIS IS AN AUTO-GENERATED FILE..\n" + + "# DO NOT MODIFY!\n" + + "build.date=${jmeBuildDate}\n" + + "git.revision=${jmeRevision}\n" + + "git.branch=${jmeBranchName}\n" + + "git.hash=${jmeGitHash}\n" + + "git.hash.short=${jmeShortGitHash}\n" + + "git.tag=${jmeGitTag}\n" + + "name.full=jMonkeyEngine ${jmeFullVersion}\n" + + "version.full=${jmeFullVersion}\n" + + "version.number=${jmeVersion}\n" + + "version.tag=${jmeVersionTag}" } -compileJava.dependsOn(updateVersion) +compileJava.dependsOn(updateVersionPropertiesFile) dependencies { } diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 6d4e4abba..ebfbc53b0 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -376,7 +376,9 @@ public class GLRenderer implements Renderer { caps.add(Caps.TextureFilterAnisotropic); } - if (hasExtension("GL_EXT_framebuffer_object") || gl3 != null) { + if (hasExtension("GL_EXT_framebuffer_object") + || gl3 != null + || caps.contains(Caps.OpenGLES20)) { caps.add(Caps.FrameBuffer); limits.put(Limits.RenderBufferSize, getInteger(GLFbo.GL_MAX_RENDERBUFFER_SIZE_EXT)); diff --git a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java index 9a920093d..c3a0ab4bb 100644 --- a/jme3-core/src/main/java/com/jme3/scene/BatchNode.java +++ b/jme3-core/src/main/java/com/jme3/scene/BatchNode.java @@ -444,6 +444,7 @@ public class BatchNode extends GeometryGroupNode { int maxWeights = -1; Mesh.Mode mode = null; + float lineWidth = 1f; for (Geometry geom : geometries) { totalVerts += geom.getVertexCount(); totalTris += geom.getTriangleCount(); @@ -452,6 +453,7 @@ public class BatchNode extends GeometryGroupNode { maxVertCount = geom.getVertexCount(); } Mesh.Mode listMode; + float listLineWidth = 1f; int components; switch (geom.getMesh().getMode()) { case Points: @@ -462,6 +464,7 @@ public class BatchNode extends GeometryGroupNode { case LineStrip: case Lines: listMode = Mesh.Mode.Lines; + listLineWidth = geom.getMesh().getLineWidth(); components = 2; break; case TriangleFan: @@ -491,13 +494,21 @@ public class BatchNode extends GeometryGroupNode { if (mode != null && mode != listMode) { throw new UnsupportedOperationException("Cannot combine different" + " primitive types: " + mode + " != " + listMode); - } + } mode = listMode; + if (mode == Mesh.Mode.Lines) { + if (lineWidth != 1f && listLineWidth != lineWidth) { + throw new UnsupportedOperationException("When using Mesh Line mode, cannot combine meshes with different line width " + + lineWidth + " != " + listLineWidth); + } + lineWidth = listLineWidth; + } compsForBuf[VertexBuffer.Type.Index.ordinal()] = components; } outMesh.setMaxNumWeights(maxWeights); outMesh.setMode(mode); + outMesh.setLineWidth(lineWidth); if (totalVerts >= 65536) { // make sure we create an UnsignedInt buffer so // we can fit all of the meshes diff --git a/jme3-core/src/main/java/com/jme3/system/JmeVersion.java b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java new file mode 100644 index 000000000..0492df950 --- /dev/null +++ b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2009-2015 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.jme3.system; + +import java.io.IOException; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Pulls in version info from the version.properties file. + * + * @author Kirill Vainer + */ +public class JmeVersion { + + private static final Logger logger = Logger.getLogger(JmeVersion.class.getName()); + private static final Properties props = new Properties(); + + static { + try { + props.load(JmeVersion.class.getResourceAsStream("version.properties")); + } catch (IOException ex) { + logger.log(Level.WARNING, "Unable to read version info!", ex); + } + } + + public static final String BUILD_DATE = props.getProperty("build.date", "1900-01-01"); + public static final String BRANCH_NAME = props.getProperty("git.branch", "unknown"); + public static final String GIT_HASH = props.getProperty("git.hash", ""); + public static final String GIT_SHORT_HASH = props.getProperty("git.hash.short", ""); + public static final String GIT_TAG = props.getProperty("git.tag", ""); + public static final String VERSION_NUMBER = props.getProperty("version.number", ""); + public static final String VERSION_TAG = props.getProperty("version.tag", ""); + public static final String VERSION_FULL = props.getProperty("version.full", ""); + public static final String FULL_NAME = props.getProperty("name.full", "jMonkeyEngine (unknown version)"); +} diff --git a/jme3-core/src/main/resources/com/jme3/system/version.properties b/jme3-core/src/main/resources/com/jme3/system/version.properties new file mode 100644 index 000000000..98168a14e --- /dev/null +++ b/jme3-core/src/main/resources/com/jme3/system/version.properties @@ -0,0 +1,11 @@ +# THIS IS AN AUTO-GENERATED FILE.. +# DO NOT MODIFY! +build.date=1900-01-01 +git.revision=0 +git.branch=unknown +git.hash= +git.hash.short= +git.tag= +name.full=jMonkeyEngine 3.1.0-UNKNOWN +version.number=3.1.0 +version.tag=SNAPSHOT \ No newline at end of file diff --git a/sdk/BasicGameTemplate/nbproject/project.properties b/sdk/BasicGameTemplate/nbproject/project.properties index ac4b3d2a6..8f2414b51 100644 --- a/sdk/BasicGameTemplate/nbproject/project.properties +++ b/sdk/BasicGameTemplate/nbproject/project.properties @@ -50,8 +50,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/JME3TestsTemplate/nbproject/project.properties b/sdk/JME3TestsTemplate/nbproject/project.properties index 2a8d46f22..b502a6417 100644 --- a/sdk/JME3TestsTemplate/nbproject/project.properties +++ b/sdk/JME3TestsTemplate/nbproject/project.properties @@ -32,8 +32,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/sdk/JME3TestsTemplateAndroid/nbproject/project.properties b/sdk/JME3TestsTemplateAndroid/nbproject/project.properties index e3a940489..f020f7d80 100644 --- a/sdk/JME3TestsTemplateAndroid/nbproject/project.properties +++ b/sdk/JME3TestsTemplateAndroid/nbproject/project.properties @@ -47,8 +47,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/ant-jme/nbproject/project.properties b/sdk/ant-jme/nbproject/project.properties index 80281cc3b..3a1490871 100644 --- a/sdk/ant-jme/nbproject/project.properties +++ b/sdk/ant-jme/nbproject/project.properties @@ -36,8 +36,8 @@ javac.compilerargs= javac.deprecation=false javac.processorpath=\ ${javac.classpath} -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/sdk/build.gradle b/sdk/build.gradle index b70e80b13..bcf6311e0 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -165,7 +165,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ "compile-dependency"{} "run-dependency"{ "release-version" "1" - "specification-version" "3.0.0" + "specification-version" jmeVersion } } } @@ -388,12 +388,14 @@ copyTestSources.outputs.dir "JME3TestsTemplate/src/" copyTestSources.outputs.dir "JME3TestsTemplateAndroid/src/" ant.properties['plugins.version'] = jmeVersion -ant.properties['app.version']= jmeMainVersion + "-" + jmeVersionTag +ant.properties['app.version']= jmeFullVersion +ant.properties['git.revision']= jmeRevision task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml, copyTestSources]) <<{ ant.propertyfile(file: "nbproject/project.properties") { entry( key: "plugins.version", value: "${jmeVersion}") - entry( key: "app.version", value: "${jmeMainVersion + "-" + jmeVersionTag}") + entry( key: "app.version", value: "${jmeFullVersion}") + entry( key: "git.revision", value: "${jmeRevision}") } ant.ant(dir: ".", antfile: "build.xml", target: "build") } diff --git a/sdk/build.xml b/sdk/build.xml index acc5c1d04..b843d779a 100644 --- a/sdk/build.xml +++ b/sdk/build.xml @@ -12,7 +12,6 @@ - @@ -157,7 +156,7 @@ replace="OpenIDE-Module-Specification-Version: ${plugins.version}" byline="true"/> @@ -167,7 +166,7 @@ replace="OpenIDE-Module-Implementation-Version: 0" byline="true"/> @@ -176,9 +175,6 @@ - - - @@ -191,105 +187,19 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Setting implementation version for ${module_dir} to revision: ${svn.LastChangedRev} - + Setting implementation version for ${module_dir} to revision: ${git.revision} + - Removing implementation version for ${module_dir} from revision: ${svn.LastChangedRev} - + Removing implementation version for ${module_dir} from revision: ${git.revision} + - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -311,6 +221,8 @@ + + @@ -339,7 +251,7 @@ section="devel" depends="sun-java6-jdk" maintainer="jMonkeyEngine" - homepage="http://www.jmonkeyengine.com" + homepage="http://www.jmonkeyengine.org" postrm="debscripts/postrm" > @@ -360,57 +272,4 @@ - - - - Upload windows installers to googlecode.. - - - Upload linux installers to googlecode.. - - - Upload mac installer to googlecode.. - - - - - - - - diff --git a/sdk/jdks/build-osx-zip.sh b/sdk/jdks/build-osx-zip.sh index cf1051901..db3c44e99 100755 --- a/sdk/jdks/build-osx-zip.sh +++ b/sdk/jdks/build-osx-zip.sh @@ -1,5 +1,5 @@ #!/bin/sh -#(c) jMonkeyEngine.com +#(c) jmonkeyengine.org #Author Normen Hansen set -e rm -rf jdk-macosx.zip diff --git a/sdk/jdks/build-package.sh b/sdk/jdks/build-package.sh index c11a8ff2f..6f9c53503 100755 --- a/sdk/jdks/build-package.sh +++ b/sdk/jdks/build-package.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -#(c) jMonkeyEngine.com +#(c) jmonkeyengine.org #This script creates SFX binaries of the JDK for the specified platform #Author Normen Hansen diff --git a/sdk/jme3-android/nbproject/project.properties b/sdk/jme3-android/nbproject/project.properties index e2ab10b96..9b1b7cb61 100644 --- a/sdk/jme3-android/nbproject/project.properties +++ b/sdk/jme3-android/nbproject/project.properties @@ -3,7 +3,7 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-angelfont/nbproject/project.properties b/sdk/jme3-angelfont/nbproject/project.properties index 44c34ecb9..0411b6ff9 100644 --- a/sdk/jme3-angelfont/nbproject/project.properties +++ b/sdk/jme3-angelfont/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-assetpack-support/nbproject/project.properties b/sdk/jme3-assetpack-support/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-assetpack-support/nbproject/project.properties +++ b/sdk/jme3-assetpack-support/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-blender/nbproject/project.properties b/sdk/jme3-blender/nbproject/project.properties index 33a6b9205..fa453f9a3 100644 --- a/sdk/jme3-blender/nbproject/project.properties +++ b/sdk/jme3-blender/nbproject/project.properties @@ -1,7 +1,7 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Kaelthas nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-cinematics/nbproject/project.properties b/sdk/jme3-cinematics/nbproject/project.properties index 437a62d3a..4b4ae0191 100644 --- a/sdk/jme3-cinematics/nbproject/project.properties +++ b/sdk/jme3-cinematics/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=R\u00e9my Bouquet nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-codepalette/nbproject/project.properties b/sdk/jme3-codepalette/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-codepalette/nbproject/project.properties +++ b/sdk/jme3-codepalette/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-baselibs/nbproject/project.properties b/sdk/jme3-core-baselibs/nbproject/project.properties index 8bcd2222a..d4692bc80 100644 --- a/sdk/jme3-core-baselibs/nbproject/project.properties +++ b/sdk/jme3-core-baselibs/nbproject/project.properties @@ -1,7 +1,7 @@ -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-libraries/nbproject/project.properties b/sdk/jme3-core-libraries/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-core-libraries/nbproject/project.properties +++ b/sdk/jme3-core-libraries/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-core-updatecenters/nbproject/project.properties b/sdk/jme3-core-updatecenters/nbproject/project.properties index 9d2616783..98f519f77 100644 --- a/sdk/jme3-core-updatecenters/nbproject/project.properties +++ b/sdk/jme3-core-updatecenters/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties index 5a898643f..dd627e347 100644 --- a/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties +++ b/sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/Bundle.properties @@ -1,6 +1,6 @@ #jMP update centers -com_jme3_gde_core_update_center_nightly=http://updates.jmonkeyengine.org/nightly/3.0/plugins/updates.xml -com_jme3_gde_core_update_center_stable=http://updates.jmonkeyengine.org/stable/3.0/plugins/updates.xml +com_jme3_gde_core_update_center_nightly=http://updates.jmonkeyengine.org/nightly/3.1/plugins/updates.xml +com_jme3_gde_core_update_center_stable=http://updates.jmonkeyengine.org/stable/3.1/plugins/updates.xml com_jme3_jmp_contributions_update_center=http://updates.jmonkeyengine.org/contributions/updates.xml #jMP update centers diff --git a/sdk/jme3-core/nbproject/project.properties b/sdk/jme3-core/nbproject/project.properties index 4206d1dff..88500da6c 100644 --- a/sdk/jme3-core/nbproject/project.properties +++ b/sdk/jme3-core/nbproject/project.properties @@ -1,10 +1,10 @@ #Thu, 25 Aug 2011 20:26:48 +0200 file.reference.DDSUtils.jar=release/modules/ext/DDSUtils.jar #Thu, 25 Aug 2011 19:32:54 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true project.license=jme diff --git a/sdk/jme3-desktop-executables/nbproject/project.properties b/sdk/jme3-desktop-executables/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-desktop-executables/nbproject/project.properties +++ b/sdk/jme3-desktop-executables/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-documentation/nbproject/project.properties b/sdk/jme3-documentation/nbproject/project.properties index 232d11645..39ff046d1 100644 --- a/sdk/jme3-documentation/nbproject/project.properties +++ b/sdk/jme3-documentation/nbproject/project.properties @@ -1,6 +1,6 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Normen Hansen, Ruth Kusterer, many others spec.version.base=3.1.0 diff --git a/sdk/jme3-gui/nbproject/project.properties b/sdk/jme3-gui/nbproject/project.properties index 291042fd5..9a27f3767 100644 --- a/sdk/jme3-gui/nbproject/project.properties +++ b/sdk/jme3-gui/nbproject/project.properties @@ -10,10 +10,10 @@ file.reference.slf4j-simple-1.7.7.jar=release/modules/ext/slf4j-simple-1.7.7.jar file.reference.swingtonifty.jar=release/modules/ext/swingtonifty.jar file.reference.xsom-20110101-SNAPSHOT.jar=release/modules/ext/xsom-20110101-SNAPSHOT.jar #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Relucri nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-lwjgl-applet/nbproject/project.properties b/sdk/jme3-lwjgl-applet/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-lwjgl-applet/nbproject/project.properties +++ b/sdk/jme3-lwjgl-applet/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-materialeditor/nbproject/project.properties b/sdk/jme3-materialeditor/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-materialeditor/nbproject/project.properties +++ b/sdk/jme3-materialeditor/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-model-importer/nbproject/project.properties b/sdk/jme3-model-importer/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-model-importer/nbproject/project.properties +++ b/sdk/jme3-model-importer/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-navmesh-gen/nbproject/project.properties b/sdk/jme3-navmesh-gen/nbproject/project.properties index 65d1fb700..78227c671 100644 --- a/sdk/jme3-navmesh-gen/nbproject/project.properties +++ b/sdk/jme3-navmesh-gen/nbproject/project.properties @@ -1,6 +1,6 @@ javac.source=1.6 javac.compilerargs=-Xlint -Xlint:-serial license.file=../license-jme.txt -nbm.homepage=http://www.jmonkeyengine.com +nbm.homepage=http://www.jmonkeyengine.org nbm.module.author=Brent Owens spec.version.base=3.1.0 diff --git a/sdk/jme3-obfuscate/nbproject/project.properties b/sdk/jme3-obfuscate/nbproject/project.properties index 61598fa7b..93b5b7a4b 100644 --- a/sdk/jme3-obfuscate/nbproject/project.properties +++ b/sdk/jme3-obfuscate/nbproject/project.properties @@ -1,5 +1,5 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial nbm.homepage=http\://proguard.sourceforge.net/ nbm.module.author=Normen Hansen diff --git a/sdk/jme3-ogretools/nbproject/project.properties b/sdk/jme3-ogretools/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-ogretools/nbproject/project.properties +++ b/sdk/jme3-ogretools/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-ogrexml/nbproject/project.properties b/sdk/jme3-ogrexml/nbproject/project.properties index 9b996acdd..4ad5ba7ab 100644 --- a/sdk/jme3-ogrexml/nbproject/project.properties +++ b/sdk/jme3-ogrexml/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-baselibs/nbproject/project.properties b/sdk/jme3-project-baselibs/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-baselibs/nbproject/project.properties +++ b/sdk/jme3-project-baselibs/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-libraries/nbproject/project.properties b/sdk/jme3-project-libraries/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-libraries/nbproject/project.properties +++ b/sdk/jme3-project-libraries/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-project-testdata/nbproject/project.properties b/sdk/jme3-project-testdata/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-project-testdata/nbproject/project.properties +++ b/sdk/jme3-project-testdata/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-scenecomposer/nbproject/project.properties b/sdk/jme3-scenecomposer/nbproject/project.properties index e0b462857..eec6af9cd 100644 --- a/sdk/jme3-scenecomposer/nbproject/project.properties +++ b/sdk/jme3-scenecomposer/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-templates/nbproject/project.properties b/sdk/jme3-templates/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-templates/nbproject/project.properties +++ b/sdk/jme3-templates/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-terrain-editor/nbproject/project.properties b/sdk/jme3-terrain-editor/nbproject/project.properties index a0916a395..0ed16b7c1 100644 --- a/sdk/jme3-terrain-editor/nbproject/project.properties +++ b/sdk/jme3-terrain-editor/nbproject/project.properties @@ -1,7 +1,7 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Brent Owens, Normen Hansen spec.version.base=3.1.0 diff --git a/sdk/jme3-tests-template/nbproject/project.properties b/sdk/jme3-tests-template/nbproject/project.properties index 2e01f5d86..513fb20e4 100644 --- a/sdk/jme3-tests-template/nbproject/project.properties +++ b/sdk/jme3-tests-template/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:48 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=jMonkeyEngine nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-texture-editor/nbproject/project.properties b/sdk/jme3-texture-editor/nbproject/project.properties index c4186f216..c3e2aa46a 100644 --- a/sdk/jme3-texture-editor/nbproject/project.properties +++ b/sdk/jme3-texture-editor/nbproject/project.properties @@ -1,8 +1,8 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=pgi nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jme3-vehicle-creator/nbproject/project.properties b/sdk/jme3-vehicle-creator/nbproject/project.properties index 44c34ecb9..0411b6ff9 100644 --- a/sdk/jme3-vehicle-creator/nbproject/project.properties +++ b/sdk/jme3-vehicle-creator/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:50 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-wavefront/nbproject/project.properties b/sdk/jme3-wavefront/nbproject/project.properties index 9d2616783..98f519f77 100644 --- a/sdk/jme3-wavefront/nbproject/project.properties +++ b/sdk/jme3-wavefront/nbproject/project.properties @@ -1,4 +1,4 @@ #Thu, 25 Aug 2011 20:26:49 +0200 -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial spec.version.base=3.1.0 diff --git a/sdk/jme3-welcome-screen/nbproject/project.properties b/sdk/jme3-welcome-screen/nbproject/project.properties index 99dbdf441..ae558b0e0 100644 --- a/sdk/jme3-welcome-screen/nbproject/project.properties +++ b/sdk/jme3-welcome-screen/nbproject/project.properties @@ -1,7 +1,7 @@ -javac.source=1.5 +javac.source=1.6 javac.compilerargs=-Xlint -Xlint\:-serial license.file=../license-jme.txt -nbm.homepage=http\://www.jmonkeyengine.com +nbm.homepage=http\://www.jmonkeyengine.org nbm.module.author=Normen Hansen, jiyarza nbm.needs.restart=true spec.version.base=3.1.0 diff --git a/sdk/jmonkeyplatform.png b/sdk/jmonkeyplatform.png index eee01902f..36675de77 100644 Binary files a/sdk/jmonkeyplatform.png and b/sdk/jmonkeyplatform.png differ diff --git a/sdk/license-jme.txt b/sdk/license-jme.txt index 9f1503915..9c2661e5b 100644 --- a/sdk/license-jme.txt +++ b/sdk/license-jme.txt @@ -1,4 +1,4 @@ -Copyright (c) 2003-2012 jMonkeyEngine +Copyright (c) 2003-2015 jMonkeyEngine All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/sdk/nbi/stub/ext/components/products/blender/nbproject/project.properties b/sdk/nbi/stub/ext/components/products/blender/nbproject/project.properties index 91a39fd25..c2be09d67 100644 --- a/sdk/nbi/stub/ext/components/products/blender/nbproject/project.properties +++ b/sdk/nbi/stub/ext/components/products/blender/nbproject/project.properties @@ -27,8 +27,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/sdk/nbi/stub/ext/components/products/blender/src/org/mycompany/ConfigurationLogic.java b/sdk/nbi/stub/ext/components/products/blender/src/org/mycompany/ConfigurationLogic.java index be992b57b..d1616e459 100644 --- a/sdk/nbi/stub/ext/components/products/blender/src/org/mycompany/ConfigurationLogic.java +++ b/sdk/nbi/stub/ext/components/products/blender/src/org/mycompany/ConfigurationLogic.java @@ -1,8 +1,11 @@ package org.mycompany; +import java.io.File; import java.util.List; import org.netbeans.installer.product.Registry; +import org.netbeans.installer.product.components.Product; import org.netbeans.installer.product.components.ProductConfigurationLogic; +import org.netbeans.installer.utils.LogManager; import org.netbeans.installer.utils.helper.RemovalMode; import org.netbeans.installer.utils.exceptions.InitializationException; import org.netbeans.installer.utils.exceptions.InstallationException; @@ -35,6 +38,20 @@ public class ConfigurationLogic extends ProductConfigurationLogic { @Override public void install(Progress progress) throws InstallationException { + final Product product = getProduct(); + final File installLocation = product.getInstallationLocation(); + LogManager.log("Setting Blender files as executable"); + setExecutableFile(installLocation, "blender"); + setExecutableFile(installLocation, "blenderplayer"); + setExecutableFile(installLocation, "blender-softwaregl"); + } + private static void setExecutableFile(File parent, String path) { + File binFile = new File(parent, path); + try { + binFile.setExecutable(true, false); + } catch (Exception ex) { + ex.printStackTrace(); + } } @Override diff --git a/sdk/nbi/stub/ext/components/products/helloworld/nbproject/project.properties b/sdk/nbi/stub/ext/components/products/helloworld/nbproject/project.properties index df20bfc24..ffc8588bc 100644 --- a/sdk/nbi/stub/ext/components/products/helloworld/nbproject/project.properties +++ b/sdk/nbi/stub/ext/components/products/helloworld/nbproject/project.properties @@ -27,8 +27,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties index 273df84b3..956a1f2e6 100644 --- a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties +++ b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties @@ -1,6 +1,7 @@ CL.app.name={product-simple-name} +CL.app.categories={product-categories} CL.desktop.shortcut.name={product-name} -CL.desktop.shortcut.description= +CL.desktop.shortcut.description={product-description} CL.desktop.shortcut.path= CL.unix.icon.name={product-icon-name} CL.unix.icon.resource=org/mycompany/{product-icon-name} @@ -8,7 +9,7 @@ CL.unix.icon.resource=org/mycompany/{product-icon-name} CL.start.menu.shortcut.name={product-name} CL.start.menu.shortcut.name.macosx={product-name} -CL.start.menu.shortcut.description= +CL.start.menu.shortcut.description={product-description} CL.start.menu.shortcut.path= CL.install.desktop=Creating shortcut on desktop diff --git a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java index 6d4c7e811..d6cd82a78 100644 --- a/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java +++ b/sdk/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java @@ -198,16 +198,37 @@ public class ConfigurationLogic extends ProductConfigurationLogic { throw new InstallationException("Cannot copy JDK",e); } // set permissions: - File binDir = new File(target, "bin"); - for (File file : binDir.listFiles()) { - try { - file.setExecutable(true); - } catch (Exception ex) { ex.printStackTrace(); } - } + // ADDED BY KIRILL: force correct permissions for JDK files + LogManager.log("Setting JDK files as executable"); + setExecutableContents(target, "bin"); + setExecutableContents(target, "db/bin"); + setExecutableContents(target, "jre/bin"); + setExecutableFile(target, "lib/jexec"); + setExecutableFile(target, "lib/amd64/libjawt.so"); + setExecutableFile(target, "lib/amd64/jli/libjli.so"); + setExecutableFile(target, "lib/visualvm/platform/lib/nbexec"); // to add uninstaller logic: SystemUtils.getNativeUtils().addUninstallerJVM(new LauncherResource(false, target)); } } + private static void setExecutableContents(File parent, String path) { + File binDir = new File(parent, path); + for (File file : binDir.listFiles()) { + try { + file.setExecutable(true, false); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + } + private static void setExecutableFile(File parent, String path) { + File binFile = new File(parent, path); + try { + binFile.setExecutable(true, false); + } catch (Exception ex) { + ex.printStackTrace(); + } + } @Override public void uninstall(Progress progress) throws UninstallationException { @@ -464,9 +485,8 @@ public class ConfigurationLogic extends ProductConfigurationLogic { } public static final String SHORTCUT_FILENAME = ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name") + ".desktop"; // NOI18N - public static final String[] SHORTCUT_CATEGORIES = new String[]{ - "Application" - }; + public static final String[] SHORTCUT_CATEGORIES = + ResourceUtils.getString(ConfigurationLogic.class, "CL.app.categories").split(","); // NOI18N public static final String BIN_SUBDIR = "bin/"; public static final String EXECUTABLE_WINDOWS = diff --git a/sdk/nbi/stub/ext/components/products/jdk/nbproject/project.properties b/sdk/nbi/stub/ext/components/products/jdk/nbproject/project.properties index 47b4c3fee..98fbf3a49 100644 --- a/sdk/nbi/stub/ext/components/products/jdk/nbproject/project.properties +++ b/sdk/nbi/stub/ext/components/products/jdk/nbproject/project.properties @@ -27,8 +27,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/sdk/nbi/stub/ext/engine/nbproject/project.properties b/sdk/nbi/stub/ext/engine/nbproject/project.properties index 60acb0db2..591b29d26 100644 --- a/sdk/nbi/stub/ext/engine/nbproject/project.properties +++ b/sdk/nbi/stub/ext/engine/nbproject/project.properties @@ -67,8 +67,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.5 -javac.target=1.5 +javac.source=1.6 +javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/sdk/nbi/stub/template.xml b/sdk/nbi/stub/template.xml index 80184f717..be69f1883 100644 --- a/sdk/nbi/stub/template.xml +++ b/sdk/nbi/stub/template.xml @@ -124,9 +124,11 @@ - + + + diff --git a/sdk/nbproject/project.properties b/sdk/nbproject/project.properties index dbcdb7343..d7206b308 100644 --- a/sdk/nbproject/project.properties +++ b/sdk/nbproject/project.properties @@ -3,6 +3,8 @@ app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif #same as ${branding.token} app.name=jmonkeyplatform app.title=jMonkeyEngine SDK +app.description=A complete 3D game development suite written purely in Java. +app.categories=Development,Graphics,IDE,3DGraphics,Java app.icon.icns=jmonkeyplatform.icns #version name used for application and settings folder, no spaces! app.version=3.1-snapshot-github diff --git a/version.gradle b/version.gradle new file mode 100644 index 000000000..4aa9c1af8 --- /dev/null +++ b/version.gradle @@ -0,0 +1,107 @@ +/* + Version Info Examples + ===================== + + Nightly Build Snapshot + * Full Version: 3.1.0-5124 + * POM Version: 3.1.0-SNAPSHOT + * NBM Version: 3.1.0.5124 + * NBM UC Suffix: nightly/3.1/plugins + + Nightly Build Snapshot (PBRIsComing branch) + * Full Version: 3.1.0-PBRIsComing-5124 + * POM Version: 3.1.0-PBRIsComing-SNAPSHOT + * NBM Version: 3.1.0.5124 + * NBM UC Suffix: PBRIsComing-nightly/3.1/plugins + + Alpha1 Release + * Full Version: 3.1.0-alpha1 + * POM Version: 3.1.0-alpha1 + * NBM Version: 3.1.0.0 + * NBM UC Suffix: alpha1/3.1/plugins + + Final Release + * Full Version: 3.1.0 + * POM Version: 3.1.0 + * NBM Version: 3.1.0.0 + * NBM UC Suffix: stable/3.1/plugins + */ + +import java.text.SimpleDateFormat +import org.ajoberstar.grgit.* + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.ajoberstar:gradle-git:1.2.0' + } +} + +ext { + jmeRevision = 0 + jmeGitHash = "" + jmeGitTag = "" + jmeShortGitHash = "" + jmeBuildDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + jmeBranchName = "unknown" + jmeFullVersion = "${jmeVersion}-UNKNOWN" + jmePomVersion = "unknown" + jmeNbmVersion = "0.0.0.0" + jmeNbmUcSuffix = "unknown" +} + +task configureVersionInfo { + try { + def grgit = Grgit.open(project.file('.')) + jmeRevision = grgit.log(includes:['HEAD']).size() + jmeGitHash = grgit.head().id + jmeShortGitHash = grgit.head().abbreviatedId + jmeBranchName = grgit.branch.current.name + jmeGitTag = grgit.describe() + if (jmeGitTag == null) jmeGitTag = "" + + jmeFullVersion = "${jmeVersion}" + jmePomVersion = jmeVersion + jmeNbmVersion = jmeVersion + + if (jmeBranchName != "master") { + jmeFullVersion += "-${jmeBranchName}" + jmePomVersion += "-${jmeBranchName}" + + jmeNbmUcSuffix = "${jmeBranchName}-" + } else { + jmeNbmUcSuffix = "" + } + + if (jmeVersionTag == "SNAPSHOT") { + jmeNbmUcSuffix += "nightly" + } else { + jmeNbmUcSuffix += "stable" + } + + jmeNbmUcSuffix += "/" + jmeMainVersion + "/plugins" + + if (jmeVersionTag == "SNAPSHOT") { + jmeFullVersion += "-${jmeRevision}" + jmePomVersion += "-SNAPSHOT" + jmeNbmVersion += ".${jmeRevision}" + } else if (jmeVersionTag == "") { + jmeNbmVersion += ".0" + } else { + jmeFullVersion += "-${jmeVersionTag}" + jmePomVersion += "-${jmeVersionTag}" + jmeNbmVersion += ".0" + } + + logger.warn("Full Version: ${jmeFullVersion}") + logger.warn("POM Version: ${jmePomVersion}") + logger.warn("NBM Version: ${jmeNbmVersion}") + logger.warn("NBM UC Suffix: ${jmeNbmUcSuffix}") + } catch (ex) { + // Failed to get repo info + logger.warn("Failed to get repository info: " + ex.message + ". " + \ + "Only partial build info will be generated.") + } +}