diff --git a/engine/bullet-native-build.txt b/engine/bullet-native-build.txt
index e9e4bcd84..af4a976bc 100644
--- a/engine/bullet-native-build.txt
+++ b/engine/bullet-native-build.txt
@@ -1,16 +1,96 @@
***********************************
-* Build info for bulletjme *
+* Build info for bulletjme *
* (c) 2011 Normen Hansen *
***********************************
This document outlines the process of building bullet-jme on different platforms.
-Since bullet-jme is a native java library and bullet gets included statically,
+Since bulletjme is a native java library and bullet gets included statically,
building requires you to download and build the bullet source first.
+Note that you do need to have CMake and a GCC compiler installed as well as
+the Android NDK in case you want to build for android too.
+
+-----------------------------------
+Requirements
+-----------------------------------
+ALL PLATFORMS
+- Java SDK 1.5+: http://java.sun.com
+- Apache ANT: http://ant.apache.org (Included in most Java IDEs)
+- Android NDK (optional): http://developer.android.com/sdk/ndk/index.html
+
+WINDOWS
+- Install mingw GNU C++ Compiler: http://www.mingw.org/
+- Install CMake: http://www.cmake.org/
+
+Mac OSX
+- Install XCode: http://developer.apple.com/ (or via the App Store)
+- Install http://www.macports.org
+- Install cmake via macports, in the Terminal type:
+> sudo port install cmake
+
+LINUX
+- Install cmake (and gcc if not available) via your package manager of choice, e.g.
+> sudo apt-get install cmake
+
+-----------------------------------
+Building
+-----------------------------------
+The build script in this directory does everything needed to download and compile
+bullet and the jme-bullet library, you only need to call the appropriate ant target,
+via your IDE or command line:
+
+> ant build-bullet-natives
+
+..and all of the steps below are executed automatically, including the download.
+
+You can alter options in the "nbproject/bullet.properties" file, such as the used
+bullet version, native compilation options (see below), path to Android NDK etc.
+
+-----------------------------------
+Altering the native build process
+-----------------------------------
+bullet-jme uses cpptasks to compile native code as well as the Android NDK.
+
+If you get compilation errors, try setting "native.java.include" in the build.properties file to your
+JDK include directory, e.g. /opt/java/include or "c:\Program Files\Java\jdk1.6.0_20\include".
+
+To change the used compiler, edit the "native.platform.compiler" entry in the
+"build.properties" file. The following c++ compilers work with cpptasks:
+
+gcc GCC C++ compiler
+g++ GCC C++ compiler
+c++ GCC C++ compiler
+msvc Microsoft Visual C++
+bcc Borland C++ Compiler
+icl Intel C++ compiler for Windows (IA-32)
+ecl Intel C++ compiler for Windows (IA-64)
+icc Intel C++ compiler for Linux (IA-32)
+ecc Intel C++ compiler for Linux (IA-64)
+CC Sun ONE C++ compiler
+aCC HP aC++ C++ Compiler
+wcl OpenWatcom C/C++ compiler
+
+In the "nbproject" folder you can find "build-native-platform.xml" files containing the commands
+to compile bullet-jme on different platforms. If you want to alter the process,
+you can copy and modify one of the files and import it in the "build.xml" file instead
+of the old one.
+
+-----------------------------------
+Netbeans Project
+-----------------------------------
+The project also includes a Netbeans project to edit and build
+the source in the Netbeans IDE in the /src/bullet/ subfolder.
+
+To have correct syntax highlighting in .cpp/.h files:
+
+- in Netbeans Settings -> C/C++ -> Code Assistance -> C++
+ - add bullet-2.77/src as include directories for c++
+ - add JAVA_HOME/include as include directories for c++
+
***********************************
-* Building bullet *
+* Building bullet (optional) *
***********************************
-----------------------------------
@@ -83,87 +163,3 @@ Commands:
More info on building bullet
-----------------------------------
http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Installation
-
-
-
-***********************************
-* Building bulletjme *
-***********************************
-
------------------------------------
-Requirements
------------------------------------
-- Java SDK 1.5+: http://java.sun.com
-- Apache ANT: http://ant.apache.org
-- C++ Compiler: (see below)
-- jme3 Source: http://jmonkeyengine.googlecode.com/
-- Statically compiled bullet source (see above)
-
------------------------------------
-Preparation
------------------------------------
-- copy/link bullet-trunk folder into the same folder where the bullet-jme folder is:
-
-disk
- |
- +-root folder
- |
- +-engine
- |
- +-sdk
- |
- +-bullet-trunk
-
-- You can alter options in the "src/bullet/native/bullet.properties" file, such as the used bullet
- version, native compilation options etc. (see below)
-
------------------------------------
-Building bulletjme native
------------------------------------
-Commands:
-> cd engine
-> ant jar
-> ant build-bullet-natives
-
-Thats all. ANT takes care building native binaries and copies them to th elib directory.
-
-If you get compilation errors, try setting "native.java.include" in the build.properties file to your
-JDK include directory, e.g. /opt/java/include or "c:\Program Files\Java\jdk1.6.0_20\include".
-
------------------------------------
-Altering the native build process
------------------------------------
-bullet-jme uses cpptasks to compile native code.
-
-To change the used compiler, edit the "native.platform.compiler" entry in the
-"build.properties" file. The following c++ compilers work with cpptasks:
-
-gcc GCC C++ compiler
-g++ GCC C++ compiler
-c++ GCC C++ compiler
-msvc Microsoft Visual C++
-bcc Borland C++ Compiler
-icl Intel C++ compiler for Windows (IA-32)
-ecl Intel C++ compiler for Windows (IA-64)
-icc Intel C++ compiler for Linux (IA-32)
-ecc Intel C++ compiler for Linux (IA-64)
-CC Sun ONE C++ compiler
-aCC HP aC++ C++ Compiler
-wcl OpenWatcom C/C++ compiler
-
-In the "nbproject" folder you can find "build-native-platform.xml" files containing the commands
-to compile bullet-jme on different platforms. If you want to alter the process,
-you can copy and modify one of the files and import it in the "build.xml" file instead
-of the old one.
-
------------------------------------
-Netbeans Project
------------------------------------
-The project also includes a Netbeans project to edit and build
-the source in the Netbeans IDE in the /src/bullet/ subfolder.
-
-To have correct syntax highlighting in .cpp/.h files:
-
-- in Netbeans Settings -> C/C++ -> Code Assistance -> C++
- - add bullet-2.77/src as include directories for c++
- - add JAVA_HOME/include as include directories for c++
diff --git a/engine/nbproject/build-bullet-natives.xml b/engine/nbproject/build-bullet-natives.xml
index 03a752156..61ac52bd7 100644
--- a/engine/nbproject/build-bullet-natives.xml
+++ b/engine/nbproject/build-bullet-natives.xml
@@ -51,7 +51,7 @@
-
+
@@ -302,4 +302,55 @@
+
+
+
+ Downloading bullet source..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/engine/nbproject/bullet-native.properties b/engine/nbproject/bullet-native.properties
index 4b8e69951..05bdf3faa 100644
--- a/engine/nbproject/bullet-native.properties
+++ b/engine/nbproject/bullet-native.properties
@@ -4,8 +4,9 @@
bullet.library.name=bulletjme
bullet.library.version=0.9
-# change if bullet folder has different location
+# change if bullet folder has different name
bullet.folder=../bullet-2.79
+bullet.download=http://bullet.googlecode.com/files/bullet-2.79-rev2440.zip
# compile options
bullet.compile.debug=false
@@ -22,7 +23,16 @@ bullet.java.include=${java.home}/../include
# OSX has no JRE, only JDK
bullet.osx.java.include=/System/Library/Frameworks/JavaVM.framework/Headers
-# location of Android NDK
+# exec command for cmake and make for different platforms,
+# needed to compile bullet before compiling the jme bullet libraries
+cmake.windows=cmake
+make.windows=mingw32-make
+cmake.linux=cmake
+make.linux=make
+cmake.osx=/opt/local/bin/cmake
+make.osx=make
+
+# location of Android NDK if available
ndk.dir=/opt/android-ndk-r7
# dont change these..