Esempio n. 1
0
def main(mcp_dir):
    src_dir = os.path.join(mcp_dir, 'src')

    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, True)
    setup_fml(fml_dir, mcp_dir)
    apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
    finish_setup_fml(fml_dir, mcp_dir)
    print '================  Forge ModLoader Setup End  ==================='

    sys.path.append(mcp_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5

    print '=============================== Minecraft Forge Setup Start ====================================='
    print 'Applying forge patches'
    apply_forge_patches(os.path.join(forge_dir, 'fml'), mcp_dir, forge_dir,
                        src_dir, True)
    os.chdir(mcp_dir)
    updatenames(None, True, True, False)
    reset_logger()
    updatemd5(None, True, True, False)
    reset_logger()
    os.chdir(forge_dir)
    print '=============================== Minecraft Forge Setup Finished ================================='
Esempio n. 2
0
File: fml.py Progetto: Samu50/FML
def finish_setup_fml(fml_dir, mcp_dir, enable_server=False, disable_client=False):
    sys.path.append(mcp_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    from runtime.updatemcp import updatemcp
    
    os.chdir(mcp_dir)
    updatenames(None, True, not disable_client, enable_server)
    reset_logger()
    updatemd5(None, True, not disable_client, enable_server)
    reset_logger()
    os.chdir(fml_dir)
Esempio n. 3
0
File: fml.py Progetto: Beliaar/FML
def finish_setup_fml(fml_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    from runtime.updatemcp import updatemcp
    
    os.chdir(mcp_dir)
    updatenames(None, True)
    reset_logger()
    updatemd5(None, True)
    reset_logger()
    os.chdir(fml_dir)
Esempio n. 4
0
def finish_setup_fml(fml_dir, mcp_dir):
    sys.path.append(mcp_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    from runtime.updatemcp import updatemcp

    os.chdir(mcp_dir)
    updatenames(None, True, False, False)
    reset_logger()
    updatemd5(None, True, False, False)
    reset_logger()
    os.chdir(fml_dir)
Esempio n. 5
0
def finish_setup_fml(fml_dir, mcp_dir, enable_server=False, disable_client=False, disable_rename=False):
    sys.path.append(mcp_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    from runtime.updatemcp import updatemcp
    
    os.chdir(mcp_dir)
    if not disable_rename:
        updatenames(None, True, not disable_client, enable_server)
        reset_logger()
    updatemd5(None, True, not disable_client, enable_server)
    reset_logger()
    os.chdir(fml_dir)
Esempio n. 6
0
def forge_main(forge_dir, fml_dir, mcp_dir):
    sys.path.append(mcp_dir)
    sys.path.append(fml_dir)
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    from forge import apply_forge_patches
    from fml import reset_logger
    
    print '=============================== Minecraft Forge Setup Start ====================================='
    print 'Applying forge patches'
    apply_forge_patches(fml_dir, mcp_dir, forge_dir, os.path.join(mcp_dir, 'src'), True)
    os.chdir(mcp_dir)
    updatenames(None, True, True, False)
    reset_logger()
    updatemd5(None, True, True, False)
    reset_logger()
    os.chdir(forge_dir)    
    print '=============================== Minecraft Forge Setup Finished ================================='
Esempio n. 7
0
def main():

    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, True)
    setup_fml(fml_dir, mcp_dir)
    apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
    finish_setup_fml(fml_dir, mcp_dir)
    print '================  Forge ModLoader Setup End  ==================='

    sys.path.append(mcp_dir)    
    from runtime.updatenames import updatenames
    from runtime.updatemd5 import updatemd5
    
    print '=============================== Minecraft Forge Setup Start ====================================='
    print 'Applying forge patches'
    apply_forge_patches(os.path.join(forge_dir, 'fml'), mcp_dir, forge_dir, src_dir, True)
    os.chdir(mcp_dir)
    updatenames(None, True, True, False)
    reset_logger()
    updatemd5(None, True, True, False)
    reset_logger()
    os.chdir(forge_dir)    
    print '=============================== Minecraft Forge Setup Finished ================================='
Esempio n. 8
0
            post_decompile()
            
        except SystemExit, e:
            print 'Decompile Exception: %d ' % e.code
            raise e   

    if not os.path.isdir(src_dir):
        print 'Something went wrong, src folder not found at: %s' % src_dir
        sys.exit(1)
        
    cleanup_source(src_dir)
    
    setup_fml()
    
    os.chdir(mcp_dir)
    updatenames(None, True)
    reset_logger()
    updatemd5(None, True)
    reset_logger()
    os.chdir(forge_dir)
    
    base_dir = os.path.join(mcp_dir, 'src_base')
    work_dir = os.path.join(mcp_dir, 'src_work')
    
    if os.path.isdir(base_dir):
        shutil.rmtree(base_dir)
    if os.path.isdir(work_dir):
        shutil.rmtree(work_dir)
        
    print 'Setting up source directories'    
    shutil.copytree(src_dir, base_dir)
Esempio n. 9
0
        if os.path.isdir(os.path.join(fml_dir, 'patches', 'minecraft')):
            apply_patches(os.path.join(fml_dir, 'patches', 'minecraft'),
                          src_dir)
        if os.path.isdir(os.path.join(fml_dir, 'src', 'minecraft')):
            copytree(os.path.join(fml_dir, 'src', 'minecraft'),
                     os.path.join(src_dir, 'minecraft'))
    if has_server:
        if os.path.isdir(os.path.join(fml_dir, 'patches', 'minecraft_server')):
            apply_patches(os.path.join(fml_dir, 'patches', 'minecraft_server'),
                          src_dir)
        if os.path.isdir(os.path.join(fml_dir, 'src', 'minecraft_server')):
            copytree(os.path.join(fml_dir, 'src', 'minecraft_server'),
                     os.path.join(src_dir, 'minecraft_server'))

    os.chdir(mcp_dir)
    updatenames(None, True)
    reset_logger()
    os.chdir(forge_dir)

    print 'Applying forge patches'
    if has_client:
        if os.path.isdir(os.path.join(forge_dir, 'patches', 'minecraft')):
            apply_patches(os.path.join(forge_dir, 'patches', 'minecraft'),
                          src_dir)
        if os.path.isdir(os.path.join(forge_dir, 'src', 'minecraft')):
            copytree(os.path.join(forge_dir, 'src', 'minecraft'),
                     os.path.join(src_dir, 'minecraft'))
    if has_server:
        if os.path.isdir(os.path.join(forge_dir, 'patches',
                                      'minecraft_server')):
            apply_patches(