Monkey Documentation

The Trans tool

Trans is the command line tool used to build Monkey apps.

If you are using an IDE such as Ted or Jungle, you will not need to use trans yourself.

Trans works with Monkey projects and ultimately converts them into target projects. A Monkey project consists of:

  • A main source file, eg: "myapp.monkey". This source file must contain your Main:Int() function. This is where program execution starts.
  • A Monkey data directory. This a directory with the same name as the main source file, but with a .data extension, eg; "". This is where you place data required by your app.
  • A Monkey build directory. This directory is generated by trans, and has the same name as the main source file, but with a .build extension, eg: "".
Trans accepts the following command line options:

transcc [-check] [-update] [-build] [-run] [-config=...] [+setting=...] -target=... mainfile.monkey

-checkCauses the project to be compiled only. The output target project is not touched, useful for error checking.
-updateCauses the output target project to be updated, but not built or run.
-buildCauses the target project to be updated and built. This is the default.
-runCauses the output target project to be updated, built and run.
-configMust be one of 'debug' or 'release'. Defaults to debug.
-targetMust be one of 'android', 'flash', 'glfw', 'html5', 'ios' or 'stdcpp'.

Arguments starting with + can be used to specify app config settings. Such arguments must be of the form +key=value. Note that boolean settings made this way should be specified using 1 or 0, not True or False, eg: '+GLFW_AUTO_SUSPEND_ENABLED=1'.

When trans is invoked, you must specify at least the target to build and the main source file, eg: "transcc -target=html5". Trans then goes about generating the output app in the .build directory.

The Trans config file

In order to locate the SDKs and tools used by different targets, Trans uses a special config file.

This config file is named "config.winnt.txt" or "config.macos.txt" depending on which OS you are using, and is located in your Monkey installation's "bin" directory.

Please refer to the appropriate SDK installation guides for details on how this file may have to be modified.

See also

Target SDKs, App config settings