From 7e8a74d1b2bd26460b397f27c764aa5e8d3872b7 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Wed, 11 Nov 2020 10:22:14 -0500 Subject: [PATCH] Comment Dockerfile --- Dockerfile.client | 8 ++++++++ mods/src/compat.c | 2 +- mods/src/time.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile.client b/Dockerfile.client index 27d0b5d67..9d1acca9c 100644 --- a/Dockerfile.client +++ b/Dockerfile.client @@ -1,24 +1,32 @@ FROM arm64v8/debian:bullseye +# Add ARM 32Bit RUN dpkg --add-architecture armhf +# Install Dependencies RUN \ apt-get update && \ apt-get dist-upgrade -y && \ apt-get install -y libglvnd-dev:armhf libsdl1.2-dev:armhf libx11-dev:armhf build-essential zlib1g-dev:armhf git cmake curl gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libfreeimage-dev:armhf libglfw3-dev:armhf xinput:armhf libxfixes-dev:armhf +# Setup GLES Location RUN ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 /usr/lib/libGLESv2.so +# Add Build Scripts ADD ./build /app/build WORKDIR /app +# Download MCPI RUN ./build/download-minecraft-pi.sh +# Build LibPNG12 RUN ./build/build-libpng12.sh +# Add Code ADD . /app +# Build Mods RUN ./build/build-mods.sh WORKDIR ./minecraft-pi diff --git a/mods/src/compat.c b/mods/src/compat.c index 46afe87fb..6e98fcf3f 100644 --- a/mods/src/compat.c +++ b/mods/src/compat.c @@ -471,4 +471,4 @@ __attribute__((constructor)) static void init() { is_server = mode == 2; // Video is Handled By GLFW Not SDL setenv("SDL_VIDEODRIVER", "dummy", 1); -} +} \ No newline at end of file diff --git a/mods/src/time.c b/mods/src/time.c index 9d93bf1f7..4f0fdd2bb 100644 --- a/mods/src/time.c +++ b/mods/src/time.c @@ -4,7 +4,7 @@ // Replace gettimeofday() With clock_gettime() int gettimeofday(struct timeval *tv, __attribute__((unused)) void *tz) { struct timespec tp; - int ret = clock_gettime(CLOCK_MONOTONIC, &tp); + int ret = clock_gettime(CLOCK_MONOTONIC_COARSE, &tp); tv->tv_sec = tp.tv_sec; tv->tv_usec = tp.tv_nsec * 0.001; return ret;