Example #1
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.reobfuscate import reobfuscate
    from soulforge import copytree, reset_logger, recompile, copyreobfuscatedfiles, unzipandcopybtw, movetodist, cleanup
    from update_binary_patches import updatepatches
    
    print '=============================== Build Soulforge Start ====================================='

    print 'Copying Mod Files'
    copytree(os.path.join(mcp_dir, 'src'), os.path.join(mcp_dir, 'src_temp'))
    
    for dirname in os.walk(os.path.join(soulforge_dir, 'addondev', 'mods', '.')).next()[1]:
        if os.path.isdir(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'minecraft')):
            copytree(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'minecraft'), os.path.join(mcp_dir, 'src', 'minecraft'))
            
        if os.path.isdir(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'common')):
            copytree(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'common'), os.path.join(mcp_dir, 'src', 'minecraft'))
            copytree(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'common'), os.path.join(mcp_dir, 'src', 'minecraft_server'))    
        
        if os.path.isdir(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'minecraft_server')):
            copytree(os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src', 'minecraft_server'), os.path.join(mcp_dir, 'src', 'minecraft_server'))

    os.chdir(mcp_dir)
    reset_logger()
    print 'Recompiling'
    recompile(None, False, False)
    reset_logger()
    print 'Reobfuscating'
    reobfuscate(None, False, False, False, False, False, False)
    reset_logger()
    print 'Copying Reobfuscated Files'
    copyreobfuscatedfiles(soulforge_dir, mcp_dir)
    print 'Unzipping BTW & Copying Files'
    unzipandcopybtw(soulforge_dir)
    print 'Creating Binary Patches'
    updatepatches()
    print 'Moving Files To Temporary Dist Folder'
    movetodist(soulforge_dir)
    print 'Cleaning Up'
    cleanup(soulforge_dir, mcp_dir)

    print '=============================== Build Soulforge Finished ================================='
Example #2
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatemd5 import updatemd5
    from soulforge import decompile, apply_initial_patches, apply_soulforge_patches, reset_logger, copytree
    
    print '=============================== Soulforge Setup Start ====================================='

    print 'Decompiling'
    decompile(mcp_dir, soulforge_dir)
    print 'Applying patches'
    apply_initial_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, 'src'), True)
    os.chdir(mcp_dir)
    reset_logger()
    updatemd5(None, True, False, False)
    reset_logger()
    copytree(os.path.join(mcp_dir, 'src'), os.path.join(mcp_dir, 'src_base')) 
    os.chdir(soulforge_dir) 
    apply_soulforge_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, 'src'), True)
    print 'Copy external libraries'
    copytree(os.path.join(soulforge_dir, 'lib'), os.path.join(mcp_dir, 'lib'))
    print 'Setup workspace'
    if os.path.isdir(os.path.join(mcp_dir, 'eclipse')):
        shutil.rmtree(os.path.join(mcp_dir, 'eclipse'))
    copytree(os.path.join(soulforge_dir, 'soulforgedev', 'tmpworkspace'), os.path.join(mcp_dir, 'eclipse')) 
    print '=============================== Soulforge Setup Finished ================================='
Example #3
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatemd5 import updatemd5
    from soulforge import decompile, apply_initial_patches, apply_soulforge_patches, reset_logger, copytree

    print '=============================== Soulforge Setup Start ====================================='

    print 'Decompiling'
    decompile(mcp_dir, soulforge_dir)
    print 'Applying patches'
    apply_initial_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, 'src'),
                          True)
    os.chdir(mcp_dir)
    reset_logger()
    updatemd5(None, True, False, False)
    reset_logger()
    copytree(os.path.join(mcp_dir, 'src'), os.path.join(mcp_dir, 'src_base'))
    os.chdir(soulforge_dir)
    apply_soulforge_patches(mcp_dir, soulforge_dir,
                            os.path.join(mcp_dir, 'src'), True)
    print 'Copy external libraries'
    copytree(os.path.join(soulforge_dir, 'lib'), os.path.join(mcp_dir, 'lib'))
    print 'Setup workspace'
    if os.path.isdir(os.path.join(mcp_dir, 'eclipse')):
        shutil.rmtree(os.path.join(mcp_dir, 'eclipse'))
    copytree(os.path.join(soulforge_dir, 'soulforgedev', 'tmpworkspace'),
             os.path.join(mcp_dir, 'eclipse'))
    print '=============================== Soulforge Setup Finished ================================='
Example #4
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatemd5 import updatemd5
    from runtime.reobfuscate import reobfuscate
    from soulforge import (
        decompile,
        apply_initial_patches,
        apply_soulforge_patches,
        recompile,
        unzipbtw,
        copyinitialreobfuscatedfiles,
        rezipbtw,
        apply_mod_patches,
        reset_logger,
        copytree,
    )

    print "=============================== Soulforge Setup Start ====================================="

    print "Decompiling"
    decompile(mcp_dir, soulforge_dir)
    print "Applying patches"
    apply_initial_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, "src"), True)
    os.chdir(mcp_dir)
    updatemd5(None, True, False, False)
    reset_logger()
    os.chdir(soulforge_dir)
    apply_soulforge_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, "src"), True)
    copytree(os.path.join(soulforge_dir, "src", "minecraft"), os.path.join(mcp_dir, "src", "minecraft"))
    copytree(os.path.join(soulforge_dir, "src", "common"), os.path.join(mcp_dir, "src", "minecraft"))
    copytree(os.path.join(soulforge_dir, "src", "minecraft_server"), os.path.join(mcp_dir, "src", "minecraft_server"))
    copytree(os.path.join(soulforge_dir, "src", "common"), os.path.join(mcp_dir, "src", "minecraft_server"))
    print "Copy external libraries"
    copytree(os.path.join(soulforge_dir, "lib"), os.path.join(mcp_dir, "lib"))
    os.chdir(mcp_dir)
    print "Recompiling"
    recompile(None, False, False)
    reset_logger()
    print "Reobfuscating"
    reobfuscate(None, False, False, False, False, False, False)
    reset_logger()
    print "Unzipping BTW"
    unzipbtw(soulforge_dir)
    print "Copying Reobfuscated Files"
    copyinitialreobfuscatedfiles(soulforge_dir, mcp_dir)
    print "Rezipping Files"
    rezipbtw(soulforge_dir)
    updatemd5(None, True, False, False)
    reset_logger()
    os.chdir(soulforge_dir)
    copytree(os.path.join(mcp_dir, "src"), os.path.join(mcp_dir, "src_base"))
    apply_mod_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, "src"), True)
    print "Setup workspace"
    if os.path.isdir(os.path.join(mcp_dir, "eclipse")):
        shutil.rmtree(os.path.join(mcp_dir, "eclipse"))
    copytree(os.path.join(soulforge_dir, "addondev", "tmpworkspace"), os.path.join(mcp_dir, "eclipse"))
    print "=============================== Soulforge Setup Finished ================================="
Example #5
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatemd5 import updatemd5
    from runtime.reobfuscate import reobfuscate
    from soulforge import decompile, apply_initial_patches, apply_soulforge_patches, recompile, unzipbtw, copyinitialreobfuscatedfiles, rezipbtw, apply_mod_patches, reset_logger, copytree

    print '=============================== Soulforge Setup Start ====================================='

    print 'Decompiling'
    decompile(mcp_dir, soulforge_dir)
    print 'Applying patches'
    apply_initial_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, 'src'),
                          True)
    os.chdir(mcp_dir)
    updatemd5(None, True, False, False)
    reset_logger()
    os.chdir(soulforge_dir)
    apply_soulforge_patches(mcp_dir, soulforge_dir,
                            os.path.join(mcp_dir, 'src'), True)
    copytree(os.path.join(soulforge_dir, 'src', 'minecraft'),
             os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'src', 'common'),
             os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'src', 'minecraft_server'),
             os.path.join(mcp_dir, 'src', 'minecraft_server'))
    copytree(os.path.join(soulforge_dir, 'src', 'common'),
             os.path.join(mcp_dir, 'src', 'minecraft_server'))
    print 'Copy external libraries'
    copytree(os.path.join(soulforge_dir, 'lib'), os.path.join(mcp_dir, 'lib'))
    os.chdir(mcp_dir)
    print 'Recompiling'
    recompile(None, False, False)
    reset_logger()
    print 'Reobfuscating'
    reobfuscate(None, False, False, False, False, False, False)
    reset_logger()
    print 'Unzipping BTW'
    unzipbtw(soulforge_dir)
    print 'Copying Reobfuscated Files'
    copyinitialreobfuscatedfiles(soulforge_dir, mcp_dir)
    print 'Rezipping Files'
    rezipbtw(soulforge_dir)
    updatemd5(None, True, False, False)
    reset_logger()
    os.chdir(soulforge_dir)
    copytree(os.path.join(mcp_dir, 'src'), os.path.join(mcp_dir, 'src_base'))
    apply_mod_patches(mcp_dir, soulforge_dir, os.path.join(mcp_dir, 'src'),
                      True)
    print 'Setup workspace'
    if os.path.isdir(os.path.join(mcp_dir, 'eclipse')):
        shutil.rmtree(os.path.join(mcp_dir, 'eclipse'))
    copytree(os.path.join(soulforge_dir, 'addondev', 'tmpworkspace'),
             os.path.join(mcp_dir, 'eclipse'))
    print '=============================== Soulforge Setup Finished ================================='
Example #6
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.reobfuscate import reobfuscate
    from soulforge import copytree, reset_logger, recompile, copyreobfuscatedfiles, unzipandcopybtw, movetodist, packagedist, cleanup
    from update_binary_patches import updatepatches
    
    print '=============================== Build Soulforge Start ====================================='

    print 'Copying Soulforge Files'
    copytree(os.path.join(soulforge_dir, 'src', 'minecraft'), os.path.join(mcp_dir, 'src', 'minecraft')) 
    copytree(os.path.join(soulforge_dir, 'src', 'common'), os.path.join(mcp_dir, 'src', 'minecraft')) 
    copytree(os.path.join(soulforge_dir, 'src', 'minecraft_server'), os.path.join(mcp_dir, 'src', 'minecraft_server')) 
    copytree(os.path.join(soulforge_dir, 'src', 'common'), os.path.join(mcp_dir, 'src', 'minecraft_server'))
    copytree(os.path.join(soulforge_dir, 'srcbiomesoplenty', 'minecraft'), os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'srcbiomesoplenty', 'common'), os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'srcbiomesoplenty', 'minecraft_server'), os.path.join(mcp_dir, 'src', 'minecraft_server'))
    copytree(os.path.join(soulforge_dir, 'srcbiomesoplenty', 'common'), os.path.join(mcp_dir, 'src', 'minecraft_server'))
    copytree(os.path.join(soulforge_dir, 'srccustomores', 'minecraft'), os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'srccustomores', 'common'), os.path.join(mcp_dir, 'src', 'minecraft'))
    copytree(os.path.join(soulforge_dir, 'srccustomores', 'minecraft_server'), os.path.join(mcp_dir, 'src', 'minecraft_server'))
    copytree(os.path.join(soulforge_dir, 'srccustomores', 'common'), os.path.join(mcp_dir, 'src', 'minecraft_server'))

    os.chdir(mcp_dir)
    reset_logger()
    print 'Recompiling'
    recompile(None, False, False)
    reset_logger()
    print 'Reobfuscating'
    reobfuscate(None, False, False, False, False, False, False)
    reset_logger()
    print 'Copying Reobfuscated Files'
    copyreobfuscatedfiles(soulforge_dir, mcp_dir)
    print 'Unzipping BTW & Copying Files'
    unzipandcopybtw(soulforge_dir)
    print 'Creating Binary Patches'
    updatepatches()
    print 'Moving Files To Temporary Dist Folder'
    movetodist(soulforge_dir)
    print 'Packaging Files'
    packagedist(soulforge_dir)
    print 'Cleaning Up'
    cleanup(soulforge_dir, mcp_dir)

    print '=============================== Build Soulforge Finished ================================='
Example #7
0
def soulforge_main(soulforge_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.reobfuscate import reobfuscate
    from soulforge import copytree, reset_logger, recompile, copyreobfuscatedfiles, unzipandcopybtw, movetodist, cleanup
    from update_binary_patches import updatepatches

    print '=============================== Build Soulforge Start ====================================='

    print 'Copying Mod Files'
    copytree(os.path.join(mcp_dir, 'src'), os.path.join(mcp_dir, 'src_temp'))

    for dirname in os.walk(os.path.join(soulforge_dir, 'addondev', 'mods',
                                        '.')).next()[1]:
        if os.path.isdir(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'minecraft')):
            copytree(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'minecraft'),
                os.path.join(mcp_dir, 'src', 'minecraft'))

        if os.path.isdir(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'common')):
            copytree(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'common'),
                os.path.join(mcp_dir, 'src', 'minecraft'))
            copytree(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'common'),
                os.path.join(mcp_dir, 'src', 'minecraft_server'))

        if os.path.isdir(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'minecraft_server')):
            copytree(
                os.path.join(soulforge_dir, 'addondev', 'mods', dirname, 'src',
                             'minecraft_server'),
                os.path.join(mcp_dir, 'src', 'minecraft_server'))

    os.chdir(mcp_dir)
    reset_logger()
    print 'Recompiling'
    recompile(None, False, False)
    reset_logger()
    print 'Reobfuscating'
    reobfuscate(None, False, False, False, False, False, False)
    reset_logger()
    print 'Copying Reobfuscated Files'
    copyreobfuscatedfiles(soulforge_dir, mcp_dir)
    print 'Unzipping BTW & Copying Files'
    unzipandcopybtw(soulforge_dir)
    print 'Creating Binary Patches'
    updatepatches()
    print 'Moving Files To Temporary Dist Folder'
    movetodist(soulforge_dir)
    print 'Cleaning Up'
    cleanup(soulforge_dir, mcp_dir)

    print '=============================== Build Soulforge Finished ================================='