浏览代码

hashlink haxelib library

Nicolas Cannasse 8 年之前
父节点
当前提交
59b090a8d3
共有 2 个文件被更改,包括 29 次插入0 次删除
  1. 20 0
      other/haxelib/Run.hx
  2. 9 0
      other/haxelib/haxelib.json

+ 20 - 0
other/haxelib/Run.hx

@@ -0,0 +1,20 @@
+class Run {
+	static function main() {
+		var args = Sys.args();
+		var originalPath = args.pop();
+		Sys.setCwd(originalPath);
+		
+		switch( args.shift() ) {
+		case "build":		
+			var output = args.shift();
+			Sys.println("Code generated in "+output+" automatic native compilation not yet implemented");
+		case "run":
+			var output = args.shift();
+			if( StringTools.endsWith(output,".c") ) return;			
+			Sys.command("hl "+output);
+		case cmd:
+			Sys.println("Unknown command "+cmd);
+			Sys.exit(1);
+		}
+	}
+}

+ 9 - 0
other/haxelib/haxelib.json

@@ -0,0 +1,9 @@
+{
+	"name" : "hashlink",
+	"url" : "https://github.com/HaxeFoundation/hashlink",
+	"license" : "BSD",
+	"contributors" : ["ncannasse"],
+	"description" : "Hashlink support library.",
+	"version" : "0.1.0",
+	"releasenote" : ""
+}