From 4bf08307966f8bf7fdc9f8100d9c4898c99fac95 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Fri, 24 Apr 2020 18:12:02 -0600 Subject: [PATCH] Update build envs to ubunto 20.04. Change mingw build env to arch --- linux-clang-format/Dockerfile | 2 +- linux-fresh/Dockerfile | 18 +++++++++++--- linux-mingw/Dockerfile | 47 +++++++++++++++++++++++++++++------ linux-mingw/mingw-setup.sh | 8 ------ 4 files changed, 55 insertions(+), 20 deletions(-) diff --git a/linux-clang-format/Dockerfile b/linux-clang-format/Dockerfile index 608e363..47b598c 100644 --- a/linux-clang-format/Dockerfile +++ b/linux-clang-format/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER yuzu RUN useradd -m -s /bin/bash yuzu RUN apt-get update && apt-get -y full-upgrade diff --git a/linux-fresh/Dockerfile b/linux-fresh/Dockerfile index abdc099..08cbe38 100644 --- a/linux-fresh/Dockerfile +++ b/linux-fresh/Dockerfile @@ -1,5 +1,17 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER yuzu RUN useradd -m -s /bin/bash yuzu -RUN apt-get update && apt-get -y full-upgrade -RUN apt-get install --no-install-recommends -y build-essential libsdl2-dev libssl-dev python qtbase5-dev qtwebengine5-dev libqt5opengl5-dev wget git ccache cmake ninja-build +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y full-upgrade +RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + build-essential \ + libsdl2-dev \ + libssl-dev \ + python \ + qtbase5-dev \ + qtwebengine5-dev \ + libqt5opengl5-dev \ + wget \ + git \ + ccache \ + cmake \ + ninja-build diff --git a/linux-mingw/Dockerfile b/linux-mingw/Dockerfile index dac207c..a230aad 100644 --- a/linux-mingw/Dockerfile +++ b/linux-mingw/Dockerfile @@ -1,12 +1,43 @@ -FROM ubuntu:18.04 +FROM archlinux:latest MAINTAINER yuzu RUN useradd -m -s /bin/bash yuzu && mkdir -p /tmp/pkgs -RUN apt-get update && apt-get install -y gpg wget git python3-pip python ccache p7zip-full g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 mingw-w64-tools cmake ninja-build -# workaround broken headers in Ubuntu MinGW package -COPY errno.h /usr/x86_64-w64-mingw32/include/ -# add mingw-w64 auxiliary ppa repository -RUN echo 'deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu bionic main ' > /etc/apt/sources.list.d/extras.list -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv '72931B477E22FEFD47F8DECE02FE5F12ADDE29B2' && apt-get update -RUN apt-get install -y sdl2-mingw-w64 qt5base-mingw-w64 qt5tools-mingw-w64 libsamplerate-mingw-w64 qt5multimedia-mingw-w64 +# Add mingw-repo "ownstuff" is a AUR with an up to date mingw64 +RUN echo "[ownstuff]" >> /etc/pacman.conf \ + && echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf \ + && echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf +RUN pacman -Syu --noconfirm +RUN pacman -Syu --noconfirm +RUN pacman -S --needed --noconfirm --noprogressbar \ + base-devel \ + gnupg \ + wget \ + git \ + python-pip \ + python \ + ccache \ + p7zip \ + cmake \ + ninja \ + mingw-w64-gcc \ + mingw-w64-tools \ + mingw-w64-sdl2 \ + mingw-w64-qt5-base \ + mingw-w64-qt5-tools \ + mingw-w64-qt5-graphicaleffects \ + mingw-w64-qt5-multimedia \ + mingw-w64-qt5-winextras \ + python2 \ + mingw-w64-opus \ + mingw-w64-winpthreads + COPY mingw-setup.sh /tmp/pkgs RUN cd /tmp/pkgs && bash -e mingw-setup.sh +# Compatibility with the old Ubuntu MingW image +RUN ln -s /usr/x86_64-w64-mingw32/lib/qt /usr/x86_64-w64-mingw32/lib/qt5 + +# Cleanup +USER root +RUN pacman -Scc --noconfirm +RUN rm -rf /usr/share/man/*; \ + rm -rf /tmp/*; \ + rm -rf /var/tmp/*; diff --git a/linux-mingw/mingw-setup.sh b/linux-mingw/mingw-setup.sh index 728eab7..4538a3c 100644 --- a/linux-mingw/mingw-setup.sh +++ b/linux-mingw/mingw-setup.sh @@ -2,14 +2,6 @@ # install pefile pip3 install pefile -MINGW_URL='https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download' -TARGET_DIR='mingw64/x86_64-w64-mingw32/lib/' - -echo 'Downloading MinGW replacement binaries...' -wget -q "${MINGW_URL}" -O 'mingw.7z' -7z x 'mingw.7z' "${TARGET_DIR}"lib{mf,mfplat,mfuuid}.a -cp -rv "${TARGET_DIR}"/* '/usr/x86_64-w64-mingw32/lib/' - # ffmpeg FFMPEG_VER='4.1' for i in 'shared' 'dev'; do