package installers;


import haxe.io.Path;
import sys.io.Process;
import neko.Lib;


class CPPInstaller extends DesktopInstaller {


	override function getVM ():String { 
		
		return "cpp";
		
	}
	

	override function copyResultTo (path:String) {
		
		var debugString:String = (debug ? "-debug" : "");
		var extension:String = (targetName=="windows") ? ".exe" : "";
		
		copyIfNewer (getBuildDir() + "/ApplicationMain" + debugString + extension, path);
		
	}
	

	override function generateContext ():Void {
		
		if (targetName == "windows") {
			
			if (!defines.exists ("SHOW_CONSOLE") && (!debug || defines.exists ("HIDE_CONSOLE"))) {
				
				defines.set ("no_console", "1");
				Sys.putEnv ("no_console", "1");
				
			}
			
			if (Sys.environment ().exists ("VS110COMNTOOLS")) {
				
				Lib.println ("Warning: Visual Studio 2012 is not supported. Trying Visual Studio 2010...");
				Sys.putEnv ("VS110COMNTOOLS", Sys.getEnv ("VS100COMNTOOLS"));
				
			}
			
		}
		
		super.generateContext ();
		
		context.CPP_DIR = getBuildDir ();
		context.HXML_PATH = NME + "/tools/command-line/cpp/hxml/" + (debug ? "debug" : "release") + ".hxml";
		
	}
	

}

package installers;


import haxe.io.Path;
import sys.io.Process;
import neko.Lib;


class CPPInstaller extends DesktopInstaller {


	override function getVM ():String { 
		
		return "cpp";
		
	}
	

	override function copyResultTo (path:String) {
		
		var debugString:String = (debug ? "-debug" : "");
		var extension:String = (targetName=="windows") ? ".exe" : "";
		
		copyIfNewer (getBuildDir() + "/ApplicationMain" + debugString + extension, path);
		
	}
	

	override function generateContext ():Void {
		
		if (targetName == "windows") {
			
			if (!defines.exists ("SHOW_CONSOLE") && (!debug || defines.exists ("HIDE_CONSOLE"))) {
				
				defines.set ("no_console", "1");
				Sys.putEnv ("no_console", "1");
				
			}
			
			if (Sys.environment ().exists ("VS110COMNTOOLS")) {
				
				Lib.println ("Warning: Visual Studio 2012 is not supported. Trying Visual Studio 2010...");
				Sys.putEnv ("VS110COMNTOOLS", Sys.getEnv ("VS100COMNTOOLS"));
				
			}
			
		} else if (targetName == "mac") {
			
			Sys.putEnv ("HXCPP_CLANG", "1");
			
		}
		
		super.generateContext ();
		
		context.CPP_DIR = getBuildDir ();
		context.HXML_PATH = NME + "/tools/command-line/cpp/hxml/" + (debug ? "debug" : "release") + ".hxml";
		
	}
	

}

Use Clang by default for OS X applications. Xcode 4.4 has broken symlink for g++
Use Clang by default for OS X applications. Xcode 4.4 has broken symlink for g++

git-svn-id: 6cc2fa9b7d2830c930c171b991ffcd5e23f23d5e@1842 1509560c-5e2a-0410-865c-31c25e1cfdef

haxenme/nme,madrazo/nme,thomasuster/NME,madrazo/nme,haxenme/nme,madrazo/nme,thomasuster/NME,madrazo/nme,thomasuster/NME,haxenme/nme,thomasuster/NME,haxenme/nme,haxenme/nme,thomasuster/NME,madrazo/nme,madrazo/nme,thomasuster/NME