def __init__(self, node): self.prefixes = {} prefixes = utils.node_get_elements_by_tag_name(node, "prefix") for child in prefixes: name = child.getAttribute("name") if len(name) == 0: name = "default" value = utils.evaluate_environment_variables(utils.node_get_string(child)) self.prefixes[name] = value child = utils.node_get_element_by_tag_name(node, "image") if child: pass # FIXME: implement child = utils.node_get_element_by_tag_name(node, "run-install-name-tool") if child: self.run_install_name_tool = True else: self.run_install_name_tool = False child = utils.node_get_element_by_tag_name(node, "destination") self.overwrite = utils.node_get_property_boolean(child, "overwrite", False) self.dest = utils.node_get_string(child, "${project}") child = utils.node_get_element_by_tag_name(node, "gtk") if child: self.gtk = utils.node_get_string(child) else: self.gtk = "gtk+-2.0"
def __init__(self, node): self.prefixes = {} prefixes = utils.node_get_elements_by_tag_name(node, "prefix") for child in prefixes: name = child.getAttribute("name") if len(name) == 0: name = "default" value = utils.evaluate_environment_variables( utils.node_get_string(child)) self.prefixes[name] = value child = utils.node_get_element_by_tag_name(node, "image") if child: pass # FIXME: implement child = utils.node_get_element_by_tag_name(node, "run-install-name-tool") if child: self.run_install_name_tool = True else: self.run_install_name_tool = False child = utils.node_get_element_by_tag_name(node, "destination") self.overwrite = utils.node_get_property_boolean( child, "overwrite", False) self.dest = utils.node_get_string(child, "${project}")
def from_node(cls, node, validate=True): source = utils.node_get_string(node) dest = node.getAttribute("dest") if len(dest) == 0: dest = None if validate: Path.validate(source, dest) return Path(source, dest)
def from_node(cls, node): source = utils.node_get_string(node) dest = node.getAttribute("dest") if len(dest) == 0: dest = None name = node.getAttribute("name") if len(name) == 0: raise "The tag 'translations' must have a 'name' property" return Translation(name, source, dest)
def __init__(self, node): self.runtime_variables = [] self.scripts = [] variables = utils.node_get_elements_by_tag_name(node, "runtime-variable") for child in variables: self.runtime_variables.append(Variable(child)) scripts = utils.node_get_elements_by_tag_name(node, "script") for child in scripts: script = Path(utils.node_get_string(child), "${bundle}/Resources/Scripts") self.scripts.append(script)
def __init__(self, node): self.runtime_variables = [] self.scripts = [] variables = utils.node_get_elements_by_tag_name( node, "runtime-variable") for child in variables: self.runtime_variables.append(Variable(child)) scripts = utils.node_get_elements_by_tag_name(node, "script") for child in scripts: script = Path(utils.node_get_string(child), "${bundle}/Resources/Scripts") self.scripts.append(script)
def from_node(cls, node): name = utils.node_get_string(node) if not name: raise Exception("Icon theme must have a 'name' property") string = node.getAttribute("icons") if string == "all": icons = IconTheme.ICONS_ALL elif string == "none": icons = IconTheme.ICONS_NONE elif string == "auto" or len(string) == 0: icons = IconTheme.ICONS_AUTO return IconTheme(name, icons)
def from_node(cls, node, validate=True): source = utils.node_get_string(node) dest = node.getAttribute("dest") recurse = node.getAttribute("recurse") if len(dest) == 0: dest = None if recurse == "True": recurse = True else: recurse = False if validate: Path.validate(source, dest) return Path(source, dest, recurse)
def __init__(self, node): self.name = node.getAttribute("name") self.value = utils.node_get_string(node)
def get_plist_path(self): plist = utils.node_get_element_by_tag_name(self.root, "plist") if not plist: raise Exception("The 'plist' tag is required") return self.evaluate_path(utils.node_get_string(plist))