I have studied and tested this on both Raspbian 10 and 11, with the aim of making the script compatible with both. This is what I have found:
- On 10, the package
qt5-default does two main things: pull in qtbase5-dev as a dependency, and set the default version of Qt for qtchooser. Without this, there is no default version.
- On 11, the package
qt5-default does not exist. qtbase5-dev is still available as the main package to install, and the default version of Qt for qtchooser is automatically set to 5 by one of the installed dependencies.
- Using
qtchooser -list-versions is an OS-independent way of determining whether there is already a default or qt5-default is required.
- Package
qtdeclaractive5-dev is not required at all, as it only provides modules not used by Jamulus.
- Package
qttools5-dev-tools is available on both 10 and 11, and is required on 11 to provide lrelease for qmake.
So I would recommend the following section of code for installing packages on both 10 and 11 (I have tested on fresh installs of both):
# install required packages
pkgs='alsamixergui build-essential qtbase5-dev qttools5-dev-tools libasound2-dev cmake libglib2.0-dev'
if ! dpkg -s $pkgs >/dev/null 2>&1; then
read -p "Do you want to install missing packages? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
sudo apt-get install $pkgs -y
# Raspbian 10 needs qt5-default; Raspbian 11 doesn't need or provide it
if ! qtchooser -list-versions | grep -q default; then
sudo apt-get install qt5-default -y
fi
fi
fi
I have a version with this change at https://github.com/softins/jamulus/tree/fix-pi
Originally posted by @softins in #2267 (comment)
I have studied and tested this on both Raspbian 10 and 11, with the aim of making the script compatible with both. This is what I have found:
qt5-defaultdoes two main things: pull inqtbase5-devas a dependency, and set the default version of Qt forqtchooser. Without this, there is no default version.qt5-defaultdoes not exist.qtbase5-devis still available as the main package to install, and the default version of Qt forqtchooseris automatically set to 5 by one of the installed dependencies.qtchooser -list-versionsis an OS-independent way of determining whether there is already a default orqt5-defaultis required.qtdeclaractive5-devis not required at all, as it only provides modules not used by Jamulus.qttools5-dev-toolsis available on both 10 and 11, and is required on 11 to providelreleaseforqmake.So I would recommend the following section of code for installing packages on both 10 and 11 (I have tested on fresh installs of both):
I have a version with this change at https://github.com/softins/jamulus/tree/fix-pi
Originally posted by @softins in #2267 (comment)