-
Notifications
You must be signed in to change notification settings - Fork 6
Wafl
INFO: WAFL is not part of Flambe anymore, since flambe version 3.1. This page is outdated.
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. Make sure adt
from
the AIR SDK is in your executable $PATH so Wafl can find it. The AIR
SDK that comes with FlashDevelop is compatible with Flambe.
Additional Wafl build options can be used for AIR apps:
-
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".
Add "android" to your wscript's platforms. Running wafl install
will
build, install and launch the app on a plugged in device. To view debug
output, run adb logcat
. adb
is included in both the AIR and Android
SDKs.
Generally, the Android SDK isn't required as the AIR contains everything needed to develop for Android. On Linux, I found it necessary to setup the Android SDK and set $AIR_ANDROID_SDK_HOME rather than using the tools included in AIR.
Add "ios" to your wscript's platforms. These additional build options can be used for iOS:
- 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")
Documentation guide for Flambe - Targeted to version 4.0+
Flambe | Installation | Demo projects | Showcase | API Reference | Forum
Flambe is MIT licensed and available for free. Feel free to contribute!
- Home / Installation
- Entity / Components
- Core
- Assets
- Publish your game
- Other
- Editors
- Plugins, tools, extensions
- Help
- More Flambe