From 2cc4c4f62ba295fb06f1f050cf82cc220d960932 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:33:11 -0500 Subject: [PATCH] Minecraft Bedrock: use bookworm appimages where possible check libc6 package version and use bookworm image if greater than or equal to 2.36 (bookworm+/lunar+) resolves https://github.com/Botspot/pi-apps/issues/2463 --- apps/Minecraft Bedrock/install-32 | 8 ++++++-- apps/Minecraft Bedrock/install-64 | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/Minecraft Bedrock/install-32 b/apps/Minecraft Bedrock/install-32 index 7070a0dc64..041b697e00 100755 --- a/apps/Minecraft Bedrock/install-32 +++ b/apps/Minecraft Bedrock/install-32 @@ -1,11 +1,15 @@ #!/bin/bash # Get dependencies -install_packages curl libx11-6 libxext6 libegl1 zlib1g libstdc++6 libgl1-mesa-dri libasound2 libcom-err2 libgmp10 libp11-kit0 || exit 1 +install_packages libx11-6 libxext6 libegl1 zlib1g libstdc++6 libgl1-mesa-dri libasound2 libcom-err2 libgmp10 libp11-kit0 || exit 1 #Download file mkdir -p ~/.local/bin || error "Could not make directory" -wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.10.0-716/Minecraft_Bedrock_Launcher-armhf-v0.10.0.716.AppImage' || error "failed to download Minecraft Bedrock Launcher" +if package_is_new_enough libc6 2.36 ;then + wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.12.1-763/Minecraft_Bedrock_Launcher-bookworm-armhf-v0.12.1.763.AppImage' || error "failed to download Minecraft Bedrock Launcher" +else + wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.12.1-763/Minecraft_Bedrock_Launcher-armhf-v0.12.1.763.AppImage' || error "failed to download Minecraft Bedrock Launcher" +fi chmod +x ~/.local/bin/MCBedrock.AppImage enable_module fuse || exit 1 diff --git a/apps/Minecraft Bedrock/install-64 b/apps/Minecraft Bedrock/install-64 index 8e3e75a40e..e432a9f34d 100755 --- a/apps/Minecraft Bedrock/install-64 +++ b/apps/Minecraft Bedrock/install-64 @@ -5,12 +5,16 @@ get_model &>/dev/null if [[ -z "$jetson_model" ]]; then sudo dpkg --add-architecture armhf - install_packages curl libx11-6:armhf libxext6:armhf libegl1:armhf zlib1g:armhf libstdc++6:armhf libgl1-mesa-dri:armhf libasound2:armhf libpulse0:armhf libcom-err2:armhf libgmp10:armhf libp11-kit0:armhf libsystemd0:armhf || exit 1 + install_packages libx11-6:armhf libxext6:armhf libegl1:armhf zlib1g:armhf libstdc++6:armhf libgl1-mesa-dri:armhf libasound2:armhf libpulse0:armhf libcom-err2:armhf libgmp10:armhf libp11-kit0:armhf libsystemd0:armhf || exit 1 fi #Download file mkdir -p ~/.local/bin || error "Could not make directory" -wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.10.0-716/Minecraft_Bedrock_Launcher-arm64-v0.10.0.716.AppImage' || error "failed to download Minecraft Bedrock Launcher" +if package_is_new_enough libc6 2.36 ;then + wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.12.1-763/Minecraft_Bedrock_Launcher-bookworm-arm64-v0.12.1.763.AppImage' || error "failed to download Minecraft Bedrock Launcher" +else + wget -O ~/.local/bin/MCBedrock.AppImage 'https://github.com/minecraft-linux/appimage-builder/releases/download/v0.12.1-763/Minecraft_Bedrock_Launcher-arm64-v0.12.1.763.AppImage' || error "failed to download Minecraft Bedrock Launcher" +fi chmod +x ~/.local/bin/MCBedrock.AppImage enable_module fuse || exit 1