initial upload

pull/7/head
Botspot 5 years ago
parent 9014ad166b
commit 637d24d884

@ -0,0 +1 @@
Latest version of Arduino IDE. Not outdated like the repository's Arduino IDE.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@ -0,0 +1,16 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
wget https://downloads.arduino.cc/arduino-1.8.13-linuxarm.tar.xz || error "failed to download!"
xz -d arduino-1.8.13-linuxarm.tar.xz || error "failed to extract with xz!"
tar -xf arduino-1.8.13-linuxarm.tar || error "failed to extract with tar!"
arduino-1.8.13/install.sh || error "failed to run install as non-root user!"
sudo arduino-1.8.13/install.sh || error "failed run install as root user!"
rm /home/pi/Desktop/arduino-arduinoide.desktop || error "failed delete desktop shortcut!"
rm arduino-1.8.13-linuxarm.tar || error "failed delete archives!"

@ -0,0 +1,4 @@
#!/bin/bash
arduino-1.8.13/uninstall.sh
sudo arduino-1.8.13/uninstall.sh
rm -rf arduino-1.8.13

@ -0,0 +1 @@
https://www.arduino.cc/en/main/software

@ -0,0 +1 @@
Flash SD cards with a disk image. Many file types supported.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,16 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
rm -f ./balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb
wget https://github.com/futurejones/balena-etcher-arm/releases/download/v1.5.63/balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb
sudo apt install -y ./balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb || error "failed to install deb file!"
rm -f ./balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb || error "failed to remove deb file!"

@ -0,0 +1,10 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
sudo apt purge -y balena-etcher-electron || error "failed to purge the deb file!"

@ -0,0 +1 @@
https://www.raspberrypi.org/forums/viewtopic.php?f=62&t=255205&start=25#p1564958

@ -0,0 +1,27 @@
[Desktop Entry]
Version=1.0
Name=Chromium (Media Edition)
GenericName=Web Browser (Media Edition)
Comment=Access the Internet
Exec=chromium-browser %U --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36"
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chromium-browser
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Actions=NewWindow;Incognito;TempProfile;
X-AppInstall-Package=chromium-browser
[Desktop Action NewWindow]
Name=Open a New Window (Media Edition)
Exec=chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36"
[Desktop Action Incognito]
Name=Open a New Window in incognito mode (Media Edition)
Exec=chromium-browser --incognito --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36"
[Desktop Action TempProfile]
Name=Open a New Window with a temporary profile (Media Edition)
Exec=chromium-browser --temp-profile --user-agent="Mozilla/5.0 (X11; CrOS armv7l 12371.89.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36"

@ -0,0 +1,14 @@
Play Widevine-protected video in Chromium.
This adds the ChromeOS DRM video decoding library to Chromium, and a ChromeOS user-agent. Websites you browse will think your Pi is a Chromebook!
This works on these websites:
• Netflix
• Hulu
• Amazon Prime
• Disney+
• HBO
• Spotify
• Pandora
• Hoopla
• MUBI
• BritBox
• Bell Satellite TV

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -0,0 +1,12 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
#curl -fsSL https://pi.vpetkov.net -o ventz-media-pi || error "Failed to download the script!"
#sh ventz-media-pi || error "Failed to run the script!"
sudo cp "$(dirname "$0")/chromium-media-browser.desktop" /usr/share/applications/ || error "failed to create menu button!"
sudo cp "$(dirname "$0")/libwidevinecdm.so" /usr/lib/chromium-browser/ || error "Failed to copy libwidevinecdm.so!"

@ -0,0 +1,9 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
sudo rm /usr/lib/chromium-browser/libwidevinecdm.so || error "failed to delete libwidevinecdm.so!"
sudo rm /usr/share/applications/chromium-media-browser.desktop || error "failed to delete menu button!"

@ -0,0 +1 @@
https://blog.vpetkov.net/2020/03/30/raspberry-pi-netflix

@ -0,0 +1 @@
Easy RaspberryPi4 GUI system managment

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

@ -0,0 +1,15 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "python3-tk python3-pil python3-pil.imagetk" "$(dirname "$0")" || exit 1
git clone https://github.com/Jack477/CommanderPi || error "failed to download repository!"
cd /home/pi/CommanderPi || error "failed to enter repository!"
chmod +x install.sh || error "failed to mark install.sh as executable!"
./install.sh || error "failed to run install.sh!"

@ -0,0 +1,12 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
rm -rf ~/CommanderPi || error "failed to remove commanderpi folder!"
sudo rm -f /usr/share/applications/commanderpi.desktop /home/pi/Desktop/commanderpi.desktop || error "failed to remove menu button!"

@ -0,0 +1 @@
https://github.com/Jack477/CommanderPi

@ -0,0 +1 @@
Simulates an old CRT terminal.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -0,0 +1,30 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtgraphicaleffects qml-module-qtquick-dialogs qml-module-qtquick-localstorage qml-module-qtquick-window2 qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel" "$(dirname "$0")" || exit 1
# Get CRT from github
git clone --recursive https://github.com/Swordfish90/cool-retro-term || error "failed to clone repository!"
# Compile
cd cool-retro-term || error "failed on cd step!"
qmake || error "failed on qmake step!"
make -j8 || error "failed on make step!"
echo "[Desktop Entry]
Comment=Use the command line the old way
Exec=/home/pi/cool-retro-term/cool-retro-term
GenericName=Terminal emulator
Icon=/home/pi/cool-retro-term/app/icons/64x64/cool-retro-term.png
Name=Cool Retro Term
Categories=GTK;System;TerminalEmulator;
StartupNotify=true
Terminal=false
Type=Application
Keywords=shell;prompt;command;commandline;console;command line;execute;" >> /home/pi/.local/share/applications/crt.desktop

@ -0,0 +1,10 @@
#!/bin/bash
rm -rf ~/.cache/cool-retro-term
rm -rf ~/cool-retro-term
rm -f ~/.local/share/applications/crt.desktop
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
rm -rf ~/.local/share/cool-retro-term ~/cool-retro-term

@ -0,0 +1 @@
https://github.com/Swordfish90/cool-retro-term

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1 @@
Takes a 3D model and slices it for use in a 3D printer.

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,26 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
wget -O ~/Cura-mb-master-armhf-20200902.AppImage https://www.dropbox.com/sh/s43vqzmi4d2bqe2/AAB-hPdiTvoExJx0kjuSx8C1a/Linux-armhf/Cura-mb-master-armhf-20200902.AppImage?dl=0 || error "Failed to download!"
chmod +x ~/Cura-mb-master-armhf-20200902.AppImage
echo "[Desktop Entry]
Name=Ultimaker Cura
GenericName=3D Printing Software
Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
Exec=bash -c 'sudo modprobe fuse; ~/Cura-mb-master-armhf-20200902.AppImage'
Icon=cura-icon
Terminal=false
Type=Application
MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml;
Categories=Graphics;Education;Development;Science;
Keywords=3D;Printing;
StartupNotify=true" >> ~/.local/share/applications/cura.desktop || error "Failed to create menu button!"
sudo cp "$(dirname $0)/cura-icon.png" /usr/share/icons/hicolor/128x128/apps/ || error "Failed to copy icon!"

@ -0,0 +1,12 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
rm ~/.local/share/applications/cura.desktop
rm ~/Cura-mb-master-armhf-20200902.AppImage || error "failed to remove the AppImage!"
rm -rf ~/.cache/cura
#gio trash ~/.config/cura

@ -0,0 +1 @@
https://community.ultimaker.com/topic/28746-experimental-cura-build-for-raspberry-pi-4-now-available/

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,24 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1
#download from google drive
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=10zsGG86z2iCN4bIfs4D4wg2hZJ4J5hGF' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=10zsGG86z2iCN4bIfs4D4wg2hZJ4J5hGF" -O freecad-precompiled.zip || error "failed to download archive from Google Drive!"
rm -f /tmp/cookies.txt || echo "Warning: failed to remove cookies.txt."
unzip ~/freecad-precompiled.zip || error "Failed to extract archive!"
rm -f ~/freecad-precompiled.zip || error "Failed to delete archive!"
cd freecad-build || error "Failed to enter directory!"
sudo make install || error "sudo make install failed!"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1

@ -0,0 +1,13 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo rm -f $(cat ~/freecad-build/install_manifest.txt) /home/pi/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!"
rm -rf ~/freecad-precompiled /home/pi/FreeCAD-0.18.4 || error "failed to remove both installation folders!"

@ -0,0 +1,2 @@
3D designer software. Unlike the repository's version of FreeCAD, this one actually works.
Warning: Takes several hours to compile! Compiling consumes 100% of the CPU, and 4GB of RAM.

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,39 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
echo -e '\e[103m\e[30mThis will take more than 1 hour to compile. It will max out the CPU the whole time. Continue? [Y/n]\e[39m\e[49m'
read answer
if [ "$answer" == 'n' ];then
exit 0
fi
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1
wget https://github.com/FreeCAD/FreeCAD/archive/0.18.4.zip || error "failed to download ZIP file!"
#ensure there's no directory in there already
rm -rf ~/FreeCAD-0.18.4 ~/freecad-build 2>/dev/null
unzip 0.18.4.zip || error "failed to extract ZIP file!"
rm 0.18.4.zip || error "failed to delete ZIP file!"
mkdir freecad-build || error "failed to create folder freecad-build!"
cd freecad-build || error "failed to enter directory freecad-build!"
cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython2.7.so -DPYTHON_PACKAGES_PATH=/usr/local/lib/python2.7/dist-packages/ ../FreeCAD-0.18.4/ || error "failed to generate make file!"
make -j8 || error "failed to compile!"
sudo make install || error "sudo make install failed!"
if [ ! -z "$(cat "${DIRECTORY}/installed-packages" | grep 'qt4-dev-tools')" ];then
sudo apt purge -y qt4-dev-tools qt4-designer || error "purging qt4-dev-tools failed!"
fi
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1

@ -0,0 +1,13 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo rm -f $(cat ~/freecad-build/install_manifest.txt) /home/pi/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!"
rm -rf ~/freecad-build /home/pi/FreeCAD-0.18.4 || error "failed to remove both installation folders!"

@ -0,0 +1 @@
https://scruss.com/blog/2020/02/16/freecad-on-raspberry-pi-4/

@ -0,0 +1,4 @@
Easily edit RaspiOS image files with a suite of useful tools.
Full set of features: Advanced Mount, Shrink, Expand, Flash, Boot in a VM, Download, Mount (View), Edit partitions, and Repair.
To run: Menu -> Accessories -> Pi Power Tools

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1,12 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "yad systemd-container xserver-xephyr expect" "$(dirname "$0")" || exit 1
wget -O - https://raw.githubusercontent.com/Botspot/Pi-Power-Tools/master/update | bash

@ -0,0 +1,12 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
rm -rf ${HOME}/Pi-Power-Tools ${HOME}/Pi-Power-Tools.old || error "failed on rm step 1!"
rm -f ${HOME}/Desktop/ppt.desktop ${HOME}/.local/share/applications/ppt.desktop || error "failed on rm step 2!"

@ -0,0 +1 @@
https://github.com/Botspot/Pi-Power-Tools

@ -0,0 +1,5 @@
Takes a screenshot of the framebuffer.
Useful for overlay applications, like Minecraft or VLC, as this will capture them properly.
Run in a terminal: raspi2png
The resulting image will be saved to /home/pi/snapshot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

@ -0,0 +1,19 @@
#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "libpng12-dev" "$(dirname "$0")" || exit 1
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
git clone https://github.com/AndrewFromMelbourne/raspi2png || error "failed to clone repository!"
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!"

@ -0,0 +1,3 @@
libpng12-dev
libpng12-dev

@ -0,0 +1,8 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
sudo rm /usr/bin/raspi2png

@ -0,0 +1 @@
https://github.com/AndrewFromMelbourne/raspi2png

@ -0,0 +1,2 @@
Make Raspberry Pi OS look as close to Windows 10 as possible.
Installs an icon theme, GTK theme, mouse cursor, openbox theme, xcompmgr, and custom panel.

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

@ -0,0 +1,14 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/pkg-install" "xcompmgr tint2 gtk2-engines-murrine" "$(dirname "$0")" || exit 1
git clone https://github.com/Botspot/Windows-10 | error "failed to dowload github repository!"
~/Windows-10/install | error "failed to install!"

@ -0,0 +1,11 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
~/Windows-10/uninstall | error "failed to uninstall!"
rm -rf ~/Windows-10

@ -0,0 +1 @@
https://github.com/Botspot/Windows-10

@ -0,0 +1,11 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
# Get dependencies
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
#"${DIRECTORY}/pkg-install" "" "$(dirname "$0")" || exit 1
read enter

@ -0,0 +1,10 @@
#!/bin/bash
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1

@ -0,0 +1 @@
installed

@ -0,0 +1 @@
installed

@ -0,0 +1 @@
uninstalled

@ -0,0 +1 @@
installed

73
gui

@ -0,0 +1,73 @@
#!/bin/bash
DIRECTORY="$(readlink -f "$(dirname "$0")")"
echo "$DIRECTORY"
while true;do
APPS="$(echo "$(ls "${DIRECTORY}/apps")" | grep -v 'template')"
#APPS="$(echo "$(ls "${DIRECTORY}/apps")")"
#echo -e "$APPS\n"
APPS="$(echo "$APPS" | tr '\n' '|')"
PREIFS="$IFS"
IFS=$"|"
LIST=''
for i in $APPS
do
LIST="$LIST$(echo "${DIRECTORY}/icons/$(cat "${DIRECTORY}/data/apps/${i}" || echo "none").png")
${DIRECTORY}/apps/${i}/icon-24.png
$i
"\("$(cat "${DIRECTORY}/data/apps/${i}" || echo "Unknown state")"\)" $(echo "$(cat "${DIRECTORY}/apps/${i}/description" || echo "Description unavailable")" | head -n1)
"
done
IFS="$PREIFS"
LIST="$(echo -e "$LIST")"
#echo "$LIST"
output="$(echo -e "$LIST" | yad --center --title='Pi-Apps' --width=300 --height=300 --no-headers \
--list --separator='\n' --window-icon="${DIRECTORY}/icons/logo.png" \
--column=:IMG --column=:IMG --column=Name --column=tip:HD --print-column=3 --tooltip-column=4 \
--button=Install!"${DIRECTORY}/icons/install.png":4 \
--button=Uninstall!"${DIRECTORY}/icons/uninstall.png":2 \
--button=Details!"${DIRECTORY}/icons/info.png"!'View more about the selected software:0' \
2>/dev/null)"
button=$? #get exit code to determine which button was pressed
echo "Button: ${button}"
if [ $button -eq 252 ];then #if window manager x was pressed
exit 0
fi
echo "Output: ${output}EOO"
case $button in
1)
echo "Error"
exit 1
;;
0)
echo "Details"
text="$(echo "$(cat "${DIRECTORY}/apps/${output}/description" || echo "Description unavailable")" | head -n1)
Website: $(cat "${DIRECTORY}/apps/${output}/website" || echo "unavailable")
$(echo "$(cat "${DIRECTORY}/apps/${output}/description" || echo "Description unavailable")" | grep -v "$(echo "$(cat "${DIRECTORY}/apps/${output}/description" || echo "Description unavailable")" | head -n1)")"
echo "$text" | yad --text-info --fontname=12 --wrap --show-uri \
--image="${DIRECTORY}/apps/${output}/icon-64.png" --image-on-top \
--title="Details of ${output}" --window-icon="${DIRECTORY}/icons/logo.png" --center --width=700 --height=300 \
--button=Install!"${DIRECTORY}/icons/install.png":4 \
--button=Uninstall!"${DIRECTORY}/icons/uninstall.png":2 \
--button=Back!"${DIRECTORY}/icons/back.png":0
;;
2)
echo "Uninstall"
"${DIRECTORY}/manage" "$output" uninstall
;;
4)
echo "Install"
"${DIRECTORY}/manage" "$output" install
;;
esac
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="layer" x="0px" y="0px" viewBox="0 0 652 652" style="enable-background:new 0 0 652 652;" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
.st0{fill:#020203;}
.st1{fill:#6ABF4B;}
.st2{fill:#C31C4A;}
</style>
<g transform="matrix(1.398839, 0, 0, 1.398839, -121.936714, -102.788345)" style="">
<path class="st0" d="M 230.4 73.8 C 235.3 73.7 238 76.8 242.5 78.2 C 253.6 74.6 256.1 79.5 261.5 81.5 C 273.6 79 277.2 84.5 283 90.2 L 283.1 90.1 C 285 89.1 287.4 89 289.4 89.9 L 289.7 90.1 C 307.8 100.6 316.8 122 320 133.1 C 323.1 122.1 332.1 100.7 350.3 90.1 C 352.3 89.1 354.6 89 356.6 90 L 357 90.2 C 362.8 84.5 366.5 79 378.5 81.5 C 383.9 79.5 386.5 74.6 397.8 78.1 C 404.6 76 410.7 70.3 419.8 77.4 C 427.5 74.5 435 73.4 441.6 79.4 C 451.8 78.1 455.2 80.9 457.7 84 C 460 84 474.6 81.8 481.3 91.6 C 498.1 89.6 503.5 101.3 497.4 112.3 C 500.9 117.5 504.5 122.7 496.4 132.7 C 499.3 138.3 497.5 144.4 490.8 151.7 C 492.5 159.6 489 165.1 482.8 169.4 C 483.9 180.1 472.8 186.3 469.5 188.6 C 468.2 194.9 465.6 200.8 452.8 204 C 450.7 213.3 443 215 435.6 216.9 C 455.374 228.199 472.933 242.43 478.867 271.317 L 161.551 271.317 C 167.492 242.363 185.003 228.112 204.8 216.8 C 197.4 214.8 189.7 213.2 187.6 203.9 C 174.9 200.6 172.2 194.7 170.9 188.5 C 167.6 186.2 156.5 180 157.6 169.3 C 151.3 165 147.8 159.4 149.6 151.6 C 143 144.2 141.2 138.2 144 132.6 C 136 122.6 139.5 117.4 143 112.2 C 136.9 101.3 142.2 89.6 159.1 91.5 C 165.8 81.7 180.4 83.9 182.7 84 C 185.2 80.8 188.6 78.1 198.8 79.4 C 205.5 73.4 212.9 74.5 220.6 77.4 C 223.8 75 226.5 73.9 229.1 73.8 Z"/>
<path class="st1" d="M193.3,120.4c48.2,24.5,76.2,44.2,91.5,61.1c-7.8,31-48.8,32.4-63.8,31.6c3.1-1.4,5.6-3.1,6.5-5.6 c-3.8-2.7-17.1-0.2-26.4-5.4c3.6-0.7,5.2-1.5,6.9-4c-8.8-2.7-18.2-5.2-23.8-9.7c3,0,5.8,0.6,9.8-2c-7.9-4.3-16.3-7.6-22.8-14 c4-0.1,8.5,0,9.8-1.5c-7.2-4.4-13.3-9.3-18.3-14.6c5.7,0.6,8.1,0.1,9.5-0.9c-5.5-5.5-12.3-10.2-15.7-16.9c4.2,1.5,8.1,2,10.9-0.2 c-1.9-4.1-9.8-6.5-14.4-16.1c4.4,0.4,9.2,1,10.1,0c-2.1-8.3-5.6-13-9.1-17.8c9.5-0.2,24,0,23.3-0.7l-5.9-6 c9.3-2.5,18.8,0.4,25.7,2.5c3.1-2.4-0.1-5.5-3.9-8.6c7.9,1,15.1,2.8,21.5,5.3c3.5-3.1-2.3-6.1-5-9.2c12.3,2.3,17.4,5.5,22.6,8.7 c3.7-3.6,0.2-6.5-2.3-9.6c9.2,3.4,14,7.7,19,12c1.7-2.3,4.3-3.9,1.1-9.4c6.5,3.7,11.5,8.1,15.1,13c4-2.5,2.4-6.1,2.4-9.2 c6.8,5.5,11.1,11.2,16.4,16.9c1-0.7,2-3.4,2.8-7.4c16.2,15.5,39.1,54.6,5.9,70C264.6,149.6,230.8,132.9,193.3,120.4L193.3,120.4z"/>
<path class="st1" d="M448.5,120.4c-48.2,24.5-76.2,44.2-91.5,61.1c7.8,31,48.8,32.4,63.8,31.6c-3.1-1.4-5.6-3.1-6.5-5.6 c3.8-2.7,17.1-0.2,26.4-5.4c-3.6-0.7-5.2-1.5-6.9-4c8.8-2.7,18.2-5.2,23.8-9.7c-3,0-5.8,0.6-9.8-2c7.9-4.2,16.3-7.5,22.8-13.9 c-4-0.1-8.5,0-9.8-1.5c7.2-4.4,13.3-9.3,18.3-14.6c-5.7,0.6-8.1,0.1-9.5-0.9c5.5-5.5,12.3-10.2,15.7-16.9c-4.2,1.5-8.1,2-10.9-0.2 c1.9-4.1,9.8-6.5,14.4-16.1c-4.4,0.4-9.2,1-10.1,0c2.1-8.3,5.6-13,9.1-17.8c-9.5-0.2-24,0-23.3-0.7l5.9-6 c-9.3-2.5-18.9,0.4-25.7,2.5c-3.1-2.4,0.1-5.5,3.9-8.6c-7.9,1-15.1,2.8-21.5,5.3c-3.5-3.1,2.3-6.1,5-9.2 c-12.3,2.3-17.4,5.5-22.6,8.7c-3.7-3.6-0.2-6.5,2.3-9.6c-9.2,3.4-14,7.7-19,12c-1.7-2.3-4.3-3.9-1.1-9.4c-6.5,3.7-11.5,8.1-15.1,13 c-4-2.5-2.4-6.1-2.4-9.2c-6.8,5.5-11.1,11.2-16.4,16.9c-1-0.7-2-3.4-2.8-7.4c-16.2,15.5-39.1,54.6-5.9,70 C377.2,149.6,411,132.9,448.5,120.4L448.5,120.4z" style=""/>
<g style="visibility: hidden;">
<path class="st2" d="M379.2,436.2c0.2,29-25.5,52.5-57.4,52.7s-57.9-23.2-58-52.1c0-0.2,0-0.4,0-0.6c-0.2-29,25.5-52.5,57.4-52.7 s57.9,23.2,58,52.1C379.2,435.8,379.2,436,379.2,436.2z"/>
<g>
<path class="st2" d="M289.2,286.4c23.9,15.4,28.2,50.4,9.6,78.1c-18.6,27.7-53,37.7-77,22.3l0,0c-23.9-15.4-28.2-50.4-9.6-78.1 S265.3,271,289.2,286.4L289.2,286.4z"/>
<path class="st2" d="M353.7,283.7c-23.9,15.4-28.2,50.4-9.6,78.1c18.6,27.7,53,37.7,77,22.3l0,0c23.9-15.4,28.2-50.4,9.6-78.1 C412.1,278.2,377.6,268.3,353.7,283.7L353.7,283.7z"/>
</g>
<g>
<path class="st2" d="M171.2,311.9c25.8-6.8,8.7,105.1-12.3,96C135.8,389.6,128.3,335.9,171.2,311.9z"/>
<path class="st2" d="M469.5,310.5c-25.8-6.8-8.7,105.1,12.3,96C504.9,388.1,512.3,334.5,469.5,310.5L469.5,310.5z"/>
</g>
<path class="st2" d="M382.9,226.9c44.5-7.4,81.6,18.6,80.1,66.3C461.5,311.4,366.5,229.6,382.9,226.9z"/>
<path class="st2" d="M259.8,225.5c-44.5-7.4-81.6,18.6-80.1,66.3C181.2,310,276.3,228.2,259.8,225.5z"/>
<path class="st2" d="M321.2,214.4c-26.5-0.6-52.1,19.4-52.1,31.1c-0.1,14.2,21,28.7,52.4,29.1c32,0.2,52.4-11.6,52.5-26.2 C374,231.7,344.8,214.1,321.2,214.4L321.2,214.4z"/>
<path class="st2" d="M323.2,505.1c23.2-1,54.3,7.3,54.3,18.4c0.4,10.7-28.2,35-55.8,34.6c-28.6,1.2-56.7-23.2-56.4-31.6 C264.9,514.2,300.2,504.6,323.2,505.1L323.2,505.1z"/>
<g>
<path class="st2" d="M237.5,439.5c16.5,19.6,24,54,10.2,64.2c-13,7.7-44.7,4.5-67.1-27.3c-15.2-26.7-13.2-53.9-2.6-61.9 C194,404.9,218.5,417.8,237.5,439.5L237.5,439.5z"/>
<path class="st2" d="M403.6,433.3c-17.8,20.6-27.8,58.2-14.8,70.3c12.4,9.4,45.9,8.1,70.6-25.7c17.9-22.7,11.9-60.5,1.7-70.6 C445.9,395.7,424,410.5,403.6,433.3L403.6,433.3z"/>
</g>
</g>
</g>
<rect x="103.874" y="202.742" width="444.251" height="444.251" style="" rx="62.1" ry="62.1"/>
<g transform="matrix(1.250353, 0, 0, 1.250353, -76.902557, -70.615715)" style="">
<rect x="167.679" y="241.723" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="277.266" y="241.723" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="386.825" y="241.723" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="167.679" y="350.4" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="277.252" y="351.296" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="386.825" y="350.4" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="167.679" y="460.869" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="277.266" y="460.869" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
<rect x="386.825" y="460.869" width="89.958" height="89.958" style="fill: rgb(195, 28, 74);" rx="28.994" ry="28.994"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

@ -0,0 +1,85 @@
#!/bin/bash
#$1 is name of software, like Arduino
#$2 is install/uninstall
DIRECTORY="$(readlink -f "$(dirname "$0")")"
function error {
echo -e "\e[31m$1\e[39m"
exit 1
}
if [ -z "$1" ];then
error "You need to specify which app, and which action to apply to it. (install/uninstall)"
elif [ ! -d "${DIRECTORY}/apps/$1" ];then
error "${DIRECTORY}/apps/$1 does not exist!"
fi
if [ "$2" == 'install' ];then
#ensure an install script is not already running
if ps -C install ;then
echo "An install script is already running.
Pi-Apps will wait until that one finishes before starting this one." | yad --text-info \
--title="Waiting" --window-icon="${DIRECTORY}/icons/logo.png" --center --width=500 --height=100 \
--button=OK!"${DIRECTORY}/icons/check.png":0 --fontname=12 --timeout=10 --timeout-indicator=top
while ps -C install ;do sleep 1; done
fi
#if already installed then ask for confirmation
if [ "$(cat "${DIRECTORY}/data/apps/${1}" )" == 'installed' ];then
yad --text="$1 is already installed. Are you sure you want to install 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
fi
lxterminal --title="Installing $1" -e "
cd $HOME
echo 'corrupted' > \"${DIRECTORY}/data/apps/${1}\"
if \"${DIRECTORY}/apps/${1}/install\" ; then
echo 'installed' > \"${DIRECTORY}/data/apps/${1}\"
echo -en '\n\e[42m\e[30mCommand succeeded.\e[39m\e[49m\nClose this window to exit.'
read enter #technically you could press Enter to exit.
else
echo 'corrupted' > \"${DIRECTORY}/data/apps/${1}\"
echo -en '\n\e[41m\e[30mCommand failed!\e[39m\e[49m\nClose this window to exit.'
read enter #technically you could press Enter to exit.
fi"
#wait until script is done before this command exits
sleep 2
while ps -C install >/dev/null;do sleep 1; done
elif [ "$2" == 'uninstall' ];then
#ensure an uninstall script is not already running
if ps -C install ;then
echo "An uninstall script is already running.
Pi-Apps will wait until that one finishes before starting this one." | yad --text-info \
--title="Waiting" --window-icon="${DIRECTORY}/icons/logo.png" --center --width=500 --height=100 \
--button=OK!"${DIRECTORY}/icons/check.png":0 --fontname=12 --timeout=10 --timeout-indicator=top
while ps -C uninstall ;do sleep 1; done
fi
#if already uninstalled then ask for confirmation
if [ "$(cat "${DIRECTORY}/data/apps/${1}" )" == 'uninstalled' ];then
yad --text="$1 is already uninstalled. Are you sure you want to uninstall 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
fi
lxterminal --title="Uninstalling $1" -e "
cd $HOME
echo 'corrupted' > \"${DIRECTORY}/data/apps/${1}\"
if \"${DIRECTORY}/apps/${1}/uninstall\" ; then
echo 'uninstalled' > \"${DIRECTORY}/data/apps/${1}\"
echo -en '\n\e[42m\e[30mCommand succeeded.\e[39m\e[49m\nClose this window to exit.'
read enter #technically you could press Enter to exit.
else
echo 'corrupted' > \"${DIRECTORY}/data/apps/${1}\"
echo -en '\n\e[41m\e[30mCommand failed!\e[39m\e[49m\nClose this window to exit.'
read enter #technically you could press Enter to exit.
fi"
#wait until script is done before this command exits
sleep 2
while ps -C uninstall >/dev/null;do sleep 1; done
else
error "Did not understand $2. It must be either "\'"install"\'" or "\'"uninstall"\'"."
fi

@ -0,0 +1,92 @@
#!/bin/bash
#$1 is a quotation-marked, space-seperated list of package names.
#$2 is the path to the program folder being installed. For example, /home/pi/pi-apps/apps/Arduino
#Example usage: ~/pi-apps/pkg-install "gparted buffer expect" ~/pi-apps/apps/Arduino
PKG_LIST="$1"
PRG_DIR="$2"
if [ -z "$PKG_LIST" ];then
echo -e "\e[91mNo packages were specified!\e[39m"
exit=1
fi
if [ -z "$PRG_DIR" ];then
echo -e "\e[91mNo program directory specified!\e[39m"
exit=1
elif [ ! -d "$PRG_DIR" ];then
echo -e "\e[91m$PRG_DIR does not exist!\e[39m"
exit=1
elif [ -z "$(echo "$PRG_DIR" | grep "pi-apps/apps")" ];then
echo -e "\e[33mWarning: That program directory ($PRG_DIR) is located outside of pi-apps.\e[39m"
fi
if [ ! -z $exit ];then
echo -e '$1 is a quotation-marked, space-seperated list of package names.\n$2 is the path to the program folder being installed.\nExample usage: ~/pi-apps/pkg-install '\"'gparted buffer expect'\"' ~/pi-apps/apps/Arduino'
echo -e "\e[91mExiting now.\e[39m"
exit 1
fi
if [ "$PRG_DIR" == "*/" ]; then # ensure there is no trailing slash
PRG_DIR=${PRG_DIR: :-1}
fi
echo "Running pkg-install..."
output="$(sudo apt update 2>&1)"
exitcode=$?
#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 -y\e[0m."
fi
#exit on apt error
errors="$(echo "$output" | grep '^[(W)|(E)|(Err]:')"
if [ $exitcode != 0 ] || [ ! -z "$errors" ];then
echo -e "\e[91mFailed to run \e[4msudo apt update\e[0m\e[39m!"
echo -e "APT reported these errors:\n\e[91m$errors\e[39m"
exit 1
fi
for i in $PKG_LIST
do
PKG_OK="$(dpkg-query -W --showformat='${Status}\n' "$i" 2>/dev/null |grep "install ok installed")"
if [ "" == "$PKG_OK" ]; then
INSTALL_LIST="${INSTALL_LIST} ${i}" #add package to install list
fi
done
#save that list of installed packages in the program directory for future removal
echo $INSTALL_LIST >> "$PRG_DIR/installed-packages"
if [ ! -z "$INSTALL_LIST" ];then
echo -e "These packages will be installed: \e[2m$INSTALL_LIST\e[22m"
output="$(sudo apt-get install -y $INSTALL_LIST 2>&1)"
exitcode=$?
errors="$(echo "$output" | grep '^[(W)|(E)|(Err]:')"
if [ $exitcode != 0 ] || [ ! -z "$errors" ];then
echo -e "\e[91mFailed to install the packages!\e[39m"
echo -e "APT reported these errors:\n\e[91m$errors\e[39m"
exit 1
fi
#re-check package list. This time it should be blank.
INSTALL_LIST=''
for i in $PKG_LIST
do
PKG_OK="$(dpkg-query -W --showformat='${Status}\n' "$i" 2>/dev/null |grep "install ok installed")"
if [ "" == "$PKG_OK" ]; then
INSTALL_LIST="${INSTALL_LIST} ${i}" #add package to install list
fi
done
if [ ! -z $INSTALL_LIST ];then
echo -e "\e[91mAPT did not exit with an error, but these packages failed to install somehow: $INSTALL_LIST\e[39m"
exit 1
else
echo -e "\e[32mAll packages were installed succesfully.\e[39m"
fi
else
echo -e "\e[32mNo new packages to install. Nothing to do!\e[39m"
fi

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save