Created
July 6, 2024 17:39
-
-
Save ybkimm/837e26a8f3d6b6ce99fff9523629d8ee to your computer and use it in GitHub Desktop.
Build wine via Docker to avoid make system more bloated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yes, I'm using Ubuntu Desktop. it's ALREADY bloated... | |
# If you prefer other OS, i think that's totally okay | |
FROM ubuntu:noble | |
# Install dependencies, both 32-bit and 64-bit | |
# https://wiki.winehq.org/Building_Wine#Satisfying_Build_Dependencies | |
RUN dpkg --add-architecture i386 && \ | |
apt-get update && \ | |
apt-get install -y \ | |
make \ | |
git \ | |
mingw-w64 \ | |
gcc \ | |
g++ \ | |
gcc-multilib \ | |
g++-multilib \ | |
flex \ | |
bison \ | |
gettext \ | |
xorg-dev \ | |
libxext-dev:i386 \ | |
libfreetype-dev:i386 \ | |
libxcursor-dev:i386 \ | |
libxi-dev:i386 \ | |
libxrandr-dev:i386 \ | |
libxcomposite-dev:i386 \ | |
libxxf86vm-dev:i386 \ | |
libosmesa-dev:i386 \ | |
libpcsclite-dev:i386 \ | |
libpulse-dev:i386 \ | |
libudev-dev:i386 \ | |
libgl-dev:i386 \ | |
libvulkan-dev:i386 \ | |
libfontconfig-dev:i386 \ | |
libsdl2-dev:i386 \ | |
libv4l-dev:i386 \ | |
libgstreamer1.0-dev:i386 \ | |
libgstreamer-plugins-base1.0-dev:i386 \ | |
libgnutls28-dev:i386 \ | |
libunwind-dev:i386 \ | |
libxfixes-dev:i386 \ | |
opencl-dev:i386 \ | |
libxext-dev \ | |
libfreetype-dev \ | |
libxcursor-dev \ | |
libxi-dev \ | |
libxrandr-dev \ | |
libxcomposite-dev \ | |
libxxf86vm-dev \ | |
libosmesa-dev \ | |
libpcsclite-dev \ | |
libpulse-dev \ | |
libudev-dev \ | |
libgl-dev \ | |
libvulkan-dev \ | |
libfontconfig-dev \ | |
libsdl2-dev \ | |
libv4l-dev \ | |
libgnutls28-dev \ | |
libunwind-dev \ | |
libxfixes-dev \ | |
opencl-dev | |
# I'm using forked version of wine | |
RUN git clone --depth 1 https://gitlab.winehq.org/ElementalWarrior/wine.git /src | |
RUN mkdir -p /src/build/install | |
# Build 64-bit version first | |
RUN mkdir -p /src/build/wine64 && \ | |
cd /src/build/wine64 && \ | |
/src/configure --enable-wine64 --prefix=/src/build/install && \ | |
make -j$(nproc) | |
# ... and 32-bit | |
RUN mkdir -p /src/build/wine32 && \ | |
cd /src/build/wine32 && \ | |
/src/configure --with-wine64=../wine64 --prefix=/src/build/install && \ | |
make -j$(nproc) | |
RUN cd /src/build/wine32 && \ | |
make install && \ | |
cd /src/build/wine64 && \ | |
make install | |
CMD ["/bin/bash", "-c", "cp -r /src/build/install/* /out/"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment