Merge branch 'develop' into 8.2.0-Dev
This commit is contained in:
@@ -826,25 +826,49 @@ class PlatformSetup
|
||||
return;
|
||||
}
|
||||
|
||||
var haxePath = Sys.getEnv("HAXEPATH");
|
||||
var haxePathEnv = Sys.getEnv("HAXEPATH");
|
||||
var haxePath = haxePathEnv;
|
||||
|
||||
if (System.hostPlatform == WINDOWS)
|
||||
{
|
||||
var usingDefaultHaxePath = false;
|
||||
if (haxePath == null || haxePath == "")
|
||||
{
|
||||
usingDefaultHaxePath = true;
|
||||
haxePath = "C:\\HaxeToolkit\\haxe\\";
|
||||
}
|
||||
|
||||
var copyFailure = false;
|
||||
var exeDestPath = haxePath + "\\lime.exe";
|
||||
try
|
||||
{
|
||||
File.copy(Haxelib.getPath(new Haxelib("lime")) + "\\templates\\\\bin\\lime.exe", haxePath + "\\lime.exe");
|
||||
File.copy(Haxelib.getPath(new Haxelib("lime")) + "\\templates\\\\bin\\lime.exe", exeDestPath);
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
catch (e:Dynamic)
|
||||
{
|
||||
copyFailure = true;
|
||||
if (Log.verbose)
|
||||
{
|
||||
Log.warn("Failed to copy lime.exe alias to destination: " + exeDestPath);
|
||||
}
|
||||
}
|
||||
var shDestPath = haxePath + "\\lime";
|
||||
try
|
||||
{
|
||||
File.copy(Haxelib.getPath(new Haxelib("lime")) + "\\templates\\\\bin\\lime.sh", haxePath + "\\lime");
|
||||
File.copy(Haxelib.getPath(new Haxelib("lime")) + "\\templates\\\\bin\\lime.sh", shDestPath);
|
||||
}
|
||||
catch (e:Dynamic)
|
||||
{
|
||||
copyFailure = true;
|
||||
if (Log.verbose)
|
||||
{
|
||||
Log.warn("Failed to copy lime.sh alias to destination: " + shDestPath);
|
||||
}
|
||||
}
|
||||
if (Log.verbose && copyFailure && usingDefaultHaxePath && !FileSystem.exists(haxePath))
|
||||
{
|
||||
Log.warn("Did you install Haxe to a custom location? Set the HAXEPATH environment variable, and run Lime setup again.");
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -869,32 +893,46 @@ class PlatformSetup
|
||||
{
|
||||
if (System.hostPlatform == MAC)
|
||||
{
|
||||
var aliasDestPath = "/usr/local/bin/lime";
|
||||
try
|
||||
{
|
||||
System.runCommand("", "cp", [
|
||||
"-f",
|
||||
Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh",
|
||||
"/usr/local/bin/lime"
|
||||
aliasDestPath
|
||||
], false);
|
||||
System.runCommand("", "chmod", ["755", "/usr/local/bin/lime"], false);
|
||||
System.runCommand("", "chmod", ["755", aliasDestPath], false);
|
||||
installedCommand = true;
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
catch (e:Dynamic)
|
||||
{
|
||||
if (Log.verbose)
|
||||
{
|
||||
Log.warn("Failed to copy Lime alias to destination: " + aliasDestPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var aliasDestPath = "/usr/local/bin/lime";
|
||||
try
|
||||
{
|
||||
System.runCommand("", "sudo", [
|
||||
"cp",
|
||||
"-f",
|
||||
Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh",
|
||||
"/usr/local/bin/lime"
|
||||
aliasDestPath
|
||||
], false);
|
||||
System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/lime"], false);
|
||||
System.runCommand("", "sudo", ["chmod", "755", aliasDestPath], false);
|
||||
installedCommand = true;
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
catch (e:Dynamic)
|
||||
{
|
||||
if (Log.verbose)
|
||||
{
|
||||
Log.warn("Failed to copy Lime alias to destination: " + aliasDestPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user