Skip to content

Commit

Permalink
Don't try to register metadata in older Haxe versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
player-03 committed Oct 22, 2024
1 parent 65437a1 commit 639555a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/echoes/macro/MacroTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ class MacroTools {
}

public static function registerDescriptionFiles():Void {
#if (haxe_ver >= 4.3)
var path:String = ((?infos:haxe.PosInfos) -> infos.fileName)();
if(!StringTools.endsWith(path, "src/echoes/macro/MacroTools.hx")) {
throw "MacroTools.hx moved, please update its path.";
}
path = path.substring(0, path.length - "src/echoes/macro/MacroTools.hx".length);

Compiler.registerMetadataDescriptionFile(path + "meta.json", "echoes");
#end
}

/**
Expand Down

0 comments on commit 639555a

Please sign in to comment.