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

@@ -18,6 +18,12 @@
<haxelib name="nodejs" if="nodejs" />
<haxelib name="format" if="java" />
<target name="wiiu" handler="lime-wiiu" />
<haxelib name="lime-wiiu" if="wiiu" />
<target name="console-pc" handler="lime-console-pc" />
<haxelib name="lime-console-pc" if="console-pc" />
<section unless="display || lime-legacy">
<ndll name="std" haxelib="hxcpp" if="cpp" />
@@ -44,12 +50,6 @@
<!-- <include haxelib="aether" unless="openfl" />
<haxelib name="aether" if="setup" /> -->
<target name="wiiu" handler="lime-wiiu" />
<haxelib name="lime-wiiu" if="wiiu" />
<target name="console-pc" handler="lime-console-pc" />
<haxelib name="lime-console-pc" if="console-pc" />
<haxedef name="lime-curl" unless="lime-console || emscripten" />
<haxedef name="lime-opengl" unless="lime-console" />
<haxedef name="lime-openal" unless="lime-console || static_link || emscripten" />

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");