resources/RooUsage.txt
[app.Builder.js] / src / Resources.vala
index e0868cc..f35b389 100644 (file)
@@ -89,7 +89,7 @@ public class Resources : Object
                        "roodata.json",
                        "*",
                        "Editors/*.js",
-                       "src/vapi/*.vapi"
+                       "vapi/*"
                        
                };
                this.fetch_files = new Gee.ArrayList<ResourcesItem>();
@@ -103,7 +103,13 @@ public class Resources : Object
                        }
                        if (target.contains("*")) {
                                var split = target.split("*");
+                               
                                src = "https://api.github.com/repos/roojs/app.Builder.js/contents/resources/" + split[0];
+                               if (split[0] == "vapi/") {
+                                       src = "https://api.github.com/repos/roojs/app.Builder.js/contents/src/vapi";
+                                       
+                               }
+                               
                        }
                        
                        this.fetch_files.add(new ResourcesItem(src,target, ""));
@@ -177,6 +183,7 @@ public class Resources : Object
                 
        public void parseDirectory(string json, string target)
        {
+               print("%s\n", json);
                var pa = new Json.Parser();
                pa.load_from_data(json);
                var node = pa.get_root();
@@ -200,7 +207,11 @@ public class Resources : Object
                        if (this.files_has_target(split[0] + n)) {
                                continue;
                        }
-                       var src = "https://raw.githubusercontent.com/roojs/app.Builder.js/master/resources/" + split[0] + n;
+                       
+                       
+                       
+                       var src = ob.get_string_member("download_url"); 
+                                       // "https://raw.githubusercontent.com/roojs/app.Builder.js/master/resources/" + split[0] + n;
                        var add = new ResourcesItem(src, split[0] + n, ob.get_string_member("sha") );
                        //add.new_sha = ob.get_string_member("sha");
                        this.fetch_files.add(add);