35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
# Build Windows PyInstaller bundle from Linux using Wine + Windows Python.
|
|
# Used by: build/ci/docker-build-windows.sh
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV WINEARCH=win64
|
|
ENV WINEPREFIX=/root/.wine
|
|
ENV WINEDEBUG=-all
|
|
|
|
RUN dpkg --add-architecture i386 \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
wine64 wine32 winbind \
|
|
wget curl ca-certificates unzip zip \
|
|
python3 python3-pip python3-venv \
|
|
xvfb \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Initialize Wine (needed for silent Python install)
|
|
RUN wineboot --init && sleep 10 || true
|
|
|
|
# Install Windows Python 3.12 into the Wine prefix
|
|
RUN wget -q https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe -O /tmp/python-installer.exe \
|
|
&& wine64 /tmp/python-installer.exe /quiet InstallAllUsers=0 PrependPath=0 Include_pip=1 TargetDir=C:\\Python312 \
|
|
&& rm /tmp/python-installer.exe
|
|
|
|
ENV WIN_PY="wine64 C:\\Python312\\python.exe"
|
|
|
|
WORKDIR /src
|
|
COPY build/ci/docker-entrypoint-win.sh /docker-entrypoint-win.sh
|
|
RUN chmod +x /docker-entrypoint-win.sh
|
|
|
|
ENTRYPOINT ["/docker-entrypoint-win.sh"]
|