diff --git a/lime/system/System.hx b/lime/system/System.hx index 79d919b80..7049e7889 100644 --- a/lime/system/System.hx +++ b/lime/system/System.hx @@ -1,4 +1,5 @@ package lime.system; +#if !macro #if js @@ -337,4 +338,38 @@ class System { #end -} \ No newline at end of file +} + + +#else + + +import haxe.macro.Compiler; +import haxe.macro.Context; +import sys.FileSystem; + + +class System { + + + public static function includeTools () { + + var paths = Context.getClassPath (); + + for (path in paths) { + + if (FileSystem.exists (path + "/tools/CommandLineTools.hx")) { + + Compiler.addClassPath (path + "/tools"); + + } + + } + + } + + +} + + +#end \ No newline at end of file