|
@@ -1,95 +1,143 @@
|
|
|
-= Setting up JME3 in Netbeans 6+
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
+= Setting up JME3 in Netbeans 8.x
|
|
|
+:author:
|
|
|
+:revnumber:
|
|
|
:revdate: 2016/03/17 20:48
|
|
|
:keywords: documentation, install
|
|
|
:relfileprefix: ../
|
|
|
:imagesdir: ..
|
|
|
+:experimental:
|
|
|
ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
|
|
|
-You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources. These instructions work in NetBeans IDE 6 or better.
|
|
|
+You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources. These instructions work in NetBeans IDE 8.x or better.
|
|
|
|
|
|
-Note: In the following, always replace “~ with the path to your home directory.
|
|
|
+.Prerequisites
|
|
|
+. Have a link:https://github.com/[GitHub account].
|
|
|
+. Are a jMonkeyEngine project member.
|
|
|
+
|
|
|
+If you are not a member, you fork the repository into your GitHub account and issue pull requests from there.
|
|
|
+
|
|
|
+To fork the jMonkeyEngine repository into your GitHub Account:
|
|
|
+
|
|
|
+. Navigate to link:https://github.com/jMonkeyEngine/jmonkeyengine[https://github.com/jMonkeyEngine/jmonkeyengine].
|
|
|
+. In the menu at the top of the page, select the icon:code-fork[]*Fork* button.
|
|
|
+
|
|
|
+
|
|
|
+NOTE: In the following, always replace kbd:[~] with the path to your home directory.
|
|
|
|
|
|
|
|
|
== Downloading the Sources
|
|
|
|
|
|
-Check out the sources from the repository. (The following NetBeans instructions are equivalent to executing `cd ~/NetBeansProjects; svn checkout link:http://jmonkeyengine.googlecode.com/svn/branches/3.0final/engine[http://jmonkeyengine.googlecode.com/svn/branches/3.0final/engine] jme3` on the commandline.)
|
|
|
+Clone the sources from the repository.
|
|
|
+
|
|
|
+. In NetBeans, go to `menu:Team[Git>Clone]`.
|
|
|
+.. Repository +++<abbr title="Uniform Resource Locator">URL</abbr>+++: +
|
|
|
+`link:https://github.com/jMonkeyEngine/jmonkeyengine[https://github.com/jMonkeyEngine/jmonkeyengine]`
|
|
|
++
|
|
|
+IMPORTANT: Use the +++<abbr title="Uniform Resource Locator">URL</abbr>+++ to your repository fork and clone your fork if a non-member and you wish to contribute.
|
|
|
|
|
|
-. In NetBeans go to Team > Subversion > Checkout
|
|
|
-.. Repository +++<abbr title="Uniform Resource Locator">URL</abbr>+++: `link:https://jmonkeyengine.googlecode.com/svn[https://jmonkeyengine.googlecode.com/svn]`
|
|
|
-.. You can leave user/pw blank for anonymous access.
|
|
|
+.. You can leave user/pw blank for anonymous access unless you are going to `push` a `commit`.
|
|
|
+.. Specify Destination Folder. +
|
|
|
+Local Folder: `~/NetBeansProjects]/jmonkeyengine`
|
|
|
|
|
|
-. Click Next
|
|
|
-.. Repository Folders: `branches/3.0final/engine`
|
|
|
-.. Enable the checkbox to Skip “engine and only checkout its contents.
|
|
|
-.. Local Folder: `~/NetBeansProjects/jme3`
|
|
|
+. Click btn:[Next].
|
|
|
+.. Select all checkboxes.
|
|
|
+
|
|
|
+. Click btn:[Next].
|
|
|
+.. Verify the autofill information in the `Destination Directory` dialog is correct.
|
|
|
+.. Select: +
|
|
|
+* [x] `Scan for NetBeans Projects after Clone`
|
|
|
|
|
|
. Click Finish and wait.
|
|
|
|
|
|
-The jme3 project opens in the Project window. It already includes a working ANT build script for building and running.
|
|
|
-
|
|
|
-Look into the Libraries node and confirm that the project depends on the following libraries in the classpath:
|
|
|
-
|
|
|
-* j-ogg-oggd.jar
|
|
|
-* j-ogg-vorbisd.jar
|
|
|
-* jbullet.jar
|
|
|
-* stack-alloc.jar
|
|
|
-* vecmath.jar
|
|
|
-* lwjgl.jar
|
|
|
-* jME3-lwjgl-natives.jar
|
|
|
-* jinput.jar
|
|
|
-* eventbus.jar
|
|
|
-* nifty-default-controls.jar
|
|
|
-* nifty-examples.jar
|
|
|
-* nifty-style-black.jar
|
|
|
-* nifty.jar
|
|
|
-* jglfont-core.jar
|
|
|
-* xmlpull-xpp3.jar
|
|
|
-* android.jar
|
|
|
-* jME3-bullet-natives.jar
|
|
|
-* gluegen-rt.jar
|
|
|
-* joal.jar
|
|
|
-* jogl-all.jar
|
|
|
-* jME3-natives-joal.jar
|
|
|
-* jME3-openal-soft-natives-android.jar
|
|
|
+
|
|
|
+After some time, the `Cloned Projects` dialog will open. Select `Open Project` followed by the `jmonkeyengine` node. The `jmonkeyengine` project opens in the Project window.
|
|
|
+
|
|
|
+== Information for Non-Members
|
|
|
+You now have a local copy of *your* forked version of the `jmonkeyengine` repository. There are a few rules you need to follow in order to contribute.
|
|
|
+
|
|
|
+. Always update your local copy in NetBeans by use of the NetBeans command `menu:Git[Remote>Pull]`.
|
|
|
+** In the `Remote Repository` dialog you toggle: +
|
|
|
+* [x] Specify Git Repository Location
|
|
|
++
|
|
|
+and use the jmonkeyengine repository +++<abbr title="Uniform Resource Locator">URL</abbr>+++: `link:https://github.com/jMonkeyEngine/jmonkeyengine[https://github.com/jMonkeyEngine/jmonkeyengine]`
|
|
|
+
|
|
|
+. Always update your fork by use of the NetBeans command `menu:Git[Remote>Push]`.
|
|
|
+** In the `Remote Repository` dialog you toggle: +
|
|
|
+* [x] Select Configured Git Repository Location:
|
|
|
++
|
|
|
+--
|
|
|
+and use the forked +++<abbr title="Uniform Resource Locator">URL</abbr>+++: `https://[email protected]/username/jmonkeyengine`
|
|
|
+
|
|
|
+where username is your username.
|
|
|
+
|
|
|
+NOTE: Note the distinction between `//github.com`: in the first case and `//[email protected]`: in the second case.
|
|
|
+--
|
|
|
+
|
|
|
+. To submit changes to the jMonkeyEngine repository after pushing them to your fork:
|
|
|
+.. Go to your version of the repository on github.
|
|
|
+.. Click the btn:[New Pull Request] button at the top.
|
|
|
+.. Note that the jMonkeyEngine repository will be on the left and your repository will be on the right.
|
|
|
+.. Click the green button btn:[Create pull request]. Give a succinct and informative title, in the comment field give a short explanation of the changes and click the green button btn:[Create pull request] again.
|
|
|
+
|
|
|
+
|
|
|
+== Verify Cloned Subprojects
|
|
|
+
|
|
|
+Look into the `Subprojects` node and confirm that the subprojects cloned:
|
|
|
+
|
|
|
+* jme3-android
|
|
|
+* jme3-android-native
|
|
|
+* jme3-blender
|
|
|
+* jme3-bullet
|
|
|
+* jme3-bullet-native
|
|
|
+* jme3-bullet-native-android
|
|
|
+* jme3-core
|
|
|
+* jme3-desktop
|
|
|
+* jme3-effects
|
|
|
+* jme3-examples
|
|
|
+* jme3-ios
|
|
|
+* jme3-jbullet
|
|
|
+* jme3-jogg
|
|
|
+* jme3-jogl
|
|
|
+* jme3-lwjgl
|
|
|
+* jme3-lwjgl3
|
|
|
+* jme3-networking
|
|
|
+* jme3-niftygui
|
|
|
+* jme3-plugins
|
|
|
+* jme3-terrain
|
|
|
+* jme3-testdata
|
|
|
+* jme3-vr
|
|
|
|
|
|
For a detailed description of the separate jar files see <<jme3/jme3_source_structure#structure_of_jmonkeyengine3_jars,this list>>.
|
|
|
|
|
|
|
|
|
== Build the Project and Run a Sample App
|
|
|
|
|
|
-. Right-click the jme3 project node and “Clean and Build the project.
|
|
|
-. In the Projects window, open the `Test` folder which contains the sample apps.
|
|
|
-. Every file with a Main class (for example `jme3test.model/TestHoverTank.java` or `jme3test.game/CubeField.java`) is an app.
|
|
|
-. Right-click a sample app and choose “Run File (Shift-F6).
|
|
|
+. btn:[RMB] select the `jmonkeyengine` project node and `Clean and Build` the project.
|
|
|
+. In the Projects window, btn:[RMB] select and then open the `jme-examples` node which contains the sample apps. You do this for any subproject you wish to make changes to.
|
|
|
+. Every file in the `Source Packages` folder with a Main class (for example `jme3test.model/TestHoverTank.java` or `jme3test.games/CubeField.java`) is an app.
|
|
|
+. Right-click a sample app and choose "`Run File`" (Shift-F6).
|
|
|
. Generally in sample apps:
|
|
|
.. the mouse and the WASD keys control movement
|
|
|
.. the Esc key exits the application
|
|
|
|
|
|
-
|
|
|
+TIP: You can btn:[RMB] select the `jme-examples` node and select `Run` to start the `Test Chooser` app whether or not you open the project node.
|
|
|
|
|
|
== Optional: Javadoc Popups and Source Navigation in NetBeans
|
|
|
|
|
|
If you are working on the jme3 sources:
|
|
|
|
|
|
-. In the Projects window, right-click the jme3 project and choose Generate Javadoc. Wait.
|
|
|
-. Confirm in the Files window that the javadoc has been created in `~/NetBeansProjects/jme3/dist/javadoc`
|
|
|
-. In the editor, place the caret in a jme class and press ctrl-space to view javadoc.
|
|
|
+. Confirm in the Files window that the javadoc has been created in `~/NetBeansProjects/jmonkeyengine/dist/javadoc`
|
|
|
+. In the editor, place the caret in a jme class and press kbd:[ctrl]-kbd:[space] to view javadoc.
|
|
|
|
|
|
If you are working on a game project that depends on jme3:
|
|
|
|
|
|
-. First follow the previous tip. (In the future, we may offer jme javadoc as download instead.)
|
|
|
-. In your game project, right-click the Libraries node and choose “Properties.
|
|
|
-. In the Library properties, select jme3.jar and click the Edit button.
|
|
|
-.. For the Javadoc field, browse to `~/NetBeansProjects/jme3/dist/javadoc`. Check “as relative path and click select.
|
|
|
-.. For the Sources field, browse to `~/NetBeansProjects/jme3/src`. Check “as relative path and click select.
|
|
|
-.. Click OK.
|
|
|
-
|
|
|
-. In the editor, place the caret in a jme class and press ctrl-space to view javadoc. Ctrl-click any jme3 method to jump to its definition in the sources.
|
|
|
+. In your game project, add the jme3 jar by btn:[RMB] selecting the Libraries node and selecting btn:[Add Far/Folder].
|
|
|
+. Navigate to the `~/NetBeansProjects/jmonkeyengine/SUBPROJECT FOLDER NAME/build/libs/` folder and select the `jme-jar name-SNAPSHOT.jar`. Check "`as relative path`" and click btn:[Open] .
|
|
|
+. In the editor, place the caret in a jme class and press kbd:[ctrl]-kbd:[space] to view javadoc. Ctrl-click any jme3 method to jump to its definition in the sources.
|
|
|
|
|
|
This tip works for any third-party JAR library that you use. (You may have to download the javadoc/sources from their home page separately).
|
|
|
+
|
|
|
'''
|
|
|
|
|
|
-Sources used: link:http://code.google.com/p/jmonkeyengine/wiki/BuildJme3[BuildJme3], link:http://www.jmonkeyengine.com/forum/index.php?topic=13108.0[NetBeans tutorial from forum]
|
|
|
+Sources used: https://github.com/jMonkeyEngine/jmonkeyengine[https://github.com/jMonkeyEngine/jmonkeyengine]
|