Esempio n. 1
0
def main():
    print '=================================== Setup Start ================================='
    
    skipDecompile = len(sys.argv) > 1 and sys.argv[1] == '-skipdecompile'
    if not skipDecompile:
        if not download_ff(mcp_dir):
            sys.exit(1)
        
        if os.path.isdir(src_dir):
            shutil.rmtree(src_dir)
            
        try:
            
            pre_decompile()
        
            os.chdir(mcp_dir)
            #         Conf  JAD    CSV    -r    -d    -a     -n    -p     -o     -l     -g
            decompile(None, False, False, True, True, False, True, False, False, False, False)
            reset_logger()
            os.chdir(forge_dir)
            
            post_decompile()
            
        except SystemExit, e:
            print 'Decompile Exception: %d ' % e.code
            raise e   
Esempio n. 2
0
def main():
    print '=================================== Minecraft Forge Setup Start ================================='
    
    if os.path.isdir(os.path.join(mcp_dir, 'conf')):
        shutil.rmtree(os.path.join(mcp_dir, 'conf'))
    copytree(os.path.join(forge_dir, 'conf'), os.path.join(mcp_dir, 'conf'))
    
    if os.path.isdir(src_dir):
        os.chdir(mcp_dir)
        cleanup(None, False)
        reset_logger()
        os.chdir(forge_dir)
        
    if os.path.isdir(src_dir):
        print 'Please make sure to backup your modified files, and say yes when it asks you to do cleanup.'
        sys.exit(1)
    
    if not download_ff(mcp_dir):
        sys.exit(1)
    
    try:
        pre_decompile()
        
        os.chdir(mcp_dir)
        #         Conf  JAD    CSV    -r    -d    -a     -n    -p     -o     -l     -g
        decompile(None, False, False, True, True, False, True, False, False, False, False)
        reset_logger()
        os.chdir(forge_dir)
        
        post_decompile()
        
    except SystemExit, e:
        print 'Decompile Exception: %d ' % e.code
        raise e   
Esempio n. 3
0
def main():
    print '=================================== Setup Start ================================='

    skipDecompile = len(sys.argv) > 1 and sys.argv[1] == '-skipdecompile'
    if not skipDecompile:
        if not download_ff(mcp_dir):
            sys.exit(1)

        if os.path.isdir(src_dir):
            shutil.rmtree(src_dir)

        try:

            pre_decompile()

            os.chdir(mcp_dir)
            #         Conf  JAD    CSV    -r    -d    -a     -n    -p     -o     -l     -g
            decompile(None, False, False, True, True, False, True, False,
                      False, False, False)
            reset_logger()
            os.chdir(forge_dir)

            post_decompile()

        except SystemExit, e:
            print 'Decompile Exception: %d ' % e.code
            raise e
Esempio n. 4
0
def main():
    print '=================================== Minecraft Forge Setup Start ================================='

    if os.path.isdir(os.path.join(mcp_dir, 'conf')):
        shutil.rmtree(os.path.join(mcp_dir, 'conf'))
    copytree(os.path.join(forge_dir, 'conf'), os.path.join(mcp_dir, 'conf'))

    if os.path.isdir(src_dir):
        os.chdir(mcp_dir)
        cleanup(None, False)
        reset_logger()
        os.chdir(forge_dir)

    if os.path.isdir(src_dir):
        print 'Please make sure to backup your modified files, and say yes when it asks you to do cleanup.'
        sys.exit(1)

    if not download_ff(mcp_dir):
        sys.exit(1)

    try:
        pre_decompile()

        os.chdir(mcp_dir)
        #         Conf  JAD    CSV    -r    -d    -a     -n    -p     -o     -l     -g
        decompile(None, False, False, True, True, False, True, False, False,
                  False, False)
        reset_logger()
        os.chdir(forge_dir)

        post_decompile()

    except SystemExit, e:
        print 'Decompile Exception: %d ' % e.code
        raise e
Esempio n. 5
0
def main():
    print '=================================== Setup Start ================================='
    
    parser = argparse.ArgumentParser(description='Sets up Forge with MCP.')
    parser.add_argument('--skipdecompile', action='store_true', help='prevents decompilation during setup')
    parser.add_argument('--preventconfigclobber', action='store_true', help='prevents overwriting mcp.cfg during setup')
    args = parser.parse_args()
    
    skipDecompile = args.skipdecompile
    preventConfigClobber = args.preventconfigclobber
    # print "test args {} {}".format(args.skipdecompile, args.preventconfigclobber)
	
    if not preventConfigClobber:
        if os.path.isdir(mcp_included_conf):
            shutil.rmtree(mcp_included_conf)
        
        shutil.copytree(forge_mcp_conf, mcp_included_conf)
        print 'Successfully overwrote MCP config folder with the Forge config folder (including patches)! (If you want this to not happen, please use the --preventconfigclobber option!)'
	
    if not skipDecompile:
        if not download_ff(mcp_dir):
            sys.exit(1)
        
        if os.path.isdir(src_dir):
            shutil.rmtree(src_dir)
            
        try:
            
            pre_decompile()
        
            os.chdir(mcp_dir)
            #         Conf  JAD    CSV    -r    -d    -a     -n    -p     -o     -l     -g
            decompile(None, False, False, True, True, False, True, False, False, False, False)
            reset_logger()
            os.chdir(forge_dir)
            
            post_decompile()
            
        except SystemExit, e:
            print 'Decompile Exception: %d ' % e.code
            raise e