You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
|
|
|
|
function error {
|
|
|
|
echo -e "\\e[31m$1\\e[39m"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# Get dependencies
|
|
|
|
"${DIRECTORY}/pkg-install" "flatpak" "$(dirname "$0")" || exit 1
|
|
|
|
|
|
|
|
#Add flathub as a source
|
|
|
|
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
|
|
|
|
|
|
#Install through flatpak
|
|
|
|
flatpak install -y flathub io.mrarm.mcpelauncher || error 'Failed to install launcher!'
|
|
|
|
|
|
|
|
#Make Desktop file
|
|
|
|
echo '[Desktop Entry]
|
|
|
|
Version=1.1
|
|
|
|
Type=Application
|
|
|
|
Name=Minecraft Bedrock Launcher
|
|
|
|
Comment=A Minecraft: Bedrock Edition
|
|
|
|
Icon=/var/lib/flatpak/exports/share/icons/hicolor/scalable/apps/io.mrarm.mcpelauncher.svg
|
|
|
|
Exec=/usr/bin/flatpak run --branch=stable --arch=arm --command=mcpelauncher-ui-qt io.mrarm.mcpelauncher
|
|
|
|
Categories=Game;' > /home/pi/.local/share/applications/minecraftbedrock.desktop
|
|
|
|
|
|
|
|
#echo 'Please please reboot your pi to finish installation'
|
|
|
|
|