本文整理汇总了Python中multiboot.fileinfo.FileInfo.configs方法的典型用法代码示例。如果您正苦于以下问题:Python FileInfo.configs方法的具体用法?Python FileInfo.configs怎么用?Python FileInfo.configs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiboot.fileinfo.FileInfo
的用法示例。
在下文中一共展示了FileInfo.configs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import configs [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import multiboot.fileio as fileio
import re
file_info = FileInfo()
filename_regex = r"^cm-.*noobdev.*.zip$"
file_info.ramdisk = 'hammerhead/AOSP/cxl.def'
file_info.patch = [ autopatcher.auto_patch ]
file_info.extract = [ autopatcher.files_to_auto_patch, 'system/build.prop' ]
# ROM has built in dual boot support
file_info.configs = [ 'all', '!dualboot' ]
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected chenxiaolong's noobdev CyanogenMod ROM zip")
def get_file_info(filename = ""):
return file_info
# My ROM has dual-boot support built in, so we'll hack around that to support
# triple, quadruple, ... boot
def multi_boot(directory, bootimg = None, device_check = True,
partition_config = None):
updater_script = 'META-INF/com/google/android/updater-script'