diff --git a/Dockerfile.client b/Dockerfile.client index 27d0b5d6..9d1acca9 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 46afe87f..6e98fcf3 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 9d93bf1f..4f0fdd2b 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;