-
Notifications
You must be signed in to change notification settings - Fork 116
Build Apache Royale with Maven
Apache Royale can be built with Maven.
Royale consists of three parts: The compiler, typedefs and the framework(asjs). Each is hosted in a separate GIT repository and has to be built and released separately. You build them in this order:
In addition to building the framework libraries, Maven also assembles the binary distribution of the Royale SDK to use in your IDE of choice.
Notice that you can build for just Javascript targets, and for Javascript and SWF targets using the "option-with-swf" flag
- Install Java from: http://www.oracle.com/technetwork/java/javase/downloads/index.html (minimum version 8)
- Install Maven from: http://maven.apache.org/download.cgi (minimum version 3.3.1)
- Download the archive
- Unpack the archive
- Set your system PATH to the bin directory
if you don't have Maven installed, you can use mvnw (or Maven Wrapper) available in each root repository folder, that allows you check if maven exists in your system and install the latest version if nothing is found.
-
Download the "Flash Player projector content debugger" for your system from: https://www.adobe.com/support/flashplayer/debug_downloads.html (The browser plugin or ActiveX component will not work).
- Create an environment variable called FLASHPLAYER_DEBUGGER and set it to the path of the Flash Debug Player executable. On Windows and Linux machines this is trivial as you simply provide the full path (including the executable name. on Mac's this will look something like this: {Place the Player is installed to}/Flash Player.app/Contents/MacOS/Flash Player Debugger)
Example for Windows:
FLASHPLAYER_DEBUGGER=C:\Program Files\Adobe\Flash\flashplayer_22_sa_debug.exe
Example for Linux:
FLASHPLAYER_DEBUGGER=/opt/adobe/flash/flashplayer_11_sa_debug.i386/flashplayerdebugger
Example for Mac:
FLASHPLAYER_DEBUGGER=/Applications/Adobe/Flash/22.0/Flash Player.app/Contents/MacOS/Flash Player Debugger
-
First build the Compiler (royale-compiler)
- Clone:
git clone https://github.com/apache/royale-compiler.git royale-compiler
- Go into the new directory:
cd royale-compiler git checkout develop
- Build the compiler:
mvn clean install
This executes all unit and integration tests. You can run the build without running any tests by adding
-DskipTests
or skip just the integration-tests with-DskipITs
. -
Next, build the Typedefs (royale-typedefs)
- Clone:
git clone https://github.com/apache/royale-typedefs.git royale-typedefs
- Go into the new directory:
cd royale-typedefs git checkout develop
- Build the typedefs:
mvn clean install
-
Finally, build the Framework (royale-asjs)
- Clone:
git clone https://github.com/apache/royale-asjs.git royale-asjs
- Go into the new directory:
cd royale-asjs git checkout develop
- Build the framework libs:
mvn clean install
Now you have the compiler, typedefs and framework ready. That's all :).
If you want to make some modifications to your code you can make the changes and then build only the part that was modified, and you'll be ready to use it in your own project. To do so just go to the sub-project folder and run
mvn clean install
.
If you build without any profile, the framework is built just for Javascript (no SWF at all), but no examples or distribution. To build the optional parts, add the following profiles to the command line using the -P
maven option:
- with-ui-testsuite: It also builds the test suite modules and runs the integration tests
You can use the latest geckodriver to run the Selenium UI tests in Firefox adding
-Dwebdriver.gecko.driver=/Users/christofer.dutz/Downloads/geckodriver
- option-with-swf: Makes each module build the SWF version.
- option-with-sass-compile: To compile all SASS in themes. You just need to use this profile when update themes and want to generate final CSS.
-
with-examples: Builds the all examples in an
examples
folder. -
with-distribution: Also builds the distribution (the Apache Royale SDK to use with an IDE). SDK built with maven allows you to get code intelligence in IDEs and build with standard IDE execution commands. To build distribution (SDK) in the folder of your choice use
-DdistributionTargetFolder={pathToDistributionDirectory}
.
Combine with-distribution and option-with-swf to get a SDK with SWF support (both Javascript and SWF).
Notice that you can use Maven distribution SDK with IDEs too!. So it's up to you to compile your Apps using standard maven commands (
mvn install
) or hitting the habitual Build button in your IDE of choice
Quick Summary of build steps using the convenient maven wrapper (mvnw) and all available profiles:
#!/bin/bash
export FLASHPLAYER_DEBUGGER="/Users/christofer.dutz/Devtools/Adobe/Flash/FlashPlayer-32.0/Flash Player.app/Contents/MacOS/Flash Player Debugger"
cd royale-compiler
./mvnw install
cd ../royale-typedefs
./mvnw install
cd ../royale-asjs
./mvnw install -P with-examples,with-distribution,with-ui-testsuite,option-with-swf -Dwebdriver.gecko.driver=/Users/christofer.dutz/Downloads/geckodriver -DdistributionTargetFolder=/Users/christofer.dutz/ApacheRoyale/SDKs
Apache®, Apache Royale, Royale™, and the Royale logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.