mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-23 13:45:10 +02:00
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:
parent
c6ba839f93
commit
00be2a5d91
@ -77,8 +77,18 @@ function tool_install {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
detected_distro "Debian based"
|
VERSION=$(cat /etc/debian_version)
|
||||||
apt install python3-dev python3-pip python3-venv python3-setuptools dmidecode libgirepository1.0-dev libcairo2-dev libgtk-3-dev gcc -y
|
# 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
|
elif [ -f /etc/redhat-release ]; then
|
||||||
detected_distro "RedHat based"
|
detected_distro "RedHat based"
|
||||||
@ -132,6 +142,17 @@ elif [ -f /etc/os-release ];then
|
|||||||
source "$venv_dir/bin/activate"
|
source "$venv_dir/bin/activate"
|
||||||
python3 -m pip install --upgrade pip wheel
|
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"
|
header "Installing auto-cpufreq tool"
|
||||||
|
|
||||||
git config --global --add safe.directory $(pwd)
|
git config --global --add safe.directory $(pwd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user