Pass absolute path to api.json to Godot

Fixes #7.
This commit is contained in:
Ruslan Mustakov 2018-06-25 20:01:29 +07:00
commit 51d0c24e1e

View file

@ -18,7 +18,7 @@ proc genGodotApi() =
const jsonFile = targetDir/"api.json"
if not fileExists(jsonFile) or
godotBin.getLastModificationTime() > jsonFile.getLastModificationTime():
direShell(godotBin, "--gdnative-generate-json-api", jsonFile)
direShell(godotBin, "--gdnative-generate-json-api", getCurrentDir()/jsonFile)
if not fileExists(jsonFile):
echo "Failed to generate api.json"
quit(-1)