Example #1
0
def pack_iso(iso: Path, game_files_path: Path,
             disable_attract_if_necessary: bool,
             progress_update: ProgressUpdateCallable):
    validate_game_files_path(game_files_path.joinpath("files"))

    nod_version = StrictVersion(getattr(nod, "VERSION", "0.0.0"))
    if nod_version < StrictVersion("1.1.0"):
        raise RuntimeError(
            "Installed nod version ({}) is older than required 1.1.0".format(
                nod_version))

    if disable_attract_if_necessary and nod.DiscBuilderGCN.calculate_total_size_required(
            str(game_files_path)) is None:
        _disable_attract_videos(game_files_path, progress_update)

    if nod.DiscBuilderGCN.calculate_total_size_required(
            str(game_files_path)) is None:
        raise RuntimeError(
            "Image built with given directory would pass the maximum size.")

    _shared_process_code(target=_disc_pack_process,
                         iso=iso,
                         game_files_path=game_files_path,
                         on_finish_message="Finished packing ISO",
                         progress_update=progress_update)
Example #2
0
def _base_args(game_root: Path, ) -> List[Union[str, Path]]:
    game_files = game_root / "files"
    validate_game_files_path(game_files)

    return [
        _get_randomizer_path(),
        game_root,
        # "-test",
    ]
Example #3
0
def _base_args(
    game_root: Path,
    hud_memo_popup_removal: bool,
) -> List[str]:
    game_files = game_root / "files"
    validate_game_files_path(game_files)

    args = [
        _get_randomizer_path(),
        game_files,
    ]
    if hud_memo_popup_removal:
        args.append("-h")
    return args