Fix AIR target, enable support without tools

This commit is contained in:
Joshua Granick
2018-07-07 07:31:47 -07:00
parent b9b3121c29
commit ec1359fb20
3 changed files with 47 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ class AIRWindow extends FlashWindow {
if (Reflect.hasField (attributes, "alwaysOnTop") && attributes.alwaysOnTop) alwaysOnTop = true;
if (Reflect.hasField (attributes, "borderless") && attributes.borderless) borderless = true;
if (Reflect.hasField (attributes, "fullscreen") && attributes.fullscreen) fullscreen;
if (Reflect.hasField (attributes.context, "hardware") && attributes.context.hardware) hardware = true;
if (Reflect.hasField (attributes, "context") && Reflect.hasField (attributes.context, "hardware") && attributes.context.hardware) hardware = true;
if (Reflect.hasField (attributes, "hidden") && attributes.hidden) hidden = true;
if (Reflect.hasField (attributes, "maximized") && attributes.maximized) maximized = true;
if (Reflect.hasField (attributes, "minimized") && attributes.minimized) minimized = true;

View File

@@ -23,9 +23,8 @@ class FlashApplication {
AudioManager.init ();
#if (flash && !air)
// Initial window is already created
parent.createWindow ({});
#end
}

View File

@@ -10,7 +10,51 @@ class DefineMacro {
public static function run ():Void {
if (!Context.defined ("tools") && !Context.defined ("nocffi")) {
if (!Context.defined ("tools")) {
if (Context.defined ("flash")) {
if (Context.defined ("air")) {
var childPath = Context.resolvePath ("lime/_internal");
var parts = StringTools.replace (childPath, "\\", "/").split ("/");
parts.pop (); // lime
parts.pop (); // src
parts.pop (); // root directory
var externPath = parts.join ("/") + "/externs/air";
Compiler.addClassPath (externPath);
}
} else if (Context.defined ("js")) {
if (!Context.defined ("nodejs") && !Context.defined ("display")) {
Compiler.define ("html5");
Compiler.define ("web");
Compiler.define ("lime-opengl");
}
} else {
Compiler.define ("native");
if (!Context.defined ("nocffi")) {
Compiler.define ("lime-cffi");
Compiler.define ("lime-curl");
Compiler.define ("lime-harfbuzz");
Compiler.define ("lime-opengl");
Compiler.define ("lime-vorbis");
}
}
if (!Context.defined ("flash") && (!Context.defined ("js") || Context.defined ("nodejs"))) {