Improve finding of NDLL folder in tools
This commit is contained in:
@@ -512,68 +512,39 @@ class CommandLineTools {
|
||||
|
||||
if (FileSystem.exists ("tools.n")) {
|
||||
|
||||
path = PathHelper.combine (Sys.getCwd (), "../");
|
||||
path = PathHelper.combine (Sys.getCwd (), "../ndll/");
|
||||
|
||||
} else if (FileSystem.exists ("run.n")) {
|
||||
|
||||
path = Sys.getCwd ();
|
||||
path = Sys.getCwd () + "/ndll/";
|
||||
|
||||
}
|
||||
|
||||
if (path == "") {
|
||||
|
||||
var process = new Process ("haxelib", [ "path", "lime" ]);
|
||||
var lines = new Array<String> ();
|
||||
|
||||
try {
|
||||
|
||||
while (true) {
|
||||
|
||||
var length = lines.length;
|
||||
var line = StringTools.trim (process.stdout.readLine ());
|
||||
trace (line);
|
||||
if (StringTools.startsWith (line, "-L ")) {
|
||||
|
||||
if (length > 0 && (line == "-D lime" || StringTools.startsWith (line, "-D lime="))) {
|
||||
|
||||
path = StringTools.trim (lines[length - 1]);
|
||||
|
||||
}
|
||||
|
||||
lines.push (line);
|
||||
|
||||
}
|
||||
|
||||
} catch (e:Dynamic) {
|
||||
|
||||
}
|
||||
|
||||
if (path == "") {
|
||||
|
||||
for (line in lines) {
|
||||
|
||||
if (line != "" && line.substr (0, 1) != "-") {
|
||||
|
||||
try {
|
||||
|
||||
if (FileSystem.exists (line)) {
|
||||
|
||||
path = line;
|
||||
|
||||
}
|
||||
|
||||
} catch (e:Dynamic) {}
|
||||
path = StringTools.trim (line.substr (2));
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e:Dynamic) {}
|
||||
|
||||
process.close ();
|
||||
|
||||
}
|
||||
|
||||
path += "../ndll/";
|
||||
|
||||
switch (PlatformHelper.hostPlatform) {
|
||||
|
||||
case WINDOWS:
|
||||
|
||||
@@ -26,36 +26,39 @@ class SVGExport {
|
||||
var haxePath = Sys.getEnv ("HAXEPATH");
|
||||
var command = (haxePath != null && haxePath != "") ? haxePath + "/haxelib" : "haxelib";
|
||||
|
||||
var process = new Process (command, [ "path", "lime" ]);
|
||||
var path = "";
|
||||
|
||||
try {
|
||||
if (FileSystem.exists ("svg.n")) {
|
||||
|
||||
var lines = new Array<String> ();
|
||||
path = PathHelper.combine (Sys.getCwd (), "../ndll/");
|
||||
|
||||
while (true) {
|
||||
}
|
||||
|
||||
var length = lines.length;
|
||||
var line = StringTools.trim (process.stdout.readLine ());
|
||||
if (path == "") {
|
||||
|
||||
if (length > 0 && (line == "-D lime" || StringTools.startsWith (line, "-D lime="))) {
|
||||
var process = new Process ("haxelib", [ "path", "lime" ]);
|
||||
|
||||
path = StringTools.trim (lines[length - 1]);
|
||||
try {
|
||||
|
||||
while (true) {
|
||||
|
||||
var line = StringTools.trim (process.stdout.readLine ());
|
||||
trace (line);
|
||||
if (StringTools.startsWith (line, "-L ")) {
|
||||
|
||||
path = StringTools.trim (line.substr (2));
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lines.push (line);
|
||||
|
||||
}
|
||||
|
||||
} catch (e:Dynamic) {
|
||||
} catch (e:Dynamic) {}
|
||||
|
||||
process.close ();
|
||||
|
||||
}
|
||||
|
||||
path += "../ndll/";
|
||||
|
||||
switch (PlatformHelper.hostPlatform) {
|
||||
|
||||
case WINDOWS:
|
||||
|
||||
Reference in New Issue
Block a user