diff --git a/CHANGELOG.md b/CHANGELOG.md index 30094a4..2c0b037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -**NOTE**: This changelog covers the major events in pi-apps like new apps being added. If every action since day one was mentioned, "I suppose that even the world itself could not contain the books that should be written." ;) -Last updated: June 21, 2021 by [RaspberryPiNews](https://www.youtube.com/channel/UCmp6JswV90SV5agNFGQuWkw) +**NOTE**: This changelog mainly covers major events in Pi-Apps like new apps being added. If every action done since day one was mentioned, then "I suppose that even the world itself could not contain the books that should be written." ;) +Last updated: September 04, 2021 by [RaspberryPiNews](https://www.youtube.com/channel/UCmp6JswV90SV5agNFGQuWkw) - **3/20/2020** Initial idea of an app store. https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=268455 @@ -110,10 +110,25 @@ Added pi-apps terminal command (you can now run pi-apps with `pi-apps`). - **5/4/2021** Added blockpi and Windows Screensavers apps, numerous changes to api script and removed up/down buttons in GUI - **5/5/2021** Added Drawing app and updated install/uninstall GUI icons - **5/6/2021** Updated trash icon -- **5/7/2021** Add Chiaki app and fixed terminal title when multi-installing apps +- **5/7/2021** Added Chiaki app and fixed terminal title when multi-installing apps - **5/9/2021** Added qterminal support to pi-apps and fix Wine precompiled kernel - **5/14/2021** Fixed update-exclusion and preload-daemon. Also added icon for disabled apps and made piKiss 32-bit only - **5/19/2021** Fixed Box86 multiarch on 64-bit - **5/24/2021** Allowed selecting apps to update in updater and added more api functions. -- **6/19/2021** Updater MCPI Modded to v2.x and use APT repo instead of pi-apps updates to allow for faster package updates -- **6/21/2021** Added 1.17 support to MC Java +- **6/19/2021** Update MCPI Modded to v2.x and use APT repo instead of pi-apps updates to allow for faster package updates +- **6/21/2021** Added support for STL thumbnails in file manager for Cura and 1.17 support to MC Java +- **7/2/2021** Added Conky Rings, Pale Moon Browser, and HTTPS File Server apps +- **7/3/2021** Added install/uninstall output logging system +- **7/4/2021** Added note about what kind of distros Pi-Apps will work on to README +- **7/10/2021** Added Min Browser and Box64 apps, and updated app screenshots in readme +- **7/25/2021** Added "Never show again" option to updater notifications, and new Firefox Rapid Release app, as well as a 64-bit installation script for Sublime Text. Also changed updater to check for updates via `git pull` instead of old `git clone` system +- **7/31/2021** Fixed writing update logs to home directory +- **8/2/2021** Made Pi-Apps print support info at end of a script failure +- **8/9/2021** Made 64-bit Zoom to use box64 and amd64 Zoom binaries, and updated install/uninstall code to mark scripts as executiable before running them +- **8/10/2021** Added new bug reporting window after script failure, allowing users to send a bug report to the developers with the click of a button, added a bash-based terminal plugin app and auto sign unsigned APT repository. A ton of commits were made following the addition of the error reporter :) +- **8/11/2021** Added AutoStar & CloudBuddy apps made by Botspot, (insert lots of bug fixes here too). Also added checks for non-arm architectures and also add semi-support for Chromebooks +- **8/13/2021** Added new "Search" button to search for apps +- **8/15/2021** Added new startup splash screen to make the wait time a little less agonizing +- **9/1/2021** Add Windows Flasher app, and update scripts to replace wget with aria2c for faster downloads if installed as small experiment + + diff --git a/api b/api index f59c76b..6ab16fa 100755 --- a/api +++ b/api @@ -10,6 +10,11 @@ if [[ "$0" == */api ]];then DIRECTORY="$(readlink -f "$(dirname "$0")")" fi +if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" == "$HOME" ];then + echo "api: DIRECTORY variable must be set to valid pi-apps folder. Default folder: $HOME/pi-apps" + return 1 +fi + repo_url="$(cat "${DIRECTORY}/etc/git_url" || echo 'https://github.com/Botspot/pi-apps')" #determine if host system is 64 bit arm64 or 32 bit armhf @@ -264,6 +269,7 @@ script_name_cpu() { #get script name to run based on detected CPU arch app_status() { #Gets the $1 app's current status. installed, uninstalled, corrupted, disabled [ -z "$1" ] && error 'app_status(): requires an argument.' + #don't check if app exists, it may be a new app in an update if [ -f "${DIRECTORY}/data/status/${1}" ];then cat "${DIRECTORY}/data/status/${1}" @@ -278,8 +284,8 @@ will_reinstall() { #return 0 if $1 app will be reinstalled during an update, oth #detect which installation script exists and get the hash for that one scriptname="$(script_name_cpu "$1")" - oldinstallhash=$(sha1sum "${DIRECTORY}/apps/${1}/${scriptname}" | awk '{print $1}') - newinstallhash=$(sha1sum "${DIRECTORY}/update/pi-apps/apps/${1}/${scriptname}" 2>/dev/null | awk '{print $1}') + oldinstallhash="$(sha1sum "${DIRECTORY}/apps/${1}/${scriptname}" 2>/dev/null | awk '{print $1}')" + newinstallhash="$(sha1sum "${DIRECTORY}/update/pi-apps/apps/${1}/${scriptname}" 2>/dev/null | awk '{print $1}')" #if install script was changed #if installed already if [ "$newinstallhash" != "$oldinstallhash" ] && [ "$(app_status "${1}")" == 'installed' ];then @@ -369,35 +375,51 @@ runonce() { #run command only if it's never been run before. Useful for one-time apt_lock_wait() { #Wait until other apt processes are finished before proceeding echo -n "Waiting until APT locks are released... " - while sudo fuser /var/lib/dpkg/lock &>/dev/null ; do - sleep 0.5 - done - while sudo fuser /var/lib/dpkg/lock-frontend &>/dev/null ; do - sleep 0.5 - done - while sudo fuser /var/lib/apt/lists/lock &>/dev/null ; do - sleep 0.5 + #while sudo fuser /var/lib/dpkg/lock &>/dev/null ; do + # sleep 0.5 + #done + #while sudo fuser /var/lib/dpkg/lock-frontend &>/dev/null ; do + # sleep 0.5 + #done + #while sudo fuser /var/lib/apt/lists/lock &>/dev/null ; do + # sleep 0.5 + #done + #if [ -f /var/log/unattended-upgrades/unattended-upgrades.log ]; then + # while sudo fuser /var/log/unattended-upgrades/unattended-upgrades.log &>/dev/null ; do + # sleep 0.5 + # done + #fi + + while [ ! -z "$(sudo fuser /var/lib/dpkg/lock /var/lib/apt/lists/lock /var/cache/apt/archives/lock /var/log/unattended-upgrades/unattended-upgrades.log /var/lib/dpkg/lock-frontend 2>/dev/null)" ];do + sleep 1 done - if [ -f /var/log/unattended-upgrades/unattended-upgrades.log ]; then - while sudo fuser /var/log/unattended-upgrades/unattended-upgrades.log &>/dev/null ; do - sleep 0.5 - done - fi + sleep 0.5 + echo "Done" } is_supported_system() { - if uname -m | grep -q 'x86' ;then - echo "Pi-Apps is not supported on x86 processors. Expect almost all apps to fail." + if uname -m | grep -q 'x86' || uname -m | grep -q 'i686' || uname -m | grep -q 'i386';then + echo "Pi-Apps is not supported on x86 processors. Expect almost all apps to fail. Consider switching to this x86 port of Pi-Apps: https://github.com/MCRaspRBX/pi-apps-x86" return 1 - elif [[ "$(cat /etc/os-release | grep VERSION_CODENAME | tr -d '"' | awk -F= '{print $2}')" == @(stretch|wheezy|jessie) ]];then - echo "Pi-Apps is not supported on the outdated $(cat /etc/os-release | grep VERSION_CODENAME | tr -d '"' | awk -F= '{print $2}') operating system. Expect many apps to fail. Consider upgrading your operating system." + elif cat /etc/os-release | grep PRETTY_NAME | tr -d '"' | awk -F= '{print $2}' | grep -qi 'stretch\|wheezy\|jessie';then + echo "Pi-Apps is not supported on your outdated operating system. Expect many apps to fail. Consider upgrading your operating system." + return 1 + elif cat /etc/os-release | grep PRETTY_NAME | tr -d '"' | awk -F= '{print $2}' | grep -qi 'manjaro';then + echo "Pi-Apps is not supported on Manjaro." return 1 elif [[ "$(uname -m)" == armv6* ]];then - echo "Pi-Apps has not been tested on armv6 Raspberry Pi boards. Expect many apps to fail." + echo "Pi-Apps is not supported on ARMv6 Raspberry Pi boards. Expect some apps to fail." + return 1 + elif [ "$(id -u)" == 0 ]; then + echo "Pi-Apps is not designed to be run as root user." return 1 + elif [ "$(df -a / -B 1 --output=avail | tail -1 | tr -d ' ')" -lt $((1*1024*1024*1024)) ];then + echo "Your system drive has less than 1GB of free space. Watch out for "\""disk full"\"" errors." + return 1 + else + return 0 fi - return 0 } format_log_file() { #remove ANSI escape sequences from a given file, and add OS information to beginning of file @@ -477,6 +499,68 @@ ${blue}┃ ${red}⬛⬛⬛ ${blue}┃\e[97m ▕ ▕ \e[0m\e[0m" } +wget() { #this function intercepts all wget commands being used in app scripts. It uses aria2c if possible. + local file='' + local url='' + local use=aria2c + if command -v aria2c >/dev/null; then + #convert wget arguments to newline-separated list + local IFS=$'\n' + local opts="$(IFS=$'\n'; echo "$*")" + for opt in $opts ;do + if [[ "$opt" == '-'* ]] || [ "$opt" == '-' ];then + #this opt is the beginning of a flag + if [ "$opt" == '-qO' ] || [ "$opt" == '-O' ] || [ "$opt" == '-q' ]; then + true + else #any other wget command-flags other than '-qO', '-O', '-q' + use=wget + break + fi + elif [[ "$opt" == *'://'* ]]; then + #this opt is web address + url="$opt" + elif [[ "$opt" == '/'* ]]; then + #this opt is file output + if [ -z "$file" ];then + file="$opt" + else #file var already populated + use=wget + break + fi + else + #this opt does not begin with '-', contain '://', or begin with '/'. Assume output file specified shorthand + if [ -z "$file" ];then + file="$(pwd)/${opt}" + else #file var already populated + use=wget + break + fi + fi + done + + else + #aria2c command not found + use=wget + fi + + if [ "$use" == wget ];then + #run the true wget binary with all this function's args + command wget "$@" + elif [ "$use" == aria2c ];then + #make default filename if $file empty + if [ -z "$file" ];then + file="$(pwd)/$(basename "$url")" + fi + + #suppress output if -q flag passed + if echo "$@" | grep -q '\-q' ;then + aria2c -c -x 16 -s 16 -m 10 --retry-wait 30 "$url" --dir '/' -o "${file:1}" --allow-overwrite --summary-interval=1 >/dev/null + else + aria2c -c -x 16 -s 16 -m 10 --retry-wait 30 "$url" --dir '/' -o "${file:1}" --allow-overwrite --summary-interval=1 + fi + fi +} + #if this script is being run standalone, not sourced if [[ "$0" == */api ]];then if [ ! -z "$1" ];then diff --git a/apps/AndroidBuddy/install b/apps/AndroidBuddy/install index 7b7c1c3..4a4daa7 100755 --- a/apps/AndroidBuddy/install +++ b/apps/AndroidBuddy/install @@ -27,6 +27,7 @@ git clone https://gitlab.com/gazlene/droidbuddy.git || error 'Could not clone An sudo pip3 install Pillow +mkdir -p ~/.local/share/applications echo "[Desktop Entry] Name=AndroidBuddy Comment=GUI for Android device recovery and maintainence diff --git a/apps/AnyDesk/install-32 b/apps/AnyDesk/install-32 index e085b27..ffa29ba 100755 --- a/apps/AnyDesk/install-32 +++ b/apps/AnyDesk/install-32 @@ -14,5 +14,4 @@ filename='anydesk_6.1.1-1_armhf' wget https://download.anydesk.com/rpi/${filename}.deb || error "Failed to downloading file. Make sure 'wget' is installed and verify your Internet Network Connection" # Installing the software with permissions -sudo apt install -y --fix-broken ~/${filename}.deb || error "Failed to install deb file" - +"${DIRECTORY}/pkg-install" ~/${filename}.deb "$(dirname "$0")" || error "Failed to install deb file" diff --git a/apps/AnyDesk/uninstall b/apps/AnyDesk/uninstall index 4c25514..46bc224 100755 --- a/apps/AnyDesk/uninstall +++ b/apps/AnyDesk/uninstall @@ -7,4 +7,4 @@ function error { exit 1 } -sudo apt purge -y anydesk +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/AstroMenace/install b/apps/AstroMenace/install index d3d23a3..165b315 100755 --- a/apps/AstroMenace/install +++ b/apps/AstroMenace/install @@ -7,7 +7,7 @@ function error { exit 1 } -sudo apt-get -y install g++ cmake make ninja-build libsdl2-dev libogg-dev libvorbis-dev libopenal-dev libalut-dev libfreetype6-dev || error 'Failed to install dependencies' +"${DIRECTORY}/pkg-install" "g++ cmake make ninja-build libsdl2-dev libogg-dev libvorbis-dev libopenal-dev libalut-dev libfreetype6-dev" "$(dirname "$0")" || exit 1 #download rm -rf master.zip astromenace-master/ diff --git a/apps/Autostar/website b/apps/Autostar/website index edc168b..a379b57 100644 --- a/apps/Autostar/website +++ b/apps/Autostar/website @@ -1 +1 @@ -https://github.com/Botspot/cloudbuddy +https://github.com/Botspot/autostar diff --git a/apps/BalenaEtcher/install-32 b/apps/BalenaEtcher/install-32 index 39bc05b..6b8ecfd 100755 --- a/apps/BalenaEtcher/install-32 +++ b/apps/BalenaEtcher/install-32 @@ -8,7 +8,7 @@ function error { } rm -f ~/etcher.deb -wget -O ~/etcher.deb https://github.com/Itai-Nelken/Etcher-arm-32-64/releases/download/v1.5.120/balena-etcher-electron_1.5.120+ccb08a48_armv7l.deb || error "Failed to download!" +wget -O ~/etcher.deb https://github.com/Itai-Nelken/Etcher-arm-32-64/releases/download/v1.5.121/balena-etcher-electron_1.5.121+8b3f3710_armv7l.deb || error "Failed to download!" "${DIRECTORY}/pkg-install" "$HOME/etcher.deb" "$(dirname "$0")" || error "failed to install etcher.deb file!" rm -f ~/etcher.deb diff --git a/apps/BalenaEtcher/install-64 b/apps/BalenaEtcher/install-64 index a552373..685e859 100755 --- a/apps/BalenaEtcher/install-64 +++ b/apps/BalenaEtcher/install-64 @@ -8,7 +8,7 @@ function error { } rm -f ~/etcher.deb -wget -O ~/etcher.deb https://github.com/Itai-Nelken/Etcher-arm-32-64/releases/download/v1.5.120/balena-etcher-electron_1.5.120+ccb08a48_arm64.deb || error "Failed to download!" +wget -O ~/etcher.deb https://github.com/Itai-Nelken/Etcher-arm-32-64/releases/download/v1.5.121/balena-etcher-electron_1.5.121+8b3f3710_arm64.deb || error "Failed to download!" "${DIRECTORY}/pkg-install" "$HOME/etcher.deb" "$(dirname "$0")" || error "failed to install etcher.deb file!" rm -f ~/etcher.deb diff --git a/apps/Box64/install-64 b/apps/Box64/install-64 index ea3e8b6..944a76e 100755 --- a/apps/Box64/install-64 +++ b/apps/Box64/install-64 @@ -13,14 +13,26 @@ rm -rf ~/box64 git clone https://github.com/ptitSeb/box64 || error 'Failed to clone box64 repository!' cd box64 || error 'Failed to change directory' mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo || error 'Failed to run cmake in "build" directory' -make -j8 || error 'Failed to compile' + +#determine how many threads can run without running out of memory +if [ $(($(free -bt | tail -1 | awk '{print $2}')-$(free -bt | tail -1 | awk '{print $3}'))) -le 2000000000 ];then + #less than 2GB of available ram + threads=3 +else + #greater than 2GB of available ram + threads=5 +fi +echo "Compiling Box64 with $threads threads..." +make -j${threads} || error 'Failed to compile' sudo make install || error 'Failed to run "sudo make install"' if ! sudo systemctl restart systemd-binfmt ;then - echo "Error: systemd-binfmt failed to restart. Running debug..." + echo "WARNING: systemd-binfmt failed to restart. Running debug..." echo 'systemctl status systemd-binfmt.service' systemctl status systemd-binfmt.service echo 'systemctl status systemd-binfmt.service' journalctl -xe | cat - error "Exiting now because systemd-binfmt failed to restart." + echo "Exiting this script as successful, but consider sending the above errors to Pi-Apps developers." fi + +exit 0 diff --git a/apps/Box86/install-32 b/apps/Box86/install-32 index b706d6e..7413b02 100755 --- a/apps/Box86/install-32 +++ b/apps/Box86/install-32 @@ -7,24 +7,23 @@ function error { exit 1 } -echo -n "Checking for working systemd-binfmt..." -if ! sudo systemctl restart systemd-binfmt ;then - echo -e "\nError: systemd-binfmt failed to restart. Running debug..." - echo 'systemctl status systemd-binfmt.service' - systemctl status systemd-binfmt.service - echo 'systemctl status systemd-binfmt.service' - journalctl -xe | cat - error "Exiting now because systemd-binfmt failed to restart." -else - echo "Done" +if dpkg -l box86 &>/dev/null ;then + sudo apt purge -y box86 fi sudo rm -f /etc/apt/sources.list.d/box86.list -echo "adding box86 repo..." +echo "Adding box86 repo..." sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list || error "Failed to download /etc/apt/sources.list.d/box86.list" -echo "adding key..." +echo "Adding key..." wget -qO- https://itai-nelken.github.io/weekly-box86-debs/debian/KEY.gpg | sudo apt-key add - || error "Failed to add key to box86 repo!" -echo "installing box86..." -"${DIRECTORY}/pkg-install" "box86" "$(dirname "$0")" || exit 1 +echo "Installing box86..." +"${DIRECTORY}/pkg-install" "box86-no-binfmt-restart" "$(dirname "$0")" || exit 1 + +if ! sudo systemctl restart systemd-binfmt ;then + echo -e "\nWarning: systemd-binfmt failed to restart. Getting debug info..." + echo "Running command: 'systemctl status systemd-binfmt.service'" + systemctl status systemd-binfmt.service + echo "Still exiting with success, but you will have to manually run all x86 applications with box86 as binfmt isn't there to do it for you." +fi diff --git a/apps/Browsh/install-32 b/apps/Browsh/install-32 index 6335a83..b2afc27 100755 --- a/apps/Browsh/install-32 +++ b/apps/Browsh/install-32 @@ -7,12 +7,12 @@ function error { exit 1 } -# Get dependencies -"${DIRECTORY}/pkg-install" "firefox-esr" "$(dirname "$0")" || exit 1 +rm -f ~/browsh.deb +wget -O browsh.deb https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_armv7.deb || error 'Failed to download browsh!' + +"${DIRECTORY}/pkg-install" "firefox-esr $HOME/browsh.deb" "$(dirname "$0")" || error 'Failed to install browsh.deb!' +rm -f ~/browsh.deb -wget https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_armv7.deb || error 'Failed to download browsh!' -sudo apt -yf install ./browsh_1.6.4_linux_armv7.deb || error 'Failed to install browsh!' -rm browsh_1.6.4_linux_armv7.deb echo "[Desktop Entry] Version=1.1 Type=Application @@ -22,4 +22,3 @@ Icon=$(dirname "$0")/icon-64.png Exec=browsh Terminal=true Categories=Network;" > ~/.local/share/applications/browsh.desktop - diff --git a/apps/Browsh/install-64 b/apps/Browsh/install-64 index a95ef68..7d658cf 100755 --- a/apps/Browsh/install-64 +++ b/apps/Browsh/install-64 @@ -7,12 +7,12 @@ function error { exit 1 } -# Get dependencies -"${DIRECTORY}/pkg-install" "firefox-esr" "$(dirname "$0")" || exit 1 +rm -f ~/browsh.deb +wget -O browsh.deb https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_arm64.deb || error 'Failed to download browsh!' + +"${DIRECTORY}/pkg-install" "firefox-esr $HOME/browsh.deb" "$(dirname "$0")" || error 'Failed to install browsh.deb!' +rm -f ~/browsh.deb -wget https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_arm64.deb || error 'Failed to download browsh!' -sudo apt -yf install ./browsh_1.6.4_linux_arm64.deb || error 'Failed to install browsh!' -rm browsh_1.6.4_linux_arm64.deb echo "[Desktop Entry] Version=1.1 Type=Application @@ -21,6 +21,4 @@ Comment=The modern text-based terminal browser. Icon=$(dirname "$0")/icon-64.png Exec=browsh Terminal=true -Actions= Categories=Network;" > ~/.local/share/applications/browsh.desktop - diff --git a/apps/Browsh/uninstall b/apps/Browsh/uninstall index b8f72bd..dd2041a 100755 --- a/apps/Browsh/uninstall +++ b/apps/Browsh/uninstall @@ -7,11 +7,6 @@ function error { exit 1 } -if command -v browsh >/dev/null ;then - sudo apt purge -y browsh || error 'Failed to remove browsh!' -fi +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || error 'Failed to purge browsh package!' sudo rm -f ~/.local/share/applications/browsh.desktop - -#if your app installs any packages, keep this command here so those packages will be removed. -"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/Chiaki/install b/apps/Chiaki/install index b013320..5a2ce0d 100755 --- a/apps/Chiaki/install +++ b/apps/Chiaki/install @@ -11,6 +11,7 @@ function error { "${DIRECTORY}/pkg-install" "cmake python3-protobuf protobuf-compiler libavcodec-dev libopus-dev libsdl2-dev libssl-dev qt5-default qtmultimedia5-dev libqt5svg5-dev libqt5multimedia5-plugins libqt5opengl5-dev" "$(dirname "$0")" || exit 1 # install Chiaki +rm -rf ~/Chiaki || error "Failed to first remove $HOME/Chiaki folder!" git clone --single-branch --branch rpi01 https://github.com/Fredrum/chiaki.git Chiaki || error "failed to clone the Chiaki repository!" cd Chiaki || error "failed to enter the Chiaki folder!" git submodule update --init || error "failed to update the Chiaki submodule!" diff --git a/apps/Color Emoji font/uninstall b/apps/Color Emoji font/uninstall index d9320c1..c61c39e 100755 --- a/apps/Color Emoji font/uninstall +++ b/apps/Color Emoji font/uninstall @@ -7,5 +7,6 @@ function error { exit 1 } -rm "$HOME/.fonts/Noto Color Emoji.ttf" "$HOME/.fonts/Segoe UI.ttf" +rm -f "$HOME/.fonts/Noto Color Emoji.ttf" "$HOME/.fonts/Segoe UI.ttf" +exit 0 diff --git a/apps/CommanderPi/install b/apps/CommanderPi/install index 615a379..03d4219 100755 --- a/apps/CommanderPi/install +++ b/apps/CommanderPi/install @@ -7,6 +7,13 @@ function error { exit 1 } +if ! cat /proc/cpuinfo | grep Model | sed 's/Model.*: //g' | grep -q 'Raspberry Pi' ;then + error "▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ +CommanderPi can only be installed on Raspberry Pi devices. +Your device is: $(cat /proc/cpuinfo | grep Model | sed 's/Model.*: //g') +▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲" +fi + rm -rf ~/CommanderPi || sudo rm -rf ~/CommanderPi || error "Failed to remove CommanderPi folder!" # Get dependencies diff --git a/apps/Conky Rings/install b/apps/Conky Rings/install index c21b104..63e06d8 100755 --- a/apps/Conky Rings/install +++ b/apps/Conky Rings/install @@ -8,7 +8,9 @@ function error { } if [ -f "$HOME/.conkyrc" ]; then - error "Another Conky theme is already installed! Uninstall the original app (Or delete $HOME/.conkyrc), then try again." + error "▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ +Another Conky theme is already installed! Uninstall the original app (Or delete $HOME/.conkyrc), then try again. +▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲" fi # Get dependencies diff --git a/apps/Conky/install b/apps/Conky/install index 59de3f9..249eb7b 100755 --- a/apps/Conky/install +++ b/apps/Conky/install @@ -8,7 +8,9 @@ function error { } if [ -f "$HOME/.conkyrc" ]; then - error "Another Conky theme is already installed! Uninstall the original app (Or delete $HOME/.conkyrc), then try again." + error "▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ +Another Conky theme is already installed! Uninstall the original app (Or delete $HOME/.conkyrc), then try again. +▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲" fi wget -O ~/.conkyrc https://raw.githubusercontent.com/Botspot/rpi_conky/master/conkyrc || error 'Failed to download conkyrc!!' diff --git a/apps/Cura/install-32 b/apps/Cura/install-32 index fc3e9ad..84681a0 100755 --- a/apps/Cura/install-32 +++ b/apps/Cura/install-32 @@ -7,7 +7,7 @@ function error { exit 1 } -wget -O ~/Cura.AppImage https://github.com/smartavionics/Cura/releases/download/20210629/Cura-mb-master-armhf-20210629.AppImage || error "Failed to download!" +wget -O ~/Cura.AppImage https://github.com/smartavionics/Cura/releases/download/20210908/Cura-mb-master-armhf-20210908.AppImage || error "Failed to download!" chmod +x ~/Cura.AppImage diff --git a/apps/Cura/install-64 b/apps/Cura/install-64 index f728749..148e956 100755 --- a/apps/Cura/install-64 +++ b/apps/Cura/install-64 @@ -7,7 +7,7 @@ function error { exit 1 } -wget -O ~/Cura.AppImage https://github.com/smartavionics/Cura/releases/download/20210629/Cura-mb-master-aarch64-20210629.AppImage || error "Failed to download!" +wget -O ~/Cura.AppImage https://github.com/smartavionics/Cura/releases/download/20210908/Cura-mb-master-aarch64-20210908.AppImage || error "Failed to download!" chmod +x ~/Cura.AppImage diff --git a/apps/Doom 3/install-32 b/apps/Doom 3/install-32 index 132c89a..1d93d50 100755 --- a/apps/Doom 3/install-32 +++ b/apps/Doom 3/install-32 @@ -7,7 +7,7 @@ function error { exit 1 } -rm -rf ~/RPIDoom3Installer || error "Failed to first remove ~/RPIDoom3Installer folder!" +rm -rf ~/RPIDoom3Installer || sudo rm -rf ~/RPIDoom3Installer || error "Failed to first remove ~/RPIDoom3Installer folder!" # Get dependencies "${DIRECTORY}/pkg-install" "libfontconfig-dev qt5-default automake mercurial libtool libfreeimage-dev \ diff --git a/apps/Downgrade Chromium/install-32 b/apps/Downgrade Chromium/install-32 index 5a0fca1..0127a5d 100755 --- a/apps/Downgrade Chromium/install-32 +++ b/apps/Downgrade Chromium/install-32 @@ -21,16 +21,18 @@ VERSIONS="65 if [ -z "$1" ];then LIST="$(echo "$VERSIONS" | sed 's/^/false\nChromium version /g')" - output="$(echo "$LIST" | yad --center --title="Choose Chromium version" --height=290 --no-headers \ - --text=" Which Chromium version to install today? " \ - --radiolist --list --column=Tick --column=version --separator='\n' --print-column=2 \ - --window-icon="$(dirname "$0")/icon-64.png" \ - --button=!${DIRECTORY}/icons/check.png!OK:0 - )" - button=$? - - [ $button != 0 ] && error "exited chromium version selection list" - + output='' + while [ -z "$output" ];do + output="$(echo "$LIST" | yad --center --title="Choose Chromium version" --height=290 --no-headers \ + --text=" Which Chromium version to install today? " \ + --radiolist --list --column=Tick --column=version --separator='\n' --print-column=2 \ + --window-icon="$(dirname "$0")/icon-64.png" \ + --button=!${DIRECTORY}/icons/check.png!OK:0 + )" + button=$? + + [ $button != 0 ] && error "exited chromium version selection list" + done #get just chromium version NUMBER output="$(echo "$output" | awk '{print $3}')" else @@ -120,6 +122,7 @@ wget -O l10n.deb "$l10n_url" || error "Failed to download $l10n_url" wget -O ffmpeg_extra.deb "$ffmpeg_extra_url" || error "Failed to download $ffmpeg_extra_url" echo "Installing the packages..." +"${DIRECTORY}/api" apt_lock_wait sudo apt install -fy --allow-downgrades --allow-change-held-packages "$(pwd)/cb.deb" "$(pwd)/l10n.deb" "$(pwd)/ffmpeg_extra.deb" || error "APT failed to install the packages" rm -f cb.deb l10n.deb ffmpeg_extra.deb || error "Failed to remove cb.deb l10n.deb ffmpeg_extra.deb" diff --git a/apps/Downgrade Chromium/uninstall b/apps/Downgrade Chromium/uninstall index 4cb68ba..278a03a 100755 --- a/apps/Downgrade Chromium/uninstall +++ b/apps/Downgrade Chromium/uninstall @@ -22,24 +22,27 @@ if [ ! -z "$(ps aux | grep chromium | grep -v 'grep' )" ];then fi if [ -d ~/.config/chromium.bak ];then - read -p "Would you like to restore the backup of Chromium's config folder? [y/n] " answer - - if [ "$answer" == y ] || [ "$answer" == Y ];then - echo "Restoring backup..." + while true;do + read -p "Would you like to restore the backup of Chromium's config folder? [y/n] " answer - #first remove existing - if [ -e ~/.config/chromium ];then - gio trash ~/.config/chromium || rm -rf ~/.config/chromium + if [ "$answer" == y ] || [ "$answer" == Y ];then + echo "Restoring backup..." + + #first remove existing + if [ -e ~/.config/chromium ];then + gio trash ~/.config/chromium || rm -rf ~/.config/chromium + fi + + #then rename the backup folder + mv ~/.config/chromium.bak ~/.config/chromium + break #exit loop + + elif [ "$answer" == n ] || [ "$answer" == N ];then + break #exit loop + else + echo "Unknown answer "\""$answer"\""" fi - - #then rename the backup folder - mv ~/.config/chromium.bak ~/.config/chromium - - elif [ "$answer" == n ] || [ "$answer" == N ];then - true #do nothing - else - error "Unknown answer "\""$answer"\""" - fi + done fi echo "Allowing Chromium to be upgradable..." @@ -48,6 +51,7 @@ echo "chromium-browser-l10n install" | sudo dpkg --set-selections echo "chromium-codecs-ffmpeg-extra install" | sudo dpkg --set-selections echo "Upgrading Chromium..." -sudo apt upgrade -y --allow-downgrades chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra rpi-chromium-mods +"${DIRECTORY}/api" apt_lock_wait +sudo apt upgrade -y --allow-downgrades chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra diff --git a/apps/Drawing/install-32 b/apps/Drawing/install-32 index eba68ba..7396dc8 100755 --- a/apps/Drawing/install-32 +++ b/apps/Drawing/install-32 @@ -17,5 +17,6 @@ fi rm -f ~/drawing.deb wget -O ~/drawing.deb "https://launchpad.net/~cartes/+archive/ubuntu/drawing/+files/drawing_0.8.3-0ubuntu1~hirsute_armhf.deb" || error "Failed to download drawing.deb" -sudo apt install -yf ~/drawing.deb || error "APT failed to install drawing.deb" + +"${DIRECTORY}/pkg-install" "$HOME/drawing.deb" "$(dirname "$0")" || error "APT failed to install drawing.deb" rm -f ~/drawing.deb diff --git a/apps/Drawing/install-64 b/apps/Drawing/install-64 index 3c47f61..08fd2ad 100755 --- a/apps/Drawing/install-64 +++ b/apps/Drawing/install-64 @@ -12,5 +12,5 @@ function error { rm -f ~/drawing.deb wget -O ~/drawing.deb "https://launchpad.net/~cartes/+archive/ubuntu/drawing/+files/drawing_0.8.3-0ubuntu1~hirsute_arm64.deb" || error "Failed to download drawing.deb" -sudo apt install -yf ~/drawing.deb || error "APT failed to install drawing.deb" +"${DIRECTORY}/pkg-install" "$HOME/drawing.deb" "$(dirname "$0")" || error "APT failed to install drawing.deb" rm -f ~/drawing.deb diff --git a/apps/Drawing/uninstall b/apps/Drawing/uninstall index c64886d..4cc004d 100755 --- a/apps/Drawing/uninstall +++ b/apps/Drawing/uninstall @@ -7,6 +7,4 @@ function error { exit 1 } -if command -v drawing >/dev/null ;then - sudo apt purge -y drawing || error "apt failed to uninstall the 'drawing' package." -fi +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 || error "apt failed to uninstall the 'drawing' package." diff --git a/apps/Firefox Rapid Release/install b/apps/Firefox Rapid Release/install index e9ec55b..8389146 100755 --- a/apps/Firefox Rapid Release/install +++ b/apps/Firefox Rapid Release/install @@ -27,8 +27,12 @@ if [ $? != 0 ];then error "wget failed to download 99bionic-updates config file!" fi +"${DIRECTORY}/api" apt_lock_wait + echo "Running 'sudo apt update'..." sudo apt update || error "Failed to run 'sudo apt update'!" +"${DIRECTORY}/api" apt_lock_wait + echo "Installing Firefox package..." sudo apt install -t bionic-updates firefox -y || error "Failed to install firefox!" diff --git a/apps/Firefox Rapid Release/uninstall b/apps/Firefox Rapid Release/uninstall index 9f0c6d5..57871ea 100755 --- a/apps/Firefox Rapid Release/uninstall +++ b/apps/Firefox Rapid Release/uninstall @@ -7,8 +7,8 @@ function error { exit 1 } -sudo apt purge firefox -y || error "Failed to uninstall firefox!" -sudo rm /etc/apt/preferences.d/99bionic-updates || error "Failed to delete /etc/apt/preferences.d/99bionic-updates" -sudo rm /etc/apt/sources.list.d/firefox-ubuntu.list || error "Failed to delete the repository!" +sudo apt purge firefox -y +sudo rm -f /etc/apt/preferences.d/99bionic-updates +sudo rm -f /etc/apt/sources.list.d/firefox-ubuntu.list sudo apt-key del "3B4FE6ACC0B21F32" || error "Failed to delete the key!" diff --git a/apps/FreeTube/install-32 b/apps/FreeTube/install-32 index 4efb57d..c3b9c1b 100755 --- a/apps/FreeTube/install-32 +++ b/apps/FreeTube/install-32 @@ -9,10 +9,10 @@ function error { #Downloading Deb File For FreeTube rm -f ~/freetube.deb -wget https://archive.org/download/freetube_0.13.2_arm64/freetube_0.13.2_armhf.deb -O ~/freetube.deb || error "Failed to download freetube.deb!" +wget -O ~/freetube.deb https://archive.org/download/freetube_0.14.0_armv7l/freetube_0.14.0_armv7l.deb || error "Failed to download freetube.deb!" #Installing FreeTube -sudo apt install -y --fix-missing ~/freetube.deb || error "APT failed to install freetube.deb!" +"${DIRECTORY}/pkg-install" "$HOME/freetube.deb" "$(dirname "$0")" || error "APT failed to install freetube.deb!" #Removing Deb File rm -f ~/freetube.deb diff --git a/apps/FreeTube/install-64 b/apps/FreeTube/install-64 index 38bdcc8..2800482 100755 --- a/apps/FreeTube/install-64 +++ b/apps/FreeTube/install-64 @@ -9,10 +9,10 @@ function error { #Downloading Deb File For FreeTube rm -f ~/freetube.deb -wget https://archive.org/download/freetube_0.13.2_arm64/freetube_0.13.2_arm64.deb -O ~/freetube.deb || error "Failed to download freetube.deb!" +wget -O ~/freetube.deb https://archive.org/download/freetube_0.14.0_armv7l/freetube_0.14.0_arm64.deb || error "Failed to download freetube.deb!" #Installing FreeTube -sudo apt install -y --fix-missing ~/freetube.deb || error "APT failed to install freetube.deb!" +"${DIRECTORY}/pkg-install" "$HOME/freetube.deb" "$(dirname "$0")" || error "APT failed to install freetube.deb!" #Removing Deb File rm -f ~/freetube.deb diff --git a/apps/FreeTube/uninstall b/apps/FreeTube/uninstall index f02b291..80ea36a 100755 --- a/apps/FreeTube/uninstall +++ b/apps/FreeTube/uninstall @@ -7,7 +7,5 @@ function error { exit 1 } - #Uninstalling FreeTube -sudo apt -y purge freetube || error "Failed to uninstall lightpad" -sudo apt -y autoremove +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/Geany Dark Mode/icon-24.png b/apps/Geany Dark Mode/icon-24.png index 24ddbbd..7b8107b 100644 Binary files a/apps/Geany Dark Mode/icon-24.png and b/apps/Geany Dark Mode/icon-24.png differ diff --git a/apps/Github-CLI/install-32 b/apps/Github-CLI/install-32 index 11805da..280e731 100755 --- a/apps/Github-CLI/install-32 +++ b/apps/Github-CLI/install-32 @@ -9,7 +9,7 @@ function error { cd $HOME -VERSION='1.14.0' +VERSION='2.0.0' #remove old deb (if exists) rm -f ~/gh.deb diff --git a/apps/Github-CLI/install-64 b/apps/Github-CLI/install-64 index 91ddd30..e88d80f 100755 --- a/apps/Github-CLI/install-64 +++ b/apps/Github-CLI/install-64 @@ -9,7 +9,7 @@ function error { cd $HOME -VERSION='1.14.0' +VERSION='2.0.0' #remove old deb (if exists) rm -f ~/gh.deb diff --git a/apps/Lego Digital Designer/uninstall b/apps/Lego Digital Designer/uninstall index d5334b0..4b5ca41 100755 --- a/apps/Lego Digital Designer/uninstall +++ b/apps/Lego Digital Designer/uninstall @@ -7,7 +7,11 @@ function error { exit 1 } -env WINEPREFIX="$HOME/.wine" wine C:\\windows\\command\\start.exe /Unix ~/.wine/dosdevices/c:/ProgramData/Microsoft/Windows/Start\ Menu/Programs/LEGO\ Company/Uninstall\ LEGO\ Digital\ Designer.lnk || error "Wine uninstallation command failed!" +if command -v wine >/dev/null ;then + env WINEPREFIX="$HOME/.wine" wine C:\\windows\\command\\start.exe /Unix ~/.wine/dosdevices/c:/ProgramData/Microsoft/Windows/Start\ Menu/Programs/LEGO\ Company/Uninstall\ LEGO\ Digital\ Designer.lnk || error "Wine uninstallation command failed!" +else + echo "WARNING: 'wine' command not found! Not uninstalling Lego Digital Designer." +fi #wait until finished while ps aux | grep -v grep | grep wine | grep -q 'LEGO Digital Designer' ;do diff --git a/apps/Libreoffice MS theme/install b/apps/Libreoffice MS theme/install index 9d576f4..e831fda 100755 --- a/apps/Libreoffice MS theme/install +++ b/apps/Libreoffice MS theme/install @@ -8,9 +8,13 @@ function error { } if ! command -v libreoffice >/dev/null ;then - error "Libreoffice is not installed, so this theme is useless to you.\nTo install libreoffice, run this in a terminal:\nsudo apt install libreoffice libreoffice-gtk2" + error "▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ +Libreoffice is not installed, so this theme is useless to you.\nTo install libreoffice, run this in a terminal:\nsudo apt install libreoffice libreoffice-gtk2 +▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲" fi + + rm -rf ~/libreoffice-ms-theme git clone --depth=1 https://github.com/Botspot/libreoffice-ms-theme || error "Failed to git clone libreoffice-ms-theme repository!" ~/libreoffice-ms-theme/apply.sh || error "apply.sh failed" diff --git a/apps/Min Browser/install-32 b/apps/Min Browser/install-32 index 8ee7435..fa3f2d2 100755 --- a/apps/Min Browser/install-32 +++ b/apps/Min Browser/install-32 @@ -7,7 +7,10 @@ function error { exit 1 } -version='1.20.0' -wget https://github.com/chunky-milk/minbrowser-arm-builds/releases/download/${version}/min_${version}_armhf.deb || error "Failed to download Min deb file!" -sudo apt install -yf ./min_${version}_armhf.deb || error "Failed to install min deb file!" -rm -f ./min_${version}_armhf.deb +version='1.21.0' +rm -f ~/min.deb +wget -O ~/min.deb https://github.com/chunky-milk/minbrowser-arm-builds/releases/download/${version}/min_${version}_armhf.deb || error "Failed to download Min deb file!" + +"${DIRECTORY}/pkg-install" "$HOME/min.deb" "$(dirname "$0")" || error "Failed to install min deb file!" +rm -f version='1.21.0' +rm -f ~/min.deb diff --git a/apps/Min Browser/install-64 b/apps/Min Browser/install-64 index 17b633c..1e11af5 100755 --- a/apps/Min Browser/install-64 +++ b/apps/Min Browser/install-64 @@ -7,7 +7,10 @@ function error { exit 1 } -version='1.20.0' -wget https://github.com/chunky-milk/minbrowser-arm-builds/releases/download/${version}/min_${version}_arm64.deb || error "Failed to download Min deb file!" -sudo apt install -yf ./min_${version}_arm64.deb || error "Failed to install min deb file!" -rm -f ./min_${version}_arm64.deb +version='1.21.0' +rm -f ~/min.deb +wget -O ~/min.deb https://github.com/chunky-milk/minbrowser-arm-builds/releases/download/${version}/min_${version}_arm64.deb || error "Failed to download Min deb file!" + +"${DIRECTORY}/pkg-install" "$HOME/min.deb" "$(dirname "$0")" || error "Failed to install min deb file!" +rm -f version='1.21.0' +rm -f ~/min.deb diff --git a/apps/Min Browser/uninstall b/apps/Min Browser/uninstall index 4eaf3f3..494d749 100755 --- a/apps/Min Browser/uninstall +++ b/apps/Min Browser/uninstall @@ -7,4 +7,4 @@ function error { exit 1 } -sudo apt purge min -y || error "failed to remove min package from system!" +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || error "failed to remove min package from system!" diff --git a/apps/Minecraft Bedrock/install-32 b/apps/Minecraft Bedrock/install-32 index d4e8c5e..b60011f 100755 --- a/apps/Minecraft Bedrock/install-32 +++ b/apps/Minecraft Bedrock/install-32 @@ -11,7 +11,7 @@ function error { #Download file cd ~ -curl -L https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/v0.2.1-661/Minecraft_Bedrock_Launcher-arm-0.0.661.AppImage --output MCBedrock.AppImage +curl -L https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/v0.2.5-672/Minecraft_Bedrock_Launcher-arm-0.0.672.AppImage --output MCBedrock.AppImage chmod +x MCBedrock.AppImage sudo mv MCBedrock.AppImage /opt/MCBedrock.AppImage @@ -21,7 +21,7 @@ Version=1.1 Type=Application Name=Minecraft Bedrock Launcher Comment=A Minecraft: Bedrock Edition -Icon=$(dirname "$0")/icon-64.png +Icon='"$(dirname "$0")/icon-64.png"' Exec=bash -c "sudo modprobe fuse ; GALLIUM_HUD=simple,fps /opt/MCBedrock.AppImage" Categories=Game; Terminal=false diff --git a/apps/Minecraft Bedrock/install-64 b/apps/Minecraft Bedrock/install-64 index 42187f6..20d8ef6 100755 --- a/apps/Minecraft Bedrock/install-64 +++ b/apps/Minecraft Bedrock/install-64 @@ -8,11 +8,11 @@ function error { # Get dependencies sudo dpkg --add-architecture armhf -"${DIRECTORY}/pkg-install" "curl libx11-6:armhf libxext6:armhf libegl1-mesa:armhf zlib1g:armhf libstdc++6:armhf libgl1-mesa-dri:armhf libasound2:armhf libpulse0:armhf libcom-err2:armhf libgmp10:armhf libp11-kit0:armhf" "$(dirname "$0")" || exit 1 +"${DIRECTORY}/pkg-install" "curl libx11-6:armhf libxext6:armhf libegl1-mesa:armhf zlib1g:armhf libstdc++6:armhf libgl1-mesa-dri:armhf libasound2:armhf libpulse0:armhf libcom-err2:armhf libgmp10:armhf libp11-kit0:armhf libsystemd0:armhf libllvm12:armhf" "$(dirname "$0")" || exit 1 #Download file cd ~ -curl -L https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/v0.2.1-661/Minecraft_Bedrock_Launcher-arm_aarch64-0.0.661.AppImage --output MCBedrock.AppImage +curl -L https://github.com/ChristopherHX/linux-packaging-scripts/releases/download/v0.2.5-672/Minecraft_Bedrock_Launcher-arm_aarch64-0.0.672.AppImage --output MCBedrock.AppImage chmod +x MCBedrock.AppImage sudo mv MCBedrock.AppImage /opt/MCBedrock.AppImage @@ -22,7 +22,7 @@ Version=1.1 Type=Application Name=Minecraft Bedrock Launcher Comment=A Minecraft: Bedrock Edition -Icon=$(dirname "$0")/icon-64.png +Icon='"$(dirname "$0")/icon-64.png"' Exec=bash -c "GALLIUM_HUD=simple,fps /opt/MCBedrock.AppImage" Categories=Game; Terminal=false diff --git a/apps/Minecraft Bedrock/uninstall b/apps/Minecraft Bedrock/uninstall index 2403cf0..07043b7 100755 --- a/apps/Minecraft Bedrock/uninstall +++ b/apps/Minecraft Bedrock/uninstall @@ -7,4 +7,4 @@ function error { } sudo rm /opt/MCBedrock.AppImage -rm -rf ~/'.cache/Minecraft Linux Launcher' ~/.cache/mcpelauncher ~/.cache/mcpelauncher-webview ~/.cache/msa ~/.cache/msa-ui-qt ~/.local/share/msa +rm -rf ~/'.cache/Minecraft Linux Launcher' ~/.cache/mcpelauncher ~/.cache/mcpelauncher-webview ~/.cache/msa ~/.cache/msa-ui-qt ~/.local/share/msa ~/.local/share/applications/minecraftbedrock.desktop diff --git a/apps/Minecraft Java/install-32 b/apps/Minecraft Java/install-32 index 111de30..62cc88f 100755 --- a/apps/Minecraft Java/install-32 +++ b/apps/Minecraft Java/install-32 @@ -7,12 +7,8 @@ function error { exit 1 } -#use the error function often! -#If a certain command is necessary for installation to continue, then add this to the end of it: -# || error 'reason' -#example below: - #Run modified setupMC.sh +rm -rf ~/Minecraft || sudo rm -rf ~/Minecraft || error "Failed to first remove ~/Minecraft folder!" mkdir -p ~/Minecraft && cd ~/Minecraft && wget https://github.com/chunky-milk/Minecraft/raw/main/setupMC.sh && chmod +x setupMC.sh && ./setupMC.sh || error 'Failed to install the launcher!' #Move launcher to /usr/share/ diff --git a/apps/Minecraft Java/install-64 b/apps/Minecraft Java/install-64 index 0e63189..318effb 100755 --- a/apps/Minecraft Java/install-64 +++ b/apps/Minecraft Java/install-64 @@ -7,12 +7,8 @@ function error { exit 1 } -#use the error function often! -#If a certain command is necessary for installation to continue, then add this to the end of it: -# || error 'reason' -#example below: - #Download java and launcher +rm -rf ~/Minecraft || sudo rm -rf ~/Minecraft || error "Failed to first remove ~/Minecraft folder!" mkdir ~/Minecraft && cd ~/Minecraft && wget https://github.com/chunky-milk/Minecraft/raw/main/setupMC.sh && chmod +x setupMC.sh && ./setupMC.sh || error 'Failed to install the launcher!' #Move launcher to /usr/share/ diff --git a/apps/Minecraft Pi (Modded)/install b/apps/Minecraft Pi (Modded)/install index c53c767..9e2589f 100755 --- a/apps/Minecraft Pi (Modded)/install +++ b/apps/Minecraft Pi (Modded)/install @@ -1,11 +1,5 @@ #!/bin/bash -## -## Config -## - -set -e - DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" function error { @@ -13,26 +7,12 @@ function error { exit 1 } -# Wait for apt lock to be released -i=0 -while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock > /dev/null 2>&1 -do - case $(($i % 4)) in - 0) j="-";; - 1) j="\\";; - 2) j="|";; - 3) j="/";; - esac - printf "\r[$j] Waiting for other package managers to finish..." - sleep 0.5 - ((i+=1)) -done -[[ $i -gt 0 ]] && printf "Done.\n" +"${DIRECTORY}/api" apt_lock_wait # Remove old MCPILs sudo apt-get remove -y mcpil-r mcpil &>/dev/null || true -wget --no-cache -q -O - https://raw.githubusercontent.com/MCPI-Revival/mcpi-packages/master/install.sh | sudo bash - || error "Failed to install APT repo!" +wget -qO- https://raw.githubusercontent.com/MCPI-Revival/mcpi-packages/master/install.sh | grep -v 'sudo apt update' | sudo bash - || error "Failed to install APT repo!" # Choose MCPIL to use PS3="Which launcher for MCPI Modded would you like to use? Need help deciding? Ask here: https://discord.com/invite/aDqejQGMMy @@ -48,10 +28,10 @@ do MCPIL="jmcpil" break;; "${options[2]}") - exit 0 + exit 0;; *) echo "Invalid option: $REPLY";; esac done -"${DIRECTORY}/pkg-install" "${MCPIL} python3-pip" "$(dirname "$0")" -pip3 install mcpi +"${DIRECTORY}/pkg-install" "$MCPIL python3-pip" "$(dirname "$0")" || error "Failed to install ${MCPIL} and python3-pip packages!" +pip3 install mcpi || error "The pip3 command failed to install mcpi!" diff --git a/apps/Minecraft Pi (Modded)/uninstall b/apps/Minecraft Pi (Modded)/uninstall index 8b5e19c..c1d6087 100755 --- a/apps/Minecraft Pi (Modded)/uninstall +++ b/apps/Minecraft Pi (Modded)/uninstall @@ -7,25 +7,6 @@ function error { exit 1 } -# Wait for apt lock to be released -i=0 -while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock > /dev/null 2>&1 -do - case $(($i % 4)) in - 0) j="-";; - 1) j="\\";; - 2) j="|";; - 3) j="/";; - esac - printf "\r[$j] Waiting for other package managers to finish..." - sleep 0.5 - ((i+=1)) -done -[[ $i -gt 0 ]] && printf "Done.\n" - -sudo apt remove -y minecraft-pi-reborn-native &>/dev/null || true "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 -sudo apt -y autoremove - sudo rm -f /etc/apt/{sources.list,trusted.gpg}.d/mcpi-revival.{list,gpg} diff --git a/apps/Node.js/uninstall b/apps/Node.js/uninstall index 19581b2..8f3ae0d 100755 --- a/apps/Node.js/uninstall +++ b/apps/Node.js/uninstall @@ -21,4 +21,4 @@ nvm uninstall default || error "Failed to purge Node.JS!" sudo rm -rf "$NVM_DIR" #remove nvm stuff from bashrc -sed -i '/NVM_DIR/d' /home/pi/.bashrc +sed -i '/NVM_DIR/d' ~/.bashrc diff --git a/apps/OBS Studio/install-32 b/apps/OBS Studio/install-32 index 3922399..4855c6c 100755 --- a/apps/OBS Studio/install-32 +++ b/apps/OBS Studio/install-32 @@ -15,6 +15,12 @@ wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_ar wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_armhf.deb -O ~/libfdk-aac-dev_2.0.1-1_armhf.deb || error "Failed to download libfdk-aac-dev_2.0.1-1_armhf.deb" wget https://github.com/techcoder20/RPIObsInstaller/blob/main/obs_armhf.deb?raw=true -O ~/obs_armhf.deb || error "Failed to download obs_armhf.deb" +#remove obs-studio package first +if dpkg -l obs-studio &>/dev/null ;then + echo "Removing obs-studio package first..." + sudo apt purge -y obs-studio +fi + #Install all debs. Local dependencies, obs_armhf.deb, normal dependencies, and libxcb* "${DIRECTORY}/pkg-install" "$HOME/obs_armhf.deb $HOME/libfdk-aac2_2.0.1-1_armhf.deb $HOME/libfdk-aac-dev_2.0.1-1_armhf.deb libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig libxcb* " "$(dirname "$0")" || exit 1 diff --git a/apps/OBS Studio/install-64 b/apps/OBS Studio/install-64 index c61f985..7804556 100755 --- a/apps/OBS Studio/install-64 +++ b/apps/OBS Studio/install-64 @@ -15,6 +15,12 @@ wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_ar wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_arm64.deb -O ~/libfdk-aac-dev_2.0.1-1_arm64.deb || error "Failed to download libfdk-aac-dev_2.0.1-1_arm64.deb" wget https://github.com/techcoder20/RPIObsInstaller/blob/main/obs_arm64.deb?raw=true -O ~/obs_arm64.deb || error "Failed to download obs_arm64.deb" +#remove obs-studio package first +if dpkg -l obs-studio &>/dev/null ;then + echo "Removing obs-studio package first..." + sudo apt purge -y obs-studio +fi + #Install all debs. Local dependencies, obs_armhf.deb, normal dependencies, and libxcb* "${DIRECTORY}/pkg-install" "$HOME/obs_arm64.deb $HOME/libfdk-aac2_2.0.1-1_arm64.deb $HOME/libfdk-aac-dev_2.0.1-1_arm64.deb libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig libxcb* " "$(dirname "$0")" || exit 1 diff --git a/apps/PPSSPP (PSP emulator)/uninstall b/apps/PPSSPP (PSP emulator)/uninstall index 0ff6c9d..8008686 100755 --- a/apps/PPSSPP (PSP emulator)/uninstall +++ b/apps/PPSSPP (PSP emulator)/uninstall @@ -10,6 +10,6 @@ function error { #if your app installs any packages, keep this command here so those packages will be removed. "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 -rm ~/.local/share/applications/ppsspp.desktop || error "Failed to remove desktop entry!" +rm -f ~/.local/share/applications/ppsspp.desktop || error "Failed to remove desktop entry!" rm -rf ~/ppsspp || error "Failed to remove install directory!" diff --git a/apps/Pi-Apps Terminal Plugin (bash)/install b/apps/Pi-Apps Terminal Plugin (bash)/install index 3da7a91..67c3d70 100755 --- a/apps/Pi-Apps Terminal Plugin (bash)/install +++ b/apps/Pi-Apps Terminal Plugin (bash)/install @@ -28,5 +28,3 @@ echo '#!/bin/bash '"${DIRECTORY}"'/pi-apps-terminal-bash-edition.sh "$@"' | sudo tee /usr/local/bin/pi-apps >/dev/null || error "Failed to create pi-apps command in '/usr/local/bin/'!" sudo chmod +x /usr/local/bin/pi-apps || error "Failed to make launcher script executable!" echo "done" - - diff --git a/apps/Powerline-Shell/install b/apps/Powerline-Shell/install index 06db079..bc629d5 100755 --- a/apps/Powerline-Shell/install +++ b/apps/Powerline-Shell/install @@ -8,7 +8,7 @@ function error { } # Get dependencies -"${DIRECTORY}/pkg-install" "python3 python-pip fonts-powerline fonts-fantasque-sans" "$(dirname "$0")" || exit 1 +"${DIRECTORY}/pkg-install" "python3 python3-pip fonts-powerline fonts-fantasque-sans" "$(dirname "$0")" || exit 1 wget -qO- https://raw.githubusercontent.com/techcoder20/RPI-PowerlineShell-Installer/main/install.sh | bash || error "install.sh failed!" diff --git a/apps/Pycharm CE/credits b/apps/Pycharm CE/credits index bf33940..d4bdf70 100644 --- a/apps/Pycharm CE/credits +++ b/apps/Pycharm CE/credits @@ -1,2 +1 @@ Thanks to gam3t3chelectronicshobbyhouse a.k.a 'Gam3t3ch' for "Installing PyCharm on Raspberry Pi 4" from element14. Also, fabianmendes for introducing it into pi-apps. -Pycharm Community EDITION (product, created and published by JetBrains. Developed with drive and IntelliJ IDEA) Copyright © 2000-2020 JetBrains s.r.o. diff --git a/apps/Pycharm CE/description b/apps/Pycharm CE/description index a51327b..dfa8871 100644 --- a/apps/Pycharm CE/description +++ b/apps/Pycharm CE/description @@ -1,5 +1,6 @@ Python Community Edition IDE for Professional and Educational Developers. -To run this app just go to Menu > Programming. Or just run on terminal: "./opt/pycharm-community/bin/pycharm.sh" +To run: Menu -> Programming -> Pycharm Community Edition +To run in a terminal: /opt/pycharm-community/bin/pycharm.sh -You must configurate the IDE to run each script ("py" file), or create a new environment. -For Educational purposes, you must to install the "EDUtools" plugin. Go to the right below corner from the Pycharm start up portal: Configurate > Plugins > Search for: EDUtools > Install it and restart the IDE. Then you will able to select "Learn and Teach" for courses. +You must configure the IDE to run each script ("py" file), or create a new environment. +For Educational purposes, the "EDUtools" plugin can be installed. Go to the right corner from the Pycharm start up portal: Configurate > Plugins > Search for: EDUtools > Install it and restart the IDE. Then you will able to select "Learn and Teach" for courses. diff --git a/apps/Pycharm CE/icon-24.png b/apps/Pycharm CE/icon-24.png index 1c08b09..bf401c9 100644 Binary files a/apps/Pycharm CE/icon-24.png and b/apps/Pycharm CE/icon-24.png differ diff --git a/apps/Pycharm CE/icon-64.png b/apps/Pycharm CE/icon-64.png index 964b26b..18248a2 100644 Binary files a/apps/Pycharm CE/icon-64.png and b/apps/Pycharm CE/icon-64.png differ diff --git a/apps/Pycharm CE/install b/apps/Pycharm CE/install index 0bc8336..315af36 100755 --- a/apps/Pycharm CE/install +++ b/apps/Pycharm CE/install @@ -8,49 +8,45 @@ function error { } #Defining Variables -downloadlink=https://download-cf.jetbrains.com/python/pycharm-community-2020.3.3.tar.gz +downloadlink=https://download-cf.jetbrains.com/python/pycharm-community-2021.2.1.tar.gz name=pycharm-community # Get dependencies -"${DIRECTORY}/pkg-install" "python-pip openjdk-11-jdk" "$(dirname "$0")" || exit 1 +"${DIRECTORY}/pkg-install" "python3-pip openjdk-11-jdk gcc" "$(dirname "$0")" || exit 1 -#Removing if pycharm-community-2020.3.3.tar.gz already downloaded -rm $name.tar.gz +echo "Downloading $(basename "$downloadlink")" +rm -f $name.tar.gz +wget $downloadlink -O $name.tar.gz || error "Failed to download $(basename "$downloadlink")" -#Removing pycharm-community-2020.3.3 if already extracted -sudo rm -r /opt/$name - -#Downloading pycharm-community-2020.3.3.tar.gz -wget $downloadlink -O $name.tar.gz - -#Extracting pycharm-community-2020.3.3.tar.gz to /opt -sudo mkdir /opt/$name -sudo tar xvzf $name.tar.gz -C /opt/$name +echo "Extracting pycharm-community-2020.3.3.tar.gz to /opt" +sudo rm -rf /opt/$name +sudo mkdir -p /opt/$name +sudo tar xvzf $name.tar.gz -C /opt/$name || error "Failed to extract $name.tar.gz" +rm -f $name.tar.gz sudo mv /opt/$name/*/* /opt/$name/ -#Deleting pycharm-community-2020.3.3.tar.gz -rm $name.tar.gz - -#Making file executable +echo "Making file executable" sudo chmod +x /opt/$name/bin/pycharm.sh -#Implementing terminal fix -git clone https://github.com/JetBrains/pty4j.git ~/pty4j +echo "Implementing terminal fix" +rm -rf ~/pty4j +git clone https://github.com/JetBrains/pty4j.git ~/pty4j || error "Failed to download pty4j repository" cd ~/pty4j/native -gcc -fPIC -c *.c -gcc -shared -o libpty.so *.o -sudo mkdir /opt/$name/lib/pty4j-native/linux/arm -sudo cp libpty.so /opt/$name/lib/pty4j-native/linux/arm -sudo rm -r ~/pty4j - -#Creating desktop shortcut +gcc -fPIC -c *.c || error "command failed: gcc -fPIC -c *.c" +gcc -shared -o libpty.so *.o || error "command failed: gcc -shared -o libpty.so *.o" +sudo mkdir -p /opt/$name/lib/pty4j-native/linux/arm || error "Failed to make directory /opt/$name/lib/pty4j-native/linux/arm" +sudo cp libpty.so /opt/$name/lib/pty4j-native/linux/arm || error "Failed to copy $(pwd)/libpty.so to /opt/$name/lib/pty4j-native/linux/arm" +rm -rf ~/pty4j +cd ~/ + +echo "Creating desktop shortcut" echo "[Desktop Entry] Type=Application Name=PyCharm Community Edition Icon=/opt/$name/bin/pycharm.svg -Exec=/opt/$name/bin/pycharm.sh %f -Comment=Python IDE for Professional Developers -Categories=Development;IDE; +Exec=bash -c "\""JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf PATH=/usr/lib/jvm/java-11-openjdk-armhf/bin/:$PATH /opt/$name/bin/pycharm.sh"\"" +Comment=Python IDE +Categories=Development;IDE;Programming; Terminal=false -StartupWMClass=jetbrains-pycharm-ce" > ~/.local/share/applications/jetbrains-pycharm-ce.desktop - +StartupWMClass=jetbrains-pycharm-ce +StartupNotify=true" > ~/.local/share/applications/jetbrains-pycharm-ce.desktop diff --git a/apps/Pycharm CE/uninstall b/apps/Pycharm CE/uninstall index 1480930..003158d 100755 --- a/apps/Pycharm CE/uninstall +++ b/apps/Pycharm CE/uninstall @@ -7,11 +7,12 @@ function error { exit 1 } -#if your app installs any packages, keep this command here so those packages will be removed. +#Defining Variables +name=pycharm-community + "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 -#deleting /opt/pycharm-community directory -sudo rm -rf /opt/pycharm-community || error "Failed to delete /opt/pycharm-community directory" +echo "Deleting /opt/$name directory" +sudo rm -rf /opt/$name || error "Failed to delete /opt/$name directory" -#deleting desktop entry -rm ~/.local/share/applications/jetbrains-pycharm-ce.desktop || error "Failed to delete desktop entry" +rm -f ~/.local/share/applications/jetbrains-pycharm-ce.desktop diff --git a/apps/QEMU/install-32 b/apps/QEMU/install-32 index 5a9172a..0c82242 100755 --- a/apps/QEMU/install-32 +++ b/apps/QEMU/install-32 @@ -8,15 +8,12 @@ function error { } #Remove any qemu packages first to prevent conflicting packages -sudo apt purge -y qemu* - -cd $HOME -#remove deb if present -rm -f ./qemu*-armhf.deb +sudo apt purge -yqq qemu* &>/dev/null +rm -f ~/qemu.deb #Download QEMU -wget https://github.com/chunky-milk/qemu-arm-builds/releases/download/6.0.50/qemu-6.0.50-armhf.deb || error 'Failed to Download QEMU!' +wget -O ~/qemu.deb https://github.com/chunky-milk/qemu-arm-builds/releases/download/6.0.50/qemu-6.0.50-armhf.deb || error 'Failed to Download QEMU!' #Install QEMU -"${DIRECTORY}/pkg-install" "$(pwd)/qemu-6.0.50-armhf.deb" "$(dirname "$0")" || error 'Failed to install QEMU!' -rm -f qemu*-armhf.deb +"${DIRECTORY}/pkg-install" "$HOME/qemu.deb" "$(dirname "$0")" || error 'Failed to install qemu.deb!' +rm -f ~/qemu.deb diff --git a/apps/QEMU/install-64 b/apps/QEMU/install-64 index 2497639..c363cc7 100755 --- a/apps/QEMU/install-64 +++ b/apps/QEMU/install-64 @@ -8,13 +8,12 @@ function error { } #Remove any qemu packages first to prevent conflicting packages -sudo apt purge -y qemu* +sudo apt purge -yqq qemu* &>/dev/null -cd $HOME -#remove deb is exists -rm -f ./qemu*arm64.deb +rm -f ~/qemu.deb #Download QEMU -wget https://github.com/chunky-milk/qemu-arm-builds/releases/download/6.0.50/qemu-6.0.50-arm64.deb || error 'Failed to Download QEMU!' +wget -O ~/qemu.deb https://github.com/chunky-milk/qemu-arm-builds/releases/download/6.0.50/qemu-6.0.50-arm64.deb || error 'Failed to Download QEMU!' + #Install QEMU -sudo apt install -fy ./qemu-6.0.50-arm64.deb || error 'Failed to install QEMU!' -rm -f qemu-6.0.50-arm64.deb +"${DIRECTORY}/pkg-install" "$HOME/qemu.deb" "$(dirname "$0")" || error 'Failed to install qemu.deb!' +rm -f ~/qemu.deb diff --git a/apps/Raspi2png/install b/apps/Raspi2png/install index 44b72dd..62bae9d 100755 --- a/apps/Raspi2png/install +++ b/apps/Raspi2png/install @@ -6,14 +6,16 @@ function error { echo -e "\\e[91m$1\\e[39m" exit 1 } + "${DIRECTORY}/pkg-install" "libpng-dev" "$(dirname "$0")" || exit 1 +rm -rf ~/raspi2png git clone https://github.com/AndrewFromMelbourne/raspi2png || error "failed to clone repository!" -cd raspi2png || error "failed to enter directory!" +cd ~/raspi2png || error "failed to enter directory!" make || error "failed to compile!" sudo make install || error "sudo make install failed!" -cd .. -rm -rf raspi2png || error "failed to delete directory!" +cd ~/ +rm -rf ~/raspi2png || error "failed to delete directory!" diff --git a/apps/Raspi2png/installed-packages b/apps/Raspi2png/installed-packages deleted file mode 100644 index a94e783..0000000 --- a/apps/Raspi2png/installed-packages +++ /dev/null @@ -1,3 +0,0 @@ -libpng12-dev -libpng12-dev - diff --git a/apps/Raspi2png/uninstall b/apps/Raspi2png/uninstall index a94faea..32bf9c9 100755 --- a/apps/Raspi2png/uninstall +++ b/apps/Raspi2png/uninstall @@ -7,4 +7,4 @@ function error { exit 1 } -sudo rm /usr/bin/raspi2png +sudo rm -f /usr/bin/raspi2png diff --git a/apps/Remarkable/install-32 b/apps/Remarkable/install-32 index 38300ce..1bd55b6 100755 --- a/apps/Remarkable/install-32 +++ b/apps/Remarkable/install-32 @@ -7,7 +7,8 @@ function error { exit 1 } -wget https://remarkableapp.github.io/files/remarkable_1.87_all.deb || error 'Failed to Download!' +rm -f ~/remarkable.deb +wget -O ~/remarkable.deb https://remarkableapp.github.io/files/remarkable_1.87_all.deb || error 'Failed to download remarkable.deb!' -sudo apt --fix-broken -y install ./remarkable_1.87_all.deb || error 'Failed to install!' -rm remarkable_1.87_all.deb +"${DIRECTORY}/pkg-install" "$HOME/remarkable.deb" "$(dirname "$0")" || error "Failed to install ~/remarkable.deb!" +rm -f ~/remarkable.deb diff --git a/apps/Remarkable/uninstall b/apps/Remarkable/uninstall index 485ca2f..46bc224 100755 --- a/apps/Remarkable/uninstall +++ b/apps/Remarkable/uninstall @@ -7,17 +7,4 @@ function error { exit 1 } -#to set $arch variable -source "${DIRECTORY}/api" || error "failed to source ${DIRECTORY}/api" -if [ "$arch" == 64 ];then - #COMMANDS TO UNINSTALL 64BIT - "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 - -elif [ "$arch" == 32 ];then - #COMMANDS TO UNINSTALL 32BIT - sudo apt purge remarkable -y || error "Failed to purge remarkable package!" - sudo apt autoremove -y - -else - error "Failed to detect OS CPU architecture! Something is very wrong." -fi +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/Scratch 2/install-32 b/apps/Scratch 2/install-32 index ff16834..94588aa 100755 --- a/apps/Scratch 2/install-32 +++ b/apps/Scratch 2/install-32 @@ -14,7 +14,7 @@ echo "Copying libpepflashplayer.so to /usr/lib/chromium-browser..." sudo cp -af ~/scratch2/libpepflashplayer.so /usr/lib/chromium-browser/libpepflashplayer.so || error "Failed to copy libpepflashplayer.so" echo "Installing scratch2 package..." -sudo apt install -yf ~/scratch2/scratch2_0.25_armhf.deb || error "Failed to install scratch2 package" +"${DIRECTORY}/pkg-install" "$HOME/scratch2/scratch2_0.25_armhf.deb" "$(dirname "$0")" || error "Failed to install scratch2 package" echo "Holding scratch2 package version so it won't upgrade..." echo "scratch2 hold" | sudo dpkg --set-selections diff --git a/apps/Scratch 2/uninstall b/apps/Scratch 2/uninstall index 0d6cf7a..64ec774 100755 --- a/apps/Scratch 2/uninstall +++ b/apps/Scratch 2/uninstall @@ -10,4 +10,4 @@ function error { echo "Allowing scratch2 package to be uninstallable..." echo "scratch2 install" | sudo dpkg --set-selections -sudo apt purge scratch2 -y || error "Failed to uninstall scratch2 package" +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || error "Failed to uninstall scratch2 package" diff --git a/apps/Snap Store/install b/apps/Snap Store/install index 3cbbdcd..2df91b6 100755 --- a/apps/Snap Store/install +++ b/apps/Snap Store/install @@ -9,14 +9,21 @@ function error { # Get dependencies "${DIRECTORY}/pkg-install" "libsquashfuse0 squashfuse fuse libgconf-2-4" "$(dirname "$0")" || error "Failed to install libsquashfuse0 squashfuse fuse" -sudo apt install snapd || error "APT failed to install snapd" +sudo apt install -y snapd || error "APT failed to install snapd" sudo systemctl enable --now snapd.socket || error "Unable to enable snapd.socket" -sudo systemctl start snapd.service || error "Unable to start snapd.service" +sudo systemctl start snapd.service +if [ $? != 0 ];then + echo "Unable to start snapd.service. Running debug..." + echo "Running 'systemctl status snapd.service'" + systemctl status snapd.service + exit 1 +fi + sudo snap refresh sudo systemctl restart snapd.service || error "Unable to restart snapd.service" -sudo snap install core20 || error "Snapd was unable to install core20" +sudo snap install core18 || error "Snapd was unable to install core20" sudo snap install core || error "Snapd was unable to install core" sudo snap install snapd || error "Snapd was unable to install snapd" diff --git a/apps/Snap Store/uninstall b/apps/Snap Store/uninstall index 8624fc5..05cbe11 100755 --- a/apps/Snap Store/uninstall +++ b/apps/Snap Store/uninstall @@ -7,12 +7,15 @@ function error { exit 1 } -sudo snap remove snap-store || error "The snap command failed to uninstall snap-store\nPerhaps running this command would fix it?\nsudo apt install --reinstall snapd" +sudo rm -rf /var/snap/snap-store +if command -v snap >/dev/null ;then + sudo snap remove snap-store || error "The snap command failed to uninstall snap-store\nPerhaps running this command would fix it?\nsudo apt install --reinstall snapd" echo -e "\e[93mNote: To prevent removing user data, uninstalling the Snap Store app does not uninstall the snapd package!\nTo completely remove everything snap-related, run this command: sudo apt purge snapd\e[39m " -sleep 3 -echo "Waiting 30 seconds..." -sleep 30 + +else + echo "Warning: attempting to uninstall snap store but the snap command is not found. This script is exiting with 'success', as obviously nothing is installed." +fi diff --git a/apps/Snapdrop/uninstall b/apps/Snapdrop/uninstall index 041f0c8..142af5e 100755 --- a/apps/Snapdrop/uninstall +++ b/apps/Snapdrop/uninstall @@ -6,4 +6,4 @@ function error { } rm -rf ~/snapdrop || error "Failed to remove install directory!" -rm ~/.local/share/applications/snapdrop.desktop || error "Failed to remove desktop shortcut!" \ No newline at end of file +rm -f ~/.local/share/applications/snapdrop.desktop \ No newline at end of file diff --git a/apps/SpeedTest-CLI/install-32 b/apps/SpeedTest-CLI/install-32 index 0b95ee2..568db8c 100755 --- a/apps/SpeedTest-CLI/install-32 +++ b/apps/SpeedTest-CLI/install-32 @@ -32,3 +32,4 @@ echo "#!/bin/bash $HOME/speedtest/speedtest \"\$@\"" | sudo tee /usr/local/bin/speedtest >/dev/null sudo chmod +x /usr/local/bin/speedtest echo "done" + diff --git a/apps/SpeedTest-CLI/install-64 b/apps/SpeedTest-CLI/install-64 index 2abfc7b..c06e3d6 100755 --- a/apps/SpeedTest-CLI/install-64 +++ b/apps/SpeedTest-CLI/install-64 @@ -9,7 +9,7 @@ function error { cd ~ mkdir speedtest -wget https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-armhf-linux.tgz -O ~/speedtest.tgz || error 'Failed to download!' +wget https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-aarch64-linux.tgz -O ~/speedtest.tgz || error 'Failed to download!' cd speedtest tar -xvzf ~/speedtest.tgz || error "failed to extract files!" cd $HOME diff --git a/apps/SpeedTest-CLI/uninstall b/apps/SpeedTest-CLI/uninstall index 5eb6a1e..2ba8bc1 100755 --- a/apps/SpeedTest-CLI/uninstall +++ b/apps/SpeedTest-CLI/uninstall @@ -7,7 +7,6 @@ function error { exit 1 } -rm ~/.local/share/applications/speedtest.desktop || error "failed to remove menu shortcut!" -cd ~ +rm -f ~/.local/share/applications/speedtest.desktop || error "failed to remove menu shortcut!" rm -rf ~/speedtest -sudo rm /usr/local/bin/speedtest +sudo rm -f /usr/local/bin/speedtest diff --git a/apps/Steam/install-32 b/apps/Steam/install-32 index 26cb319..2980569 100755 --- a/apps/Steam/install-32 +++ b/apps/Steam/install-32 @@ -14,6 +14,11 @@ if dpkg -l steam-devices ;then sudo apt purge -y steam-devices fi +if dpkg -l steamlink ;then + echo "Removing steamlink package because it conflicts with steam-launcher..." + sudo apt purge -y steamlink +fi + "${DIRECTORY}/manage" install-if-not-installed Box86 || error "Box86 failed to install somehow!" echo "Downloading steam.deb" diff --git a/apps/Stunt Rally/install-32 b/apps/Stunt Rally/install-32 index 0af4e9e..86019d6 100755 --- a/apps/Stunt Rally/install-32 +++ b/apps/Stunt Rally/install-32 @@ -7,22 +7,13 @@ function error { exit 1 } -#install dependencies -if ! command -v aria2c >/dev/null ; then - sudo apt install aria2 -yf || error "Failed to install aria2" - ARIA2=1 -fi - -"${DIRECTORY}/pkg-install" "libboost-wave-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libogre-1.9-dev libmygui-dev libsdl2-dev libogg-dev libvorbis-dev libenet-dev libopenal-dev libopenal-dev libbullet-dev libbullet-extras-dev" "$(dirname "$0")" || exit 1 - - - #download the deb -cd $HOME -aria2c -x 16 https://archive.org/download/stunt-rally_armhf/stunt-rally_20210305-1_armhf.deb +rm -f ~/stunt-rally.deb +wget -O ~/stunt-rally.deb https://archive.org/download/stunt-rally_armhf/stunt-rally_20210305-1_armhf.deb #install the deb and delete it -sudo apt -f -y install ./stunt-rally_20210305-1_armhf.deb -rm -f stunt-rally_20210305-1_armhf.deb + +"${DIRECTORY}/pkg-install" "libboost-wave-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libogre-1.9-dev libmygui-dev libsdl2-dev libogg-dev libvorbis-dev libenet-dev libopenal-dev libopenal-dev libbullet-dev libbullet-extras-dev $HOME/stunt-rally.deb" "$(dirname "$0")" || exit 1 +rm -f ~/stunt-rally.deb #fix menu shortcut icons sudo rm /usr/share/applications/stuntrally.desktop &>/dev/null @@ -385,8 +376,3 @@ motionblurintensity = 0.400000 softparticles = off ssao = off ' > ~/.config/stuntrally/game.cfg - -#clean up -if [[ "$ARIA2" == 1 ]]; then - sudo apt purge -y aria2 -fi diff --git a/apps/Stunt Rally/install-64 b/apps/Stunt Rally/install-64 index 0dffbf6..5d8f2bc 100755 --- a/apps/Stunt Rally/install-64 +++ b/apps/Stunt Rally/install-64 @@ -23,12 +23,14 @@ fi #compile stunt rally cd $HOME -git clone --depth=1 git://github.com/stuntrally/stuntrally.git stuntrally || error "Failed to clone stuntrally repo!" +rm -rf ~/stuntrally || error "Failed to first remove $HOME/stuntrally" +git clone --depth=1 https://github.com/stuntrally/stuntrally stuntrally || error "Failed to clone stuntrally repo!" cd stuntrally/data || error "Failed to change directory to '$DIRECTORY/stuntrally/data'!" -git clone --depth=1 git://github.com/stuntrally/tracks.git tracks || error "Failed to clone tracks repo!" +git clone --depth=1 https://github.com/stuntrally/tracks tracks || error "Failed to clone tracks repo!" cd .. || error "Failed to go one directory up!" -mkdir build || error "Failed to create '$DIRECTORY/stuntrally/build' directory!" -cd build || error "Failed to change directory to '$DIRECTORY/stuntrally/build'!" + +mkdir build || error "Failed to create '$HOME/stuntrally/build' directory!" +cd build || error "Failed to change directory to '$HOME/stuntrally/build'!" cmake .. || error "Failed to run 'cmake ..'!" make -j$(nproc) || make || error "Failed to run 'make'!" #sudo make install @@ -43,10 +45,13 @@ DEBDIR="$(echo ${DEBNAME/.deb/})" || error "Failed to generate deb directory nam dpkg-deb -R $DEBNAME $DEBDIR || error "Failed to unpack deb!" rm -rf $DEBDIR/home || sudo rm -rf $DEBDIR/home rm -f $DEBNAME || error "Failed to delete old deb!" +"${DIRECTORY}/api" apt_lock_wait dpkg-deb -b $DEBDIR || sudo dpkg-deb -b $DEBDIR || error "Failed to repack deb!" #install the deb -sudo dpkg -i $DEBNAME; sudo apt install -f -y || error "Failed to install the deb!" +"${DIRECTORY}/api" apt_lock_wait +sudo apt install -f -y $DEBNAME || error "Failed to install the deb!" +rm -rf ~/stuntrally #fix the menu shortcut icons sudo rm /usr/share/applications/stuntrally.desktop &>/dev/null diff --git a/apps/Stunt Rally/uninstall b/apps/Stunt Rally/uninstall index 75e45cc..bc2e755 100755 --- a/apps/Stunt Rally/uninstall +++ b/apps/Stunt Rally/uninstall @@ -7,10 +7,10 @@ function error { exit 1 } +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 + sudo rm -f /usr/share/applications/stuntrally.desktop sudo rm -f /usr/share/applications/sr-editor.desktop -sudo apt purge stunt-rally -y || error "Failed to uninstall stunt rally!" -"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 +rm -rf $HOME/.config/stuntrally ~/stuntrally -rm -r $HOME/.config/stuntrally/ \ No newline at end of file diff --git a/apps/TeamViewer Host/install-32 b/apps/TeamViewer Host/install-32 index f2bbebb..0b53a28 100755 --- a/apps/TeamViewer Host/install-32 +++ b/apps/TeamViewer Host/install-32 @@ -7,11 +7,12 @@ function error { exit 1 } -# Download teamviewer installation file # -wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.deb || error "Failed to download teamviewer-host_armhf.deb" +# Download teamviewer installation file +rm -f ~/teamviewer-host_armhf.deb +wget -O ~/teamviewer-host_armhf.deb https://download.teamviewer.com/download/linux/teamviewer-host_armhf.deb || error "Failed to download teamviewer-host_armhf.deb" -# Install it with dpkg -sudo apt install -y --fix-broken ~/teamviewer-host_armhf.deb || error "Failed to install teamviewer-host_armhf.deb" +#install deb file +"${DIRECTORY}/pkg-install" "$HOME/teamviewer-host_armhf.deb" "$(dirname "$0")" || error "Failed to install teamviewer-host_armhf.deb" # Delete teamviewer installation file rm -f ~/teamviewer-host_armhf.deb diff --git a/apps/TeamViewer Host/uninstall b/apps/TeamViewer Host/uninstall index 03d7cfc..7631643 100755 --- a/apps/TeamViewer Host/uninstall +++ b/apps/TeamViewer Host/uninstall @@ -7,4 +7,4 @@ function error { exit 1 } -sudo apt purge -y teamviewer-host || error "APT failed to remove teamviewer-host package." +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || error "Failed to remove teamviewer-host package!" diff --git a/apps/Timeshift/install-32 b/apps/Timeshift/install-32 index 7882d90..829c8e4 100755 --- a/apps/Timeshift/install-32 +++ b/apps/Timeshift/install-32 @@ -7,7 +7,7 @@ function error { exit 1 } -cd $HOME/Downloads -wget https://github.com/teejee2008/timeshift/releases/download/v20.11.1/timeshift_20.11.1_armhf.deb || error 'Failed to download timeshift!' -sudo apt install -y --fix-broken ~/Downloads/timeshift_20.11.1_armhf.deb || error 'Failed to install .deb file!' -rm -f timeshift_20.11.1_armhf.deb +rm -f ~/timeshift.deb +wget -O ~/timeshift.deb https://github.com/teejee2008/timeshift/releases/download/v20.11.1/timeshift_20.11.1_armhf.deb || error 'Failed to download timeshift!' +"${DIRECTORY}/pkg-install" "$HOME/timeshift.deb" "$(dirname "$0")" || error 'Failed to install .deb file!' +rm -f ~/timeshift.deb diff --git a/apps/Timeshift/install-64 b/apps/Timeshift/install-64 index 4875ece..cd8f3f2 100755 --- a/apps/Timeshift/install-64 +++ b/apps/Timeshift/install-64 @@ -7,7 +7,7 @@ function error { exit 1 } -cd $HOME/Downloads -wget https://github.com/teejee2008/timeshift/releases/download/v20.11.1/timeshift_20.11.1_arm64.deb || error 'Failed to download timeshift!' -sudo apt install -y --fix-broken ~/Downloads/timeshift_20.11.1_arm64.deb || error 'Failed to install .deb file!' -rm -f timeshift_20.11.1_arm64.deb +rm -f ~/timeshift.deb +wget -O ~/timeshift.deb https://github.com/teejee2008/timeshift/releases/download/v20.11.1/timeshift_20.11.1_arm64.deb || error 'Failed to download timeshift!' +"${DIRECTORY}/pkg-install" "$HOME/timeshift.deb" "$(dirname "$0")" || error 'Failed to install .deb file!' +rm -f ~/timeshift.deb diff --git a/apps/Timeshift/uninstall b/apps/Timeshift/uninstall index 7751337..87437a6 100755 --- a/apps/Timeshift/uninstall +++ b/apps/Timeshift/uninstall @@ -7,5 +7,5 @@ function error { exit 1 } -sudo apt purge -y timeshift +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || error "Failed to uninstall timeshift package!" sudo rm -rf /etc/timeshift diff --git a/apps/Tor Browser/install-32 b/apps/Tor Browser/install-32 index 774a688..a3bedcb 100755 --- a/apps/Tor Browser/install-32 +++ b/apps/Tor Browser/install-32 @@ -7,7 +7,8 @@ function error { exit 1 } -wget https://sourceforge.net/projects/tor-browser-ports/files/10.5/tor-browser-linux-armhf-10.5_en-US.tar.xz/download -O tor.tar.xz || error "Failed to download!" +rm -f ~/tor.tar.xz +wget -O ~/tor.tar.xz https://sourceforge.net/projects/tor-browser-ports/files/10.5.6/tor-browser-linux-armhf-10.5.6_en-US.tar.xz/download || error "Failed to download!" tar -xf ~/tor.tar.xz || error "Failed to extract!" diff --git a/apps/Tor Browser/install-64 b/apps/Tor Browser/install-64 index 6eeb90e..cbf9175 100755 --- a/apps/Tor Browser/install-64 +++ b/apps/Tor Browser/install-64 @@ -7,7 +7,8 @@ function error { exit 1 } -wget https://sourceforge.net/projects/tor-browser-ports/files/10.5/tor-browser-linux-arm64-10.5_en-US.tar.xz/download -O tor.tar.xz || error "Failed to download!" +rm -f ~/tor.tar.xz +wget -O ~/tor.tar.xz https://sourceforge.net/projects/tor-browser-ports/files/10.5.6/tor-browser-linux-arm64-10.5.6_en-US.tar.xz/download || error "Failed to download!" tar -xf ~/tor.tar.xz || error "Failed to extract!" diff --git a/apps/Turbowarp/install-32 b/apps/Turbowarp/install-32 index e868b83..7c051f1 100755 --- a/apps/Turbowarp/install-32 +++ b/apps/Turbowarp/install-32 @@ -8,7 +8,7 @@ function error { } rm -f ~/turbowarp.deb -wget -O ~/turbowarp.deb https://github.com/TurboWarp/desktop/releases/download/v0.8.1/TurboWarp-linux-armv7l-0.8.1.deb || error "Failed to download deb!" +wget -O ~/turbowarp.deb https://github.com/TurboWarp/desktop/releases/download/v0.9.0/TurboWarp-linux-armv7l-0.9.0.deb || error "Failed to download deb!" "${DIRECTORY}/pkg-install" "$HOME/turbowarp.deb" "$(dirname "$0")" || error "Failed to install turbowarp.deb!" diff --git a/apps/Turbowarp/install-64 b/apps/Turbowarp/install-64 index 6e1e205..71e23f6 100755 --- a/apps/Turbowarp/install-64 +++ b/apps/Turbowarp/install-64 @@ -8,7 +8,7 @@ function error { } rm -f ~/turbowarp.deb -wget -O ~/turbowarp.deb https://github.com/TurboWarp/desktop/releases/download/v0.8.1/TurboWarp-linux-arm64-0.8.1.deb || error "Failed to download deb!" +wget -O ~/turbowarp.deb https://github.com/TurboWarp/desktop/releases/download/v0.9.0/TurboWarp-linux-arm64-0.9.0.deb || error "Failed to download deb!" "${DIRECTORY}/pkg-install" "$HOME/turbowarp.deb" "$(dirname "$0")" || error "Failed to install turbowarp.deb!" diff --git a/apps/USBImager/install-32 b/apps/USBImager/install-32 index ed47a66..497ae0d 100755 --- a/apps/USBImager/install-32 +++ b/apps/USBImager/install-32 @@ -8,7 +8,7 @@ function error { } #change version to latest each time -VER="1.0.7" +VER="1.0.8" rm -rf ~/usbimager mkdir -p ~/usbimager diff --git a/apps/USBImager/install-64 b/apps/USBImager/install-64 index 8fabd0a..b254de6 100755 --- a/apps/USBImager/install-64 +++ b/apps/USBImager/install-64 @@ -8,14 +8,14 @@ function error { } #change version to latest each time -VER="1.0.7" +VER="1.0.8" rm -rf ~/usbimager mkdir -p ~/usbimager cd ~/usbimager echo "Downloading..." -wget -qO $(pwd)/usbimager.zip https://gitlab.com/bztsrc/usbimager/raw/binaries/usbimager_1.0.7-aarch64-linux-x11.zip || error "Failed to download usbimager.zip!" +wget -qO $(pwd)/usbimager.zip https://gitlab.com/bztsrc/usbimager/raw/binaries/usbimager_${VER}-aarch64-linux-x11.zip || error "Failed to download usbimager.zip!" echo "Extracting..." unzip $(pwd)/usbimager.zip || error "Failed to extract!" diff --git a/apps/Ulauncher/install b/apps/Ulauncher/install index 836f503..dd23d69 100755 --- a/apps/Ulauncher/install +++ b/apps/Ulauncher/install @@ -7,11 +7,10 @@ function error { exit 1 } -"${DIRECTORY}/pkg-install" "gir1.2-appindicator3-0.1 python3-distutils-extra python3-levenshtein python3-websocket" "$(dirname "$0")" || exit 1 -wget 'https://github.com/Ulauncher/Ulauncher/releases/download/5.11.0/ulauncher_5.11.0_all.deb' -O ~/ulauncher.deb || error 'Failed to download ulauncher.deb!' +rm -f ~/ulauncher.deb +wget -O ~/ulauncher.deb 'https://github.com/Ulauncher/Ulauncher/releases/download/5.13.0/ulauncher_5.13.0_all.deb' || error 'Failed to download ulauncher.deb!' -sudo apt install -y --fix-missing ~/ulauncher.deb || error "APT failed to install ulauncher.deb!" +"${DIRECTORY}/pkg-install" "gir1.2-appindicator3-0.1 python3-distutils-extra python3-levenshtein python3-websocket $HOME/ulauncher.deb" "$(dirname "$0")" || error "Failed to install ulauncher.deb and dependencies!" rm -f ~/ulauncher.deb -exit 0 diff --git a/apps/Ulauncher/uninstall b/apps/Ulauncher/uninstall index 126fd22..46bc224 100755 --- a/apps/Ulauncher/uninstall +++ b/apps/Ulauncher/uninstall @@ -7,9 +7,4 @@ function error { exit 1 } -rm -f ~/ulauncher.deb - -sudo apt purge -y ulauncher - -#if your app installs any packages, keep this command here so those packages will be removed. "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/VSCodium/install b/apps/VSCodium/install deleted file mode 100755 index f4c964f..0000000 --- a/apps/VSCodium/install +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" - -function error { - echo -e "\\e[91m$1\\e[39m" - exit 1 -} - -wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium.gpg -sudo bash -c "echo 'deb https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' > /etc/apt/sources.list.d/vscodium.list" -"${DIRECTORY}/pkg-install" "codium" "$(dirname "$0")" || error "Failed to install the codium package!" diff --git a/apps/VSCodium/install-32 b/apps/VSCodium/install-32 new file mode 100755 index 0000000..7ce84e7 --- /dev/null +++ b/apps/VSCodium/install-32 @@ -0,0 +1,15 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +sudo rm -f /etc/apt/sources.list.d/vscodium.list /etc/apt/trusted.gpg.d/vscodium.gpg + +rm -f ~/codium.deb || error "Failed to first remove codium.deb" +wget -O ~/codium.deb https://github.com/VSCodium/vscodium/releases/download/1.60.1/codium_1.60.1-1631717946_armhf.deb || error "Failed to download codium.deb" + +"${DIRECTORY}/pkg-install" "$HOME/codium.deb" "$(dirname "$0")" || error "Failed to install the codium.deb package!" diff --git a/apps/VSCodium/install-64 b/apps/VSCodium/install-64 new file mode 100755 index 0000000..9f3a12a --- /dev/null +++ b/apps/VSCodium/install-64 @@ -0,0 +1,15 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +sudo rm -f /etc/apt/sources.list.d/vscodium.list /etc/apt/trusted.gpg.d/vscodium.gpg + +rm -f ~/codium.deb || error "Failed to first remove codium.deb" +wget -O ~/codium.deb https://github.com/VSCodium/vscodium/releases/download/1.60.1/codium_1.60.1-1631665121_arm64.deb || error "Failed to download codium.deb" + +"${DIRECTORY}/pkg-install" "$HOME/codium.deb" "$(dirname "$0")" || error "Failed to install the codium.deb package!" diff --git a/apps/Vivaldi/install-32 b/apps/Vivaldi/install-32 index 05a6987..a0fc48a 100755 --- a/apps/Vivaldi/install-32 +++ b/apps/Vivaldi/install-32 @@ -8,6 +8,6 @@ function error { } rm -f ~/vivaldi.deb -wget -O ~/vivaldi.deb https://downloads.vivaldi.com/stable/vivaldi-stable_4.1.2369.11-1_armhf.deb || error 'Failed to download vivaldi!' +wget -O ~/vivaldi.deb https://downloads.vivaldi.com/stable/vivaldi-stable_4.1.2369.21-1_armhf.deb || error 'Failed to download vivaldi!' "${DIRECTORY}/pkg-install" "$HOME/vivaldi.deb" "$(dirname "$0")" || error 'Failed to install vivaldi.deb!' rm -f ~/vivaldi.deb diff --git a/apps/Vivaldi/install-64 b/apps/Vivaldi/install-64 index 9560d36..309f427 100755 --- a/apps/Vivaldi/install-64 +++ b/apps/Vivaldi/install-64 @@ -8,6 +8,6 @@ function error { } rm -f ~/vivaldi.deb -wget -O ~/vivaldi.deb https://downloads.vivaldi.com/stable/vivaldi-stable_4.1.2369.11-1_arm64.deb || error 'Failed to download vivaldi!' +wget -O ~/vivaldi.deb https://downloads.vivaldi.com/stable/vivaldi-stable_4.1.2369.21-1_arm64.deb || error 'Failed to download vivaldi!' "${DIRECTORY}/pkg-install" "$HOME/vivaldi.deb" "$(dirname "$0")" || error 'Failed to install vivaldi.deb!' rm -f ~/vivaldi.deb diff --git a/apps/Windows 10 Theme/uninstall b/apps/Windows 10 Theme/uninstall index 0cb502e..290767a 100755 --- a/apps/Windows 10 Theme/uninstall +++ b/apps/Windows 10 Theme/uninstall @@ -7,10 +7,10 @@ function error { exit 1 } -if [ ! -f ~/Windows-10/uninstall ];then - error "Windows 10 uninstall script missing!" +if [ -f ~/Windows-10/uninstall ];then + setsid ~/Windows-10/uninstall & +else + echo "WARNING: Windows 10 theme's uninstall script is missing!" fi -setsid ~/Windows-10/uninstall & - "${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 diff --git a/apps/Windows Flasher/credits b/apps/Windows Flasher/credits new file mode 100644 index 0000000..729fb33 --- /dev/null +++ b/apps/Windows Flasher/credits @@ -0,0 +1 @@ +Botspot diff --git a/apps/Windows Flasher/description b/apps/Windows Flasher/description new file mode 100644 index 0000000..886368b --- /dev/null +++ b/apps/Windows Flasher/description @@ -0,0 +1,16 @@ +Install Windows 10 or Windows 11 on a Raspberry Pi SD card. +This tool is a 100% legal way to use any Debian or Ubuntu Linux operating system to flash a RPi's SD card with the necessary files to run Windows 10 or 11. + +Usage is simple: +- Choose an operating system version. (Windows 11, Windows 10, Custom version) +- Choose what model Pi will be running Windows. (RPi4 or RPi3) +- Choose a language. +- Choose a storage drive to flash. +- Click Flash. +It's as simple as that. WoR-flasher takes care of the rest - downloading hundreds of files from Microsoft, generating a Windows image with them, importing the custom RPi drivers, enabling the WinPE environment, and much more. When finished, WoR-flasher will tell you exactly what to do next. + +To run: Menu -> Accessories -> WoR-Flasher +To run the graphical interface in a terminal: ~/wor-flasher/install-wor-gui.sh +To run the command-line interface in a terminal: ~/wor-flasher/install-wor.sh + +If you encounter problems, we recommend you run WoR-flasher in a terminal to catch any errors. diff --git a/apps/Windows Flasher/icon-24.png b/apps/Windows Flasher/icon-24.png new file mode 100644 index 0000000..ce4d4de Binary files /dev/null and b/apps/Windows Flasher/icon-24.png differ diff --git a/apps/Windows Flasher/icon-64.png b/apps/Windows Flasher/icon-64.png new file mode 100644 index 0000000..c9100f6 Binary files /dev/null and b/apps/Windows Flasher/icon-64.png differ diff --git a/apps/Windows Flasher/install b/apps/Windows Flasher/install new file mode 100755 index 0000000..85d37b4 --- /dev/null +++ b/apps/Windows Flasher/install @@ -0,0 +1,29 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Installing dependencies..." +"${DIRECTORY}/pkg-install" "yad aria2 cabextract wimtools chntpw genisoimage exfat-fuse exfat-utils wget" "$(dirname "$0")" || exit 1 + +echo "Downloading repository..." +rm -rf ~/wor-flasher || error "Failed to first remove ~/wor-flasher folder!" +git clone https://github.com/Botspot/wor-flasher || error "Failed to download wor-flasher repository!" + +if [ -d ~/wor-flasher-files ];then + echo -e "\nDuring use, WoR-flasher downloads all files to $HOME/wor-flasher-files\nThis folder exists right now.\nIf WoR-flasher is malfunctioning, deleting this folder may help.\n" +fi + +echo "Creating menu button..." +echo "[Desktop Entry] +Type=Application +Name=WoR Flasher +Comment=WoR Flasher - Flash Windows 10 or 11 to your Raspberry Pi +Categories=Utility; +Exec=$HOME/wor-flasher/install-wor-gui.sh +Icon=$HOME/wor-flasher/logo.png +StartupNotify=true" > ~/.local/share/applications/wor-flasher.desktop diff --git a/apps/Windows Flasher/uninstall b/apps/Windows Flasher/uninstall new file mode 100755 index 0000000..8185e9f --- /dev/null +++ b/apps/Windows Flasher/uninstall @@ -0,0 +1,21 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Removing dependencies..." +"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1 + +echo "Removing $HOME/wor-flasher folder..." +rm -rf ~/wor-flasher || error "Failed to remove ~/wor-flasher folder!" + +echo "Removing menu button..." +rm -f ~/.local/share/applications/wor-flasher.desktop + +if [ -d ~/wor-flasher-files ];then + echo -e "\nDuring use, WoR-flasher downloads all files to $HOME/wor-flasher-files\nThis folder exists right now.\nFeel free to delete that folder to save disk space.\n" +fi diff --git a/apps/Windows Flasher/website b/apps/Windows Flasher/website new file mode 100644 index 0000000..baeee32 --- /dev/null +++ b/apps/Windows Flasher/website @@ -0,0 +1 @@ +https://github.com/Botspot/wor-flasher diff --git a/apps/Windows Screensavers/install-32 b/apps/Windows Screensavers/install-32 index fcdd569..aba882d 100755 --- a/apps/Windows Screensavers/install-32 +++ b/apps/Windows Screensavers/install-32 @@ -12,6 +12,7 @@ function error { # Get dependencies "${DIRECTORY}/pkg-install" "x11-utils yad xprintidle" "$(dirname "$0")" || exit 1 +rm -rf Screensavers git clone https://github.com/Botspot/Screensavers || error 'Failed to clone repository!' #create menu launcher diff --git a/apps/Wine (x86)/install-32 b/apps/Wine (x86)/install-32 index 584b5ed..f6a7d26 100755 --- a/apps/Wine (x86)/install-32 +++ b/apps/Wine (x86)/install-32 @@ -70,10 +70,13 @@ elif echo "$vmsplit_output" | grep -q "^CONFIG_VMSPLIT_2G=y" || echo "$vmsplit_o #download kernel source code git clone --depth=1 https://github.com/raspberrypi/linux || error "Failed to git clone the raspberry pi kernel repo!" + echo "Installing necessary build packages..." + "${DIRECTORY}/pkg-install" "raspberrypi-kernel-headers build-essential bc git wget bison flex libssl-dev make libncurses-dev" "$(dirname "$0")" || error "Failed to install necessary packages to build kernel." + #build for pi3 - cd linux + cd ~/linux || error "Failed to enter the ~/linux folder!" KERNEL=kernel7 - make -j8 bcm2709_defconfig + make -j8 bcm2709_defconfig || error "The make command exited with failure. Full command: 'make -j8 bcm2709_defconfig'" #change memory split config echo "Setting memory split to 3G/1G" @@ -83,6 +86,7 @@ elif echo "$vmsplit_output" | grep -q "^CONFIG_VMSPLIT_2G=y" || echo "$vmsplit_o echo '' | make -j8 zImage modules dtbs || error "Failed to make bcm2709_defconfig zImage modules dtbs!" #install + echo "Copying new files to /boot/..." sudo make modules_install || error "sudo make modules_install failed!" sudo cp arch/arm/boot/dts/*.dtb /boot/ || error "Failed to copy dtb files to /boot!" sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ || error "Failed to copy overlays to /boot/overlays!" @@ -91,6 +95,9 @@ elif echo "$vmsplit_output" | grep -q "^CONFIG_VMSPLIT_2G=y" || echo "$vmsplit_o cd rm -rf ~/linux + echo "Removing the utilities that were used to compile the kernel..." + "${DIRECTORY}/purge-installed" "$(dirname "$0")" + #message echo -e "It appears the 3G/1G kernel has been built and installed successfully.\nPlease reboot and install the Wine app again." sleep infinity @@ -103,7 +110,7 @@ elif echo "$vmsplit_output" | grep -q "^CONFIG_VMSPLIT_2G=y" || echo "$vmsplit_o #download precompiled kernel cd $HOME echo "Downloading precompiled kernel..." - wget https://github.com/Itai-Nelken/RPi-3g-1g-kernel-wine/releases/download/4.1/rpi23_3g1g_kernel.zip -O ~/3g1g-rpi-kernel.zip || error "Failed to download prebuilt kernel!" + wget https://github.com/Itai-Nelken/RPi-3g-1g-kernel-wine/releases/download/5/rpi23_3g1g_kernel.zip -O ~/3g1g-rpi-kernel.zip || error "Failed to download prebuilt kernel!" #extract precompiled kernel echo "Extracting prebuilt kernel..." sleep 0.5 # so user has time to read what is happening @@ -136,6 +143,10 @@ fi #install box86 "${DIRECTORY}/manage" install-if-not-installed Box86 || error "Box86 failed to install somehow!" +if ! command -v box86 >/dev/null ;then + error "Pi-Apps thinks Box86 is installed, however no command named 'box86' exists. Please install Box86 manually." +fi + pkill -9 wine sudo apt purge -y wine &>/dev/null & @@ -150,6 +161,8 @@ wget https://twisteros.com/wine.tgz -O ~/wine.tgz || error 'Failed to download w tar zxf ~/wine.tgz || error 'Failed to extract wine!' rm ~/wine.tgz +[ ! -f ~/wine/bin/wine ] && error "the wine.tgz extraction succeeded, but the file '$HOME/wine/bin/wine' is missing!" + # Install #sudo ln -s ~/wine/bin/wine /usr/local/bin/wine sudo ln -s ~/wine/bin/winecfg /usr/local/bin/winecfg @@ -160,12 +173,6 @@ echo "#!/bin/bash setarch linux32 -L $HOME/wine/bin/wine"' "$@"' | sudo tee /usr/local/bin/wine >/dev/null sudo chmod +x /usr/local/bin/wine /usr/local/bin/wineboot /usr/local/bin/wineserver /usr/local/bin/winecfg -#winetricks pre-patched -#see https://discord.com/channels/670543161525010442/736736690932285481/793931182302560277 -#sudo wget https://cdn.discordapp.com/attachments/736736690932285481/793931182249213972/winetricks -O /usr/local/bin/winetricks || error "Failed to get winetricks!" -#winetricks patch (doesn't work) -#sudo sed -i 's|echo "${arg%%=*}"=\""${arg#*=}"\"|echo ${arg%%=*}=\"${arg#*=}\"|g' /usr/local/bin/winetricks - sudo wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/local/bin/winetricks || error "Failed to download winetricks!" sudo chmod +x /usr/local/bin/winetricks diff --git a/apps/Zoom PWA/credits b/apps/Zoom PWA/credits new file mode 100644 index 0000000..729fb33 --- /dev/null +++ b/apps/Zoom PWA/credits @@ -0,0 +1 @@ +Botspot diff --git a/apps/Zoom PWA/description b/apps/Zoom PWA/description new file mode 100644 index 0000000..e3e6b15 --- /dev/null +++ b/apps/Zoom PWA/description @@ -0,0 +1,9 @@ +Web-app for Zoom +This is basically a web browser running Zoom's new Progressive Web App. Performance is better in some ways and worse in others. +This app should be considered a backup option, only used if the regular Zoom app doesn't work at all. +Both versions can be installed at the same time and will not interfere with each another. + +Note: this app requires you to have chromium-browser, chromium, or google-chrome installed. Let us know if your Chromium-based browser is not detected by the script. + +To run: Menu -> Internet -> Zoom PWA +To run in a terminal: cat ~/.local/share/applications/chrome-gbmplfifepjenigdepeahbecfkcalfhg-Zoom-PWA.desktop | grep Exec | sed 's/Exec=//g' | bash diff --git a/apps/Zoom PWA/icon-24.png b/apps/Zoom PWA/icon-24.png new file mode 100644 index 0000000..2d51e70 Binary files /dev/null and b/apps/Zoom PWA/icon-24.png differ diff --git a/apps/Zoom PWA/icon-64.png b/apps/Zoom PWA/icon-64.png new file mode 100644 index 0000000..2f57831 Binary files /dev/null and b/apps/Zoom PWA/icon-64.png differ diff --git a/apps/Zoom PWA/install b/apps/Zoom PWA/install new file mode 100755 index 0000000..dc6be8f --- /dev/null +++ b/apps/Zoom PWA/install @@ -0,0 +1,18 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Downloading zoom-pwa repository" +rm -rf ~/zoom-pwa +git clone https://github.com/Botspot/zoom-pwa + +echo "Running the built-in installation script" +~/zoom-pwa/install.sh || error "The zoom-pwa/install.sh indicated a failure. Please review errors above this point." + +echo "Cleaning up" +rm -rf ~/zoom-pwa diff --git a/apps/Zoom PWA/uninstall b/apps/Zoom PWA/uninstall new file mode 100755 index 0000000..869983e --- /dev/null +++ b/apps/Zoom PWA/uninstall @@ -0,0 +1,16 @@ +#!/bin/bash + +DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo -n "Removing files... " + +rm -f ~/.local/share/applications/*gbmplfifepjenigdepeahbecfkcalfhg* +rm -rf ./zoom-pwa +rm -rf ~/.config/Zoom-PWA + +echo Done diff --git a/apps/Zoom PWA/website b/apps/Zoom PWA/website new file mode 100644 index 0000000..459c13f --- /dev/null +++ b/apps/Zoom PWA/website @@ -0,0 +1 @@ +https://github.com/Botspot/zoom-pwa diff --git a/apps/Zoom/install-32 b/apps/Zoom/install-32 index cba6f17..78cda6e 100755 --- a/apps/Zoom/install-32 +++ b/apps/Zoom/install-32 @@ -33,8 +33,8 @@ sudo ldconfig #For testing, set to false if zoom folder is already there if true;then echo "Downloading Zoom..." - rm -rf "${HOME}/zoom" ~/zoom_i686.tar.xz - wget 'https://zoom.us/client/5.4.53391.1108/zoom_i686.tar.xz' || wget 'https://d11yldzmag5yn.cloudfront.net/prod/5.4.53391.1108/zoom_i686.tar.xz' || error 'Failed to download Zoom i686!' + rm -rf "${HOME}/zoom" ~/zoom_i686.tar.xz || sudo rm -rf "${HOME}/zoom" ~/zoom_i686.tar.xz + wget 'https://zoom.us/client/5.4.53391.1108/zoom_i686.tar.xz' || wget 'https://zoom.com/client/5.4.53391.1108/zoom_i686.tar.xz' || wget 'https://d11yldzmag5yn.cloudfront.net/prod/5.4.53391.1108/zoom_i686.tar.xz' || error 'Failed to download Zoom i686!' #get outdated Zoom client from Botspot's mirror because it's more stable #wget 'https://github.com/Botspot/zoom_686_mirror/raw/main/zoom_i686.tar.xz' || error 'Failed to download Zoom i686!' diff --git a/apps/Zoom/install-64 b/apps/Zoom/install-64 index daf2305..e969888 100755 --- a/apps/Zoom/install-64 +++ b/apps/Zoom/install-64 @@ -34,7 +34,7 @@ sudo ldconfig if true;then echo "Downloading Zoom..." rm -rf "${HOME}/zoom" ~/zoom_x86_64.tar.xz - wget 'https://zoom.us/client/latest/zoom_x86_64.tar.xz' || error 'Failed to download Zoom x86_64!' + wget 'https://zoom.us/client/latest/zoom_x86_64.tar.xz' || wget 'https://zoom.com/client/latest/zoom_x86_64.tar.xz' || error 'Failed to download Zoom x86_64!' echo "Extracting..." tar -xf ~/zoom_x86_64.tar.xz || error 'Failed to extract Zoom x86_64!' diff --git a/apps/eDEX-UI/install-32 b/apps/eDEX-UI/install-32 index cab5330..b87d984 100755 --- a/apps/eDEX-UI/install-32 +++ b/apps/eDEX-UI/install-32 @@ -12,7 +12,7 @@ mkdir ~/eDEX-UI-RPi wget -O ~/'eDEX-UI-RPi/eDEX-UI-Linux-armv7l_2.2.7.AppImage' 'https://github.com/GitSquared/edex-ui/releases/download/v2.2.7/eDEX-UI-Linux-armv7l.AppImage' || error 'Failed to download 2.2.6 appimage!' chmod +x ~/'eDEX-UI-RPi/eDEX-UI-Linux-armv7l_2.2.7.AppImage' || error 'Failed to make the appimage executable!' - +mkdir -p ~/.local/share/applications echo "[Desktop Entry] Name=eDEX-UI 2.2.7 Comment=eDEX-UI sci-fi interface diff --git a/apps/eDEX-UI/install-64 b/apps/eDEX-UI/install-64 index dd11012..6d11234 100755 --- a/apps/eDEX-UI/install-64 +++ b/apps/eDEX-UI/install-64 @@ -12,6 +12,7 @@ mkdir ~/eDEX-UI-RPi wget -O ~/eDEX-UI-RPi/eDEX-UI-Linux-arm64_2.2.7.AppImage https://github.com/GitSquared/edex-ui/releases/download/v2.2.7/eDEX-UI-Linux-arm64.AppImage || error 'Failed to download 2.2.6 appimage!' chmod +x ~/eDEX-UI-RPi/eDEX-UI-Linux-arm64_2.2.7.AppImage || error 'Failed to make the appimage executable!' +mkdir -p ~/.local/share/applications echo "[Desktop Entry] Name=eDEX-UI 2.2.7 Comment=eDEX-UI sci-fi interface diff --git a/data/categories/structure b/data/categories/structure index 8d0b67d..cb2550f 100644 --- a/data/categories/structure +++ b/data/categories/structure @@ -1,4 +1,3 @@ -AdventButWrong|Games All Is Well|Tools AndroidBuddy|Tools Angry IP scanner|Internet @@ -50,7 +49,6 @@ Libreoffice MS theme|Eyecandy LibrePCB|Editors Lightpad|Eyecandy Lokinet|Internet -Lunar Client|Games Mac OS Theme|Eyecandy Min Browser|Internet Minecraft Bedrock|Games @@ -78,6 +76,7 @@ Puffin Browser Demo|Internet Pycharm CE|Editors QEMU|Tools Raspi2png|Tools +RealVNC server|Tools Remarkable|Editors RPi-Play|Tools Scratch 2|Editors @@ -110,8 +109,12 @@ Web Apps|Internet Wechat|Internet Whatsapp|Internet Windows 10 Theme|Eyecandy +Windows Flasher|Tools Windows Screensavers|Eyecandy Wine (x86)|Tools +WorldPainter| WPS Office|Editors +XSnow| YouTubuddy|Multimedia Zoom|Internet +Zoom PWA|Internet diff --git a/etc/terminal-run b/etc/terminal-run index 42b6541..4d6f792 100755 --- a/etc/terminal-run +++ b/etc/terminal-run @@ -81,12 +81,3 @@ if [ ! -z "$temp_pid_file" ];then rm -f "$temp_pid_file" fi - - - - - - - - - diff --git a/gui b/gui index cd48eeb..0b11ded 100755 --- a/gui +++ b/gui @@ -102,24 +102,23 @@ runonce <<"EOF" fi EOF -#remove old mcpi repositories +#ensure curl is installed runonce <<"EOF" - if [ -f /etc/apt/sources.list.d/mcpi-revival.list ] && cat /etc/apt/sources.list.d/mcpi-revival.list | grep -q 'https://mcpirevival.tk/mcpi-packages' ;then - echo 'deb [trusted=yes] https://mcpi-revival.github.io/mcpi-packages/ buster main' | sudo tee /etc/apt/sources.list.d/mcpi-revival.list - fi - if [ -f /etc/apt/sources.list.d/Alvarito050506_mcpi-devs.list ];then - sudo rm -f /etc/apt/sources.list.d/Alvarito050506_mcpi-devs.list + if ! command -v curl >/dev/null ;then + sudo apt install -y curl fi EOF -#ensure curl is installed +#install aria2c for faster downloading runonce <<"EOF" - if ! command -v curl >/dev/null ;then - sudo apt install -y curl + if ! command -v aria2c >/dev/null ;then + sudo apt install -y aria2 fi EOF ) & + + install() { app="$1" #one app name per line @@ -178,14 +177,12 @@ uninstall() { "${DIRECTORY}/etc/preload-daemon" "$format" &>/dev/null & } - -if [ ! -f "${DIRECTORY}/data/announcements" ] || [ -z $(find "${DIRECTORY}/data/announcements" -mtime +1 -print) ]; then - motd="$(wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps-announcements/main/message)" - echo "$motd" > "${DIRECTORY}/data/announcements" -else - motd="$(cat "${DIRECTORY}/data/announcements")" +#Determine message of the day. If announcements file missing or over a day old, download it. +if [ ! -f "${DIRECTORY}/data/announcements" ] || [ ! -z "$(find "${DIRECTORY}/data/announcements" -mtime +1 -print)" ]; then + wget https://raw.githubusercontent.com/Botspot/pi-apps-announcements/main/message -qO "${DIRECTORY}/data/announcements" fi -motd="$(echo -e "$motd" | shuf -n 1)" +#retrieve a random line from the announcements file for this session +motd="$(shuf -n 1 "${DIRECTORY}/data/announcements")" #app list mode. Allowed values: 'yad', 'xlunch' guimode="$(cat "${DIRECTORY}/data/settings/App List Style")" @@ -240,6 +237,7 @@ while true;do echo "output variable empty!" yad --center --title='Pi-Apps' --width=310 \ --window-icon="${DIRECTORY}/icons/logo.png" \ + --image="${DIRECTORY}/icons/mind-reading.png" \ --text="Mind reading is not supported. (You didn"\'"t select an App)" \ --button=OK:0 diff --git a/icons/badge-light.png b/icons/badge-light.png new file mode 100644 index 0000000..ee82324 Binary files /dev/null and b/icons/badge-light.png differ diff --git a/icons/badge.png b/icons/badge.png index fed800f..40fc1a0 100644 Binary files a/icons/badge.png and b/icons/badge.png differ diff --git a/icons/logo-glow.png b/icons/logo-glow.png new file mode 100644 index 0000000..5689502 Binary files /dev/null and b/icons/logo-glow.png differ diff --git a/icons/logo-simple.png b/icons/logo-simple.png new file mode 100644 index 0000000..ee03019 Binary files /dev/null and b/icons/logo-simple.png differ diff --git a/icons/mind-reading.png b/icons/mind-reading.png new file mode 100644 index 0000000..9af2d65 Binary files /dev/null and b/icons/mind-reading.png differ diff --git a/icons/splashscreen.png b/icons/splashscreen.png index 932f7f3..e05a1a3 100644 Binary files a/icons/splashscreen.png and b/icons/splashscreen.png differ diff --git a/icons/vector/badge-dark.svg b/icons/vector/badge-dark.svg new file mode 100644 index 0000000..8497577 --- /dev/null +++ b/icons/vector/badge-dark.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + orij capsule + + Get it from + Pi-Apps + + \ No newline at end of file diff --git a/icons/vector/badge-light.svg b/icons/vector/badge-light.svg new file mode 100644 index 0000000..fc4c17e --- /dev/null +++ b/icons/vector/badge-light.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + orij capsule + + + Get it from + Pi-Apps + + \ No newline at end of file diff --git a/icons/vector/badge.svg b/icons/vector/badge.svg deleted file mode 100644 index 52429ac..0000000 --- a/icons/vector/badge.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - orij capsule - - - - Get it on - Pi-Apps - - \ No newline at end of file diff --git a/icons/vector/logo-glow.svg b/icons/vector/logo-glow.svg new file mode 100644 index 0000000..8878efa --- /dev/null +++ b/icons/vector/logo-glow.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + white cover + + + black + + + black + + + dots + + + shadow handle + + + white cover + + \ No newline at end of file diff --git a/icons/vector/logo-simple.svg b/icons/vector/logo-simple.svg new file mode 100644 index 0000000..94a7f09 --- /dev/null +++ b/icons/vector/logo-simple.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + shadow handle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + black + + + + + + shadow handle + + + basket + + + white cover + + + handle + + + + + + + + + + + + logo + + black + + + + + + + + + + + + + crescents + + + + + + + shadows around handle + + + + + + + accents + + white accents + + + black accents + + + \ No newline at end of file diff --git a/icons/vector/splashscreen.svg b/icons/vector/splashscreen.svg index 46c9888..d8126de 100644 --- a/icons/vector/splashscreen.svg +++ b/icons/vector/splashscreen.svg @@ -1,126 +1,41 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - blue gradient - - + + + + + + + + + + - - - shadow gradient - - - hex detail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pi-Apps - Pi-Apps - Pi-Apps + + + + + + + + + + + + + + + + - Loading... - - logo - - byby - - bs logo - - below - - - BotspotBotspot + + orij capsule + + Pi-Apps + Loading... \ No newline at end of file diff --git a/install b/install index b7832b5..48440a7 100755 --- a/install +++ b/install @@ -14,7 +14,7 @@ fi command -v apt >/dev/null || error "apt: command not found. Most likely this system is not running Debian." #Ensure running arm processor if uname -m | grep -q 'x86' ;then - error "Pi-Apps is not not supported on x86 processors." + error "Pi-Apps is not not supported on non-arm processor architectures like amd64 and i386. You may be interested in Pi-Apps x86, a unofficial fork of Pi-Apps for x64 and x86 systems: https://github.com/Pi-Apps-Recreates/pi-apps-x86" fi sudo apt update || error "The command 'sudo apt update' failed. Before Pi-Apps will work, you must fix your apt package-management system." diff --git a/manage b/manage index 192a0bb..f6b23ae 100755 --- a/manage +++ b/manage @@ -14,9 +14,49 @@ if [ -z "$1" ];then error "You need to specify an operation, and in most cases, which app to operate on." fi +set -a #make all functions in the api available to apps source "${DIRECTORY}/api" || error "failed to source ${DIRECTORY}/api" +#remove old mcpi repositories - this runonce is here so that terminal-only users will still receive the fix. +(runonce <<"EOF" + if [ -f /etc/apt/sources.list.d/mcpi-revival.list ] && cat /etc/apt/sources.list.d/mcpi-revival.list | grep -qF 'https://mcpirevival.tk/mcpi-packages' ;then + echo 'deb [trusted=yes] https://mcpi-revival.github.io/mcpi-packages/ buster main' | sudo tee /etc/apt/sources.list.d/mcpi-revival.list + elif [ -f /etc/apt/sources.list.d/mcpi-revival.list ] && cat /etc/apt/sources.list.d/mcpi-revival.list | grep -qF 'https://mcpi-revival.github.io/mcpi-packages/debs' ;then + echo 'deb [trusted=yes] https://mcpi-revival.github.io/mcpi-packages/ buster main' | sudo tee /etc/apt/sources.list.d/mcpi-revival.list + fi + if [ -f /etc/apt/sources.list.d/Alvarito050506_mcpi-devs.list ];then + sudo rm -f /etc/apt/sources.list.d/Alvarito050506_mcpi-devs.list + fi + + if dpkg -l box86 &>/dev/null ;then + sudo apt purge -y box86 + sudo apt install -y box86-no-binfmt-restart + fi +EOF +) &>/dev/null + +#Silently re-download repo if github repository is over 3 months out of date +{ +current_git_date="$(cd "$DIRECTORY"; git show -s --format=%ct)" +if [ $(date +%s) -gt $(($current_git_date + 7776000)) ];then + yad --window-icon="${DIRECTORY}/icons/logo.png" --width=500 --no-buttons --center --title="Auto-updating Pi-Apps" \ + --text="Your Pi-Apps github repository is somehow 3 months out-of-date."$'\n'"Downloading fresh version of pi-apps and saving the old version to ${DIRECTORY}-3-months-old..." & + sleep 1 + clear + echo -e "\nYour Pi-Apps github repository is somehow 3 months out-of-date.\nDownloading fresh version of pi-apps and saving the old version to ${DIRECTORY}-3-months-old...\n\n" 1>&2 + cd $HOME + rm -rf ~/pi-apps-forced-update + git clone "$(cat "${DIRECTORY}/etc/git_url")" pi-apps-forced-update 1>&2 && cp -af "${DIRECTORY}/data" ~/pi-apps-forced-update && mv -f "$DIRECTORY" "${DIRECTORY}-3-months-old" && mv -f ~/pi-apps-forced-update "${DIRECTORY}" + temp_logfile="$(mktemp).txt" + echo -e "Updated a 3-months-outdated pi-apps install.\nFrom: $current_git_date\nTo: $(cd "$DIRECTORY"; git show -s --format=%ct)\n$(get_device_info)" >> "$temp_logfile" + send_error_report "$temp_logfile" 1>&2 + rm -f "$temp_logfile" + sleep 10 +fi +} + mkdir -p "${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" "${DIRECTORY}/logs" + #remove week-old logfiles find "${DIRECTORY}/logs" -type f -mtime +7 -exec rm -f {} \; &>/dev/null & @@ -38,6 +78,12 @@ dirhash() { echo "$hash" } +#check if hardware and OS is supported +if is_supported_system >/dev/null;then + supported=yes +else + supported=no +fi if [ "$1" == 'multi-uninstall' ] || [ "$1" == 'multi-install' ];then @@ -47,10 +93,27 @@ if [ "$1" == 'multi-uninstall' ] || [ "$1" == 'multi-install' ];then action=install fi - failed_apps='' + app_list="$2" #newline-separated list of apps to install/uninstall + + #if trying to install an already-installed app, or trying to uninstall and already-uninstalled app, ask for confirmation IFS=$'\n' - for app in $2 - do + for app in $app_list ;do + if [ "$(app_status "${app}")" == "${action}ed" ];then + yad --text="$app is already ${action}ed. Are you sure you want to $action it again?" \ + --text-align=center --center --title='Quick question' --window-icon="${DIRECTORY}/icons/logo.png" \ + --button=No!"${DIRECTORY}/icons/exit.png":1 --button=Yes!"${DIRECTORY}/icons/check.png":0 + + if [ $? != 0 ];then + #user clicked No, so remove the app from list + app_list="$(echo "$app_list" | grep -vx "$app")" + fi + fi + done + + #install/uninstall one app at a time. If it fails then add the app to the list of failed apps + failed_apps='' + for app in $app_list ;do + "${DIRECTORY}/manage" $action "$app" if [ $? != 0 ];then #this app failed to install - add it to the list of failed apps @@ -58,14 +121,14 @@ if [ "$1" == 'multi-uninstall' ] || [ "$1" == 'multi-install' ];then $app" fi done - app_results="${app_results:1}" #remove first blank newline + failed_apps="${failed_apps:1}" #remove first blank newline if [ "$supported" == yes ];then #if hardware and OS is supported for app in $(echo "$failed_apps" | list_intersect "$(list_apps online)") ;do logfile="$(ls -dt "${DIRECTORY}/logs"/* | grep '\-'"${app}"'\.log' -m 1)" #sort logfiles by modification date, get the most recent one for the current app - #if logfile detected, exists, and is not empty, ask permission to send error report - if [ ! -z "$logfile" ] && [ -f "$logfile" ] && [ -s "$logfile" ];then + #if logfile detected, exists, is not empty, and does not contain a bunch of arrows (user-fault error) ask permission to send error report + if [ ! -z "$logfile" ] && [ -f "$logfile" ] && [ -s "$logfile" ] && ! grep -qF '▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼' "$logfile" ;then send_error_report_gui "$logfile" "$app failed to ${action}." fi done @@ -91,15 +154,6 @@ elif [ "$1" == 'install' ] || [ "$1" == 'uninstall' ];then error "${DIRECTORY}/apps/$app does not exist!" fi - #check if hardware and OS is supported - if is_supported_system >/dev/null;then - supported=yes - else - supported=no - echo -e "\e[103m\e[30mWARNING: YOUR SETUP IS UNSUPPORTED:\n$(is_supported_system)\e[39m\e[49m" - sleep 10 - fi - if [ "$1" == install ];then mode=install else @@ -112,11 +166,14 @@ elif [ "$1" == 'install' ] || [ "$1" == 'uninstall' ];then exit 0 fi - #if already installed then ask for confirmation - if [ "$(app_status "${app}")" == "${mode}ed" ];then - yad --text="$app is already ${mode}ed. Are you sure you want to $mode it again?" \ - --text-align=center --center --title='Quick question' --window-icon="${DIRECTORY}/icons/logo.png" \ - --button=No!"${DIRECTORY}/icons/exit.png":1 --button=Yes!"${DIRECTORY}/icons/check.png":0 || exit 0 + #display warning if hardware and os is unsupported + if [ "$supported" == no ];then + echo -e "\e[103m\e[30mWARNING: YOUR SYSTEM IS UNSUPPORTED:\n$(is_supported_system)\e[39m\e[49m" + sleep 1 + echo -e "\e[103m\e[30mThe ability to send error reports has been disabled.\e[39m\e[49m" + sleep 1 + echo -e "\e[103m\e[30mWaiting 10 seconds... (To cancel, press Ctrl+C or close this terminal)\e[39m\e[49m" + sleep 10 fi #analytics @@ -248,31 +305,16 @@ elif [ "$1" == 'check-all' ];then if [ "$2" == 'installedonly' ];then # If $2 is 'installedonly', then only check for updates for those apps that are installed installedonly=1 - - elif [ "$2" == 'nogenerate' ];then - # If $2 is 'nogenerate', then don't hash anything or git-clone anything. Simply reads out data found in data/update-status folder in the same app-per-newline format. - echo -e "\e[97mThese apps can be updated:" 1>&2 - echo "${updatable}" - IFS=$'\n' - for app in $(list_apps all);do - - updatestatus="$(cat "${DIRECTORY}/data/update-status/${app}" 2>/dev/null)" - if [ "$updatestatus" == 'new' ] || [ "$updatestatus" == 'updatable' ];then - #if current app's update-status is 'new' or 'updatable', then echo it. - echo "$app" - fi - - done - exit 0 #the lines above have displayed a list of apps already. - fi #end of checking for hidden flags + echo -n "Checking for online changes... " 1>&2 + #if the updater script exists in update folder, then just git pull to save time if [ -f "${DIRECTORY}/update/pi-apps/updater" ];then cd "${DIRECTORY}/update/pi-apps" - echo -n "The 'git pull' command says: " 1>&2 - git pull 1>&2 || rm -rf "${DIRECTORY}/update" - fi + git pull || rm -rf "${DIRECTORY}/update" + fi | grep -v "Already up to date." 1>&2 + #re-check and if updater script does not exist then do a git clone if [ ! -f "${DIRECTORY}/update/pi-apps/updater" ];then rm -rf "${DIRECTORY}/update" @@ -280,6 +322,8 @@ elif [ "$1" == 'check-all' ];then git clone --depth=1 "$(cat "${DIRECTORY}/etc/git_url")" 1>&2|| error "failed to clone repository to the update directory!" fi + echo "Done" 1>&2 + if [ $installedonly == 1 ];then #installedonly flag enabled. Remove apps that are uninstalled, disabled, or corrupted applist="$(list_apps installed)" @@ -294,7 +338,7 @@ elif [ "$1" == 'check-all' ];then IFS=$'\n' for app in $applist do - #echo "app: $app" + echo -en "Scanning apps... $app\033[0K\r" 1>&2 newhash="$(dirhash "${DIRECTORY}/update/pi-apps/apps/${app}")" #folder will not exist if local app oldhash="$(dirhash "${DIRECTORY}/apps/${app}")" #folder will not exist if new online app #echo -e "newhash: $newhash\noldhash: $oldhash" 1>&2 @@ -302,9 +346,10 @@ elif [ "$1" == 'check-all' ];then if [ "$newhash" == "$oldhash" ];then #echo -e "${app} is identical\e[90m to the online version. Nothing to do!\e[39m" 1>&2 echo 'latest' > "${DIRECTORY}/data/update-status/${app}" + true else if [ ! -d "${DIRECTORY}/apps/${app}" ];then - echo -e "\e[97m${app} does not exist locally.\e[39m Adding to updatable list." 1>&2 + #echo -e "\e[97m${app} does not exist locally.\e[39m Adding to updatable list." 1>&2 echo 'new' > "${DIRECTORY}/data/update-status/${app}" #in this case, add to updatable list updatable="${updatable} @@ -312,9 +357,10 @@ ${app}" elif [ ! -d "${DIRECTORY}/update/pi-apps/apps/${app}" ];then #echo -e "\e[97m${app} only exists locally.\e[39m Will not add to updatable list." 1>&2 echo 'local' > "${DIRECTORY}/data/update-status/${app}" + true #in this case, do not add to updatable list else - echo -e "\e[97m${app} exists in both locations, but online version is newer\e[39m. Adding to updatable list." 1>&2 + #echo -e "\e[97m${app} exists in both locations, but online version is newer\e[39m. Adding to updatable list." 1>&2 echo 'updatable' > "${DIRECTORY}/data/update-status/${app}" #in this case, add to updatable list updatable="${updatable} @@ -331,6 +377,8 @@ ${app}" updatable='.' fi + echo "Done" 1>&2 + echo "${updatable}" elif [ "$1" == 'update-all' ];then #UPDATE-ALL diff --git a/pkg-install b/pkg-install index e6da196..33583a4 100755 --- a/pkg-install +++ b/pkg-install @@ -35,26 +35,30 @@ $1 apt_diagnose() { #Explain stdin-inputted apt errors to user and list ways to fix them errors="$(cat /dev/stdin)" +#------------------------------------------ +#repo issues below +#------------------------------------------ + #check for 'E: The repository' - if echo "$errors" | grep -q 'E: The repository' || echo "$errors" | grep -q 'sources.list entry misspelt' ;then + if echo "$errors" | grep -qF 'E: The repository' || echo "$errors" | grep -qF 'sources.list entry misspelt' ;then message_to_user "APT reported a faulty repository, and you must fix it before Pi-Apps will work. To delete the repository: -Remove the relevant line from /etc/apt/sources.list file or delete the file in +Remove the relevant line from /etc/apt/sources.list file or delete one file in the /etc/apt/sources.list.d folder. sources.list requires root permissions to edit: sudo mousepad /path/to/file" fi #check for 'NO_PUBKEY' - if echo "$errors" | grep -q 'NO_PUBKEY';then + if echo "$errors" | grep -qF 'NO_PUBKEY';then echo -en "\e[93m ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ APT reported an unsigned repository. This script will try to repair it. Waiting 10 seconds... Press Ctrl+C to cancel.\e[39m" sleep 10 echo -e '\n\e[93mAttempting to sign unsigned repositories...\e[39m' - sudo -E apt update 2>&1 1>/dev/null | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo -E apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done + sudo -E apt update 2>&1 | sed -ne 's/.*NO_PUBKEY //p' | while read key; do if ! [[ ${keys[*]} =~ "$key" ]]; then sudo -E apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; keys+=("$key"); fi; done if [ $? == 0 ];then echo -e '\e[93mDone. Please try installing the same app again.\e[39m' else @@ -64,14 +68,14 @@ Waiting 10 seconds... Press Ctrl+C to cancel.\e[39m" fi # check for 'Could not resolve' or 'Failed to fetch' - if echo "$errors" | grep -q 'Could not resolve' || echo "$errors" | grep -q 'Failed to fetch' || echo "$errors" | grep -q 'Temporary failure resolving' || echo "$errors" | grep -q 'Network is unreachable';then + if echo "$errors" | grep -qF 'Could not resolve' || echo "$errors" | grep -qF 'Failed to fetch' || echo "$errors" | grep -qF 'Temporary failure resolving' || echo "$errors" | grep -qF 'Network is unreachable';then message_to_user "APT reported an unresolvable repository. Please check your Internet connection and try again." fi #check for 'is configured multiple times in' - if echo "$errors" | grep -q 'is configured multiple times in';then + if echo "$errors" | grep -qF 'is configured multiple times in' ;then message_to_user "APT reported a double-configured repository, and you must fix it to fix Pi-Apps. To delete the repository: @@ -81,40 +85,135 @@ the /etc/apt/sources.list.d folder. sources.list requires root permissions to edit: sudo mousepad /path/to/file" fi + #check for "W: Conflicting distribution: " + if echo "$errors" | grep -qF "W: Conflicting distribution: " ;then + message_to_user "Dpkg, apt, and Pi-Apps will not work until you fix the conflicting repository. + +Read the errors above, then look through /etc/apt/sources.list and /etc/apt/sources.list.d, making changes as necessary. + +Perhaps doing a Google search for the exact error you received would help." + fi + + #check for "Release file for is not valid yet" + if echo "$errors" | grep -q "Release file for .* is not valid yet" ;then + message_to_user "One or more repositories has a release file that becomes valid in the future. + +Please look at the above errors to see how long you have to wait." + fi + + #check for typo in sources.list and list.d + if echo "$errors" | grep -qF "The list of sources could not be read." ;then + message_to_user "One or more sources contain a typo. Before APT or Pi-Apps will work, you must look around in /etc/apt/sources.list and /etc/apt/sources.list.d and fix the typo." + fi + + #check for "W: Did not understand pin type releace" + if echo "$errors" | grep -qF "Did not understand pin type" ;then + message_to_user "This error was not caused by Pi-Apps. Looks like there is a typo in your /etc/apt/sources.list" + fi + +#------------------------------------------ +#repo issues above, apt/dpkg issues below +#------------------------------------------ + #check for "--fix-broken" - if echo "$errors" | grep -q "\-\-fix\-broken" || echo "$errors" | grep -q "needs to be reinstalled" ;then + if echo "$errors" | grep -qF "\-\-fix\-broken" || echo "$errors" | grep -qF "needs to be reinstalled" ;then message_to_user "APT reported a broken package, and you must fix it before Pi-Apps will work. Please run this command: sudo apt --fix-broken install" fi #check for dpkg --configure -a - if echo "$errors" | grep -q "dpkg \-\-configure \-a" ;then + if echo "$errors" | grep -qF "dpkg --configure -a" ;then message_to_user "Before dpkg, apt, or Pi-Apps will work, dpkg needs to repair your system. Please run this command: sudo dpkg --configure -a" fi - #check for faulty dphys-swapfile package - if echo "$errors" | grep -q "error processing package dphys-swapfile" ;then - message_to_user "Before dpkg, apt, or Pi-Apps will work, dphys-swapfile must be fixed. - -Try Googling the above errors, or ask the Pi-Apps developers for help." - fi - #check for insufficient space errors - if echo "$errors" | grep -q "You don't have enough free space in" ;then + if echo "$errors" | grep -qF "You don't have enough free space in" ;then message_to_user "Package(s) failed to install because your system has insufficient disk space. Please free up some space, then try again." fi + #check for "Command line option --allow-releaseinfo-change is not understood" + if echo "$errors" | grep -qF "Command line option --allow-releaseinfo-change is not understood" ;then + message_to_user "The Debian Project recently upgraded from Buster to version Bullseye. As a result, all Raspberry Pi OS Buster users will receive APT errors saying the repositories changed from 'stable' to 'oldstable'. + +This error broke pi-apps. To fix it, the Pi-Apps developers added something to the 'sudo apt update' command: --allow-releaseinfo-change. +This flag allows the repository migration to succeed, therefore allowing Pi-Apps to work again. + +Unfortunately for you, your operating system is too old for apt to understand this flag we added. Please upgrade your operating system for a better experience. Raspbian Stretch is unsupported and many apps will not install. + +Please flash your SD card with the latest release of Raspberry Pi OS: https://www.raspberrypi.org/software" + fi + +#------------------------------------------ +#apt/dpkg issues above, package issues below +#------------------------------------------ + + #check for "installed package post-installation script subprocess returned error exit status 10" + if echo "$errors" | grep -q "installed .* post-installation script subprocess returned error exit status 10" ;then + message_to_user "Some other package on your system is causing problems. As a result, dpkg and APT won't work properly. + +Perhaps reinstalling the package would help?" + fi + + #check for faulty dphys-swapfile package + if echo "$errors" | grep -qF "error processing package dphys-swapfile" ;then + message_to_user "Before dpkg, apt, or Pi-Apps will work, dphys-swapfile must be fixed. + +Try Googling the above errors, or ask the Pi-Apps developers for help." + fi + #check for unconfigured boot-firmware package - if echo "$errors" | grep -q "missing /boot/firmware, did you forget to mount it" || echo "$errors" | grep -q "u-boot-rpi" ;then + if echo "$errors" | grep -qF "missing /boot/firmware, did you forget to mount it" || echo "$errors" | grep -q "u-boot-rpi" ;then message_to_user "Package(s) failed to install because your boot drive is not working. You must fix the u-boot-rpi package before dpkg, apt, or Pi-Apps will work." fi + + #check for "files list file for package 'package-name' is missing final newline" + if echo "$errors" | grep -q "files list file for package .* is missing final newline" ;then + message_to_user "Before dpkg, apt, or Pi-Apps will work, your system must be repaired. + +Try Googling the above errors, or ask the Pi-Apps developers for help. +Perhaps this link will help: https://askubuntu.com/questions/909719/dpkg-unrecoverable-fatal-error-aborting-files-list-file-for-package-linux-ge" + fi + + #check for "installed raspberrypi-kernel package post-installation script subprocess returned error exit status 1" + if echo "$errors" | grep -qF "raspberrypi-kernel package post-installation script subprocess returned error exit status" ;then + message_to_user "The raspberrypi-kernel package on your system is causing problems. +Pi-Apps, dpkg and APT won't work properly until the problem is fixed. + +Google the errors above this message, or ask in the Raspberry Pi Forums. +https://www.raspberrypi.org/forums" + fi + + #check for "raspberrypi-bootloader package pre-installation script subprocess returned error exit status 2" + if echo "$errors" | grep -qF "raspberrypi-bootloader package pre-installation script subprocess returned error exit status" ;then + message_to_user "The raspberrypi-bootloader package on your system is causing problems. +Pi-Apps, dpkg and APT won't work properly until the problem is fixed. + +Google the errors above this message, or ask in the Raspberry Pi Forums. +https://www.raspberrypi.org/forums" + fi + + #check for "dpkg: error processing package nginx-full (--configure):" + if echo "$errors" | grep -qF "error processing package nginx-full" ;then + message_to_user "This error was not caused by Pi-Apps, it is caused by your nginx-full package. + +Maybe reinstalling it would help? +sudo apt install --reinstall nginx-full" + fi + + #check for "installed libwine-development:arm64 package post-installation script subprocess returned error exit status 1" + if echo "$errors" | grep -qF "libwine-development:arm64 package post-installation script subprocess returned error exit status" ;then + message_to_user "This error was not caused by Pi-Apps, it is caused by your libwine-development package." + fi + + #no need for this function to exit with return code 1 just because the last if statement evaluated as false + return 0 } echo "Running pkg-install..." @@ -126,6 +225,8 @@ fi LANG=C LC_ALL=C +LANGUAGE=C +IFS=$' \n' source "${DIRECTORY}/api" apt_lock_wait @@ -133,7 +234,7 @@ apt_lock_wait #sudo apt update { echo -e "Running \e[4msudo a\e[0mp\e[4mt u\e[0mp\e[4mdate\e[0m..." -output="$(sudo -E apt update 2>&1 | reduceapt | tee /dev/stderr)" +output="$(sudo -E apt update --allow-releaseinfo-change 2>&1 | tee /dev/stderr | reduceapt)" exitcode=$? #inform user about autoremovable packages @@ -144,6 +245,8 @@ fi #inform user packages are upgradeable if [ ! -z "$(echo "$output" | grep 'packages can be upgraded' )" ];then echo -e "\e[33mSome packages can be upgraded.\e[39m Please consider running \e[4msudo apt full-upgrade\e[0m." +elif [ ! -z "$(echo "$output" | grep 'package can be upgraded' )" ];then + echo -e "\e[33mOne package can be upgraded.\e[39m Please consider running \e[4msudo apt full-upgrade\e[0m." fi #exit on apt error @@ -163,7 +266,7 @@ fi for package in $PKG_LIST ;do #if package begins with / (absolute path) - if [[ "$package" == /* ]];then + if [[ "$package" == /* ]];then #determine the package name from the package filepath packagename="$(dpkg-deb -I "$package" | grep "^ Package:" | awk '{print $2}')" [ -z "$packagename" ] && error "pkg-install: failed to determine the package name of $package" @@ -238,8 +341,12 @@ Section: custom Depends: $(echo "$PKG_LIST" | tr -d ',' | sed 's/ /, /g' | sed 's/, |/ |/g' | sed 's/|, /| /g') Package: pi-apps-$appnamehash" > ~/pi-apps-$appnamehash/DEBIAN/control +#fix error report "dpkg-deb: error: control directory has bad permissions 700 (must be >=0755 and <=0775)" +sudo chmod -R '0755' ~/pi-apps-$appnamehash + output="$(dpkg-deb --build ~/pi-apps-$appnamehash 2>&1)" if [ $? != 0 ];then + echo "$output" echo "$output" | apt_diagnose error "pkg-install: failed to create dummy deb pi-apps-$appnamehash" fi @@ -251,6 +358,7 @@ fi #ensure dummy deb isn't already installed if dpkg -l pi-apps-$appnamehash &>/dev/null ;then echo -e "\e[97m\nDummy deb is already installed. Uninstalling it first...\e[39m" + apt_lock_wait output="$(sudo -E apt purge -y pi-apps-$appnamehash 2>&1 | reduceapt | tee /dev/stderr )" if [ $? != 0 ];then echo "$output" | apt_diagnose @@ -261,7 +369,7 @@ fi apt_lock_wait echo -e "\e[97m\nInstalling dummy deb...\e[39m" -output="$(sudo -E apt-get install -fy --no-install-recommends --allow-downgrades ~/pi-apps-$appnamehash.deb 2>&1 | reduceapt | tee /dev/stderr )" +output="$(sudo -E apt install -fy --no-install-recommends --allow-downgrades ~/pi-apps-$appnamehash.deb 2>&1 | reduceapt | tee /dev/stderr )" rm -f ~/pi-apps-$appnamehash.deb rm -rf ~/pi-apps-$appnamehash diff --git a/purge-installed b/purge-installed index e31ac7e..3d2da31 100755 --- a/purge-installed +++ b/purge-installed @@ -11,6 +11,9 @@ function error { exit 1 } +LANG=C +LC_ALL=C + DIRECTORY="$(readlink -f "$(dirname "$0")")" echo -e "\e[97m\nRunning purge-installed...\e[39m" @@ -32,7 +35,7 @@ if dpkg -l pi-apps-$appnamehash &>/dev/null ;then #new pkg-install implementation - using dummy debs echo -e "\e[97m\nRemoving dummy deb for $app...\e[39m" - sudo apt purge -y pi-apps-$appnamehash --autoremove || error "apt failed to purge dummy deb (pi-apps-$appnamehash)!" + sudo -E apt purge -y pi-apps-$appnamehash --autoremove || error "apt failed to purge dummy deb (pi-apps-$appnamehash)!" elif [ -f "${DIRECTORY}/data/installed-packages/${app}" ];then #old pkg-install implementation @@ -40,7 +43,7 @@ elif [ -f "${DIRECTORY}/data/installed-packages/${app}" ];then PKG_LIST="$(cat "${DIRECTORY}/data/installed-packages/${app}" | tr '\n' ' ' | sed 's/ / /g')" - PURGE_LIST="$(sudo LANG=C LC_ALL=C apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages will be REMOVED/,/to remove and/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')" + PURGE_LIST="$(sudo -E apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages will be REMOVED/,/to remove and/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')" echo "These packages will be purged: $PURGE_LIST" #normal mode diff --git a/updater b/updater index f85978f..d13e9e8 100755 --- a/updater +++ b/updater @@ -290,8 +290,8 @@ if [ ! -z "$updatable" ];then fi #.git folder #delete .git folder, then copy the new one -rm -rf "${DIRECTORY}/.git" -cp -rf "${DIRECTORY}/update/pi-apps/.git" "${DIRECTORY}/.git" || error "Failed to copy new .git folder!" +rm -rf "${DIRECTORY}/.git" || sudo rm -rf "${DIRECTORY}/.git" || error "Failed to delete old ${DIRECTORY}/.git folder!" +cp -a "${DIRECTORY}/update/pi-apps/.git" "${DIRECTORY}" || error "Failed to copy new .git folder!" echo -e "\e[92mPi-Apps updates complete.\e[39m"