commit 813d835c
Now compiles MXE instead of using prebuild binaries
Changed files
| M | mxe_basic/Dockerfile before |
| M | mxe_blockattack/Dockerfile before |
| M | mxe_boost/Dockerfile before |
diff --git a/mxe_basic/Dockerfile b/mxe_basic/Dockerfile
index 69db359..e1699b8 100644
--- a/mxe_basic/Dockerfile
+++ b/mxe_basic/Dockerfile
@@ -1,17 +1,67 @@
-FROM ubuntu:xenial
-RUN apt-get update && apt-get install -y gnupg
-#Use http://mirror.mxe.cc/
-#First add the repository and install the static gcc compiler. This ensures that everything basic is setup.
-RUN echo "deb http://pkg.mxe.cc/repos/apt xenial main" > \
- /etc/apt/sources.list.d/mxeapt.list && \
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 && \
- apt-get update && \
- apt-get install -y mxe-i686-w64-mingw32.static-gcc \
- nsis \
- zip \
- libtool
-#All packages!
-#RUN apt-get update && wget -O - http://mirror.mxe.cc/repos/apt/debian/dists/jessie/main/binary-amd64/Packages | grep Package | awk '{print $2}' | xargs apt-get install -y
+# Base image
+FROM ubuntu:24.04
-#Set the path
-env PATH /usr/lib/mxe/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+# Install necessary dependencies
+RUN apt-get update && apt-get install -y \
+ ca-certificates \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bison \
+ bzip2 \
+ flex \
+ g++ \
+ g++-multilib \
+ gettext \
+ git \
+ gperf \
+ intltool \
+ libc6-dev-i386 \
+ libgdk-pixbuf2.0-dev \
+ libltdl-dev \
+ libgl-dev \
+ libpcre3-dev \
+ libssl-dev \
+ libtool-bin \
+ libxml-parser-perl \
+ lzip \
+ make \
+ openssl \
+ p7zip-full \
+ patch \
+ perl \
+ python3 \
+ python3-mako \
+ python3-packaging \
+ python3-pkg-resources \
+ python-is-python3 \
+ ruby \
+ sed \
+ sqlite3 \
+ unzip \
+ wget \
+ xz-utils \
+ && rm -rf /var/lib/apt/lists/*
+
+# Install MXE
+WORKDIR /usr/src
+RUN git clone https://github.com/mxe/mxe.git && cd mxe && git checkout cac2c6e842ed2bce55dc9fc3b39d0aaef4fd4fff
+WORKDIR /usr/src/mxe
+
+# Install MXE toolchain with gcc and SDL2
+RUN make gcc
+
+# Set environment variables for MXE
+ENV PATH=/usr/src/mxe/usr/bin:$PATH
+
+# Create a directory for source code and build
+WORKDIR /src
+
+# Default command
+CMD ["bash"]
+
+# Build instructions:
+# docker build -t mxe-sdl2 .
+# To use the container:
+# docker run -it --rm -v $(pwd):/src mxe-sdl2 bash
diff --git a/mxe_blockattack/Dockerfile b/mxe_blockattack/Dockerfile
index 816e2dc..e1cf1df 100644
--- a/mxe_blockattack/Dockerfile
+++ b/mxe_blockattack/Dockerfile
@@ -1,30 +1,13 @@
FROM sago007/mxe_boost
RUN apt-get update && \
- apt-get install -y mxe-i686-w64-mingw32.static-sdl2 \
- mxe-i686-w64-mingw32.static-sdl2-image \
- mxe-i686-w64-mingw32.static-sdl2-mixer \
- mxe-i686-w64-mingw32.static-sdl2-ttf \
+ apt-get install -y \
docbook-to-man \
- mxe-i686-w64-mingw32.static-boost \
- mxe-i686-w64-mingw32.static-physfs \
- mxe-i686-w64-mingw32.static-jsoncpp \
libtool \
- mxe-i686-w64-mingw32.static-gettext \
- mxe-i686-w64-mingw32.static-freetype \
- mxe-i686-w64-mingw32.static-zlib \
- zip
+ zip \
+ nsis
-RUN mkdir -p /staging/deps && cd /staging/deps && curl http://icculus.org/physfs/downloads/physfs-3.0.2.tar.bz2 | tar -jx && cd physfs-3.0.2 && ls -lrt \
-&& cd /staging/deps/physfs-3.0.2 \
-&& i686-w64-mingw32.static-cmake . -DPHYSFS_BUILD_STATIC=TRUE \
- -DPHYSFS_BUILD_SHARED=FALSE \
- -DPHYSFS_INTERNAL_ZLIB=FALSE \
- -DPHYSFS_BUILD_TEST=FALSE \
--DPHYSFS_BUILD_WX_TEST=FALSE && make && make install
+RUN make sdl2 sdl2_mixer sdl2_image sdl2_ttf physfs jsoncpp gettext freetype zlib
-RUN mkdir -p /staging/deps && cd /staging/deps && curl https://files.poulsander.com/~poul19/public_files/fmt-8.1.0.tar.gz | tar -xz && cd fmt-8.1.0 && ls -lrt \
-&& cd /staging/deps/fmt-8.1.0 \
-&& i686-w64-mingw32.static-cmake . -DFMT_TEST=OFF -DFMT_INSTALL=ON -DFMT_MASTER_PROJECT=OFF && make && make install
COPY build_it.sh /
diff --git a/mxe_boost/Dockerfile b/mxe_boost/Dockerfile
index 1718da8..b25c264 100644
--- a/mxe_boost/Dockerfile
+++ b/mxe_boost/Dockerfile
@@ -1,3 +1,7 @@
FROM sago007/mxe_basic
#All packages!
-RUN apt-get update && wget -O - http://mirror.mxe.cc/repos/apt/dists/stretch/main/binary-amd64/Packages | grep Package | grep boost | awk '{print $2}' | xargs apt-get install -y
+
+WORKDIR /usr/src/mxe
+
+# Install MXE toolchain with gcc and SDL2
+RUN make boost
\ No newline at end of file