Comment Dockerfile

This commit is contained in:
TheBrokenRail 2020-11-11 10:22:14 -05:00
parent c0b5026221
commit 7e8a74d1b2
3 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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;