-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installer: Minecraft Pi Server #2514
Comments
A zipfile was found in the body of your issue. Click to show contents preview
#!/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/'
"
#!/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/'" |
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. |
Yes we would like that. We are slowly trying to migrate all install scripts to perform global installation. |
A zipfile was found in the body of your issue. Click to show contents preview
#!/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.
"
#!/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/'" |
@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: NoozAbooz/mcpi-reborn-extended#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. |
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) 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. |
A zipfile was found in the body of an issue comment. Click to show contents preview
#!/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.
"
#!/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/'" |
@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: for the servers: additionally I will add a subfolder |
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. |
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 |
closing as waiting for upstream release where support for this will be automatic |
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
The text was updated successfully, but these errors were encountered: