Browse Source

Fix Build

pull/42/head
TheBrokenRail 3 weeks ago
parent
commit
49f8da2a80
  1. 19
      Dockerfile
  2. 2
      media-layer/core/src/media.c
  3. 5
      media-layer/core/src/screenshot.c
  4. 4
      mods/src/chat/chat.cpp
  5. 2
      mods/src/chat/chat.h
  6. 7
      mods/src/chat/ui.c
  7. 2
      mods/src/feature/feature.h
  8. 5
      mods/src/game-mode/ui.cpp
  9. 2
      mods/src/init/init.c
  10. 2
      mods/src/init/init.h
  11. 4
      mods/src/multiplayer/multiplayer.cpp
  12. 4
      mods/src/server/server.cpp
  13. 3
      scripts/ci/Dockerfile
  14. 4
      scripts/install-dependencies.sh

19
Dockerfile

@ -3,24 +3,13 @@ FROM debian:bullseye-slim
# Install
RUN \
apt-get update && \
apt-get install -y tini sed && \
apt-get install -y tini sed patchelf qemu-user && \
apt-get --fix-broken install -y && \
rm -rf /var/lib/apt/lists/*
# Copy AppImage
# Copy
RUN mkdir /app
ADD ./out/minecraft-pi-reborn-server-*-amd64.AppImage /app
# Extract AppImage
WORKDIR /app
RUN \
sed -i '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' ./*.AppImage && \
./*.AppImage --appimage-extract && \
rm -f ./*.AppImage
# Setup AppImage
ENV OWD=/data
ENV APPDIR=/app/squashfs-root
ADD ./out/server-amd64 /app
# Setup Working Directory
RUN mkdir /data
@ -28,4 +17,4 @@ WORKDIR /data
# Setup Entrypoint
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/app/squashfs-root/AppRun"]
CMD ["/app/usr/bin/minecraft-pi-reborn-server"]

2
media-layer/core/src/media.c

@ -1,13 +1,13 @@
#include <unistd.h>
#include <SDL/SDL.h>
#include <libreborn/libreborn.h>
#ifndef MCPI_HEADLESS_MODE
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#endif
#include <libreborn/libreborn.h>
#include <media-layer/core.h>
#include <media-layer/internal.h>

5
media-layer/core/src/screenshot.c

@ -1,3 +1,6 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
// Screenshot Code Is Useless In Headless Mode
#ifndef MCPI_HEADLESS_MODE
@ -12,8 +15,6 @@
#include <FreeImage.h>
#include <GLES/gl.h>
#include <libreborn/libreborn.h>
#include <media-layer/core.h>
// Ensure Screenshots Folder Exists

4
mods/src/chat/chat.cpp

@ -1,3 +1,6 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
#include <string>
#include <cstring>
#include <cstdio>
@ -6,7 +9,6 @@
#include <pthread.h>
#endif
#include <libreborn/libreborn.h>
#include <symbols/minecraft.h>
#ifndef MCPI_SERVER_MODE
#include <media-layer/core.h>

2
mods/src/chat/chat.h

@ -1,5 +1,7 @@
#pragma once
#include <libreborn/libreborn.h>
#ifdef __cplusplus
extern "C" {
#endif

7
mods/src/chat/ui.c

@ -1,10 +1,14 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
// Chat UI Code Is Useless In Headless Mode
#ifndef MCPI_SERVER_MODE
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <string.h>
#include <libreborn/libreborn.h>
#include <media-layer/core.h>
#include "chat.h"
@ -82,4 +86,5 @@ void chat_open() {
pthread_create(&thread, NULL, chat_thread, NULL);
}
}
#endif

2
mods/src/feature/feature.h

@ -1,5 +1,7 @@
#pragma once
#include <libreborn/libreborn.h>
#ifdef __cplusplus
extern "C" {
#endif

5
mods/src/game-mode/ui.cpp

@ -1,3 +1,7 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
// Game Mode UI Code Is Useless In Headless Mode
#ifndef MCPI_SERVER_MODE
#include <pthread.h>
@ -6,7 +10,6 @@
#include <string>
#include <stdexcept>
#include <libreborn/libreborn.h>
#include <symbols/minecraft.h>
#include <media-layer/core.h>

2
mods/src/init/init.c

@ -1,3 +1,5 @@
#include <libreborn/libreborn.h>
#include "init.h"
#include <media-layer/core.h>

2
mods/src/init/init.h

@ -1,5 +1,7 @@
#pragma once
#include <libreborn/libreborn.h>
#ifdef __cplusplus
extern "C" {
#endif

4
mods/src/multiplayer/multiplayer.cpp

@ -1,3 +1,6 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
#ifdef MCPI_SERVER_MODE
#error "External Server Code Requires Client Mode"
#endif
@ -7,7 +10,6 @@
#include <string>
#include <vector>
#include <libreborn/libreborn.h>
#include <symbols/minecraft.h>
#include "../home/home.h"

4
mods/src/server/server.cpp

@ -1,3 +1,6 @@
// Config Needs To Load First
#include <libreborn/libreborn.h>
#ifndef MCPI_SERVER_MODE
#error "Server Code Requires Server Mode"
#endif
@ -16,7 +19,6 @@
#include <SDL/SDL.h>
#include <libreborn/libreborn.h>
#include <symbols/minecraft.h>
#include "server_properties.h"

3
scripts/ci/Dockerfile

@ -1,8 +1,5 @@
FROM buildpack-deps:bullseye
# Setup
ENV ARM_PACKAGES_SUPPORTED=1
# Install
ADD ./scripts/install-dependencies.sh /
RUN \

4
scripts/install-dependencies.sh

@ -76,10 +76,10 @@ run() {
desktop-file-utils \
libgdk-pixbuf2.0-dev \
fakeroot \
strace \
fuse \
gtk-update-icon-cache \
shared-mime-info \
squashfs-tools \
zsync \
sed
# Install Queue

Loading…
Cancel
Save