From 968001897d444f97df4d3a511b5a9e9410dbea63 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Mon, 11 Jul 2022 18:30:49 -0400 Subject: [PATCH] Build Fixes + Don't Force EGL --- media-layer/core/src/media.c | 2 -- scripts/ci/simulate.sh | 2 +- scripts/install-dependencies.sh | 28 ++++++++++++++++++++++++---- scripts/test.sh | 1 + 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/media-layer/core/src/media.c b/media-layer/core/src/media.c index c4f98cd..9c49681 100644 --- a/media-layer/core/src/media.c +++ b/media-layer/core/src/media.c @@ -273,8 +273,6 @@ void SDL_WM_SetCaption(const char *title, __attribute__((unused)) const char *ic glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 1); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); #endif - // Use EGL - glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); // Extra Settings glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE); glfwWindowHint(GLFW_ALPHA_BITS, 0); // Fix Transparent Window On Wayland diff --git a/scripts/ci/simulate.sh b/scripts/ci/simulate.sh index f1e8fa6..957134b 100755 --- a/scripts/ci/simulate.sh +++ b/scripts/ci/simulate.sh @@ -6,4 +6,4 @@ set -e docker build -f scripts/ci/Dockerfile -t minecraft-pi-reborn-build . # Run -docker run --rm -v "$(pwd):/data" -w '/data' -u '1000:1000' minecraft-pi-reborn-build ./scripts/ci/run.sh +docker run --rm -v "$(pwd):/data" -w '/data' -u "$(id -u):$(id -g)" minecraft-pi-reborn-build ./scripts/ci/run.sh diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 16bcc20..6978ecf 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -13,6 +13,9 @@ run() { sudo apt-get update sudo apt-get dist-upgrade -y + # Architecture Detection + sudo apt-get install --no-install-recommends -y dpkg-dev + # Install Everything In One Go PKG_QUEUE='' queue_pkg() { @@ -23,8 +26,7 @@ run() { queue_pkg \ git \ cmake \ - ninja-build \ - dpkg-dev + ninja-build # Host Dependencies Needed For Compile queue_pkg \ @@ -38,8 +40,22 @@ run() { # Architecture-Specific Dependencies architecture_specific_pkg() { # Compiler - queue_pkg \ - crossbuild-essential-$1 + if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "$1" ]; then + queue_pkg \ + gcc \ + g++ + else + case "$1" in + 'armhf') GCC_TARGET='arm-linux-gnueabihf';; + 'arm64') GCC_TARGET='aarch64-linux-gnu';; + 'i386') GCC_TARGET='i686-linux-gnu';; + 'amd64') GCC_TARGET='x86-64-linux-gnu';; + esac + queue_pkg \ + "gcc-${GCC_TARGET}" \ + libc6-dev-$1-cross \ + "g++-${GCC_TARGET}" + fi # Dependencies queue_pkg \ @@ -65,6 +81,10 @@ run() { architecture_specific_pkg "${arch}" done + # AppStream Verification + queue_pkg \ + appstream + # Install Queue sudo apt-get install --no-install-recommends -y ${PKG_QUEUE} diff --git a/scripts/test.sh b/scripts/test.sh index b269a55..b11da7b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -27,4 +27,5 @@ cd ../../ export PATH="$(pwd)/out/client-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}" # Run Benchmark +export HOME="$(pwd)/build/test" minecraft-pi-reborn-client --default --benchmark