From 5f397c2f43fbc9a1344cad4b5314fff669a1beff Mon Sep 17 00:00:00 2001 From: Botspot <54716352+Botspot@users.noreply.github.com> Date: Thu, 30 May 2024 22:38:15 -0500 Subject: [PATCH] Zoom: install globally and fix taskbar icon on wayland --- apps/Zoom/description | 2 +- apps/Zoom/install-32 | 71 ++++++++++++++----------------------------- apps/Zoom/install-64 | 34 ++++++++++----------- apps/Zoom/uninstall | 2 ++ 4 files changed, 42 insertions(+), 67 deletions(-) diff --git a/apps/Zoom/description b/apps/Zoom/description index 61ef9cff29..ae739adf2c 100644 --- a/apps/Zoom/description +++ b/apps/Zoom/description @@ -4,4 +4,4 @@ This works by running the x86 Zoom Linux app inside the box86/box64 emulator. Performance is good enough on the Pi4. Turning off HD video in Zoom's settings is recommended. To run: Menu -> Internet -> Zoom -To run in a terminal: ~/zoom/ZoomLauncher +To run in a terminal: /opt/zoom/ZoomLauncher diff --git a/apps/Zoom/install-32 b/apps/Zoom/install-32 index da54cac6d7..0f182ef68a 100755 --- a/apps/Zoom/install-32 +++ b/apps/Zoom/install-32 @@ -2,11 +2,6 @@ version=5.4.53391.1108 -if command -v box86 >/dev/null;then - echo "Updating box86..." -else - echo "Installing box86..." -fi "${DIRECTORY}/manage" install-if-not-installed 'Box86' || error "Box86 installation failed!" if ! command -v box86 >/dev/null;then error "Box86 failed to install somehow!\n/usr/local/bin/box86 does not exist" @@ -17,55 +12,33 @@ install_packages libxcb-xtest0 libxcb-xfixes0 libturbojpeg0 '|' libturbojpeg pul #refresh list of libraries 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 || sudo rm -rf "${HOME}/zoom" ~/zoom_i686.tar.xz - wget "https://zoom.us/client/${version}/zoom_i686.tar.xz" || wget "https://zoom.com/client/${version}/zoom_i686.tar.xz" || wget "https://d11yldzmag5yn.cloudfront.net/prod/${version}/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!' - - echo "Extracting..." - tar -xf ~/zoom_i686.tar.xz || error 'Failed to extract Zoom i686!' - rm -f ~/zoom_i686.tar.xz #who cares if this fails -fi -echo 'Creating launcher script' -echo '#!/bin/bash -trap "echo '\''Zoom exited. Close this terminal to exit'\'' ; sleep infinity" EXIT -if [ -z "$(ps aux | grep pulseaudio | grep -v grep)" ];then - echo -e "\e[102m\e[30mLaunching pulseaudio.\e[0m" - pulseaudio & - pulsepid=$! - trap "kill $pulsepid" EXIT - echo "Pulseaudio PID: $pulsepid" - sleep 2 -fi -cd ${HOME}/zoom/ -echo -e "\e[102m\e[30mLaunching Zoom.\e[0m" -box86 zoom "$1"' > "${HOME}/zoom/runzoom.sh" -chmod +x "${HOME}/zoom/runzoom.sh" +echo "Downloading Zoom..." +rm -rf "${HOME}/zoom" ~/zoom_i686.tar.xz ~/.local/share/applications/zoom.desktop /tmp/zoom_i686.tar.xz +wget -O /tmp/zoom_i686.tar.xz "https://zoom.us/client/${version}/zoom_i686.tar.xz" || wget -O /tmp/zoom_i686.tar.xz "https://zoom.com/client/${version}/zoom_i686.tar.xz" || wget -O /tmp/zoom_i686.tar.xz "https://d11yldzmag5yn.cloudfront.net/prod/${version}/zoom_i686.tar.xz" || error 'Failed to download Zoom i686!' + +#get outdated Zoom client from Botspot's mirror because it's more stable +#wget -O /tmp/zoom_i686.tar.xz 'https://github.com/Botspot/zoom_686_mirror/raw/main/zoom_i686.tar.xz' || error 'Failed to download Zoom i686!' + +echo "Extracting..." +sudo tar -xf /tmp/zoom_i686.tar.xz -C /opt || error 'Failed to extract Zoom xi686!' +rm -f /tmp/zoom_i686.tar.xz + +#copy icon to icons dir +sudo cp "$(dirname "$0")/icon-64.png" /usr/share/icons/hicolor/64x64/apps/zoom.png +sudo update-icon-caches /usr/share/icons/* echo "Creating a Zoom button in the Main Menu..." echo "[Desktop Entry] -Version=${version} Name=Zoom -Exec=${DIRECTORY}/etc/terminal-run "\""$HOME/zoom/runzoom.sh %u"\"" 'Close this window to exit Zoom' -Icon=$(dirname "$0")/icon-64.png -Path=${HOME}/zoom/ +Exec=box86 /opt/zoom/zoom %u +Icon=zoom +Path=/opt/zoom/ Type=Application -Comment=i386 version of software platform used for teleconferencing using Box86 +Comment=x86 version of teleconferencing software, emulated with Box86 Categories=Network; -StartupNotify=true" > ~/.local/share/applications/zoom.desktop -#Associate with mimeapp -if [ -z "$(cat ~/.config/mimeapps.list | grep 'zoom.desktop')" ];then - echo "Associating Zoom mimetypes..." - echo "[Added Associations] -x-scheme-handler/zoomus=zoom.desktop; -x-scheme-handler/zoommtg=zoom.desktop;" >> ~/.config/mimeapps.list -fi +StartupNotify=true" | sudo tee /usr/share/applications/zoom.desktop >/dev/null -systemctl --user unmask pulseaudio.service pulseaudio.socket -systemctl --user enable pulseaudio.service pulseaudio.socket -echo "Installation complete!" \ No newline at end of file +#Associate with mimeapp +echo "Associating Zoom mimetypes..." +xdg-mime default zoom.desktop x-scheme-handler/zoomus x-scheme-handler/zoommtg diff --git a/apps/Zoom/install-64 b/apps/Zoom/install-64 index 289984be35..c29ed1074b 100755 --- a/apps/Zoom/install-64 +++ b/apps/Zoom/install-64 @@ -14,30 +14,30 @@ install_packages libxcb-xtest0 libxcb-xfixes0 libturbojpeg0 '|' libturbojpeg pul #refresh list of libraries sudo ldconfig -#For testing, set to false if zoom folder is already there -if true;then - echo "Downloading Zoom..." - rm -rf "${HOME}/zoom" ~/zoom_x86_64.tar.xz* ~/zoom_x64_libs.zip* ~/zoom_x64_libs - wget "https://zoom.us/client/${version}/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!' - rm -f ~/zoom_x86_64.tar.xz #who cares if this fails -fi +echo "Downloading Zoom..." +rm -rf "${HOME}/zoom" ~/zoom_x86_64.tar.xz* ~/zoom_x64_libs.zip* ~/zoom_x64_libs /tmp/zoom_x86_64.tar.xz ~/.local/share/applications/zoom.desktop + +wget -O /tmp/zoom_x86_64.tar.xz "https://zoom.us/client/${version}/zoom_x86_64.tar.xz" || wget -O /tmp/zoom_x86_64.tar.xz 'https://zoom.com/client/latest/zoom_x86_64.tar.xz' || error 'Failed to download Zoom x86_64!' + +echo "Extracting..." +sudo tar -xf /tmp/zoom_x86_64.tar.xz -C /opt || error 'Failed to extract Zoom x86_64!' +rm -f /tmp/zoom_x86_64.tar.xz + +#copy icon to icons dir +sudo cp "$(dirname "$0")/icon-64.png" /usr/share/icons/hicolor/64x64/apps/zoom.png +sudo update-icon-caches /usr/share/icons/* echo "Creating a Zoom button in the Main Menu..." echo "[Desktop Entry] Name=Zoom -Exec=box64 ${HOME}/zoom/ZoomLauncher %u -Icon=$(dirname "$0")/icon-64.png -Path=${HOME}/zoom/ +Exec=box64 /opt/zoom/ZoomLauncher %u +Icon=zoom +Path=/opt/zoom/ Type=Application -Comment=x86_64 version of software platform used for teleconferencing using Box64 +Comment=x86_64 version of teleconferencing software, emulated with Box64 Categories=Network; -StartupNotify=true" > ~/.local/share/applications/zoom.desktop +StartupNotify=true" | sudo tee /usr/share/applications/zoom.desktop >/dev/null #Associate with mimeapp echo "Associating Zoom mimetypes..." xdg-mime default zoom.desktop x-scheme-handler/zoomus x-scheme-handler/zoommtg - -echo "Installation complete!" diff --git a/apps/Zoom/uninstall b/apps/Zoom/uninstall index cf5e179fe9..468983d728 100755 --- a/apps/Zoom/uninstall +++ b/apps/Zoom/uninstall @@ -1,6 +1,8 @@ #!/bin/bash rm -rf ~/zoom rm -f ~/.local/share/applications/zoom.desktop +sudo rm -f /usr/share/icons/hicolor/64x64/apps/zoom.png /usr/share/applications/zoom.desktop +sudo rm -rf /opt/zoom/ purge_packages || exit 1 if [ -d ~/.zoom ] || [ -f ~/.config/zoomus.conf ];then