Commit de69f6ec authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

automatically append .exe on Windows

parent 3dd1c714
Loading
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -255,6 +255,10 @@ IVAS_Bins = {
    "ISAR": "ISAR_post_rend",
}

# Automatically append .exe on Windows
if platform.system() == "Windows":
    IVAS_Bins = {k: f"{v}.exe" for k, v in IVAS_Bins.items()}

DECODER_OUTPUT_FORMATS = {
    "MONO",
    "STEREO",
@@ -288,19 +292,13 @@ def validate_build_binaries(parser, build_path: str, build_label: str) -> None:
        )

    missing = []
    is_windows = platform.system() == "Windows"
    for tag, binary in IVAS_Bins.items():
        candidate = os.path.join(abs_build_path, binary)
        candidate_exe = f"{candidate}.exe"
        exists = os.path.isfile(candidate) or (is_windows and os.path.isfile(candidate_exe))
        if not exists:
            shown = candidate_exe if is_windows else candidate
            missing.append(f"{tag}: {shown}")
        if not os.path.isfile(candidate):
            missing.append(f"{tag}: {candidate}")

    if missing:
        parser.error(
            f"Missing {build_label} binaries:\n  - " + "\n  - ".join(missing)
        )
        parser.error(f"Missing {build_label} binaries:\n  - " + "\n  - ".join(missing))

ReferenceMldFiles = {
    "ENC": "mld_ref_ENC.csv",