def do_build(iface,target, feat, rebuild=True, dstfolder = None): db = init_database() oi = ObjectIndex(iface) oi.analyze_objects() if target == "src-fullpatch": dstfolder = "build/src" target = "test-fullpatch" build_instructions = oi.get_build_actions(target,feat,dstfolder) if build_instructions is None: iface.error("Error al generar las instrucciones de compilado.") return False buildpath = os.path.join(build_instructions.get("path"), "build") if not os.path.exists(buildpath): os.mkdir(buildpath) dstfile = os.path.join(buildpath, "%s.build.xml" % target) build_instructions.getroottree().write(dstfile, pretty_print=True) depends = build_instructions.get("depends", "").split(" ") if depends: for dep in depends: dep = dep.strip() if dep == "": continue if not is_target_built(iface, dep, feat): # Si tiene una dependencia, y no está cumplida, recompilarla: do_build(iface, dep, feat, rebuild = False) mtool_iface = MergeToolInterface() mtool_iface.verbosity = iface.verbosity projectbuilder.build_xml(mtool_iface,build_instructions,rebuild)
def do_build(iface, target, feat, rebuild=True, dstfolder=None): db = init_database() oi = ObjectIndex(iface) oi.analyze_objects() if target == "src-fullpatch": dstfolder = "build/src" target = "test-fullpatch" build_instructions = oi.get_build_actions(target, feat, dstfolder) if build_instructions is None: iface.error("Error al generar las instrucciones de compilado.") return False buildpath = os.path.join(build_instructions.get("path"), "build") if not os.path.exists(buildpath): os.mkdir(buildpath) dstfile = os.path.join(buildpath, "%s.build.xml" % target) build_instructions.getroottree().write(dstfile, pretty_print=True) depends = build_instructions.get("depends", "").split(" ") if depends: for dep in depends: dep = dep.strip() if dep == "": continue if not is_target_built(iface, dep, feat): # Si tiene una dependencia, y no está cumplida, recompilarla: do_build(iface, dep, feat, rebuild=False) mtool_iface = MergeToolInterface() mtool_iface.verbosity = iface.verbosity + cfg.mergetool.verbosity_delta mtool_iface.patch_qs_rewrite = cfg.mergetool.patch_qs_rewrite mtool_iface.patch_xml_style_name = cfg.mergetool.patch_xml_style_name mtool_iface.diff_xml_search_move = cfg.mergetool.diff_xml_search_move projectbuilder.build_xml(mtool_iface, build_instructions, rebuild)
def do_howto_build(iface,target, feat): db = init_database() oi = ObjectIndex(iface) oi.analyze_objects() build_instructions = oi.get_build_actions(target,feat) if build_instructions is None: iface.error("Error al buscar %s -> %s" % (feat,target)) return False iface.info("Acciones para compilar funcionalidad %s %s:" % (feat, target)) iface.msg(etree.tostring(build_instructions, pretty_print=True)) buildpath = os.path.join(build_instructions.get("path"), "build") if not os.path.exists(buildpath): os.mkdir(buildpath) dstfile = os.path.join(buildpath, "%s.build.xml" % target) build_instructions.getroottree().write(dstfile, pretty_print=True)
def do_howto_build(iface, target, feat): db = init_database() oi = ObjectIndex(iface) oi.analyze_objects() build_instructions = oi.get_build_actions(target, feat) if build_instructions is None: iface.error("Error al buscar %s -> %s" % (feat, target)) return False iface.info("Acciones para compilar funcionalidad %s %s:" % (feat, target)) iface.msg(etree.tostring(build_instructions, pretty_print=True)) buildpath = os.path.join(build_instructions.get("path"), "build") if not os.path.exists(buildpath): os.mkdir(buildpath) dstfile = os.path.join(buildpath, "%s.build.xml" % target) build_instructions.getroottree().write(dstfile, pretty_print=True)