diff --git a/Run.hx b/Run.hx new file mode 100644 index 000000000..af9bb28a5 --- /dev/null +++ b/Run.hx @@ -0,0 +1,5 @@ +class Run { + static function main() { + RunMain.main(); + } +} diff --git a/extraRunParams.hxml b/extraRunParams.hxml new file mode 100644 index 000000000..d9436c1f0 --- /dev/null +++ b/extraRunParams.hxml @@ -0,0 +1 @@ +-cp tools/run diff --git a/tools/hxcpp/Log.hx b/tools/hxcpp/Log.hx index b1226b398..bef42adcd 100644 --- a/tools/hxcpp/Log.hx +++ b/tools/hxcpp/Log.hx @@ -11,7 +11,7 @@ import cpp.vm.Mutex; #if neko import neko.Lib; -#else +#elseif cpp import cpp.Lib; #end @@ -65,7 +65,11 @@ class Log printMutex.release(); if ((verbose || !terminate) && e != null) +#if (cpp || neko) Lib.rethrow(e); +#else + throw e; +#end if (terminate) Tools.exit(1); diff --git a/tools/run/RunMain.hx b/tools/run/RunMain.hx index 79975950d..497501430 100644 --- a/tools/run/RunMain.hx +++ b/tools/run/RunMain.hx @@ -87,8 +87,10 @@ class RunMain public static function executeHxcpp() { + #if neko if (!sys.FileSystem.exists("./hxcpp.n")) return false; + #end if (Sys.args().indexOf("-DHXCPP_NEKO_BUILDTOOL=1")<0) { @@ -104,6 +106,7 @@ class RunMain compiled += ".exe"; if (FileSystem.exists(compiled)) { + #if neko var dotN = FileSystem.stat("hxcpp.n").mtime.getTime(); var dotExe= FileSystem.stat(compiled).mtime.getTime(); if (dotExe