# Wine + a virtual X display + a window manager (without one, Wine hands the foreground to the
# desktop when a child control takes focus), for AiReader's --bench / --script tests on a Mac or Linux box.
# Built and used by test/wine/run.sh (x86-64 image; on Apple Silicon Docker runs it under Rosetta/QEMU).
FROM debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
# 64-bit Wine only: Docker's Rosetta runs x86-64 code, not 32-bit, so the (32-bit) NSIS installer cannot be
# run here; check its contents with 7-Zip instead (see CLAUDE.md).
RUN apt-get update && apt-get install -y --no-install-recommends \
      wine wine64 xvfb xauth x11-utils xdotool imagemagick openbox fonts-dejavu-core procps ca-certificates \
    && rm -rf /var/lib/apt/lists/*
ENV WINEPREFIX=/wineprefix WINEDEBUG=-all WINEDLLOVERRIDES=mscoree,mshtml=
RUN xvfb-run -a wineboot --init && wineserver -w || true
WORKDIR /src
