PlatformSetup: sudo still required on Linux
This commit is contained in:
@@ -864,6 +864,8 @@ class PlatformSetup
|
||||
}
|
||||
|
||||
if (answer == YES || answer == ALWAYS)
|
||||
{
|
||||
if (System.hostPlatform == MAC)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -877,6 +879,22 @@ class PlatformSetup
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
System.runCommand("", "sudo", [
|
||||
"cp",
|
||||
"-f",
|
||||
Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh",
|
||||
"/usr/local/bin/lime"
|
||||
], false);
|
||||
System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/lime"], false);
|
||||
installedCommand = true;
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (!installedCommand)
|
||||
{
|
||||
@@ -1080,6 +1098,9 @@ class PlatformSetup
|
||||
}
|
||||
|
||||
if (answer == YES || answer == ALWAYS)
|
||||
{
|
||||
|
||||
if (System.hostPlatform == MAC)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1099,6 +1120,25 @@ class PlatformSetup
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.runCommand("", "sudo", [
|
||||
"cp",
|
||||
"-f",
|
||||
Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh",
|
||||
"/usr/local/bin/lime"
|
||||
], false);
|
||||
System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/lime"], false);
|
||||
System.runCommand("", "sudo", [
|
||||
"cp",
|
||||
"-f",
|
||||
System.findTemplate(project.templatePaths, "bin/openfl.sh"),
|
||||
"/usr/local/bin/openfl"
|
||||
], false);
|
||||
System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/openfl"], false);
|
||||
installedCommand = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!installedCommand)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user