Updates for console targets

This commit is contained in:
Joshua Granick
2015-01-20 10:28:39 -08:00
parent 057ae36d69
commit db7f1f9f4f
6 changed files with 21 additions and 7 deletions

View File

@@ -558,6 +558,8 @@ class CommandLineTools {
platform = new EmscriptenPlatform (command, project, targetFlags);
default:
}
if (platform != null) {

View File

@@ -175,6 +175,12 @@ class HXProject {
}
default:
// TODO: Better handle platform type for pluggable targets
platformType = PlatformType.CONSOLE;
}
meta = ObjectHelper.copyFields (defaultMeta, {});

View File

@@ -15,5 +15,6 @@ package project;
var WINDOWS = "windows";
var WEBOS = "webos";
var EMSCRIPTEN = "emscripten";
var CUSTOM = null;
}

View File

@@ -6,5 +6,6 @@ enum PlatformType {
DESKTOP;
MOBILE;
WEB;
CONSOLE;
}

View File

@@ -72,6 +72,10 @@ class ProjectXMLParser extends HXProject {
defines.set ("web", "1");
case CONSOLE:
defines.set ("console", "1");
}
if (targetFlags.exists ("neko")) {
@@ -93,7 +97,7 @@ class ProjectXMLParser extends HXProject {
defines.set ("html5", "1");
} else if (targetFlags.exists ("cpp") || ((platformType == PlatformType.MOBILE || platformType == PlatformType.DESKTOP) && !targetFlags.exists("html5")) || target == Platform.EMSCRIPTEN) {
} else if (targetFlags.exists ("cpp") || ((platformType != PlatformType.WEB) && !targetFlags.exists("html5")) || target == Platform.EMSCRIPTEN) {
defines.set ("native", "1");
defines.set ("cpp", "1");