Skip to content

Commit

Permalink
initial commit (tested and working on piOS 64-bit bullseye)
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Oct 5, 2023
1 parent 4888a20 commit 4c89ef8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
41 changes: 41 additions & 0 deletions apps/AnyDesk/install-64
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

version=6.3.0-1

function check-armhf() {
ARMHF="$(dpkg --print-foreign-architectures | grep "armhf")"
}

#add armhf architecture (multiarch)
check-armhf
if [[ "$ARMHF" == *"armhf"* ]]; then
echo "armhf arcitecture already added..."
else
sudo dpkg --add-architecture armhf
check-armhf
if [[ "$ARMHF" != *"armhf"* ]]; then
error "armhf architecture should be added by now, but it isn't!"
fi
fi

unset rpi_arm_userspace
# only install the libraspberrypi0 arm32 package if the user already has the libraspberrypi0 arm64 package installed
if package_installed libraspberrypi0 ; then
rpi_arm_userspace="libraspberrypi0:armhf"
fi

install_packages https://download.anydesk.com/rpi/anydesk_${version}_armhf.deb libgles-dev:armhf libegl-dev:armhf libpolkit-gobject-1-0:armhf $rpi_arm_userspace || exit 1

#As libraspberrypi-dev:armhf cannot be installed with multiarch, symlink the required libs from libraspberrypi0:armhf
if [ -e /usr/lib/arm-linux-gnueabihf/libbcm_host.so.0 ] && [ -e /usr/lib/arm-linux-gnueabihf/libvcos.so.0 ] && [ -e /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0 ];then
sudo ln -s /usr/lib/arm-linux-gnueabihf/libbcm_host.so.0 /usr/lib/arm-linux-gnueabihf/libbcm_host.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/libvcos.so.0 /usr/lib/arm-linux-gnueabihf/libvcos.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0 /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so
else
error "Could not locate needed libs to symlink! Please ask pi-apps developers for help about this."
fi
# Solve error on Bullseye: "anydesk: error while loading shared libraries: libbrcmGLESv2.so: cannot open shared object file: No such file or directory"

[ ! -e /usr/lib/libbrcmGLESv2.so ] && sudo ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libbrcmGLESv2.so
[ ! -e /usr/lib/libbrcmEGL.so ] && sudo ln -s /usr/lib/arm-linux-gnueabihf/libEGL.so /usr/lib/arm-linux-gnueabihf/libbrcmEGL.so
exit 0
14 changes: 14 additions & 0 deletions apps/AnyDesk/uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

purge_packages || exit 1

if [ "$arch" == 64 ];then
# remove armhf architecture if no packages from it are currently installed
apt list --installed | awk '$3 == "armhf" { print }' | grep -q installed || sudo dpkg --remove-architecture armhf

#unlink libs
IFS=' '
for i in /usr/lib/arm-linux-gnueabihf/libbcm_host.so /usr/lib/arm-linux-gnueabihf/libvcos.so /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so /usr/lib/arm-linux-gnueabihf/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libbrcmEGL.so ;do
if [ -L $i ];then
sudo rm -f $i
fi
done

fi

#remove symlinked libraries
if [ -L /usr/lib/libbrcmGLESv2.so ];then
sudo rm -f /usr/lib/libbrcmGLESv2.so
Expand Down

0 comments on commit 4c89ef8

Please sign in to comment.