diff --git a/dcc/dsda.py b/dcc/dsda.py index f675670..bf6e156 100644 --- a/dcc/dsda.py +++ b/dcc/dsda.py @@ -2,6 +2,7 @@ import dcc.config import dcc.doom_base import os import re +import shutil import subprocess import zipfile @@ -15,9 +16,13 @@ class DSDA(dcc.doom_base.WadMap): dip = dcc.config.DemoInPath(parsed_args.wad, parsed_args.map) dtp = dcc.config.DsdaTextPath(parsed_args.wad, parsed_args.map) if not dtp.exists(): - subprocess.run([dcc.config.DSDA] + + command = [dcc.config.DSDA] + if shutil.which("xvfb-run") is not None: + command = ["xvfb-run"] + command + # TODO: negative tics should seek from the end, but this doesn't seem to work. + subprocess.run(command + dcc.config.DsdaPreamble(parsed_args.wad, parsed_args.map) + - ["-playdemo", dip, "-export_text_file"]) + ["-fastdemo", dip, "-nosound", "-skiptic", "999999999", "-export_text_file"]) editor = "nano" if "EDITOR" in os.environ: editor = os.environ["EDITOR"]