Changeset 939:de728888b85e


Ignore:
Timestamp:
04/28/19 17:32:28 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

The Docker/Wine-based build infrastructure works for Python 3 (re #347)

Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • MANIFEST.in

    r916 r939  
    11include mlx.nsi
    2 include makeinst.bat
    3 include winemakeinst.bat
     2include makeinst.sh
    43include license.txt
    54include runmlx.py
  • docker/build-mlxwinebuild.sh

    r916 r939  
    66sdistdir=$(cd $(dirname "${sdistfile}") && pwd)
    77
    8 docker run --rm -v "${sdistdir}:/root/dist" mlxwinebuild build $(basename "${sdistfile}") $(id -u) $(id -g)
    9 #docker run -it --rm -v "${sdistdir}:/root/dist" mlxwinebuild bash
     8docker run --rm -v "${sdistdir}:/root/dist" mlxwinebuild-py3 build $(basename "${sdistfile}") $(id -u) $(id -g)
     9#docker run -it --rm -v "${sdistdir}:/root/dist" mlxwinebuild-py3 bash
  • docker/context/Dockerfile

    r916 r939  
    88        wine \
    99        wine32 && \
     10    apt-get clean && \
    1011    echo "Europe/Budapest" > /etc/timezone && \
    1112    rm -f /etc/localtime && \
  • docker/context/build.sh

    r916 r939  
    1818cd "${mlxdirname}"
    1919
    20 echo "winemakeinst.bat" | wine cmd
     20export WINE=yes
     21./makeinst.sh
    2122
    2223echo
  • docker/context/setup.sh

    r916 r939  
    44
    55cdrive="${HOME}/.wine/drive_c"
    6 ctmpdir="${cdrive}/tmp"
    7 cpythondir="${cdrive}/Python27"
    8 cwinsysdir="${cdrive}/windows/system32"
     6cpythondir="${cdrive}/msys64/mingw32"
    97
    10 if test -f "${cpythondir}/python.exe"; then
     8if test -f "${cpythondir}/bin/python3.exe"; then
    119    echo "Image already configured, not doing anything!"
    1210    exit 1
     
    1614echo
    1715
     16export WINEARCH=win32
     17
     18echo "exit" | wine cmd
     19
    1820echo "Downloading and extracting the extra packages..."
    1921
    20 wget -O - mlx.varadiistvan.hu/update/winepkgs.tar | tar xf -
     22wget -O - mlx.varadiistvan.hu/update/msys64.tar.gz | tar xzf - -C "${cdrive}"
     23wget -O - mlx.varadiistvan.hu/update/winepkgs.tar | tar xf - nsis-2.46-setup.exe pyuipc-cpython-37m.dll xplra.py
     24
     25mv  pyuipc-cpython-37m.dll xplra.py /root/.wine/drive_c/msys64/mingw32/lib/python3.7/site-packages
    2126
    2227echo
    2328echo "Installing extra packages..."
    2429
    25 export WINEARCH=win32
    26 
    27 echo "exit" | wine cmd
    28 wine msiexec /i python-2.7.2.msi
    29 wine msiexec /i cefpython3-31.2.py2.7-win32.msi
    30 wine msiexec /i pygtk-all-in-one-2.24.1.win32-py2.7.msi
    31 wine msiexec /i pyuipc-0.4.win32-py2.7.msi
    32 wine msiexec /i xplra-0.2.win32.msi
    33 
    34 wine pywin32-217.win32-py2.7.exe
    35 wine py2exe-0.6.9.win32-py2.7.exe
    3630wine nsis-2.46-setup.exe
    37 
    38 mkdir "${ctmpdir}"
    39 cp chromedriver.exe "${ctmpdir}"
    40 
    41 tar xzf Python27.extra.tar.gz -C "${cpythondir}"
    42 
    43 touch -d "2015-02-22 14:50:07" "${cpythondir}/Lib/site-packages/win32/lib/win32con.py"
    44 touch -d "2015-02-22 14:50:07" "${cpythondir}/Lib/site-packages/win32/lib/winerror.py"
    45 
    46 cp python27.dll WINHTTP.dll "${cwinsysdir}"
    4731
    4832echo
    4933echo "Removing extra packages..."
    50 rm -f *.msi *.exe Python27.extra.tar.gz python27.dll WINHTTP.dll
     34rm -f *.exe
    5135echo
    5236echo "Done."
  • docker/initialize-mlxwinebuild.sh

    r916 r939  
    66scriptdir=`cd "${scriptdir}" && pwd`
    77
    8 docker build -t mlxwinebuild-base "${scriptdir}/context"
     8docker build -t mlxwinebuild-py3-base "${scriptdir}/context"
    99
    1010if test -z "${XAUTHORITY:-}"; then
     
    1212fi
    1313
    14 docker run -it --name mlxwinebuildinit -v /tmp/.X11-unix:/tmp/.X11-unix -v "${XAUTHORITY}":/root/.Xauthority -v /usr/lib/x86_64-linux-gnu/vdpau:/usr/lib/x86_64-linux-gnu/vdpau --device /dev/nvidiactl --device /dev/nvidia0 --security-opt=apparmor:unconfined  --env DISPLAY mlxwinebuild-base initialize
     14docker run -it --name mlxwinebuildinit -v /tmp/.X11-unix:/tmp/.X11-unix -v "${XAUTHORITY}":/root/.Xauthority -v /usr/lib/x86_64-linux-gnu/vdpau:/usr/lib/x86_64-linux-gnu/vdpau --device /dev/nvidiactl --device /dev/nvidia0 --security-opt=apparmor:unconfined  --env DISPLAY mlxwinebuild-py3-base initialize
    1515
    1616echo "Committing new image..."
    1717
    18 docker commit --change='CMD ["bash"]' mlxwinebuildinit mlxwinebuild
     18docker commit --change='CMD ["bash"]' mlxwinebuildinit mlxwinebuild-py3
    1919
    2020echo "Removing container..."
Note: See TracChangeset for help on using the changeset viewer.