当前位置: 首页>>代码示例>>Python>>正文


Python PatchInfo.configs方法代码示例

本文整理汇总了Python中multiboot.patchinfo.PatchInfo.configs方法的典型用法代码示例。如果您正苦于以下问题:Python PatchInfo.configs方法的具体用法?Python PatchInfo.configs怎么用?Python PatchInfo.configs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在multiboot.patchinfo.PatchInfo的用法示例。


在下文中一共展示了PatchInfo.configs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: PatchInfo

# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import configs [as 别名]
from multiboot.autopatchers.base import BasePatcher
from multiboot.autopatchers.cyanogenmod import DalvikCachePatcher
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo
import multiboot.fileio as fileio
import os

patchinfo = PatchInfo()

patchinfo.matches        = r"^cm-.*noobdev.*.zip$"
patchinfo.name           = "chenxiaolong's noobdev CyanogenMod"
patchinfo.ramdisk        = 'jflte/AOSP/cxl.def'
patchinfo.autopatchers   = [StandardPatcher, DalvikCachePatcher]
# ROM has built in dual boot support
patchinfo.configs        = ['all', '!dual']


class MultiBoot(BasePatcher):
    def __init__(self, **kwargs):
        super(MultiBoot, self).__init__(**kwargs)

        # Don't need to add, since it's not from the original zip file
        #self.files_list.append('dualboot.sh')

    def patch(self, directory, file_info, bootimages=None):
        # My ROM has dual-boot support built in, so we'll hack around that to
        # support triple, quadruple, ... boot
        updater_script = 'META-INF/com/google/android/updater-script'
        lines = fileio.all_lines(os.path.join(directory, updater_script))

        i = 0
开发者ID:Kratos1982,项目名称:DualBootPatcher,代码行数:33,代码来源:chenxiaolong.py


注:本文中的multiboot.patchinfo.PatchInfo.configs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。