Improve behavior from HXML builds
This commit is contained in:
1
extraParams.hxml
Normal file
1
extraParams.hxml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--macro lime.Lib.extraParams()
|
||||||
24
lime/Lib.hx
24
lime/Lib.hx
@@ -4,6 +4,11 @@ package lime;
|
|||||||
import haxe.PosInfos;
|
import haxe.PosInfos;
|
||||||
import lime.utils.Log;
|
import lime.utils.Log;
|
||||||
|
|
||||||
|
#if macro
|
||||||
|
import haxe.macro.Compiler;
|
||||||
|
import haxe.macro.Context;
|
||||||
|
#end
|
||||||
|
|
||||||
|
|
||||||
class Lib {
|
class Lib {
|
||||||
|
|
||||||
@@ -11,6 +16,25 @@ class Lib {
|
|||||||
@:noCompletion private static var __sentWarnings = new Map<String, Bool> ();
|
@:noCompletion private static var __sentWarnings = new Map<String, Bool> ();
|
||||||
|
|
||||||
|
|
||||||
|
#if macro
|
||||||
|
public static function extraParams ():Void {
|
||||||
|
|
||||||
|
if (!Context.defined ("tools")) {
|
||||||
|
|
||||||
|
if (!Context.defined ("flash") && (!Context.defined ("js") || Context.defined ("nodejs"))) {
|
||||||
|
|
||||||
|
Compiler.define ("lime-cffi");
|
||||||
|
Compiler.define ("native");
|
||||||
|
Compiler.define ("lime-curl");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
|
|
||||||
public static function notImplemented (api:String, ?posInfo:PosInfos):Void {
|
public static function notImplemented (api:String, ?posInfo:PosInfos):Void {
|
||||||
|
|
||||||
if (!__sentWarnings.exists (api)) {
|
if (!__sentWarnings.exists (api)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user