示例#1
0
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True):
    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
    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  ==================='
示例#2
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 ================================='
示例#3
0
文件: install.py 项目: Beliaar/FML
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True):
    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
    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  ==================='
示例#4
0
def fml_main(fml_dir,
             mcp_dir,
             dont_gen_conf=True,
             disable_patches=False,
             disable_at=False,
             disable_merge=False,
             enable_server=False,
             disable_client=False,
             disable_rename=False):
    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
    setup_fml(fml_dir,
              mcp_dir,
              disable_at=disable_at,
              disable_merge=disable_merge,
              enable_server=enable_server,
              disable_client=disable_client)
    if disable_patches:
        print 'Patching disabled'
    else:
        apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
    finish_setup_fml(fml_dir,
                     mcp_dir,
                     enable_server=enable_server,
                     disable_client=disable_client,
                     disable_rename=disable_rename)
    print '================  Forge ModLoader Setup End  ==================='
示例#5
0
文件: install.py 项目: Samu50/FML
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, disable_client=False):
    print '================ Forge ModLoader Setup Start ==================='
    setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
    setup_fml(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge, enable_server=enable_server, disable_client=disable_client)
    if disable_patches:
        print 'Patching disabled'
    else:
        apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
    finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client)
    print '================  Forge ModLoader Setup End  ==================='
示例#6
0
def fml_main(fml_dir, mcp_dir, gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, 
            disable_client=False, disable_rename=False, disable_assets=False, decompile=False):
    sys.path.append(fml_dir)
    from fml import download_mcp, setup_mcp, decompile_minecraft, apply_fml_patches, finish_setup_fml
    print '================ Forge ModLoader Setup Start ==================='
    download_mcp(fml_dir, mcp_dir)
    setup_mcp(fml_dir, mcp_dir, gen_conf)
    if decompile:
        decompile_minecraft(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge, 
              enable_server=enable_server, disable_client=disable_client,
              disable_assets=disable_assets)
        if disable_patches:
            print 'Patching disabled'
        else:
            apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
        finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename)
    else:
        print 'Decompile free install is on the to-do!'
    print '================  Forge ModLoader Setup End  ==================='
示例#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 ================================='
示例#8
0
import urllib
import zipfile
import sys
import os
from optparse import OptionParser


if __name__ == '__main__':
    parser = OptionParser()
    parser.add_option('-g', '--gen-conf', action="store_true", dest='gen_conf', help='Generate merged MCP conf folder', default=False)
    parser.add_option('-m', '--mcp-dir', action='store',       dest='mcp_dir',  help='Path to download/extract MCP to', default=None )
    parser.add_option('-f', '--fml-dir', action='store',       dest='fml_dir',  help='Path to FML install folder',      default=None )
    options, _ = parser.parse_args()
    
    if options.fml_dir is None or options.mcp_dir is None:
        print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py --mcp-dir <MCPFolder> --fml-dir <FMLFolder>'
    else:
        sys.path.append(os.path.join(options.fml_dir, 'install'))
        
        from fml import decompile_minecraft, setup_mcp, download_mcp
        
        download_mcp(fml_dir=options.fml_dir, mcp_dir=options.mcp_dir)
        setup_mcp(options.fml_dir, options.mcp_dir, gen_conf=options.gen_conf)
        decompile_minecraft(options.fml_dir, options.mcp_dir)
示例#9
0
    parser.add_option('-g',
                      '--gen-conf',
                      action="store_true",
                      dest='gen_conf',
                      help='Generate merged MCP conf folder',
                      default=False)
    parser.add_option('-m',
                      '--mcp-dir',
                      action='store',
                      dest='mcp_dir',
                      help='Path to download/extract MCP to',
                      default=None)
    parser.add_option('-f',
                      '--fml-dir',
                      action='store',
                      dest='fml_dir',
                      help='Path to FML install folder',
                      default=None)
    options, _ = parser.parse_args()

    if options.fml_dir is None or options.mcp_dir is None:
        print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py --mcp-dir <MCPFolder> --fml-dir <FMLFolder>'
    else:
        sys.path.append(os.path.join(options.fml_dir, 'install'))

        from fml import decompile_minecraft, setup_mcp, download_mcp

        download_mcp(fml_dir=options.fml_dir, mcp_dir=options.mcp_dir)
        setup_mcp(options.fml_dir, options.mcp_dir, gen_conf=options.gen_conf)
        decompile_minecraft(options.fml_dir, options.mcp_dir)
示例#10
0
import urllib
import zipfile
import sys
import os


if __name__ == '__main__':
    if not len(sys.argv) >= 3:
        print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py <MCPFolder> <FMLFolder>'
    else:
        mcp_dir = os.path.abspath(sys.argv[1])
        fml_dir = os.path.abspath(sys.argv[2])
        dont_gen_conf = '-no_gen_conf' in sys.argv
        
        sys.path.append(os.path.join(fml_dir, 'install'))
        
        from fml import setup_fml, setup_mcp
        
        setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
        setup_fml(fml_dir, mcp_dir)
示例#11
0
import urllib
import zipfile
import sys
import os

if __name__ == '__main__':
    if not len(sys.argv) >= 3:
        print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py <MCPFolder> <FMLFolder>'
    else:
        mcp_dir = os.path.abspath(sys.argv[1])
        fml_dir = os.path.abspath(sys.argv[2])
        dont_gen_conf = '-no_gen_conf' in sys.argv

        sys.path.append(os.path.join(fml_dir, 'install'))

        from fml import setup_fml, setup_mcp

        setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
        setup_fml(fml_dir, mcp_dir)