예제 #1
0
def build(major_num=0, build_num=0, revision_num=0):
    print '============================= Build Start (%d.%d.%d) ============================' % (
        major_num, build_num, revision_num)
    print '\nsrc -> backup'
    copytree(src_dir, backup_dir, 0)
    print '\nTFC_Shared -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC_Shared'),
             os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC API -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC API'),
             os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC ASM -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC ASM'),
             os.path.join(src_dir, 'minecraft'), 0)
    print

    error_level = 0
    try:
        os.chdir(mcp_dir)
        reset_logger()
        recompile(None, False, False)
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Recompile Exception: %d ' % e.code
        error_level = e.code
예제 #2
0
파일: build.py 프로젝트: Aranshada/TFCraft
def build(major_num=0, build_num=0, revision_num=0):
    print '============================= Build Start (%d.%d.%d) ============================' % (major_num, build_num, revision_num)   
    print '\nsrc -> backup'
    copytree(src_dir, backup_dir, 0)    
    print '\nTFC_Shared -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC_Shared'), os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC API -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC API'), os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC ASM -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC ASM'), os.path.join(src_dir, 'minecraft'), 0)
    print
    
    error_level = 0
    try:
        os.chdir(mcp_dir)
        reset_logger()
        recompile(None, False, False)
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Recompile Exception: %d ' % e.code
        error_level = e.code
예제 #3
0
파일: build.py 프로젝트: Aranshada/TFCraft
    copytree(os.path.join(forge_dir, 'TFC_Shared'), os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC API -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC API'), os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC ASM -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC ASM'), os.path.join(src_dir, 'minecraft'), 0)
    print
    
    error_level = 0
    try:
        os.chdir(mcp_dir)
        reset_logger()
        recompile(None, False, False)
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Recompile Exception: %d ' % e.code
        error_level = e.code

    print '\nremove src'
    shutil.rmtree(src_dir)
    print '\nbackup -> src'
    copytree(backup_dir, src_dir, 0)
    print '\nremove backup'
    shutil.rmtree(backup_dir)
        
    print '============================= Build Finished %d ============================' % error_level
    return error_level
    
if __name__ == '__main__':
    main()
예제 #4
0
             os.path.join(src_dir, 'minecraft'), 0)
    print '\nTFC API -> minecraft'
    copytree(os.path.join(forge_dir, 'TFC API'),
             os.path.join(src_dir, 'minecraft'), 0)
    print

    error_level = 0
    try:
        os.chdir(mcp_dir)
        reset_logger()
        recompile(None, False, False)
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Recompile Exception: %d ' % e.code
        error_level = e.code

    print '\nremove src'
    shutil.rmtree(src_dir)
    print '\nbackup -> src'
    copytree(backup_dir, src_dir, 0)
    print '\nremove backup'
    shutil.rmtree(backup_dir)

    print '============================= Build Finished %d ============================' % error_level
    return error_level


if __name__ == '__main__':
    main()