Botspot / pi-apps

Raspberry Pi App Store for Open Source Projects
GNU General Public License v3.0
1.96k stars 202 forks source link

Installer: Minecraft Pi Server #2514

Closed NoozAbooz closed 2 months ago

NoozAbooz commented 9 months ago

What is the name of the app?

Minecraft Pi Server

(Optional) Where is the app hosted?

https://github.com/NoozAbooz/mcpi-reborn-extended

About the app

Dedicated server for MCPI. Continuation of #2437 since Botspot gave the go-ahead.

Upload file or Add PR Link

Minecraft Pi Server.zip

Confirmations

github-actions[bot] commented 9 months ago

A zipfile was found in the body of your issue. The sha1sum of the zip was: 981ecd40b2d4c4958cccb2373ee3734b5cb38493

Click to show contents preview `Minecraft Pi Server/install` ```bash #!/bin/bash # https://github.com/raspberrypi/bookworm-feedback/issues/107 PAGE_SIZE="$(getconf PAGE_SIZE)" if [[ "$PAGE_SIZE" == "16384" ]]; then #switch to 4K pagesize kernel if [ -f /boot/config.txt ]; then text="Raspberry Pi 5 PiOS images ship by default with a 16K PageSize Linux Kernel. This kernel causes incompatibilities with some software including MCPI-Reborn https://github.com/raspberrypi/bookworm-feedback/issues/107 Would you like to automatically switch to a 4K PageSize Linux Kernel?" userinput_func "$text" "No, keep 16K PageSize Kernel and Exit" "Yes, switch to 4K PageSize Kernel" if [ "$output" == "No, keep 16K PageSize Kernel and Exit" ]; then error "User error: Your current running kernel is built with 16K PageSize and is incompatible with MCPI-Reborn. You must switch to a 4K PageSize kernel (and chose to not do so automatically) before installing MCPI-Reborn." fi echo "" | sudo tee --append /boot/config.txt >/dev/null echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the Minecraft Pi app again." sleep infinity else error "User error (reporting allowed): Your current running kernel is built with 16K PageSize and is incompatible with Minecraft Pi. Changing kernels automatically cannot be done since no /boot/config.txt file was found." fi fi # Version version=2.5.3-1 # Install if [ "${arch}" = "64" ]; then url_arch=arm64 else url_arch=armhf fi url="https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-${version}-${url_arch}.AppImage" # Cleanup Old Script Versions sudo rm -f /etc/apt/trusted.gpg.d/mcpi-revival.gpg sudo rm -f /etc/apt/sources.list.d/mcpi-revival.list if package_installed minecraft-pi-reborn-server ;then apt_lock_wait sudo apt-get remove -y minecraft-pi-reborn-server fi # Download file mkdir -p ~/.local/mcpi-server || error "Could not make directory" wget -O ~/.local/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage "${url}" || error 'Failed to download AppImage' chmod +x ~/.local/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage enable_module fuse || exit 1 # Make Desktop file mkdir -p ~/.local/share/applications || error "Could not make directory" echo "[Desktop Entry] Name=Minecraft Pi Server Comment=Self-hosted multiplayer server for Minecraft Pi Icon=$(dirname "$0")/icon-64.png StartupNotify=false Exec=${HOME}/.local/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage Path=${HOME}/.local/mcpi-server/ Terminal=true Type=Application Categories=Game;" > ~/.local/share/applications/com.nooz.MCPIRebornExtendedServer.desktop status_green "You might want to copy this down: To run: Menu -> Games -> Minecraft Pi Server - OR 'cd ~/.local/mcpi-server/ && ./com.nooz.MCPIRebornExtendedServer.AppImage' Access your world files and configurations at '~/.local/mcpi-server/' " ``` `Minecraft Pi Server/credits` ``` MCPI++ made by Nooz: https://github.com/NoozAbooz/ Ported to Pi-Apps by https://www.youtube.com/@oldspiceman2583 with modifications from Nooz ``` `Minecraft Pi Server/website` ``` https://github.com/NoozAbooz/mcpi-reborn-extended ``` `Minecraft Pi Server/description` ``` A modded dedicated server for Minecraft: Pi Edition modified to run in a headless environment. To run: Menu -> Games -> Minecraft Pi Server Access your world files and configurations at '~/.local/mcpi-server/' Need help? Consider asking for support at https://discord.gg/XJJNG9jTuh Notes: - The server supports both vanilla and modded MCPI clients, but unmodded clients are INCOMPATIBLE if the server is in survival mode. - Player inventories are not saved ``` `Minecraft Pi Server/uninstall` ```bash #!/bin/bash rm -rf ~/.local/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage ~/.local/share/applications/com.nooz.MCPIRebornExtendedServer.desktop status "The server binary has been deleted, but your world data is still located at '${HOME}/.local/mcpi-server/'" ```
NoozAbooz commented 9 months ago

This is currently untested FYI. I noticed in the OG pr that Botspot wanted to save files to /usr/share, but I decided to make the installer align with the formatting of the existing MCPI Client app.

theofficialgman commented 9 months ago

I noticed in the OG pr that Botspot wanted to save files to /usr/share

Yes we would like that. We are slowly trying to migrate all install scripts to perform global installation.

github-actions[bot] commented 9 months ago

A zipfile was found in the body of your issue. The sha1sum of the zip was: 58a7d39be75dd90d5c56e3661049b8fffb2f10c8

Click to show contents preview `Minecraft Pi Server/install` ```bash #!/bin/bash # https://github.com/raspberrypi/bookworm-feedback/issues/107 PAGE_SIZE="$(getconf PAGE_SIZE)" if [[ "$PAGE_SIZE" == "16384" ]]; then #switch to 4K pagesize kernel if [ -f /boot/config.txt ]; then text="Raspberry Pi 5 PiOS images ship by default with a 16K PageSize Linux Kernel. This kernel causes incompatibilities with some software including MCPI-Reborn https://github.com/raspberrypi/bookworm-feedback/issues/107 Would you like to automatically switch to a 4K PageSize Linux Kernel?" userinput_func "$text" "No, keep 16K PageSize Kernel and Exit" "Yes, switch to 4K PageSize Kernel" if [ "$output" == "No, keep 16K PageSize Kernel and Exit" ]; then error "User error: Your current running kernel is built with 16K PageSize and is incompatible with MCPI-Reborn. You must switch to a 4K PageSize kernel (and chose to not do so automatically) before installing MCPI-Reborn." fi echo "" | sudo tee --append /boot/config.txt >/dev/null echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the Minecraft Pi app again." sleep infinity else error "User error (reporting allowed): Your current running kernel is built with 16K PageSize and is incompatible with Minecraft Pi. Changing kernels automatically cannot be done since no /boot/config.txt file was found." fi fi # Version version=2.5.3-1 # Install if [ "${arch}" = "64" ]; then url_arch=arm64 else url_arch=armhf fi url="https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-${version}-${url_arch}.AppImage" # Cleanup Old Script Versions sudo rm -f /etc/apt/trusted.gpg.d/mcpi-revival.gpg sudo rm -f /etc/apt/sources.list.d/mcpi-revival.list if package_installed minecraft-pi-reborn-server ;then apt_lock_wait sudo apt-get remove -y minecraft-pi-reborn-server fi # Download file sudo mkdir -p /usr/share/mcpi-server || error "Could not make directory" sudo wget -O /usr/share/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage "${url}" || error 'Failed to download AppImage' sudo chmod +x /usr/share/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage enable_module fuse || exit 1 # Make Desktop file sudo mkdir -p /usr/share/applications || error "Could not make directory" echo "[Desktop Entry] Name=Minecraft Pi Server Comment=Self-hosted multiplayer server for Minecraft Pi Icon=$(dirname "$0")/icon-64.png StartupNotify=false Exec=/usr/share/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage Path=/usr/share/mcpi-server/ Terminal=true Type=Application Categories=Game;" | sudo tee /usr/share/applications/com.nooz.MCPIRebornExtendedServer.desktop status_green "You might want to copy this down: To run: Menu -> Games -> Minecraft Pi Server - OR 'cd /usr/share/mcpi-server/ && ./com.nooz.MCPIRebornExtendedServer.AppImage' Access your world files and configurations at '/usr/share/mcpi-server/' The server will be accessable on port '19132'. You must forward this port in your router to allow connections from outside your network. Inside the server console, run 'help' for a list of possible commands. " ``` `Minecraft Pi Server/credits` ``` MCPI++ made by Nooz: https://github.com/NoozAbooz/ Ported to Pi-Apps by https://www.youtube.com/@oldspiceman2583 with modifications from Nooz ``` `Minecraft Pi Server/website` ``` https://github.com/NoozAbooz/mcpi-reborn-extended ``` `Minecraft Pi Server/description` ``` A modded dedicated server for Minecraft: Pi Edition modified to run in a headless environment. To run: Menu -> Games -> Minecraft Pi Server Access your world files and configurations at '/usr/share/mcpi-server/'. You can modify server.properties to change basic settings. The server will be accessable on port '19132'. You must forward this port in your router to allow connections from outside your network. Inside the server console, run 'help' for a list of possible commands. Need help? Consider asking for support at https://discord.gg/XJJNG9jTuh Notes: - The server supports both vanilla and modded MCPI clients, but unmodded clients are INCOMPATIBLE if the server is in survival mode. - Player inventories are not saved ``` `Minecraft Pi Server/uninstall` ```bash #!/bin/bash sudo rm -rf /usr/share/mcpi-server/com.nooz.MCPIRebornExtendedServer.AppImage /usr/share/applications/com.nooz.MCPIRebornExtendedServer.desktop status "The server binary has been deleted, but your world data is still located at '/usr/share/mcpi-server/'" ```
theofficialgman commented 9 months ago

@NoozAbooz Please explain in clear terms what benefits your packages offer over TheBrokenRail's minecraft-pi-reborn . To an outsider (like me) all I see is that you package as a deb the work of TheBrokenRail that officially packages as an appimage and flatpak

NoozAbooz commented 9 months ago

@NoozAbooz Please explain in clear terms what benefits your packages offer over TheBrokenRail's minecraft-pi-reborn . To an outsider (like me) all I see is that you package as a deb the work of TheBrokenRail that officially packages as an appimage and flatpak

There's a few QoL changes listed in the readme: https://github.com/NoozAbooz/mcpi-reborn-extended?tab=readme-ov-file#feature-list-in-order-of-awesomeness. For the server software, the only major change is that it fixes an issue with playing on older world files causing disappearing blocks: https://github.com/NoozAbooz/mcpi-reborn-extended/issues/39.

I only kept the download link to my repo since the original author in #2437 used it. Let me know if you want it changed to TBR's server software.

theofficialgman commented 9 months ago

There's a few QoL changes listed in the readme: https://github.com/NoozAbooz/mcpi-reborn-extended?tab=readme-ov-file#feature-list-in-order-of-awesomeness.

I have read the readme already. It does not describe the changes that have been made in ADDITION to those already included in TheBrokenRail's software. I am not interested in the full list of changes in reference to the ORIGINAL Minecraft Pi Edition

NoozAbooz commented 9 months ago

There's a few QoL changes listed in the readme: https://github.com/NoozAbooz/mcpi-reborn-extended?tab=readme-ov-file#feature-list-in-order-of-awesomeness.

I have read the readme already. It does not describe the changes that have been made in ADDITION to those already included in TheBrokenRail's software. I am not interested in the full list of changes in reference to the ORIGINAL Minecraft Pi Edition

Sorry, I should have made some of them more detailed. All of these are additions on top of reborn.

Add [even more] missing items to creative inventory (full set of armour, all food types, etc) Sprinting via Ctrl key Optifine-like zoom feature via C key Modern 1.14+ Jappa textures from BasedSkeleton Longer chat message length limit (512 characters) Longer username length limit (32 characters) Add [more] item names to hidden items Sneaking via both the Shift and Alt keys A custom "Cursed Chest" block for debugging Ability to look around via arrow keys instead of mouse (useful if mouse is glitched) Ability to also use Vim keybindings for movement (hjkl)

Of course though, these are not relevant to the current submission since they are the client modifications. Here's another version of the installer downloading from TBR's version if you want to use that instead. The icon is the same as the MCPI app. Minecraft Pi Server.zip

github-actions[bot] commented 9 months ago

A zipfile was found in the body of an issue comment. The sha1sum of the zip was: 8a95d208742376902c97c4ec3682633979556a23

Click to show contents preview `Minecraft Pi Server/install` ```bash #!/bin/bash # https://github.com/raspberrypi/bookworm-feedback/issues/107 PAGE_SIZE="$(getconf PAGE_SIZE)" if [[ "$PAGE_SIZE" == "16384" ]]; then #switch to 4K pagesize kernel if [ -f /boot/config.txt ]; then text="Raspberry Pi 5 PiOS images ship by default with a 16K PageSize Linux Kernel. This kernel causes incompatibilities with some software including MCPI-Reborn https://github.com/raspberrypi/bookworm-feedback/issues/107 Would you like to automatically switch to a 4K PageSize Linux Kernel?" userinput_func "$text" "No, keep 16K PageSize Kernel and Exit" "Yes, switch to 4K PageSize Kernel" if [ "$output" == "No, keep 16K PageSize Kernel and Exit" ]; then error "User error: Your current running kernel is built with 16K PageSize and is incompatible with MCPI-Reborn. You must switch to a 4K PageSize kernel (and chose to not do so automatically) before installing MCPI-Reborn." fi echo "" | sudo tee --append /boot/config.txt >/dev/null echo "[pi5]" | sudo tee --append /boot/config.txt >/dev/null echo "kernel=kernel8.img" | sudo tee --append /boot/config.txt >/dev/null echo -e "The 4K PageSize Kernel has been enabled by adding 'kernel=kernel8.img' to /boot/config.txt\nPlease reboot and install the Minecraft Pi app again." sleep infinity else error "User error (reporting allowed): Your current running kernel is built with 16K PageSize and is incompatible with Minecraft Pi. Changing kernels automatically cannot be done since no /boot/config.txt file was found." fi fi # Version version=2.5.3 # Install if [ "${arch}" = "64" ]; then url_arch=arm64 else url_arch=armhf fi url="https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/releases/download/${version}/minecraft-pi-reborn-server-${version}-${url_arch}.AppImage" # Cleanup Old Script Versions sudo rm -f /etc/apt/trusted.gpg.d/mcpi-revival.gpg sudo rm -f /etc/apt/sources.list.d/mcpi-revival.list if package_installed minecraft-pi-reborn-server ;then apt_lock_wait sudo apt-get remove -y minecraft-pi-reborn-server fi # Download file sudo mkdir -p /usr/share/mcpi-server || error "Could not make directory" sudo wget -O /usr/share/mcpi-server/com.thebrokenrail.MCPIRebornServer.AppImage "${url}" || error 'Failed to download AppImage' sudo chmod +x /usr/share/mcpi-server/com.thebrokenrail.MCPIRebornServer.AppImage enable_module fuse || exit 1 # Make Desktop file sudo mkdir -p /usr/share/applications || error "Could not make directory" echo "[Desktop Entry] Name=Minecraft Pi Server Comment=Self-hosted multiplayer server for Minecraft Pi Icon=$(dirname "$0")/icon-64.png StartupNotify=false Exec=/usr/share/mcpi-server/com.thebrokenrail.MCPIRebornServer.AppImage Path=/usr/share/mcpi-server/ Terminal=true Type=Application Categories=Game;" | sudo tee /usr/share/applications/com.thebrokenrail.MCPIRebornServer.desktop status_green "You might want to copy this down: To run: Menu -> Games -> Minecraft Pi Server - OR 'cd /usr/share/mcpi-server/ && ./com.thebrokenrail.MCPIRebornServer.AppImage' Access your world files and configurations at '/usr/share/mcpi-server/' The server will be accessable on port '19132'. You must forward this port in your router to allow connections from outside your network. Inside the server console, run 'help' for a list of possible commands. " ``` `Minecraft Pi Server/credits` ``` MCPI++ made by Nooz: https://github.com/NoozAbooz/ Ported to Pi-Apps by https://www.youtube.com/@oldspiceman2583 with modifications from Nooz ``` `Minecraft Pi Server/website` ``` https://discord.com/invite/aDqejQGMMy ``` `Minecraft Pi Server/description` ``` A modded dedicated server for Minecraft: Pi Edition modified to run in a headless environment. To run: Menu -> Games -> Minecraft Pi Server Access your world files and configurations at '/usr/share/mcpi-server/'. You can modify server.properties to change basic settings. The server will be accessable on port '19132'. You must forward this port in your router to allow connections from outside your network. Inside the server console, run 'help' for a list of possible commands. Need help? Consider asking for support at https://discord.com/invite/aDqejQGMMy Notes: - The server supports both vanilla and modded MCPI clients, but unmodded clients are INCOMPATIBLE if the server is in survival mode. - Player inventories are not saved ``` `Minecraft Pi Server/uninstall` ```bash #!/bin/bash sudo rm -rf /usr/share/mcpi-server/com.thebrokenrail.MCPIRebornServer.AppImage /usr/share/applications/com.thebrokenrail.MCPIRebornServer.desktop status "The server binary has been deleted, but your world data is still located at '/usr/share/mcpi-server/'" ```
theofficialgman commented 8 months ago

@NoozAbooz I am currently leaning towards TBR's version to match the current client available via pi-apps already.

In your personal opinion do you see any reason that a user would want to have both TBR's and your version installed? I am considering having both in pi-apps and am debating whether they should be separate apps or one app where a userinput prompt asks the user which one they would like to install. If we choose to do separate apps I think we need to rename the current application to better describe what it is. My current thinking of the following names to actually match the project names.

for the clients: Minecraft Pi Reborn Minecraft Pi Reborn Extended

for the servers: Minecraft Pi Reborn Server Minecraft Pi Reborn Extended Server

additionally I will add a subfolder Games/Minecraft Pi that these will reside in so it does not increase the length of the Games folder.

NoozAbooz commented 8 months ago

Unless it's a MCPI dev, most users shouldn't have two versions installed at once. The naming seems fine, though it seems a little long. MInecraft Pi Reborn++/Minecraft Pi Reborn++ Server could also work as an alternative if you would like.

TheBrokenRail commented 3 months ago

In the upcoming MCPI-Reborn v3.0.0, the client and server builds have been unified. Running the dedicated server will only require running MCPI-Reborn with --server.

theofficialgman commented 2 months ago

closing as waiting for upstream release where support for this will be automatic