Skip to content

Commit

Permalink
Zoom: install globally and fix taskbar icon on wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed May 31, 2024
1 parent 2442e71 commit 5f397c2
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 67 deletions.
2 changes: 1 addition & 1 deletion apps/Zoom/description
Original file line number Diff line number Diff line change
Expand Up @@ -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
71 changes: 22 additions & 49 deletions apps/Zoom/install-32
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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!"
#Associate with mimeapp
echo "Associating Zoom mimetypes..."
xdg-mime default zoom.desktop x-scheme-handler/zoomus x-scheme-handler/zoommtg
34 changes: 17 additions & 17 deletions apps/Zoom/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
2 changes: 2 additions & 0 deletions apps/Zoom/uninstall
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5f397c2

Please sign in to comment.