From 334fafb6bcafb1593f73a6e238b1a53ed2caa2c0 Mon Sep 17 00:00:00 2001 From: Kenneth Larrieu Date: Fri, 1 Aug 2025 09:28:42 -0700 Subject: [PATCH 1/3] added tested laptop model --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b051336..e3beb7c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ - Run ```install.sh``` from the desktop folder. ## Supported Laptop models (tested) +- MSI GP66 12UGS - MSI GP76 11UG ## Supported Linux Distro (tested) From 53fa102ca9dd55174e854711b32b0082da8ee3ff Mon Sep 17 00:00:00 2001 From: Kenneth Larrieu Date: Fri, 1 Aug 2025 09:29:34 -0700 Subject: [PATCH 2/3] added more robust directory traversal, ubuntu version check for limiting pygobject version --- install.sh | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 245f092..212d9a0 --- a/install.sh +++ b/install.sh @@ -12,6 +12,7 @@ if test -f ~/Desktop/OFC/OFC.py; then FLAG_3=1 else + REPO_DIR=$(dirname "$(readlink -f "$0")") echo "This is a shell script to install all the dependencies required for this software to run." echo "Dependencies required are as follows." echo "1 -> python3-virtualenv AND python3-venv" @@ -29,18 +30,34 @@ else python3 -m venv ~/Desktop/OFC echo "----------Virtual Environment for Open Freeze Center created----------" echo "----------Installing PyGObject----------" - ~/Desktop/OFC/bin/pip3 install PyGObject + # get distro version if ubuntu base, since we need to restrict pygobject version for distro version <24.04 + RESTRICT_GI_VER=0 + if [ -f /etc/os-release ]; then + . /etc/os-release + if [[ $ID == *"ubuntu"* ]] || [[ $ID_LIKE == *"ubuntu"* ]]; then + echo "Running ubuntu-based distro" + if { echo "$VERSION_ID"; echo "22.04.5"; } | sort --version-sort --check=quiet; then + echo "Version is 22.04 or less, restricting pygobject version" + RESTRICT_GI_VER=1 + fi + fi + fi + if [ "$RESTRICT_GI_VER" -eq "0" ]; then + ~/Desktop/OFC/bin/pip3 install PyGObject + else + ~/Desktop/OFC/bin/pip3 install "PyGObject<=3.52.0" + fi echo "----------Installing PyCairo----------" ~/Desktop/OFC/bin/pip3 install pycairo echo "----------Installing Expert----------" sudo apt-get install expect echo "----------Moving files to virtual environment----------" - cp -i ~/Downloads/OpenFreezeCenter-5/install.sh ~/Desktop/OFC - cp -i ~/Downloads/OpenFreezeCenter-5/file_1.sh ~/Desktop/OFC - cp -i ~/Downloads/OpenFreezeCenter-5/file_2.sh ~/Desktop/OFC - cp -i ~/Downloads/OpenFreezeCenter-5/OFC.py ~/Desktop/OFC - cp -i ~/Downloads/OpenFreezeCenter-5/README.md ~/Desktop/OFC - cp -i ~/Downloads/OpenFreezeCenter-5/LICENSE ~/Desktop/OFC + cp -i "${REPO_DIR}/install.sh" ~/Desktop/OFC + cp -i "${REPO_DIR}/file_1.sh" ~/Desktop/OFC + cp -i "${REPO_DIR}/file_2.sh" ~/Desktop/OFC + cp -i "${REPO_DIR}/OFC.py" ~/Desktop/OFC + cp -i "${REPO_DIR}/README.md" ~/Desktop/OFC + cp -i "${REPO_DIR}/LICENSE" ~/Desktop/OFC FLAG_3=1 fi From 0cc9b42c593f1f7f0113b0996c4bc318f034baf3 Mon Sep 17 00:00:00 2001 From: Kenneth Larrieu Date: Fri, 1 Aug 2025 09:40:06 -0700 Subject: [PATCH 3/3] fix typo in comments --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 212d9a0..c87999d 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ else echo "1 -> python3-virtualenv AND python3-venv" echo "2 -> PyGObject" echo "3 -> PyCairo" - echo "4 -> Expert" + echo "4 -> Expect" echo "----------Creating Folder for Open Freeze Center----------" cd ~/Desktop mkdir OFC @@ -49,7 +49,7 @@ else fi echo "----------Installing PyCairo----------" ~/Desktop/OFC/bin/pip3 install pycairo - echo "----------Installing Expert----------" + echo "----------Installing Expect----------" sudo apt-get install expect echo "----------Moving files to virtual environment----------" cp -i "${REPO_DIR}/install.sh" ~/Desktop/OFC