Skip to content

Building From Source

Josh Tynjala edited this page Jul 16, 2019 · 5 revisions

The Royale SDK can be built using either ant or maven. Below are instructions for both.

Ant Build

Prerequisites:

  1. Java 7 or later should be installed.
  2. Apache Ant should be installed.

Steps to Build

  1. Clone the Royale Framework repo.
  2. Make sure you are using the develop branch.
  3. Open the folder of the cloned repo in a terminal.
  4. Run ant all.

This will clone all the necessary repos and build them all in the correct order. It will also add the necessary files to use the royale-asjs folder as a working SDK. You should be able to point your IDE (i.e. VS Code, Moonshine, Flash Builder, etc.) to the royale-asjs folder and it should be recognized and "just work".

Notes

  • If you are working on Framework features, once the original ant all is run, you should be able to build individual swcs by running ant on the specific project.
  • To make changes to the new js swcs available in active projects, you need to clean the project and remove the old .js files in the bin/js-debug folder. Those files are not overwritten by default.
  • The above instructions does not include any environment variables. For a basic build, none are needed. However, for a full build which runs all tests, additional environment variables can be specified.
    • PLAYERGLOBAL_HOME should point to a folder which has sub-folders with the playerglobal files. The structure should be [version_number]/playerglobal.swc where version_number is the specific version(s) being used.
    • AIR_HOME should point to an AIR SDK folder
    • FLASHPLAYER_DEBUGGER should point to the Flash Player debugged executable. On Mac, it should point to the executable inside the app package.
    • GOOG_HOME Can point to a folder containing closure-library. Using the environment variable can save some time and prevent downloading the closure files after cleaning.
    • ROYALE_COMPILER_REPO can be used to point the build to a royale-compiler clone in some place other than the default location.
    • ROYALE_TYPEDEFS_HOME can be used to point the build to a royale-typedefs clone in some place other than the default location.

Maven Build

Build Apache Royale with Maven

Clone this wiki locally