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


Python Commands.process_annotate方法代码示例

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


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

示例1: decompile

# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import process_annotate [as 别名]
def decompile(conffile=None, force_jad=False):
    commands = Commands(conffile)

    try:
        commands.checkupdates()

        cltdone = False
        srvdone = False

        use_ff = os.path.exists(commands.fernflower) and not force_jad

        commands.logger.info('> Creating Retroguard config files')
        commands.creatergcfg()

        srcdir = os.path.join(commands.srcclient, os.path.normpath(commands.ffsource))
        if not os.path.exists(srcdir):
            commands.logger.info('== Decompiling Client ==')
            if commands.checkjars(CLIENT):
                clienttime = time.time()
                commands.logger.info('> Creating SRGS for client')
                commands.createsrgs(CLIENT)
                commands.logger.info('> Applying Retroguard to client')
                commands.applyrg(CLIENT)
                commands.logger.info('> Applying Exceptor to client')
                commands.applyexceptor(CLIENT)
                if use_ff:
                    commands.logger.info('> Decompiling...')
                    commands.applyff(CLIENT)
                    commands.logger.info('> Unzipping the client sources')
                    commands.extractsrc(CLIENT)
                commands.logger.info('> Unzipping the client jar')
                commands.extractjar(CLIENT)
                if not use_ff:
                    commands.logger.info('> Applying jadretro')
                    commands.applyjadretro(CLIENT)
                    commands.logger.info('> Decompiling...')
                    commands.applyjad(CLIENT)
                    commands.logger.info('> Copying the client sources')
                    commands.copysrc(CLIENT)
                commands.logger.info('> Applying patches')
                if commands.osname == 'osx' and not use_ff:
                    commands.applypatches(CLIENT, False, True)
                commands.applypatches(CLIENT, use_ff)
                commands.logger.info('> Removing comments')
                commands.process_comments(CLIENT)
                commands.logger.info('> Renaming sources')
                commands.process_rename(CLIENT)
                commands.logger.info('> Reformating sources')
                commands.applyastyle(CLIENT)
                commands.logger.info('> Commenting OpenGL constants')
                commands.process_annotate(CLIENT)
                commands.logger.info('> Creating reobfuscation tables')
                commands.renamereobsrg(CLIENT)
                commands.logger.info('> Done in %.2f seconds' % (time.time() - clienttime))
        else:
            commands.logger.warn('!! Client already decompiled. Run cleanup before decompiling again !!')
            cltdone = True

        srcdir = os.path.join(commands.srcserver, os.path.normpath(commands.ffsource))
        if not os.path.exists(srcdir):
            commands.logger.info('== Decompiling Server ==')
            if commands.checkjars(SERVER):
                servertime = time.time()
                commands.logger.info('> Creating SRGS for server')
                commands.createsrgs(SERVER)
                commands.logger.info('> Applying Retroguard to server')
                commands.applyrg(SERVER)
                commands.logger.info('> Applying Exceptor to server')
                commands.applyexceptor(SERVER)
                if use_ff:
                    commands.logger.info('> Decompiling...')
                    commands.applyff(SERVER)
                    commands.logger.info('> Unzipping the server sources')
                    commands.extractsrc(SERVER)
                commands.logger.info('> Unzipping the server jar')
                commands.extractjar(SERVER)
                if not use_ff:
                    commands.logger.info('> Applying jadretro')
                    commands.applyjadretro(SERVER)
                    commands.logger.info('> Decompiling...')
                    commands.applyjad(SERVER)
                    commands.logger.info('> Copying the server sources')
                    commands.copysrc(SERVER)
                commands.logger.info('> Applying patches')
                if commands.osname == 'osx' and not use_ff:
                    commands.applypatches(SERVER, False, True)
                commands.applypatches(SERVER, use_ff)
                commands.logger.info('> Removing comments')
                commands.process_comments(SERVER)
                commands.logger.info('> Renaming sources')
                commands.process_rename(SERVER)
                commands.logger.info('> Reformating sources')
                commands.applyastyle(SERVER)
                commands.logger.info('> Creating reobfuscation tables')
                commands.renamereobsrg(SERVER)
                commands.logger.info('> Done in %.2f seconds' % (time.time() - servertime))
        else:
            commands.logger.warn('!! Server already decompiled. Run cleanup before decompiling again !!')
            srvdone = True

#.........这里部分代码省略.........
开发者ID:Orazur66,项目名称:Minecraft-Client,代码行数:103,代码来源:decompile.py


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