示例#1
0
文件: mod.py 项目: epowers/arc
def get_all_arc_android_mods(submodules=None):
  logging.info('Gathering a list of mods...')
  submodules = internal.ensure_android_submodule_paths(submodules)
  mod_count = 0
  for mod_path in internal.find_all_files_under(
      os.path.join(constants.ARC_ROOT, constants.ANDROID_MODS_PATH)):
    logging.debug('Considering %s', mod_path)
    mod = get_arc_android_mod(mod_path, submodules=submodules)
    if mod is None:
      continue
    yield mod
    mod_count += 1

  logging.info('%d mods found.', mod_count)
示例#2
0
def get_all_arc_android_mods(submodules=None):
    logging.info('Gathering a list of mods...')
    submodules = internal.ensure_android_submodule_paths(submodules)
    mod_count = 0
    for mod_path in internal.find_all_files_under(
            os.path.join(constants.ARC_ROOT, constants.ANDROID_MODS_PATH)):
        logging.debug('Considering %s', mod_path)
        mod = get_arc_android_mod(mod_path, submodules=submodules)
        if mod is None:
            continue
        yield mod
        mod_count += 1

    logging.info('%d mods found.', mod_count)
示例#3
0
文件: mod.py 项目: epowers/arc
def get_arc_android_mod(mod_path, submodules=None):
  submodules = internal.ensure_android_submodule_paths(submodules)

  mod_path = internal.relpath(mod_path, constants.ARC_ROOT)
  android_path = internal.get_android_path_for_mod(mod_path)
  if not android_path:
    return None

  android_module_path = internal.identify_containing_submodule(
      android_path, submodules=submodules)

  uses_mod_track = android_path != staging.get_default_tracking_path(mod_path)

  return _ModState(mod_path, android_path, android_module_path, uses_mod_track)
示例#4
0
def get_arc_android_mod(mod_path, submodules=None):
    submodules = internal.ensure_android_submodule_paths(submodules)

    mod_path = internal.relpath(mod_path, constants.ARC_ROOT)
    android_path = internal.get_android_path_for_mod(mod_path)
    if not android_path:
        return None

    android_module_path = internal.identify_containing_submodule(
        android_path, submodules=submodules)

    uses_mod_track = android_path != staging.get_default_tracking_path(
        mod_path)

    return _ModState(mod_path, android_path, android_module_path,
                     uses_mod_track)