SHARE
    TWEET
    Krenair

    MCP 5.6 updatemd5 diff MCP 6.0 updatemd5

    Mar 4th, 2012
    160
    0
    Never
    Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
    Diff 2.60 KB | None | 0 0
    1. alex@alex:~$ diff MCP5.6/runtime/updatemd5.py MCP6.0/runtime/updatemd5.py
    2. 9a10
    3. > import logging
    4. 12,13c13,14
    5. < from commands import Commands, CLIENT, SERVER
    6. < from recompile import recompile
    7. ---
    8. > from commands import Commands, CLIENT, SERVER, CalledProcessError
    9. > from mcp import updatemd5_side
    10. 17c18,19
    11. < parser = OptionParser(version='MCP %s' % Commands.MCPFullVersion())
    12. ---
    13. > parser = OptionParser(version='MCP %s' % Commands.fullversion())
    14. > parser.add_option('-f', '--force', action='store_true', dest='force', help='force update', default=False)
    15. 20c22
    16. < updatemd5(options.config)
    17. ---
    18. > updatemd5(options.config, options.force)
    19. 23,25c25
    20. < def updatemd5(conffile=None):
    21. < commands = Commands(conffile)
    22. <
    23. ---
    24. > def updatemd5(conffile, force):
    25. 27,32c27,52
    26. < commands.logger.info('> Recompiling')
    27. < recompile(conffile)
    28. < commands.logger.info('> Generating the md5 (client)')
    29. < commands.gathermd5s(CLIENT)
    30. < commands.logger.info('> Generating the md5 (server)')
    31. < commands.gathermd5s(SERVER)
    32. ---
    33. > commands = Commands(conffile)
    34. >
    35. > if (commands.checkmd5s(CLIENT) or commands.checkmd5s(SERVER)) and not force:
    36. > print 'WARNING:'
    37. > print 'The updatemd5 script is unsupported and should only be run in special'
    38. > print 'cases, such as if there were compile errors in the last decompile which'
    39. > print 'have now been corrected. It will reset the changed status of all classes'
    40. > print 'for reobfuscation, and only classes modified afterwards will end up in'
    41. > print 'the reobf directory.'
    42. > print 'Only use this script if you absolutely know what you are doing, or when a'
    43. > print 'MCP team member asks you to do so.'
    44. > answer = raw_input('If you really want to update all classes, enter "Yes" ')
    45. > if answer.lower() not in ['yes']:
    46. > print 'You have not entered "Yes", aborting the update process'
    47. > sys.exit(1)
    48. >
    49. > try:
    50. > updatemd5_side(commands, CLIENT)
    51. > except CalledProcessError:
    52. > commands.logger.error('Client recompile failed, correct source then rerun updatemd5')
    53. > pass
    54. > try:
    55. > updatemd5_side(commands, SERVER)
    56. > except CalledProcessError:
    57. > commands.logger.error('Server recompile failed, correct source then rerun updatemd5')
    58. > pass
    59. 34c54
    60. < commands.logger.exception('FATAL ERROR')
    61. ---
    62. > logging.exception('FATAL ERROR')
    Advertisement
    Add Comment
    Please, Sign In to add comment
    Public Pastes
    We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
    Not a member of Pastebin yet?
    Sign Up, it unlocks many cool features!

    AltStyle によって変換されたページ (->オリジナル) /