Exemple #1
0
def extract_bnd(bnd_path, output_dir):
    """ Extract files from a BND to output_dir. """
    bnd = Bnd()
    load_success = bnd.load(bnd_path)
    if not load_success:
        return
    bnd.extract_all_files(output_dir)
Exemple #2
0
def extract_bnd(bnd_path):
    print("Extract", bnd_path)
    bnd = Bnd()
    load_success = bnd.load(bnd_path)
    if not load_success:
        return
    output_dir = os.path.join(
        os.path.dirname(bnd_path),
        os.path.splitext(os.path.basename(bnd_path))[0]
    )
    bnd.extract_all_files(output_dir)
Exemple #3
0
def generate_bnd(bnd_dir, output_path):
    """ Build a BND from the files in bnd_dir; BND is saved at output_path. """
    bnd = Bnd()
    bnd.import_files(bnd_dir)
    bnd.save(output_path)