Skip to content

Commit

Permalink
convert: Add default DLL paths to singlefile converter,
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed May 17, 2024
1 parent 144c113 commit afb0486
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openage/convert/tool/singlefile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright 2015-2023 the openage authors. See copying.md for legal info.
# Copyright 2015-2024 the openage authors. See copying.md for legal info.

"""
Convert a single slp/wav file from some drs archive to a png/opus file.
"""
from __future__ import annotations

import sys

from pathlib import Path

Expand Down Expand Up @@ -59,6 +60,11 @@ def main(args, error):
file_path = Path(args.filename)
file_extension = file_path.suffix[1:].lower()

if sys.platform == "win32":
from openage.util.dll import DllDirectoryManager, default_paths
dll_manager = DllDirectoryManager(default_paths())
dll_manager.add_directories()

if not (args.mode in ("sld", "drs-wav", "wav") or file_extension in ("sld", "wav")):
if not args.palettes_path:
raise RuntimeError("palettes-path needs to be specified for "
Expand Down

0 comments on commit afb0486

Please sign in to comment.