This repository has been archived by the owner on May 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Dockerfile-wine
executable file
·54 lines (43 loc) · 2.31 KB
/
Dockerfile-wine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:16.04
LABEL maintainer "Andriy Khavryuchenko <[email protected]>"
RUN dpkg --add-architecture i386
RUN apt-get update -y
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ubuntu-wine/ppa
RUN apt-get update -y
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN apt-get install -y wine1.8 xvfb wget zip winbind unzip git
RUN wget -O python.msi https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi
RUN wget -O pyinstaller.zip https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.zip
RUN wget -O pywin32.exe https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/pywin32-220.win32-py2.7.exe/download
RUN wget -O PyQt.exe "https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe/download"
RUN wget -O nsis.exe "http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download"
RUN xvfb-run -a wineboot && sleep 5
RUN xvfb-run -a -e /dev/stdout -a msiexec /q /i python.msi && sleep 5
# PyQt should be installed here, not later, otherwise it doesn't find the python
RUN xvfb-run -a wine PyQt.exe /S
ENV WINEPREFIX /root/.wine
ENV PYHOME c:/Python27
RUN unzip -qq pywin32.exe ; echo
RUN cp -r PLATLIB/* $WINEPREFIX/drive_c/Python27/Lib/site-packages/
RUN mkdir -p $WINEPREFIX/drive_c/Python27/Scripts/
RUN cp -r SCRIPTS/* $WINEPREFIX/drive_c/Python27/Scripts/
RUN wineboot --update && xvfb-run -a wine $PYHOME/python.exe -B \
$WINEPREFIX/drive_c/Python27/Scripts/pywin32_postinstall.py -install
COPY ./python-trezor/dist/Python27 $WINEPREFIX/drive_c/Python27
COPY ./x11_hash/build/lib.win32-2.7/x11_hash.pyd $WINEPREFIX/drive_c/Python27/Lib/site-packages
RUN unzip -qq pyinstaller.zip && mv PyInstaller-2.1 $WINEPREFIX/drive_c/pyinstaller
RUN rm -rf /tmp/.wine-* ; wineboot --update ; xvfb-run -a wine nsis.exe /S
RUN rm -rf /tmp/.wine-* ; wineboot --update ; wine python -m ensurepip
RUN wineboot --update ; wine python C:/Python27/Scripts/pip.exe install \
dnspython==1.12.0 \
slowaes==0.1a1 \
ecdsa==0.13 \
requests==2.5.1 \
six==1.11.0 \
qrcode==5.1 \
pbkdf2==1.3 \
protobuf==2.6.1 \
jsonrpclib==0.1.7
# so pyinstaller would find `google.protobuf`
RUN touch /root/.wine/drive_c/Python27/Lib/site-packages/google/__init__.py