Explorar o código

hashlink haxelib library

Nicolas Cannasse %!s(int64=8) %!d(string=hai) anos
pai
achega
59b090a8d3
Modificáronse 2 ficheiros con 29 adicións e 0 borrados
  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" : ""
+}