Esempio n. 1
0
def zip_add(file, key=None):
    if key == None:
        key = os.path.basename(file)
    else:
        key = key.replace('/', os.sep)
    if not zip_base is None:
        key = os.path.join(zip_base, key)
    file = os.path.join(forge_dir, file.replace('/', os.sep))
    if os.path.isdir(file):
        zip_folder(file, key, zip)
    else:
        if os.path.isfile(file):
            print key
            zip.write(file, key)
Esempio n. 2
0
def zip_add(file, key=None):
    if key == None:
        key = os.path.basename(file)
    else:
        key = key.replace('/', os.sep)
    if not zip_base is None:
        key = os.path.join(zip_base, key)
    file = os.path.join(forge_dir, file.replace('/', os.sep))
    if os.path.isdir(file):
        zip_folder(file, key, zip)
    else:
        if os.path.isfile(file):
            print key
            zip.write(file, key)
Esempio n. 3
0
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Reobfusicate Exception: %d ' % e.code
        error_level = e.code
    
    version = load_version(build_num)
        
    out_folder = os.path.join(forge_dir, 'TFC Build')
    if os.path.isdir(out_folder):
        shutil.rmtree(out_folder)
        
    os.makedirs(out_folder)
    
    zip_start('TFCraft-client-core.zip')
    zip_folder(client_dir, '', zip)
    zip_add('TFCraft_credits.txt')
    zip_add('license.txt')
    zip_end()
    zip_start('TFCraft-client-game.zip')
    zip_folder(client_dir, '', zip)
    zip_add('TFCraft_credits.txt')
    zip_add('license.txt')
    zip_end()
    
    zip_start('TFCraft-server-core.zip')
    zip_folder(server_dir, '', zip)
    zip_add('TFCraft_credits.txt')
    zip_add('license.txt')
    zip_end()
Esempio n. 4
0
     reset_logger()
     os.chdir(forge_dir)
 except SystemExit, e:
     print 'Reobfusicate Exception: %d ' % e.code
     error_level = e.code
 
 version = load_version(build_num)
     
 out_folder = os.path.join(forge_dir, 'TFC Build')
 if os.path.isdir(out_folder):
     shutil.rmtree(out_folder)
     
 os.makedirs(out_folder)
 
 zip_start('TFCraft-Universal-Core-B2-Build.zip')
 zip_folder(client_dir, '', zip)
 zip_add('TFCraft_credits.txt')
 zip_add('license.txt')
 zip_folder(os.path.join(forge_dir, 'TFC Resources'), '', zip)
 zip_end()
 
 zip_start('TFCraft-src.zip')
 zip_add('tfc_shared/src',     'src/minecraft')
 zip_add('patches',          'patches')
 zip_add('tfc_credits.txt')
 zip_add('install/install.cmd')
 zip_add('install/install.sh')
 zip_add('install/README.txt')
 zip_add('install/install.py')
 zip_add('tfc.py')
 zip_add('license.txt')
Esempio n. 5
0
        reset_logger()
        os.chdir(forge_dir)
    except SystemExit, e:
        print 'Reobfusicate Exception: %d ' % e.code
        error_level = e.code

    version = load_version(build_num)

    out_folder = os.path.join(forge_dir, 'TFC Build')
    if os.path.isdir(out_folder):
        shutil.rmtree(out_folder)

    os.makedirs(out_folder)

    zip_start('TFCraft-Universal-Core-B2-Build.zip')
    zip_folder(client_dir, '', zip)
    zip_add('TFCraft_credits.txt')
    zip_add('license.txt')
    zip_folder(os.path.join(forge_dir, 'TFC Resources'), '', zip)
    zip_end()

    zip_start('TFCraft-src.zip')
    zip_add('tfc_shared/src', 'src/minecraft')
    zip_add('patches', 'patches')
    zip_add('tfc_credits.txt')
    zip_add('install/install.cmd')
    zip_add('install/install.sh')
    zip_add('install/README.txt')
    zip_add('install/install.py')
    zip_add('tfc.py')
    zip_add('license.txt')