add -json flag to allow json types export

This commit is contained in:
Cameron Taylor
2025-01-02 21:23:51 -08:00
committed by Josh Tynjala
parent ff3ccf159d
commit 03ea041e0e
9 changed files with 50 additions and 0 deletions

View File

@@ -459,6 +459,11 @@ class AndroidPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
var context = project.templateContext;
context.CPP_DIR = targetDirectory + "/obj";

View File

@@ -139,6 +139,11 @@ class FlashPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
if (Log.verbose)
{
project.haxedefs.set("verbose", 1);

View File

@@ -353,6 +353,11 @@ class HTML5Platform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
if (Log.verbose)
{
project.haxedefs.set("verbose", 1);

View File

@@ -169,6 +169,11 @@ class IOSPlatform extends PlatformTarget
{
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
if (project.targetFlags.exists("final"))
{

View File

@@ -556,6 +556,11 @@ class LinuxPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
var context = generateContext();
context.OUTPUT_DIR = targetDirectory;

View File

@@ -507,6 +507,11 @@ class MacPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
for (asset in project.assets)
{
if (asset.embed && asset.sourcePath == "")

View File

@@ -168,6 +168,11 @@ class TVOSPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
if (project.targetFlags.exists("final"))
{
project.haxedefs.set("final", "");

View File

@@ -227,6 +227,11 @@ class TizenPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
var context = project.templateContext;
context.CPP_DIR = targetDirectory + "/obj";
context.OUTPUT_DIR = targetDirectory;

View File

@@ -921,6 +921,11 @@ class WindowsPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
for (asset in project.assets)
{
if (asset.embed && asset.sourcePath == "")
@@ -1067,6 +1072,11 @@ class WindowsPlatform extends PlatformTarget
project.haxeflags.push("-xml " + targetDirectory + "/types.xml");
}
if (project.targetFlags.exists("json"))
{
project.haxeflags.push("--json " + targetDirectory + "/types.json");
}
if (Log.verbose)
{
project.haxedefs.set("verbose", 1);