1diff --git a/src/ocrmypdf/_exec/ghostscript.py b/src/ocrmypdf/_exec/ghostscript.py 2index 92b73a0a..9f04555c 100644 3--- a/src/ocrmypdf/_exec/ghostscript.py 4+++ b/src/ocrmypdf/_exec/ghostscript.py 5@@ -58,7 +58,7 @@ log.addFilter(DuplicateFilter(log)) 6 7 8 # Ghostscript executable - gswin32c is not supported 9-GS = 'gswin64c' if os.name == 'nt' else 'gs' 10+GS = '@gs@' 11 12 13 def version() -> Version: 14diff --git a/src/ocrmypdf/_exec/jbig2enc.py b/src/ocrmypdf/_exec/jbig2enc.py 15index 5a34a95a..5ee1b333 100644 16--- a/src/ocrmypdf/_exec/jbig2enc.py 17+++ b/src/ocrmypdf/_exec/jbig2enc.py 18@@ -14,7 +14,7 @@ from ocrmypdf.subprocess import get_version, run 19 20 21 def version() -> Version: 22- return Version(get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*')) 23+ return Version(get_version('@jbig2@', regex=r'jbig2enc (\d+(\.\d+)*).*')) 24 25 26 def available(): 27@@ -27,7 +27,7 @@ def available(): 28 29 def convert_group(cwd, infiles, out_prefix, threshold): 30 args = [ 31- 'jbig2', 32+ '@jbig2@', 33 '-b', 34 out_prefix, 35 '--symbol-mode', # symbol mode (lossy) 36@@ -44,7 +44,7 @@ def convert_group(cwd, infiles, out_prefix, threshold): 37 38 39 def convert_single(cwd, infile, outfile, threshold): 40- args = ['jbig2', '--pdf', '-t', str(threshold), infile] 41+ args = ['@jbig2@', '--pdf', '-t', str(threshold), infile] 42 with open(outfile, 'wb') as fstdout: 43 proc = run(args, cwd=cwd, stdout=fstdout, stderr=PIPE) 44 proc.check_returncode() 45diff --git a/src/ocrmypdf/_exec/pngquant.py b/src/ocrmypdf/_exec/pngquant.py 46index 5b8600d0..fcad771b 100644 47--- a/src/ocrmypdf/_exec/pngquant.py 48+++ b/src/ocrmypdf/_exec/pngquant.py 49@@ -15,7 +15,7 @@ from ocrmypdf.subprocess import get_version, run 50 51 52 def version() -> Version: 53- return Version(get_version('pngquant', regex=r'(\d+(\.\d+)*).*')) 54+ return Version(get_version('@pngquant@', regex=r'(\d+(\.\d+)*).*')) 55 56 57 def available(): 58@@ -37,7 +37,7 @@ def quantize(input_file: Path, output_file: Path, quality_min: int, quality_max: 59 """ 60 with open(input_file, 'rb') as input_stream: 61 args = [ 62- 'pngquant', 63+ '@pngquant@', 64 '--force', 65 '--skip-if-larger', 66 '--quality', 67diff --git a/src/ocrmypdf/_exec/tesseract.py b/src/ocrmypdf/_exec/tesseract.py 68index fab92bb1..78b634a7 100644 69--- a/src/ocrmypdf/_exec/tesseract.py 70+++ b/src/ocrmypdf/_exec/tesseract.py 71@@ -95,7 +95,7 @@ class TesseractVersion(Version): 72 73 74 def version() -> Version: 75- return TesseractVersion(get_version('tesseract', regex=r'tesseract\s(.+)')) 76+ return TesseractVersion(get_version('@tesseract@', regex=r'tesseract\s(.+)')) 77 78 79 def has_thresholding() -> bool: 80@@ -113,7 +113,7 @@ def get_languages() -> set[str]: 81 msg += output 82 return msg 83 84- args_tess = ['tesseract', '--list-langs'] 85+ args_tess = ['@tesseract@', '--list-langs'] 86 try: 87 proc = run( 88 args_tess, 89@@ -135,7 +135,7 @@ def get_languages() -> set[str]: 90 91 92 def tess_base_args(langs: list[str], engine_mode: int | None) -> list[str]: 93- args = ['tesseract'] 94+ args = ['@tesseract@'] 95 if langs: 96 args.extend(['-l', '+'.join(langs)]) 97 if engine_mode is not None: 98diff --git a/src/ocrmypdf/_exec/unpaper.py b/src/ocrmypdf/_exec/unpaper.py 99index 493d9b3a..578c2dda 100644 100--- a/src/ocrmypdf/_exec/unpaper.py 101+++ b/src/ocrmypdf/_exec/unpaper.py 102@@ -70,7 +70,7 @@ class UnpaperImageTooLargeError(Exception): 103 104 105 def version() -> Version: 106- return Version(get_version('unpaper')) 107+ return Version(get_version('@unpaper@')) 108 109 110 @contextmanager 111@@ -92,7 +92,7 @@ def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Path]]: 112 def run_unpaper( 113 input_file: Path, output_file: Path, *, dpi: DecFloat, mode_args: list[str] 114 ) -> None: 115- args_unpaper = ['unpaper', '-v', '--dpi', str(round(dpi, 6))] + mode_args 116+ args_unpaper = ['@unpaper@', '-v', '--dpi', str(round(dpi, 6))] + mode_args 117 118 with _setup_unpaper_io(input_file) as (input_png, output_pnm, tmpdir): 119 # To prevent any shenanigans from accepting arbitrary parameters in