Build Fixes + Don't Force EGL

This commit is contained in:
TheBrokenRail 2022-07-11 18:30:49 -04:00
parent 68519f06fd
commit 968001897d
4 changed files with 26 additions and 7 deletions

View File

@ -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_MAJOR, 1);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
#endif #endif
// Use EGL
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
// Extra Settings // Extra Settings
glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE); glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE);
glfwWindowHint(GLFW_ALPHA_BITS, 0); // Fix Transparent Window On Wayland glfwWindowHint(GLFW_ALPHA_BITS, 0); // Fix Transparent Window On Wayland

View File

@ -6,4 +6,4 @@ set -e
docker build -f scripts/ci/Dockerfile -t minecraft-pi-reborn-build . docker build -f scripts/ci/Dockerfile -t minecraft-pi-reborn-build .
# Run # 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

View File

@ -13,6 +13,9 @@ run() {
sudo apt-get update sudo apt-get update
sudo apt-get dist-upgrade -y sudo apt-get dist-upgrade -y
# Architecture Detection
sudo apt-get install --no-install-recommends -y dpkg-dev
# Install Everything In One Go # Install Everything In One Go
PKG_QUEUE='' PKG_QUEUE=''
queue_pkg() { queue_pkg() {
@ -23,8 +26,7 @@ run() {
queue_pkg \ queue_pkg \
git \ git \
cmake \ cmake \
ninja-build \ ninja-build
dpkg-dev
# Host Dependencies Needed For Compile # Host Dependencies Needed For Compile
queue_pkg \ queue_pkg \
@ -38,8 +40,22 @@ run() {
# Architecture-Specific Dependencies # Architecture-Specific Dependencies
architecture_specific_pkg() { architecture_specific_pkg() {
# Compiler # Compiler
queue_pkg \ if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "$1" ]; then
crossbuild-essential-$1 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 # Dependencies
queue_pkg \ queue_pkg \
@ -65,6 +81,10 @@ run() {
architecture_specific_pkg "${arch}" architecture_specific_pkg "${arch}"
done done
# AppStream Verification
queue_pkg \
appstream
# Install Queue # Install Queue
sudo apt-get install --no-install-recommends -y ${PKG_QUEUE} sudo apt-get install --no-install-recommends -y ${PKG_QUEUE}

View File

@ -27,4 +27,5 @@ cd ../../
export PATH="$(pwd)/out/client-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}" export PATH="$(pwd)/out/client-$(dpkg-architecture -qDEB_BUILD_ARCH)/usr/bin:${PATH}"
# Run Benchmark # Run Benchmark
export HOME="$(pwd)/build/test"
minecraft-pi-reborn-client --default --benchmark minecraft-pi-reborn-client --default --benchmark