Skip to content
jasononeil edited this page Oct 5, 2012 · 1 revision

Installing from Haxelib (easiest)

To install the latest version from haxelib, use

haxelib install detox

This will install the latest stable Detox library, and all of it's dependencies.

Note: on linux, for most haxelib commands, you need admin privileges. Just put sudo before each of these statements and you'll be right.

Once it is included, you get access to all the Detox goodness by adding using Detox; to the top of your files along with the other imports. See Basic Usage

Installing the latest GIT version (cutting edge)

If you run this command

haxelib git detox https://github.com/jasononeil/detox.git src

Haxelib will clone the latest version of git, which could be helpful if you're trying to get a bugfix before it's released. It could also be used to use a fork of the project:

haxelib git detox https://github.com/myusername/detox.git src

When you load a file through GIT like this, haxelib doesn't know about it's dependencies - so you will have to include selecthxml, xirsys_stdjs, beanhx and tink_macros in your hxml build file.

Installing a development version

First, get a copy of your code:

cd /home/jason/workspace/
git clone https://github.com/jasononeil/detox.git

Now ask haxelib to reference that file:

haxelib dev detox /home/jason/workspace/detox/src/

When you use a dev version of a library, haxelib doesn't know about it's dependencies - so you will have to include selecthxml, xirsys_stdjs, beanhx and tink_macros in your hxml build file.

To disable the development version, and go back to using the official version:

haxelib dev detox

Dependencies

  • Haxe 2.10 - Detox has only been tested with Haxe 2.10. It's possible it works with earlier versions, but no promises - especially for anything that uses macros.
  • xirsys_stdjs - a set of externs for the JS target which give accurate access to the browser environment.
  • tink_macros - a set of tools to help make life easier for our macros, used especially in Widgets.
  • beanhx - a lightweight JS event framework, which we use to manage events on the JS target.
  • selecthxml - a selector engine for Haxe's non-JS frameworks. It has some cool macro features, but we don't use them much.