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)
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(mcp_dir, 'TFC Build') if os.path.exists(out_folder): print 'TFC Build Folder already exists. Skipping creation.' else: print 'Creating TFC Build Folder.' os.makedirs(out_folder) zip_start('TFC-%d.%d.%d.jar' % (major_num, build_num, revision_num)) 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_add('TFC ASM/tfc_at.cfg') zip_folder(os.path.join(forge_dir, 'TFC ASM/META-INF'), 'META-INF', zip) zip_end() zip_start('TFC-Dev-%d.%d.%d.jar' % (major_num, build_num, revision_num)) zip_folder(os.path.join(bin_dir, 'TFC'), 'TFC', zip) zip_folder(os.path.join(forge_dir, 'TFC Resources'), '', zip) zip_add('tfc_credits.txt') zip_add('license.txt') zip_add('TFC ASM/tfc_at.cfg') zip_folder(os.path.join(forge_dir, 'TFC ASM/META-INF'), 'META-INF', zip)
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(mcp_dir, 'TFC Build') if os.path.exists(out_folder): print 'TFC Build already exists. Skipping creation.' else: print 'Creating TFC Build.' os.makedirs(out_folder) zip_start('TFC-%d.%d.%d.zip' % (major_num, build_num, revision_num)) 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('TFC-Dev-%d.%d.%d.zip' % (major_num, build_num, revision_num)) zip_folder(os.path.join(forge_dir, 'TFC_Shared/src'), '', zip) zip_folder(os.path.join(forge_dir, 'TFC Resources'), '', zip) zip_folder(os.path.join(forge_dir, 'TFC API'), '', zip) zip_add('tfc_credits.txt') zip_add('license.txt') zip_end() zip_start('TFC-Dev-API-%d.%d.%d.zip' % (major_num, build_num, revision_num)) zip_folder(os.path.join(forge_dir, 'TFC API'), '', zip)
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(mcp_dir, 'TFC Build') if os.path.exists(out_folder): print 'TFC Build already exists. Skipping creation.' else: print 'Creating TFC Build.' os.makedirs(out_folder) zip_start('TFC-%d.%d.%d.zip' % (major_num, build_num, revision_num)) 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('TFC-Dev-%d.%d.%d.zip' % (major_num, build_num, revision_num)) zip_folder(os.path.join(forge_dir, 'TFC_Shared/src'), '', zip) zip_folder(os.path.join(forge_dir, 'TFC Resources'), '', zip) zip_folder(os.path.join(forge_dir, 'TFC API'), '', zip) zip_add('tfc_credits.txt') zip_add('license.txt') zip_end() zip_start('TFC-Dev-API-%d.%d.%d.zip' % (major_num, build_num, revision_num))