Fix issues
This commit is contained in:
@@ -7,8 +7,19 @@ import sys.io.Process;
|
||||
import sys.FileSystem;
|
||||
|
||||
class Update {
|
||||
private static function recursiveDelete(path:String) {
|
||||
for(file in FileSystem.readDirectory(path)) {
|
||||
var p = '$path/$file';
|
||||
if(FileSystem.isDirectory(p))
|
||||
recursiveDelete(p);
|
||||
else
|
||||
FileSystem.deleteFile(p);
|
||||
}
|
||||
FileSystem.deleteDirectory(path);
|
||||
}
|
||||
|
||||
public static function main(args:Array<String>) {
|
||||
var args = ArgParser.parse(args, ["S" => "silent-progress", "silent" => "silent-progress"]);
|
||||
var args = ArgParser.parse(args, ["s" => "silent-progress", "S" => "silent-progress", "silent" => "silent-progress"]);
|
||||
var CHECK_VSTUDIO = !args.existsOption("no-vscheck");
|
||||
var REINSTALL_ALL = args.existsOption("reinstall");
|
||||
var SILENT = args.existsOption("silent-progress");
|
||||
@@ -18,7 +29,7 @@ class Update {
|
||||
FileSystem.createDirectory('.haxelib');
|
||||
|
||||
if (REINSTALL_ALL) {
|
||||
FileSystem.deleteDirectory('.haxelib');
|
||||
recursiveDelete('.haxelib');
|
||||
FileSystem.createDirectory('.haxelib');
|
||||
}
|
||||
|
||||
@@ -102,9 +113,9 @@ class Update {
|
||||
if(args.args.length == 0) defines.push("all");
|
||||
|
||||
function parse(libNode:Access) {
|
||||
if(libNode.name == "if") {
|
||||
if(libNode.name == "if" || libNode.name == "unless") {
|
||||
var cond = libNode.att.cond;
|
||||
if(!Utils.evaluateArgsCondition(cond, defines)) {
|
||||
if(Utils.evaluateArgsCondition(cond, defines) != (libNode.name == "if")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -6,6 +6,18 @@
|
||||
<line>mkdir dev-libs</line>
|
||||
</cmd>
|
||||
|
||||
<if cond="hxcpp || all">
|
||||
<cmd>
|
||||
<line>cd dev-libs</line>
|
||||
<line>git clone https://github.com/NeeEoo/hxcpp hxcpp</line>
|
||||
<line>cd ..</line>
|
||||
<line>haxelib dev hxcpp dev-libs/hxcpp</line>
|
||||
</cmd>
|
||||
|
||||
<!-- Build hxcpp -->
|
||||
<cmd inLib="hxcpp" dir="tools/hxcpp" cmd="haxe compile.hxml" />
|
||||
</if>
|
||||
|
||||
<if cond="openfl || all">
|
||||
<cmd>
|
||||
<line>cd dev-libs</line>
|
||||
@@ -82,17 +94,5 @@
|
||||
</cmd>
|
||||
</if>
|
||||
|
||||
<if cond="hxcpp || all">
|
||||
<cmd>
|
||||
<line>cd dev-libs</line>
|
||||
<line>git clone https://github.com/NeeEoo/hxcpp hxcpp</line>
|
||||
<line>cd ..</line>
|
||||
<line>haxelib dev hxcpp dev-libs/hxcpp</line>
|
||||
</cmd>
|
||||
|
||||
<!-- Build hxcpp -->
|
||||
<cmd inLib="hxcpp" dir="tools/hxcpp" cmd="haxe compile.hxml" />
|
||||
</if>
|
||||
|
||||
<print pretty="true">Setup for dev libs complete!</print>
|
||||
</libraries>
|
||||
|
||||
Reference in New Issue
Block a user