A Fix for GUI not launching in some cases and dependency management (#826)

* proposing addition of libgirepository-2.0-dev and PyGObject for GUI not launching on Linux mint and similar distros

* Update auto-cpufreq-installer

* here are the proposed changes, please make changes necessary

* rev of prescribed changes

* rev

* formatting
This commit is contained in:
Aman Rawat 2025-03-30 14:39:03 +05:30 committed by GitHub
parent c6ba839f93
commit 00be2a5d91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,8 +77,18 @@ function tool_install {
}
if [ -f /etc/debian_version ]; then
detected_distro "Debian based"
apt install python3-dev python3-pip python3-venv python3-setuptools dmidecode libgirepository1.0-dev libcairo2-dev libgtk-3-dev gcc -y
VERSION=$(cat /etc/debian_version)
# VERSION="CSCS"
if [[ "$VERSION" =~ ^12(\.[0-9]+)?$ || ("$VERSION" =~ ^[0-9]+$ && "$VERSION" -lt 12) ]]; then
LIB_GI_REPO="libgirepository1.0-dev"
else
LIB_GI_REPO="libgirepository-2.0-dev"
fi
echo $LIB_GI_REPO needs to be installed for version $VERSION
echo '---- '
apt install -y python3-dev python3-pip python3-venv python3-setuptools dmidecode \
"$LIB_GI_REPO" libcairo2-dev libgtk-3-dev gcc
elif [ -f /etc/redhat-release ]; then
detected_distro "RedHat based"
@ -132,6 +142,17 @@ elif [ -f /etc/os-release ];then
source "$venv_dir/bin/activate"
python3 -m pip install --upgrade pip wheel
# debian specific PyGObject Installation
if [ -f /etc/debian_version ]; then
VERSION=$(cat /etc/debian_version | cut -d'.' -f1)
if [[ "$VERSION" =~ ^12(\.[0-9]+)?$ ]]; then
python3 -m pip install PyGObject==3.50.0
fi
fi
python3 -m pip install PyGObject
header "Installing auto-cpufreq tool"
git config --global --add safe.directory $(pwd)