Open kidmakesreal opened 10 months ago
A zipfile was found in the body of an issue comment. The sha1sum of the zip was: 1a028a974ff2d4844c4cd8c53a99a5db1024eca9
I've fixed all the previous problems with my scripts
pi-apps prefers global installation of applications when possible. please refer to many other scripts that install globally
#download server
wget -O server.AppImage https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-2.4.8-arm64.AppImage || error "failed to download server"
correct URL to use version variable in appimage
also please stop closing and opening new issues. that is unnecessary
if you want the github actions automated preview of the zipfile to change (instead of getting a new comment made), you can edit the body of the initial post to use your new zip
also please stop closing and opening new issues. that is unnecessary
if you want the github actions automated preview of the zipfile to change (instead of getting a new comment made), you can edit the body of the initial post to use your new zip
sorry i didn't know you could do that im new to github
pi-apps prefers global installation of applications when possible. please refer to many other scripts that install globally
#download server wget -O server.AppImage https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-2.4.8-arm64.AppImage || error "failed to download server"
correct URL to use version variable in appimage
alright i fixed the url it should be good to go now
again, there are still multiple issues. the use of apt directly inside of scripts is banned for almost all cases (refer again to our official script writing wiki linked to you before). also we prefer that global installations be done when possible (which is the case here) so you need to change to doing that.
the use of apt directly inside of scripts is banned for almost all cases (refer again to our official script writing wiki linked to you before). also we prefer that global installations be done when possible (which is the case here) so you need to change to doing that.
what do you mean by that?
local to the current user: ~
, $HOME
, /home/$USER
. Don't use these
global: anywhere outside of the users home directory.
just pick any random pi-apps script type install to look at. the majority are global install based (eg: pixelorama https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install )
local to the current user:
~
,$HOME
,/home/$USER
. Don't use these global: anywhere outside of the users home directory.just pick any random pi-apps script type install to look at. the majority are global install based (eg: pixelorama https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install )
oh ok thanks for helping me even though im not great at this
local to the current user:
~
,$HOME
,/home/$USER
. Don't use these global: anywhere outside of the users home directory.just pick any random pi-apps script type install to look at. the majority are global install based (eg: pixelorama https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install )
ok i fixed that it should be good now
It's still saving everything in the user's home directory. The reason why this matters is for Pi systems that have multiple users. We try to make the app install in a way that all users can run the program. Your script makes it only possible for the current user to see the program, because other users cannot access files in the current user's home folder.
And that is the problem: All app files are being saved to the current user's home folder, rather than to a global location.
~/.local/share/applications
is a local location, which can only be accessed by the currently logged in user.
~/.local/bin/mcpi_server
is a local location, which can only be accessed by the currently logged in user.
If my Pi has two user accounts and I login as user etaprime
and install Minecraft Pi Server, I should be able to login as leepsp
and still be able to run Minecraft Pi Server.
You should find the global equivalents to these locations, like /usr/share/applications or /usr/local/bin. It will require sudo
to add files to these locations, but there are many good examples of pi-apps scripts doing it this way. Take another look at the Pixelorama app please. https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install
It's still saving everything in the user's home directory. The reason why this matters is for Pi systems that have multiple users. We try to make the app install in a way that all users can run the program. Your script makes it only possible for the current user to see the program, because other users cannot access files in the current user's home folder.
And that is the problem: All app files are being saved to the current user's home folder, rather than to a global location.
~/.local/share/applications
is a local location, which can only be accessed by the currently logged in user.~/.local/bin/mcpi_server
is a local location, which can only be accessed by the currently logged in user. If my Pi has two user accounts and I login as useretaprime
and install Minecraft Pi Server, I should be able to login asleepsp
and still be able to run Minecraft Pi Server.You should find the global equivalents to these locations, like /usr/share/applications or /usr/local/bin. It will require
sudo
to add files to these locations, but there are many good examples of pi-apps scripts doing it this way. Take another look at the Pixelorama app please. https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install
oh that makes sense i updated it to work that way thats a good idea to make it global for all users
Minecraft Pi Server/wget-log.1
looks like you have multiple stray logfiles in your zip
Minecraft Pi Server/wget-log.1
looks like you have a stray logfile in your zip
oops sorry i fixed that
this is local ~/.local/share/applications
Icon=$HOME/pi-apps/apps/Minecraft Pi Server/icon-64.png
this won't work for users that have pi-apps located elsewhere. refer to this again -> https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install
#update os
sudo apt-get update
again, pi-apps does not allow apps to use apt directly except under specific circumstances.
also your uninstall script needs correcting
also you need to enable the fuse module since this is an appimage. You can look at Musescore to see how to do this https://github.com/Botspot/pi-apps/blob/master/apps/MuseScore/install
also @Botspot what are your thoughts on the actions bot here. Do you like that it edits the initial comment zip preview when the user edits their initial post or would it be clearer if it always made a new post (which would show up at the bottom)?
If you have other ideas I am all ears.
this is local
~/.local/share/applications
Icon=$HOME/pi-apps/apps/Minecraft Pi Server/icon-64.png
this won't work for users that have pi-apps located elsewhere. refer to this again -> https://github.com/Botspot/pi-apps/blob/master/apps/Pixelorama/install#update os sudo apt-get update
again, pi-apps does not allow apps to use apt directly except under specific circumstances.
also your uninstall script needs correcting
also you need to enable the fuse module since this is an appimage. You can look at Musescore to see how to do this https://github.com/Botspot/pi-apps/blob/master/apps/MuseScore/install
oh okay i fixed it
still not fixed:
this is local
~/.local/share/applications
also you need to enable the fuse module since this is an appimage. You can look at Musescore to see how to do this https://github.com/Botspot/pi-apps/blob/master/apps/MuseScore/install
also I suggest using the 64x64 version of the icon in the .desktop file as it will be clearer
still not fixed:
this is local
~/.local/share/applications
also you need to enable the fuse module since this is an appimage. You can look at Musescore to see how to do this https://github.com/Botspot/pi-apps/blob/master/apps/MuseScore/installalso I suggest using the 64x64 version of the icon in the .desktop file as it will be clearer
what is the fuse module for?
also you need to enable the fuse module since this is an appimage
-> also you need to enable the fuse module since this is an appimage
using google "fuse appimage" -> "AppImages require FUSE version 2 to run. Filesystem in Userspace (FUSE) is a system that lets non-root users mount filesystems."
also @Botspot what are your thoughts on the actions bot here. Do you like that it edits the initial comment zip preview when the user edits their initial post or would it be clearer if it always made a new post (which would show up at the bottom)?
If you have other ideas I am all ears.
@theofficialgman,
I think this issue in particular has shown how effective the bot can be for cases when a PR would be a bit much. I would recommend that in the future we advise the app-submitter to not edit their original post with a new zip, but instead post a new zip, for the bot to then reply with the zip preview. To prevent the page from getting too lengthy, I would recommend wrapping the preview in <details>
tags, as seen on the README.
Heres the new file Minecraft Pi Server.zip
A zipfile was found in the body of an issue comment. The sha1sum of the zip was: 1a028a974ff2d4844c4cd8c53a99a5db1024eca9 The contents can be previewed below:
Minecraft Pi Server/install-64
#!/bin/bash
version=2.4.8
#create server folder
sudo mkdir -p /usr/share/applications/mcpi_server
cd /usr/share/applications/mcpi_server
#download server
sudo wget -O server.AppImage https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-${version}-arm64.AppImage || error "failed to download server"
#make server executable
sudo chmod +x server.AppImage
#make desktop shortcut
mkdir -p /usr/share/applications || error "Could not make directory"
echo "[Desktop Entry]
Name=Minecraft Pi Server
Exec=.local/bin/mcpi_server/server.AppImage
Comment=Multiplayer Server
Terminal=true
Icon=$(dirname "$0")/icon-64.png
Type=Application
Categories=Game;
" > ~/.local/share/applications/mcpi_server.desktop
enable_module fuse || exit 1
Minecraft Pi Server/install-32
#!/bin/bash
version=2.4.8
#create server folder
sudo mkdir -p /usr/share/applications/mcpi_server
cd /usr/share/applications/mcpi_server
#download server
sudo wget -O server.AppImage https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-${version}-armhf.AppImage || error "failed to download server"
#make server executable
sudo chmod +x server.AppImage
#make desktop shortcut
mkdir -p /usr/share/applications || error "Could not make directory"
echo "[Desktop Entry]
Name=Minecraft Pi Server
Exec=/usr/share/applications/mcpi_server/server.AppImage
Comment=Multiplayer Server
Terminal=true
Icon=$(dirname "$0")/icon-64.png
Type=Application
Categories=Game;
" > ~/.local/share/applications/mcpi_server.desktop
enable_module fuse || exit 1
Minecraft Pi Server/credits
https://github.com/NoozAbooz/ for providing the appimage
Minecraft Pi Server/website
https://unschooledinventor.com/2023/08/diy-minecraft-pi-edition-server/
Minecraft Pi Server/description
I recently installed Minecraft pi edtition on my raspberry pi and wanted to start a minecraft pi server but found little documentation and had to figure it out on my own. So i created this simple one click installer for pi-apps.
Learn how to use this software here: https://unschooledinventor.com/2023/08/diy-minecraft-pi-edition-server/
Check out my YouTube channel: https://www.youtube.com/@kidmakesreal
Minecraft Pi Server/uninstall
#!/bin/bash
#remove server app image
rm -rf /usr/share/applications/mcpi_server/server.AppImage || error "Failed to remove server.appImage"
#remove shortcut
rm -rf /usr/share/applications/mcpi_server.desktop || error "Failed to remove Minecraft Pi Server shortcut"
I would recommend that in the future we advise the app-submitter to not edit their original post with a new zip, but instead post a new zip, for the bot to then reply with the zip preview.
@Botspot there is no reason we need to tell users which method to do. Before this commit https://github.com/Botspot/pi-apps/commit/f6defd402dfb801cc6fb1f3a6b2ca68b72431c3c the bot would make a new post every time even if the edited the original post. I can revert to that while also implementing the hidden text
also you need to enable the fuse module since this is an appimage
-> also you need to enable the fuse module since this is an appimage
using google "fuse appimage" -> "AppImages require FUSE version 2 to run. Filesystem in Userspace (FUSE) is a system that lets non-root users mount filesystems."
ok i did that im hoping its good now
still not fixed:
this is local
~/.local/share/applications
^
still not fixed:
this is local
~/.local/share/applications
^
heres the file Minecraft.Pi.Server.zip i don't see where the issue is
heres the file Minecraft.Pi.Server.zip i don't see where the issue is
that is the same file....
echo "[Desktop Entry]
Name=Minecraft Pi Server
Exec=.local/bin/mcpi_server/server.AppImage
Comment=Multiplayer Server
Terminal=true
Icon=$(dirname "$0")/icon-64.png
Type=Application
Categories=Game;
" > ~/.local/share/applications/mcpi_server.desktop
this is local ~/.local/share/applications/mcpi_server.desktop
I refer back to botspot's explaination -> https://github.com/Botspot/pi-apps/issues/2437#issuecomment-1703949187
heres the file Minecraft.Pi.Server.zip i don't see where the issue is
that is the same file....
echo "[Desktop Entry] Name=Minecraft Pi Server Exec=.local/bin/mcpi_server/server.AppImage Comment=Multiplayer Server Terminal=true Icon=$(dirname "$0")/icon-64.png Type=Application Categories=Game; " > ~/.local/share/applications/mcpi_server.desktop
this is local
~/.local/share/applications/mcpi_server.desktop
I refer back to botspot's explaination -> #2437 (comment)
oh i see sorry about that Minecraft Pi Server.zip
A zipfile was found in the body of your issue. The sha1sum of the zip was: c8b312255302777e057f0d436678b82a52fb1741
mkdir -p /usr/share/applications || error "Could not make directory"
" > /usr/share/applications/mcpi_server.desktop
refer again to https://github.com/Botspot/pi-apps/issues/2437#issuecomment-1703949187 , you can't write to or create a root owned directory as a regular user.
also I'd personally prefer if the enable fuse module was placed directly after the version variable. that way if it fails then you aren't left with an unuseable application unless the user does an uninstall.
also you need a purge_packages in your uninstall if you have an enable_module
A zipfile was found in the body of an issue comment. The sha1sum of the zip was: f8e82494afc74ca38e42b1d8f8b6a736a35a267a
also I'd personally prefer if the enable fuse module was placed directly after the version variable. that way if it fails then you aren't left with an unuseable application unless the user does an uninstall.
also you need a purge_packages in your uninstall if you have an enable_module
okay done Minecraft Pi Server.zip
@kidmakesreal you don't need to edit both the original post and make a new one with the zip. as per botspot's revised recommendations just make the new post.
" > /usr/share/applications/mcpi_server.desktop
still not fixed... refer again -> https://github.com/Botspot/pi-apps/issues/2437#issuecomment-1703949187 also you have not updated install-64 to match install-32
I suggest you take a bit longer to digest and understand what we have been telling you to do rather than trying to solve the problem as quickly as possible and messing up. Think through what the commands are actually doing. There is no rush here, it won't be added today (or even this weekend likely) anyway.
@kidmakesreal you don't need to edit both the original post and make a new one with the zip. as per botspot's revised recommendations just make the new post.
" > /usr/share/applications/mcpi_server.desktop
still not fixed... refer again -> #2437 (comment) also you have not updated install-64 to match install-32
I suggest you take a bit longer to digest and understand what we have been telling you to do rather than trying to solve the problem as quickly as possible and messing up. Think through what the commands are actually doing. There is no rush here, it won't be added today (or even this weekend likely) anyway.
ok sorry ill try harder
ok sorry ill try harder
Don't worry about it. Nobody expects someone to become and expert on day one. Just make sure to give yourself time to digest and think about it.
We just have guidelines (some explicitly written down in our documentation and some implied) at pi-apps that we want all new scripts to follow.
i cant get the global installation to work is it cool if i just make it install locally?
i think it would be better if the server folder was located in the home directory anyway due to then fact that to configure the server you have to change the server.properties file in the server folder and it would overcomplicate things for the user to have to be root to access it
is there are reason why you chose to use the appimages from the release instead of the armhf/arm64 debs available?
all release types create their configuration files in the home directory as normal so that is a non-issue
is there are reason why you chose to use the appimages from the release instead of the armhf/arm64 debs available?
all release types create their configuration files in the home directory as normal so that is a non-issue
where can i find the .deb files? i only was able to find appimages
is there are reason why you chose to use the appimages from the release instead of the armhf/arm64 debs available? all release types create their configuration files in the home directory as normal so that is a non-issue
where can i find the .deb files? i only was able to find appimages
nevermind found it
is there are reason why you chose to use the appimages from the release instead of the armhf/arm64 debs available?
all release types create their configuration files in the home directory as normal so that is a non-issue
i have this desktop entry: "[Desktop Entry] Name=Minecraft Pi Server Exec=/usr/share/applications/mcpi_server/server.AppImage Comment=Multiplayer Server Terminal=true Icon=$(dirname "$0")/icon-64.png Type=Application Categories=Game;" and for some reason it always gives me permission denied error when i try to run it do you know why this might be and how to fix it
sudo mkdir -p /usr/share/applications/mcpi_server
cd /usr/share/applications/mcpi_server
#download server
sudo wget -O server.AppImage https://github.com/NoozAbooz/mcpi-reborn-extended/releases/download/${version}/minecraft-pi-reborn-server-${version}-armhf.AppImage || error "failed to download server"
application folders do not belong in the /usr/share/applications
folder. that is only for the .desktop
files, nothing else. any files or assets should be added to their own folder in /usr/share
A zipfile was found in the body of your issue. The sha1sum of the zip was: ce3657d221d2a797c88ac1ec502342f4838bad5b
i've fixed all the previous errors in my scripts it should be all good now
sudo echo "[Desktop Entry]
Name=Minecraft Pi Server
Exec=/usr/share/mcpi_server/server.AppImage
Comment=Multiplayer Server
Terminal=true
Icon=$(dirname "$0")/icon-64.png
Type=Application
Categories=Game;
"
no .desktop file is created. this simply echos to the terminal. Writing to a .desktop file in a root owned location can be performed with a combination echo
and | sudo tee
command as seen in other scripts
it gives me this error unless i run in root "bash: mcpi_server.desktop: Permission denied"
A zipfile was found in the body of your issue. The sha1sum of the zip was: be8023bb9c674e44add565b1ae6b87e2b428391c
What is the name of the app?
Minecraft Pi Server
(Optional) Where is the app hosted?
No response
About the app
a simple one click install mcpi server software
Upload file or Add PR Link
Minecraft Pi Server.zip
Confirmations