Source
Public Releases
The directions that follow are useful if you would prefer to work on the cutting edge of NME development, using the latest development releases. You will have to compile the command-line tools and native binaries yourself in order to work from the repository.
If you are new to NME, it is best to begin with the Get Started page to download and install the latest public release.
Development Builds
You can check-out the source code for NME, here:
http://code.google.com/p/nekonme
In order to compile the binaries for each C++ target, you will also need to check-out the "sdl-static" repository in a neighboring directory, to resolve dependencies
http://code.google.com/p/sdl-static
You may also be interested in checking out the source code for HXCPP, which is responsible for compiling to C++ targets
http://code.google.com/p/hxcpp
Development Paths
After you download NME from the source repository, you can tell haxelib to prefer this version over the version it already has installed using the "dev" command
haxelib dev nme /path/to/nme
Rebuilding Libraries
Once you have NME set up on your system, you will need to compile the command-line tools and native binaries in order to use NME. These are not included in the repository, but are included in each public release.
Compiling the command-line tools relies on "gm2D", so make sure you have installed it through haxelib
haxelib install gm2d
Then you can compile the command-line tools from the NME directory, like this
cd tools/command-line
haxe CommandLine.hxml
There may be issues compiling the command-line tools on 64-bit builds of Linux. This seems to be an issue with 64-bit builds of Neko. If you do have problems, you can compile using a different system, or copy "run.n" from a public release of NME into your SVN directory.
You will also need to build the native library for your current desktop, as well as any additional targets you wish to support. The dependencies for building the library is the same as compiling an application. If you haven't already, go through the Get Started page or the Manual Install page to ensure you have the right compiler for your target.
To build for your current desktop, run these commands
cd project
haxelib run hxcpp Build.xml
The requirements to build the NME library is generally the same as compiling NME applications, but if you are using Linux you will need to install libraries for OpenGL. For a 64-bit install of Ubuntu, you should be able to use the following command
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libgl1-mesa-dev:i386
Here are additional flags you can use to compile for other targets
haxelib run hxcpp Build.xml -Diphone -Diphoneos haxelib run hxcpp Build.xml -Diphone -Diphonesim haxelib run hxcpp Build.xml -Dwebos haxelib run hxcpp Build.xml -Dandroid haxelib run hxcpp Build.xml -DHXCPP_M64
It is usually unnecessary to perform a "clean build" -- you can run use these build commands interchangeably and repeatedly to rebuild the native code in the "project" directory for use with each target. However, if you experience problems, you can remove the "obj" directory that gets generated while compiling.
If you are in the "project" directory, you can run "rmdir /Q /S obj" on Windows, or "rm -r obj" on Mac or Linux, to remove this directory. Keeping this directory is usually desirable for keeping compile times low.
Returning to Official Releases
If you have been using NME from the source repository and would like to return to an official release, run this command
haxelib dev nme
If you have multiple versions of NME installed, you can also use the "haxelib set" command to specify which installed version you would like to use.
