diff --git a/lime/project/PlatformTarget.hx b/lime/project/PlatformTarget.hx index 4999e43d5..7d00fe1a6 100644 --- a/lime/project/PlatformTarget.hx +++ b/lime/project/PlatformTarget.hx @@ -124,6 +124,32 @@ class PlatformTarget { } + + public function getBuildType (?_project:HXProject):String { + + // Optionnal project parameter used in case the function is called before a super call + if (_project == null) { + + _project = project; + + } + + var buildType = "release"; + + if (_project.debug) { + + buildType = "debug"; + + } else if (_project.targetFlags.exists ("final")) { + + buildType = "final"; + + } + + return buildType; + + } + @ignore public function build ():Void {} @ignore public function clean ():Void {} diff --git a/lime/tools/helpers/FlashHelper.hx b/lime/tools/helpers/FlashHelper.hx index 727df9759..c18ae7b01 100644 --- a/lime/tools/helpers/FlashHelper.hx +++ b/lime/tools/helpers/FlashHelper.hx @@ -606,10 +606,10 @@ class FlashHelper { } - private static function compileSWC (project:HXProject, assets:Array, id:Int):Void { + private static function compileSWC (project:HXProject, assets:Array, id:Int, destination:String):Void { #if format - var destination = project.app.path + "/flash/obj"; + destination = destination + "/obj"; PathHelper.mkdir (destination); var label = (id > 0 ? Std.string (id + 1) : ""); @@ -751,7 +751,7 @@ class FlashHelper { }*/ - public static function embedAssets (project:HXProject):Bool { + public static function embedAssets (project:HXProject, targetDirectory:String):Bool { var embed = ""; var assets = []; @@ -875,7 +875,7 @@ class FlashHelper { if (embed != "") { //compileSWC (project, embed, id); - compileSWC (project, assets, id); + compileSWC (project, assets, id, targetDirectory); } @@ -891,7 +891,7 @@ class FlashHelper { if (assets.length > 0) { - project.haxeflags.push ("-swf-lib " + project.app.path + "/flash/obj/assets.swf"); + project.haxeflags.push ("-swf-lib " + targetDirectory + "/obj/assets.swf"); project.haxedefs.set ("flash-use-stage", ""); return true; diff --git a/lime/tools/platforms/AndroidPlatform.hx b/lime/tools/platforms/AndroidPlatform.hx index 61d94b473..a73f73b17 100644 --- a/lime/tools/platforms/AndroidPlatform.hx +++ b/lime/tools/platforms/AndroidPlatform.hx @@ -52,7 +52,7 @@ class AndroidPlatform extends PlatformTarget { } - targetDirectory = project.app.path + "/android"; + targetDirectory = project.app.path + "/android/" + getBuildType(); } @@ -61,18 +61,7 @@ class AndroidPlatform extends PlatformTarget { var destination = targetDirectory + "/bin"; - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; var hasARMV5 = (ArrayHelper.containsValue (project.architectures, Architecture.ARMV5) || ArrayHelper.containsValue (project.architectures, Architecture.ARMV6)); @@ -174,22 +163,12 @@ class AndroidPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "android/hxml/" + type + ".hxml"); var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; var template = new Template (File.getContent (hxml)); @@ -320,6 +299,7 @@ class AndroidPlatform extends PlatformTarget { var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; context.ANDROID_INSTALL_LOCATION = project.config.getString ("android.install-location", "auto"); context.ANDROID_MINIMUM_SDK_VERSION = project.config.getInt ("android.minimum-sdk-version", 9); context.ANDROID_TARGET_SDK_VERSION = project.config.getInt ("android.target-sdk-version", 19); diff --git a/lime/tools/platforms/BlackBerryPlatform.hx b/lime/tools/platforms/BlackBerryPlatform.hx index 8ac812a83..047f9ae13 100644 --- a/lime/tools/platforms/BlackBerryPlatform.hx +++ b/lime/tools/platforms/BlackBerryPlatform.hx @@ -35,12 +35,12 @@ class BlackBerryPlatform extends PlatformTarget { if (!project.targetFlags.exists ("html5")) { - targetDirectory = project.app.path + "/blackberry/cpp"; + targetDirectory = project.app.path + "/blackberry/cpp/" + getBuildType(); outputFile = targetDirectory + "/bin/" + PathHelper.safeFileName (project.app.file); } else { - targetDirectory = project.app.path + "/blackberry/html5"; + targetDirectory = project.app.path + "/blackberry/html5/" + getBuildType(); outputFile = targetDirectory + "/src/" + project.app.file + ".js"; } @@ -66,18 +66,7 @@ class BlackBerryPlatform extends PlatformTarget { if (project.app.main != null) { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; ProcessHelper.runCommand ("", "haxe", [ hxml, "-D", "blackberry" ] ); @@ -177,17 +166,7 @@ class BlackBerryPlatform extends PlatformTarget { var hxml = ""; var context = project.templateContext; - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } + var type = getBuildType (); if (!project.targetFlags.exists ("html5")) { @@ -199,10 +178,11 @@ class BlackBerryPlatform extends PlatformTarget { hxml = PathHelper.findTemplate (project.templatePaths, "html5/hxml/" + type + ".hxml"); - context.OUTPUT_DIR = targetDirectory; context.OUTPUT_FILE = outputFile; } + + context.OUTPUT_DIR = targetDirectory; var template = new Template (File.getContent (hxml)); @@ -323,11 +303,11 @@ class BlackBerryPlatform extends PlatformTarget { destination = targetDirectory + "/src/"; context.WIN_FLASHBACKGROUND = StringTools.hex (project.window.background, 6); - context.OUTPUT_DIR = targetDirectory; context.OUTPUT_FILE = outputFile; } + context.OUTPUT_DIR = targetDirectory; context.BLACKBERRY_AUTHOR_ID = BlackBerryHelper.processDebugToken (project, targetDirectory).authorID; context.APP_FILE_SAFE = PathHelper.safeFileName (project.app.file); diff --git a/lime/tools/platforms/EmscriptenPlatform.hx b/lime/tools/platforms/EmscriptenPlatform.hx index e3580ddfc..44f3063ab 100644 --- a/lime/tools/platforms/EmscriptenPlatform.hx +++ b/lime/tools/platforms/EmscriptenPlatform.hx @@ -30,7 +30,7 @@ class EmscriptenPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = project.app.path + "/emscripten"; + targetDirectory = project.app.path + "/emscripten/" + getBuildType(); outputFile = targetDirectory + "/bin/" + project.app.file + ".js"; } @@ -38,18 +38,7 @@ class EmscriptenPlatform extends PlatformTarget { public override function build ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; ProcessHelper.runCommand ("", "haxe", [ hxml, "-D", "emscripten", "-D", "webgl", "-D", "static_link" ] ); @@ -198,18 +187,7 @@ class EmscriptenPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "emscripten/hxml/" + type + ".hxml"); var context = project.templateContext; diff --git a/lime/tools/platforms/FirefoxPlatform.hx b/lime/tools/platforms/FirefoxPlatform.hx index 597f180f3..8a46e0a12 100644 --- a/lime/tools/platforms/FirefoxPlatform.hx +++ b/lime/tools/platforms/FirefoxPlatform.hx @@ -42,7 +42,7 @@ class FirefoxPlatform extends HTML5Platform { private override function initialize (command:String, project:HXProject):Void { - targetDirectory = project.app.path + "/firefox"; + targetDirectory = project.app.path + "/firefox/" + getBuildType(); outputFile = targetDirectory + "/bin/" + project.app.file + ".js"; } @@ -50,7 +50,7 @@ class FirefoxPlatform extends HTML5Platform { public override function run ():Void { - HTML5Helper.launch (project, project.app.path + "/firefox/bin"); + HTML5Helper.launch (project, targetDirectory + "/bin"); } diff --git a/lime/tools/platforms/FlashPlatform.hx b/lime/tools/platforms/FlashPlatform.hx index c77a36d46..c0e25b32c 100644 --- a/lime/tools/platforms/FlashPlatform.hx +++ b/lime/tools/platforms/FlashPlatform.hx @@ -36,8 +36,8 @@ class FlashPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = project.app.path + "/flash"; - + targetDirectory = project.app.path + "/flash/" + getBuildType(); + } @@ -45,17 +45,7 @@ class FlashPlatform extends PlatformTarget { var destination = targetDirectory + "/bin"; - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } + var type = getBuildType (); if (embedded) { @@ -87,7 +77,7 @@ class FlashPlatform extends PlatformTarget { } } - + ProcessHelper.runCommand ("", "haxe", args); } else { @@ -140,22 +130,12 @@ class FlashPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "flash/hxml/" + type + ".hxml"); var context = project.templateContext; context.WIN_FLASHBACKGROUND = StringTools.hex (project.window.background, 6); + context.OUTPUT_DIR = targetDirectory; var template = new Template (File.getContent (hxml)); @@ -257,9 +237,10 @@ class FlashPlatform extends PlatformTarget { var destination = targetDirectory + "/bin/"; PathHelper.mkdir (destination); - embedded = FlashHelper.embedAssets (project); + embedded = FlashHelper.embedAssets (project, targetDirectory); var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; FileHelper.recursiveCopyTemplate (project.templatePaths, "haxe", targetDirectory + "/haxe", context); FileHelper.recursiveCopyTemplate (project.templatePaths, "flash/hxml", targetDirectory + "/haxe", context); diff --git a/lime/tools/platforms/HTML5Platform.hx b/lime/tools/platforms/HTML5Platform.hx index cf9f809b1..fbb1f3058 100644 --- a/lime/tools/platforms/HTML5Platform.hx +++ b/lime/tools/platforms/HTML5Platform.hx @@ -88,18 +88,7 @@ class HTML5Platform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "html5/hxml/" + type + ".hxml"); var context = project.templateContext; @@ -116,7 +105,7 @@ class HTML5Platform extends PlatformTarget { private function initialize (command:String, project:HXProject):Void { - targetDirectory = project.app.path + "/html5"; + targetDirectory = project.app.path + "/html5/" + getBuildType (project); outputFile = targetDirectory + "/bin/" + project.app.file + ".js"; } diff --git a/lime/tools/platforms/IOSPlatform.hx b/lime/tools/platforms/IOSPlatform.hx index fa5a000d7..75ddd3c60 100644 --- a/lime/tools/platforms/IOSPlatform.hx +++ b/lime/tools/platforms/IOSPlatform.hx @@ -39,7 +39,7 @@ class IOSPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = PathHelper.combine (project.app.path, "ios"); + targetDirectory = PathHelper.combine (project.app.path, "ios/" + getBuildType()); } @@ -89,7 +89,10 @@ class IOSPlatform extends PlatformTarget { var hxml = PathHelper.findTemplate (project.templatePaths, "iphone/PROJ/haxe/Build.hxml"); var template = new Template (File.getContent (hxml)); - Sys.println (template.execute (generateContext ())); + var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; + + Sys.println (template.execute (context)); Sys.println ("-D display"); } @@ -398,6 +401,7 @@ class IOSPlatform extends PlatformTarget { project.assets.push (manifest); var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; var projectDirectory = targetDirectory + "/" + project.app.file + "/"; diff --git a/lime/tools/platforms/LinuxPlatform.hx b/lime/tools/platforms/LinuxPlatform.hx index 9c4ebfdc6..70eb6e5c0 100644 --- a/lime/tools/platforms/LinuxPlatform.hx +++ b/lime/tools/platforms/LinuxPlatform.hx @@ -72,7 +72,7 @@ class LinuxPlatform extends PlatformTarget { } - targetDirectory = project.app.path + "/linux" + (is64 ? "64" : "") + (isRaspberryPi ? "-rpi" : "") + "/" + targetType; + targetDirectory = project.app.path + "/linux" + (is64 ? "64" : "") + (isRaspberryPi ? "-rpi" : "") + "/" + targetType + "/" + getBuildType(); applicationDirectory = targetDirectory + "/bin/"; executablePath = PathHelper.combine (applicationDirectory, project.app.file); @@ -81,18 +81,7 @@ class LinuxPlatform extends PlatformTarget { public override function build ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; PathHelper.mkdir (targetDirectory); @@ -198,22 +187,14 @@ class LinuxPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, targetType + "/hxml/" + type + ".hxml"); var template = new Template (File.getContent (hxml)); - Sys.println (template.execute (generateContext ())); + var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; + + Sys.println (template.execute (context)); Sys.println ("-D display"); } @@ -320,6 +301,7 @@ class LinuxPlatform extends PlatformTarget { } var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; if (targetType == "cpp" && project.targetFlags.exists ("static")) { diff --git a/lime/tools/platforms/MacPlatform.hx b/lime/tools/platforms/MacPlatform.hx index a91c6372d..148e7bf42 100644 --- a/lime/tools/platforms/MacPlatform.hx +++ b/lime/tools/platforms/MacPlatform.hx @@ -69,7 +69,7 @@ class MacPlatform extends PlatformTarget { } - targetDirectory = project.app.path + "/mac" + (is64 ? "64" : "") + "/" + targetType; + targetDirectory = project.app.path + "/mac" + (is64 ? "64" : "") + "/" + targetType + "/" + getBuildType(); applicationDirectory = targetDirectory + "/bin/" + project.app.file + ".app"; contentDirectory = applicationDirectory + "/Contents/Resources"; executableDirectory = applicationDirectory + "/Contents/MacOS"; @@ -80,18 +80,7 @@ class MacPlatform extends PlatformTarget { public override function build ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type =getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; PathHelper.mkdir (targetDirectory); @@ -189,22 +178,14 @@ class MacPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType(); var hxml = PathHelper.findTemplate (project.templatePaths, targetType + "/hxml/" + type + ".hxml"); var template = new Template (File.getContent (hxml)); - Sys.println (template.execute (generateContext ())); + var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; + + Sys.println (template.execute (context)); Sys.println ("-D display"); } @@ -296,6 +277,7 @@ class MacPlatform extends PlatformTarget { } var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; if (targetType == "cpp" && project.targetFlags.exists ("static")) { diff --git a/lime/tools/platforms/TVOSPlatform.hx b/lime/tools/platforms/TVOSPlatform.hx index 1b1540cbd..6ae64d957 100644 --- a/lime/tools/platforms/TVOSPlatform.hx +++ b/lime/tools/platforms/TVOSPlatform.hx @@ -39,7 +39,7 @@ class TVOSPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = PathHelper.combine (project.app.path, "tvos"); + targetDirectory = PathHelper.combine (project.app.path, "tvos/" + getBuildType()); } @@ -88,8 +88,11 @@ class TVOSPlatform extends PlatformTarget { var hxml = PathHelper.findTemplate (project.templatePaths, "tvos/PROJ/haxe/Build.hxml"); var template = new Template (File.getContent (hxml)); + + var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; - Sys.println (template.execute (generateContext ())); + Sys.println (template.execute (context)); Sys.println ("-D display"); } @@ -364,6 +367,7 @@ class TVOSPlatform extends PlatformTarget { project.assets.push (manifest); var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; var projectDirectory = targetDirectory + "/" + project.app.file + "/"; diff --git a/lime/tools/platforms/TizenPlatform.hx b/lime/tools/platforms/TizenPlatform.hx index 76a8a2975..d617b71c9 100644 --- a/lime/tools/platforms/TizenPlatform.hx +++ b/lime/tools/platforms/TizenPlatform.hx @@ -29,7 +29,7 @@ class TizenPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = project.app.path + "/tizen"; + targetDirectory = project.app.path + "/tizen/" + getBuildType(); } @@ -52,18 +52,7 @@ class TizenPlatform extends PlatformTarget { } - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; ProcessHelper.runCommand ("", "haxe", [ hxml, "-D", "tizen" ] ); @@ -103,22 +92,12 @@ class TizenPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "tizen/hxml/" + type + ".hxml"); var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; var template = new Template (File.getContent (hxml)); @@ -192,6 +171,7 @@ class TizenPlatform extends PlatformTarget { var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; context.APP_PACKAGE = TizenHelper.getUUID (project); context.SIMULATOR = project.targetFlags.exists ("simulator"); diff --git a/lime/tools/platforms/WebOSPlatform.hx b/lime/tools/platforms/WebOSPlatform.hx index d8fe650c5..26e73bde9 100644 --- a/lime/tools/platforms/WebOSPlatform.hx +++ b/lime/tools/platforms/WebOSPlatform.hx @@ -26,25 +26,14 @@ class WebOSPlatform extends PlatformTarget { super (command, _project, targetFlags); - targetDirectory = project.app.path + "/webos"; + targetDirectory = project.app.path + "/webos/" + getBuildType(); } public override function build ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; var destination = targetDirectory + "/bin/"; @@ -86,22 +75,12 @@ class WebOSPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, "webos/hxml/" + type + ".hxml"); var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; var template = new Template (File.getContent (hxml)); @@ -167,6 +146,7 @@ class WebOSPlatform extends PlatformTarget { var context = project.templateContext; context.CPP_DIR = targetDirectory + "/obj"; + context.OUTPUT_DIR = targetDirectory; var icons = project.icons; diff --git a/lime/tools/platforms/WindowsPlatform.hx b/lime/tools/platforms/WindowsPlatform.hx index ef380d772..84ddb52fd 100644 --- a/lime/tools/platforms/WindowsPlatform.hx +++ b/lime/tools/platforms/WindowsPlatform.hx @@ -36,7 +36,7 @@ class WindowsPlatform extends PlatformTarget { public function new (command:String, _project:HXProject, targetFlags:Map ) { super (command, _project, targetFlags); - + if (project.targetFlags.exists ("neko") || project.target != PlatformHelper.hostPlatform) { targetType = "neko"; @@ -51,7 +51,7 @@ class WindowsPlatform extends PlatformTarget { } - targetDirectory = project.app.path + "/windows/" + targetType; + targetDirectory = project.app.path + "/windows/" + targetType + "/" + getBuildType(); applicationDirectory = targetDirectory + "/bin/"; executablePath = applicationDirectory + project.app.file + ".exe"; @@ -60,18 +60,7 @@ class WindowsPlatform extends PlatformTarget { public override function build ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = targetDirectory + "/haxe/" + type + ".hxml"; PathHelper.mkdir (targetDirectory); @@ -194,22 +183,14 @@ class WindowsPlatform extends PlatformTarget { public override function display ():Void { - var type = "release"; - - if (project.debug) { - - type = "debug"; - - } else if (project.targetFlags.exists ("final")) { - - type = "final"; - - } - + var type = getBuildType (); var hxml = PathHelper.findTemplate (project.templatePaths, targetType + "/hxml/" + type + ".hxml"); var template = new Template (File.getContent (hxml)); - Sys.println (template.execute (generateContext ())); + var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; + + Sys.println (template.execute (context)); Sys.println ("-D display"); } @@ -291,6 +272,7 @@ class WindowsPlatform extends PlatformTarget { } var context = generateContext (); + context.OUTPUT_DIR = targetDirectory; if (targetType == "cpp" && project.targetFlags.exists ("static")) { diff --git a/templates/android/hxml/debug.hxml b/templates/android/hxml/debug.hxml index 5e5312606..3ba0607cf 100644 --- a/templates/android/hxml/debug.hxml +++ b/templates/android/hxml/debug.hxml @@ -1,7 +1,7 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/android/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: +--macro keep("::APP_MAIN::") -D android -D android-9 -debug ---macro keep("::APP_MAIN::") \ No newline at end of file diff --git a/templates/android/hxml/final.hxml b/templates/android/hxml/final.hxml index b8141827a..b4a64757a 100644 --- a/templates/android/hxml/final.hxml +++ b/templates/android/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/android/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D android diff --git a/templates/android/hxml/release.hxml b/templates/android/hxml/release.hxml index c4bc5299a..d03f23c13 100644 --- a/templates/android/hxml/release.hxml +++ b/templates/android/hxml/release.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/android/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D android diff --git a/templates/blackberry/hxml/debug.hxml b/templates/blackberry/hxml/debug.hxml index 8b23d4f2e..305519a5c 100644 --- a/templates/blackberry/hxml/debug.hxml +++ b/templates/blackberry/hxml/debug.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/blackberry/cpp/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D blackberry --debug \ No newline at end of file +-debug diff --git a/templates/blackberry/hxml/final.hxml b/templates/blackberry/hxml/final.hxml index 25b078c48..1c9b26d87 100644 --- a/templates/blackberry/hxml/final.hxml +++ b/templates/blackberry/hxml/final.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/blackberry/cpp/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D blackberry --D final \ No newline at end of file +-D final diff --git a/templates/blackberry/hxml/release.hxml b/templates/blackberry/hxml/release.hxml index fa23e62e8..3da413b6d 100644 --- a/templates/blackberry/hxml/release.hxml +++ b/templates/blackberry/hxml/release.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/blackberry/cpp/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") --D blackberry \ No newline at end of file +-D blackberry diff --git a/templates/cpp/hxml/debug.hxml b/templates/cpp/hxml/debug.hxml index c87f1eb5d..f6bc1a354 100644 --- a/templates/cpp/hxml/debug.hxml +++ b/templates/cpp/hxml/debug.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: -cpp ::CPP_DIR:: --cp ::BUILD_DIR::/cpp/haxe +-cp ::OUTPUT_DIR::/haxe --macro keep("::APP_MAIN::") --debug \ No newline at end of file +-debug diff --git a/templates/cpp/hxml/final.hxml b/templates/cpp/hxml/final.hxml index a42220b80..f477f4bee 100644 --- a/templates/cpp/hxml/final.hxml +++ b/templates/cpp/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/cpp/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D final diff --git a/templates/cpp/hxml/release.hxml b/templates/cpp/hxml/release.hxml index 45516fc8b..92297dcd8 100644 --- a/templates/cpp/hxml/release.hxml +++ b/templates/cpp/hxml/release.hxml @@ -1,4 +1,4 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/cpp/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: ---macro keep("::APP_MAIN::") \ No newline at end of file +--macro keep("::APP_MAIN::") diff --git a/templates/emscripten/hxml/debug.hxml b/templates/emscripten/hxml/debug.hxml index 61fa3fad2..e2efde5e1 100644 --- a/templates/emscripten/hxml/debug.hxml +++ b/templates/emscripten/hxml/debug.hxml @@ -1,7 +1,7 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/emscripten/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D emscripten -D webgl --debug \ No newline at end of file +-debug diff --git a/templates/emscripten/hxml/final.hxml b/templates/emscripten/hxml/final.hxml index 5542dda0a..fc6e82599 100644 --- a/templates/emscripten/hxml/final.hxml +++ b/templates/emscripten/hxml/final.hxml @@ -1,7 +1,7 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/emscripten/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D emscripten -D webgl --D final \ No newline at end of file +-D final diff --git a/templates/emscripten/hxml/release.hxml b/templates/emscripten/hxml/release.hxml index e17ff7bce..d2b14aa11 100644 --- a/templates/emscripten/hxml/release.hxml +++ b/templates/emscripten/hxml/release.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/emscripten/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D emscripten --D webgl \ No newline at end of file +-D webgl diff --git a/templates/flash/hxml/debug.hxml b/templates/flash/hxml/debug.hxml index 7a203638c..7de77c318 100644 --- a/templates/flash/hxml/debug.hxml +++ b/templates/flash/hxml/debug.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: -swf-version ::SWF_VERSION:: --swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf +-swf ::OUTPUT_DIR::/bin/::APP_FILE::.swf -swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND:: --cp ::BUILD_DIR::/flash/haxe +-cp ::OUTPUT_DIR::/haxe -debug \ No newline at end of file diff --git a/templates/flash/hxml/final.hxml b/templates/flash/hxml/final.hxml index 41579051b..db53ce166 100644 --- a/templates/flash/hxml/final.hxml +++ b/templates/flash/hxml/final.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: -swf-version ::SWF_VERSION:: --swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf +-swf ::OUTPUT_DIR::/bin/::APP_FILE::.swf -swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND:: --cp ::BUILD_DIR::/flash/haxe +-cp ::OUTPUT_DIR::/haxe -D final \ No newline at end of file diff --git a/templates/flash/hxml/release.hxml b/templates/flash/hxml/release.hxml index ed7c6116e..6842b40db 100644 --- a/templates/flash/hxml/release.hxml +++ b/templates/flash/hxml/release.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: -swf-version ::SWF_VERSION:: --swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf +-swf ::OUTPUT_DIR::/bin/::APP_FILE::.swf -swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND:: --cp ::BUILD_DIR::/flash/haxe \ No newline at end of file +-cp ::OUTPUT_DIR::/haxe \ No newline at end of file diff --git a/templates/html5/hxml/debug.hxml b/templates/html5/hxml/debug.hxml index 122945e1f..b7f2af904 100755 --- a/templates/html5/hxml/debug.hxml +++ b/templates/html5/hxml/debug.hxml @@ -3,4 +3,4 @@ -cp ::OUTPUT_DIR::/haxe -D html5 -D html --debug \ No newline at end of file +-debug diff --git a/templates/java/hxml/debug.hxml b/templates/java/hxml/debug.hxml index 31c1ee060..07c810910 100644 --- a/templates/java/hxml/debug.hxml +++ b/templates/java/hxml/debug.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/java/haxe --java ::BUILD_DIR::/java/obj +-cp ::OUTPUT_DIR::/haxe +-java ::OUTPUT_DIR::/obj --macro keep("::APP_MAIN::") -debug \ No newline at end of file diff --git a/templates/java/hxml/final.hxml b/templates/java/hxml/final.hxml index efbed252f..b6dee86e7 100644 --- a/templates/java/hxml/final.hxml +++ b/templates/java/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/java/haxe --java ::BUILD_DIR::/java/obj +-cp ::OUTPUT_DIR::/haxe +-java ::OUTPUT_DIR::/obj --macro keep("::APP_MAIN::") -D final \ No newline at end of file diff --git a/templates/java/hxml/release.hxml b/templates/java/hxml/release.hxml index 457d265fc..50eea373c 100644 --- a/templates/java/hxml/release.hxml +++ b/templates/java/hxml/release.hxml @@ -1,4 +1,4 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/java/haxe --java ::BUILD_DIR::/java/obj +-cp ::OUTPUT_DIR::/haxe +-java ::OUTPUT_DIR::/obj --macro keep("::APP_MAIN::") \ No newline at end of file diff --git a/templates/neko/hxml/debug.hxml b/templates/neko/hxml/debug.hxml index f5b4db93e..191ef100f 100644 --- a/templates/neko/hxml/debug.hxml +++ b/templates/neko/hxml/debug.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/neko/haxe +-cp ::OUTPUT_DIR::/haxe -neko ::NEKO_FILE:: --macro keep("::APP_MAIN::") -debug \ No newline at end of file diff --git a/templates/neko/hxml/final.hxml b/templates/neko/hxml/final.hxml index 652d6a9a1..b4a0c5f6a 100644 --- a/templates/neko/hxml/final.hxml +++ b/templates/neko/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/neko/haxe +-cp ::OUTPUT_DIR::/haxe -neko ::NEKO_FILE:: --macro keep("::APP_MAIN::") -D final \ No newline at end of file diff --git a/templates/neko/hxml/release.hxml b/templates/neko/hxml/release.hxml index 75625aa15..76812e47a 100644 --- a/templates/neko/hxml/release.hxml +++ b/templates/neko/hxml/release.hxml @@ -1,4 +1,4 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/neko/haxe +-cp ::OUTPUT_DIR::/haxe -neko ::NEKO_FILE:: --macro keep("::APP_MAIN::") \ No newline at end of file diff --git a/templates/nodejs/hxml/debug.hxml b/templates/nodejs/hxml/debug.hxml index ed7b4979a..f0112a266 100644 --- a/templates/nodejs/hxml/debug.hxml +++ b/templates/nodejs/hxml/debug.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: -js ::NODE_FILE:: --cp ::BUILD_DIR::/nodejs/haxe +-cp ::OUTPUT_DIR::/haxe --macro allowPackage("flash") --macro define("sys") -D nodejs diff --git a/templates/nodejs/hxml/final.hxml b/templates/nodejs/hxml/final.hxml index d9f0b8478..8e09552fe 100644 --- a/templates/nodejs/hxml/final.hxml +++ b/templates/nodejs/hxml/final.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: -js ::NODE_FILE:: --cp ::BUILD_DIR::/nodejs/haxe +-cp ::OUTPUT_DIR::/haxe --macro allowPackage("flash") --macro define("sys") -D nodejs diff --git a/templates/nodejs/hxml/release.hxml b/templates/nodejs/hxml/release.hxml index dc6631990..8370ec862 100644 --- a/templates/nodejs/hxml/release.hxml +++ b/templates/nodejs/hxml/release.hxml @@ -1,6 +1,6 @@ -main ApplicationMain ::HAXE_FLAGS:: -js ::NODE_FILE:: --cp ::BUILD_DIR::/nodejs/haxe +-cp ::OUTPUT_DIR::/haxe --macro allowPackage("flash") --macro define("sys") -D nodejs diff --git a/templates/tizen/hxml/debug.hxml b/templates/tizen/hxml/debug.hxml index afeca1ea3..3bb2d7d0d 100644 --- a/templates/tizen/hxml/debug.hxml +++ b/templates/tizen/hxml/debug.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/tizen/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D tizen diff --git a/templates/tizen/hxml/final.hxml b/templates/tizen/hxml/final.hxml index 82978d0c5..953f7d73b 100644 --- a/templates/tizen/hxml/final.hxml +++ b/templates/tizen/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/tizen/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D tizen diff --git a/templates/tizen/hxml/release.hxml b/templates/tizen/hxml/release.hxml index afdab8443..f091a281c 100644 --- a/templates/tizen/hxml/release.hxml +++ b/templates/tizen/hxml/release.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/tizen/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D tizen diff --git a/templates/webos/hxml/debug.hxml b/templates/webos/hxml/debug.hxml index f1429d067..10fd15e7b 100644 --- a/templates/webos/hxml/debug.hxml +++ b/templates/webos/hxml/debug.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/webos/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D webos diff --git a/templates/webos/hxml/final.hxml b/templates/webos/hxml/final.hxml index 145844a31..c982bf7c3 100644 --- a/templates/webos/hxml/final.hxml +++ b/templates/webos/hxml/final.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/webos/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D webos diff --git a/templates/webos/hxml/release.hxml b/templates/webos/hxml/release.hxml index 1288019f5..1c58b4015 100644 --- a/templates/webos/hxml/release.hxml +++ b/templates/webos/hxml/release.hxml @@ -1,5 +1,5 @@ -main ApplicationMain ::HAXE_FLAGS:: --cp ::BUILD_DIR::/webos/haxe +-cp ::OUTPUT_DIR::/haxe -cpp ::CPP_DIR:: --macro keep("::APP_MAIN::") -D webos