7 def Build(real_type, quadtree=False, controlpanel=False):
10 if (type(real_type) == str):
11 quadtree = "enabled" if (real_type.split("-")[-1] == "qtree") else quadtree
12 real_type = real_type.split("-")[0]
14 real_type = options["real_names"].index(real_type)
16 real_name = options["real_names"][real_type]
18 quadtree = "enabled" if quadtree else "disabled"
19 controlpanel = "enabled" if controlpanel else "disabled"
20 if (os.system("make -C %s clean" % options["ipdf_src"]) != 0):
21 raise Exception("Make clean failed.")
22 if (os.system("make -C %s REALTYPE=%d QUADTREE=%s CONTROLPANEL=%s" % (options["ipdf_src"], real_type, quadtree, controlpanel)) != 0):
23 raise Exception("Make failed.")
25 q = "-qtree" if quadtree == "enabled" else ""
26 os.rename(options["ipdf_bin"], options["local_bin"]+real_name+q)
30 p = ProgressBar(len(options["tobuild"]))
31 print("Building: %s" % str(options["tobuild"]))
33 for (i,b) in enumerate(options["tobuild"]): #options["real_names"]:
34 if b in options["ignore"]:
37 Build(b, False, False)
38 options["built"] += [b]
40 display("Failed to build %s" % b)
43 if __name__ == "__main__":