Skip to content

Commit

Permalink
Zoom: remove all unnecessary bloat from install-64
Browse files Browse the repository at this point in the history
also make setting mimetypes more safe

tested on RPi4/5 Bookworm and Bullseye ARM64 and Nintendo Switch Ubuntu Jammy ARM64
  • Loading branch information
theofficialgman committed Jan 6, 2024
1 parent 5ef99a6 commit afbca0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 43 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/runzoom.sh
To run in a terminal: ~/zoom/ZoomLauncher
45 changes: 3 additions & 42 deletions apps/Zoom/install-64
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,12 @@ if true;then
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

echo "Getting x86_64 libs..."
wget https://github.com/ryanfortner/rpi-zoom/raw/master/zoom_x64_libs.zip || error "Failed to download zoom x64 libraries!"
unzip zoom_x64_libs.zip || error "Failed to extract zoom libraries."
rm zoom_x64_libs.zip || error "Failed to remove zoom_x64_libs.zip"
mkdir ~/zoom/x64_libs
mv zoom_x64_libs/* ~/zoom/x64_libs || error "Failed to move zoom x64 libraries to zoom folder."
rm -r $HOME/zoom_x64_libs || error "Failed to remove library folder."
fi

echo 'Creating launcher script'
echo '#!/bin/bash
trap "echo -e '\''\e[102m\e[30mZoom exited. Close this terminal to exit\e[0m'\'' ; 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"
#record uptime before zoom launches
before="$(cat /proc/uptime | awk "{print $1}" | awk "{print int($1+0.5)}")"
export BOX64_LD_LIBRARY_PATH="${BOX64_LD_LIBRARY_PATH}:${HOME}/zoom/Qt/lib:${HOME}/zoom/cef:${HOME}/zoom/x64_libs"
box64 ./zoom --no-sandbox
if [ $? != 0 ] && [ $((before+5)) -ge "$(cat /proc/uptime | awk "{print $1}" | awk "{print int($1+0.5)}")" ];then
box64 ./ZoomLauncher
fi
' > "${HOME}/zoom/runzoom.sh"
chmod +x "${HOME}/zoom/runzoom.sh"

echo "Creating a Zoom button in the Main Menu..."
echo "[Desktop Entry]
Name=Zoom
Exec=${DIRECTORY}/etc/terminal-run "\""$HOME/zoom/runzoom.sh %u"\"" 'Close this window to exit Zoom'
Exec=box64 ${HOME}/zoom/ZoomLauncher %u
Icon=$(dirname "$0")/icon-64.png
Path=${HOME}/zoom/
Type=Application
Expand All @@ -70,13 +37,7 @@ 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
echo "Associating Zoom mimetypes..."
xdg-mime default zoom.desktop x-scheme-handler/zoomus x-scheme-handler/zoommtg

systemctl --user unmask pulseaudio.service pulseaudio.socket
systemctl --user enable pulseaudio.service pulseaudio.socket
echo "Installation complete!"

0 comments on commit afbca0b

Please sign in to comment.