@@ -7,7 +7,6 @@ API_URL="https://api.github.com/repos/$GITHUB_REPO/releases/latest"
77ICON_URL=" https://updates.phcode.io/icons/phoenix_icon.png"
88INSTALL_DIR=" $HOME /.phoenix-code"
99LINK_DIR=" $HOME /.local/bin"
10- DESKTOP_DIR=" $HOME /.local/share/applications" # Directory for desktop entries
1110DESKTOP_ENTRY_NAME=" PhoenixCode.desktop"
1211DESKTOP_APP_NAME=" Phoenix Code"
1312DESKTOP_ENTRY=" $DESKTOP_DIR /$DESKTOP_ENTRY_NAME "
@@ -199,24 +198,24 @@ install_dependencies() {
199198 ubuntu|debian|linuxmint|kali)
200199 echo " Detected an Ubuntu/Debian based distribution."
201200 sudo apt update
202- sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 \
201+ yes | sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 \
203202 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
204203 gstreamer1.0-tools
205204 ;;
206205 fedora|rhel|centos)
207- echo " Detected a Fedora/Red Hat based distribution."
208- yes | sudo dnf install webkit2gtk3 gtk3 \
206+ echo " Detected a Fedora/Red Hat based distribution."
207+ yes | sudo dnf install webkit2gtk3 gtk3 \
209208 gstreamer1-plugins-base gstreamer1-plugins-good
210- ;;
209+ ;;
211210 arch|manjaro)
212- echo " Detected an Arch Linux based distribution."
213- sudo pacman -Syu
214- sudo pacman -S webkit2gtk gtk3
215- ;;
211+ echo " Detected an Arch Linux based distribution."
212+ sudo pacman -Syu
213+ sudo pacman -S webkit2gtk gtk3
214+ ;;
216215 * )
217- echo " Unsupported distribution. Please manually install the required dependencies."
218- exit 1
219- ;;
216+ echo " Unsupported distribution. Please manually install the required dependencies."
217+ exit 1
218+ ;;
220219 esac
221220}
222221# Verify and Install Dependencies Function
@@ -394,11 +393,18 @@ EOF
394393 kbuildsycoca5
395394 fi
396395 fi
396+
397+ if [[ " $XDG_CURRENT_DESKTOP " =~ LXQt ]]; then
398+ if command -v lxqt-config & > /dev/null; then
399+ lxqt-config --clear-cache
400+ fi
401+ fi
397402 # Set Phoenix Code as the default application for the MIME types
398403 set_default_application
399404 echo -e " ${GREEN} Installation completed successfully. Phoenix Code is now installed.${RESET} "
400405
401406}
407+
402408downloadLatestReleaseInfo () {
403409 local release_info_file=" $TMP_DIR /latest_release.json"
404410
@@ -459,13 +465,12 @@ downloadLatestReleaseInfo() {
459465# version and decide whether an upgrade is necessary.
460466#
461467downloadAndInstall (){
462-
463468 echo " Using temporary directory $TMP_DIR for processing"
464469 downloadLatestReleaseInfo > /dev/null
465470 # Check Ubuntu version for compatibility
466471 if [ -f /etc/os-release ]; then
467472 . /etc/os-release
468- if [[ " $ID " = " ubuntu" && " $VERSION_ID " = " 24.04" ]]; then
473+ if [[ " $ID " = " ubuntu" && " $VERSION_ID " = " 24.04" ]]; then
469474 local latestFileUrl
470475 latestFileUrl=$( grep -oP ' https://[^"]*latest\.json' " $TMP_DIR /latest_release.json" )
471476 WGET_OPTS=$( configure_wget_options)
@@ -737,6 +742,12 @@ uninstall() {
737742 kbuildsycoca5
738743 fi
739744 fi
745+
746+ if [[ " $XDG_CURRENT_DESKTOP " =~ LXQt ]]; then
747+ if command -v lxqt-config & > /dev/null; then
748+ lxqt-config --clear-cache
749+ fi
750+ fi
740751 else
741752 echo -e " ${RED} Desktop entry not found. Skipping...${RESET} "
742753 fi
0 commit comments