Exemplo n.º 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, 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 ================================='
Exemplo n.º 2
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 ================================='
Exemplo n.º 3
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 ================================='