-
Notifications
You must be signed in to change notification settings - Fork 117
Wafl
Wafl is Flambe's thin wrapper around waf, a quick and robust build tool.
Projects are configured by running wafl configure OPTIONS
. The main Flambe
option is --debug, which adds runtime checks useful for development and disables
some optimizations for faster compile times. When your game goes live, you
should be sure to compile in release mode by running configure without --debug.
Projects are built by running wafl install
, which compiles whatever changed
and creates the application in the deploy/ directory. You don't need to run
configure again after each build.
The build configuration for a Flambe project is in the wscript file. This is a Python script, but knowledge of Python isn't necessary to get up and running.
The project template includes a basic wscript which includes something like this:
# Runs the build!
def build(ctx):
# Kick off a build with the desired platforms
ctx(features="flambe",
platforms=["flash", "html"])
The call to ctx(features="flambe"...)
builds the app, with possible options:
-
platforms: The targets to build for, including flash, html, android, and ios.
-
libs: The haxelibs to use when compiling.
-
main: Your main class name. If not specified, it is parsed from the .hxproj FlashDevelop project.
-
flags: Additional flags to pass directly to the Haxe compiler.
Android and iOS apps are packaged using Adobe AIR and use additional options:
-
air_desc: The location of your AIR application descriptor, or etc/air-desc.xml by default.
-
air_cert: The location of your AIR certificate, or etc/air-cert.pfx by default. AIR requires this, but a placeholder certificate is included in the project template. Before you ship your game, you'll want to generate your own.
-
air_password: The password to the AIR certificate. The password to the default placeholder certificate is "samplePassword".
-
ios_profile: The location of the iOS provisioning profile to sign the application, or etc/ios.mobileprovision by default.
Since the wscript is Python, the build process is highly customizable.
Multiple ctx() calls can be used with different options to build multiple variants of an app. For example, to build variants of a social game for both Facebook and Kongregate:
def build(ctx):
if ctx.env.debug: print("This is a debug build!")
ctx(features="flambe", name="facebook", main="urgame.GameFacebookMain")
ctx(features="flambe", name="kongregate", libs="kong_api" main="urgame.GameKongregateMain")
Flambe | Installation | FAQ | Changes | API Reference | Forum