linux-mingw: adapt scripts from yuzu ...
... now the base image uses Arch Linux
This commit is contained in:
parent
eeaf05faae
commit
63c53f8d1f
@ -1,13 +1,44 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM archlinux:latest
|
||||
LABEL maintainer="citraemu"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN mkdir -p /tmp/pkgs
|
||||
RUN apt-get update && apt-get install -y gpg wget git python3-pip 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 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
|
||||
# Runs pacman -Syu twice in order to work around pacman issues where the first run only updates the
|
||||
# current distro packages, and the second run actually pulls the updates from the repos.
|
||||
RUN useradd -m -u 1027 -s /bin/bash yuzu && mkdir -p /tmp/pkgs && \
|
||||
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 && \
|
||||
pacman -Syu --noconfirm && \
|
||||
pacman -Syu --noconfirm && \
|
||||
pacman -S --needed --noconfirm --noprogressbar \
|
||||
base-devel \
|
||||
sudo \
|
||||
gnupg \
|
||||
wget \
|
||||
git \
|
||||
glslang \
|
||||
python-pip \
|
||||
python \
|
||||
ccache \
|
||||
p7zip \
|
||||
cmake \
|
||||
ninja \
|
||||
mingw-w64-boost \
|
||||
mingw-w64-gcc \
|
||||
mingw-w64-libusb \
|
||||
mingw-w64-lz4 \
|
||||
mingw-w64-nlohmann-json \
|
||||
mingw-w64-qt5-base \
|
||||
mingw-w64-qt5-multimedia \
|
||||
mingw-w64-qt5-tools \
|
||||
mingw-w64-qt5-winextras \
|
||||
mingw-w64-tools \
|
||||
mingw-w64-winpthreads \
|
||||
mingw-w64-zlib \
|
||||
mingw-w64-zstd \
|
||||
&& \
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /usr/share/man/ /tmp/* /var/tmp/ /usr/{i686-w64-mingw32,lib32} /usr/lib/gcc/i686-w64-mingw32 && \
|
||||
mkdir -p /tmp/pkgs
|
||||
COPY mingw-setup.sh /tmp/pkgs
|
||||
RUN cd /tmp/pkgs && bash -e mingw-setup.sh
|
||||
|
@ -2,16 +2,8 @@
|
||||
# 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/'
|
||||
|
||||
# SDL2
|
||||
SDL2_VER='2.0.16'
|
||||
SDL2_VER='2.0.22'
|
||||
wget "https://www.libsdl.org/release/SDL2-devel-${SDL2_VER}-mingw.tar.gz"
|
||||
tar -zxf "SDL2-devel-${SDL2_VER}-mingw.tar.gz"
|
||||
cd SDL2-${SDL2_VER}/
|
||||
@ -19,10 +11,10 @@ make install-package arch=x86_64-w64-mingw32 prefix=/usr/x86_64-w64-mingw32;
|
||||
cd ..
|
||||
|
||||
# ffmpeg
|
||||
FFMPEG_VER='4.4'
|
||||
FILENAME="ffmpeg-n${FFMPEG_VER}-151-g5e61fce832-win64-gpl-shared-${FFMPEG_VER}"
|
||||
FFMPEG_VER='4.4.2'
|
||||
FILENAME="ffmpeg-n${FFMPEG_VER}-95-ga8f16d4eb4-win64-gpl-shared-${FFMPEG_VER%.*}"
|
||||
echo "Downloading ffmpeg (${FFMPEG_VER})..."
|
||||
wget -q -c "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-09-13-12-21/${FILENAME}.zip"
|
||||
wget -c "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-10-03-12-38/${FILENAME}.zip"
|
||||
7z x "${FILENAME}.zip"
|
||||
|
||||
echo "Copying ffmpeg ${FFMPEG_VER} files to sysroot..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user