From 37fcb6907a3222737f4fc65c44408bdc3d90a189 Mon Sep 17 00:00:00 2001 From: JennaHuntsman <jenna.salem.sf@gmail.com> Date: Mon, 4 Jul 2022 17:16:31 -0400 Subject: [PATCH] Merge suggestions from @Xenny Heartsong --- indra/newview/linux_tools/refresh_desktop_app_entry.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh index 5b4ace367ef..4f688a54004 100755 --- a/indra/newview/linux_tools/refresh_desktop_app_entry.sh +++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh @@ -7,6 +7,12 @@ RUN_PATH="$(dirname "${SCRIPTSRC}" || echo .)" install_prefix=$(builtin cd "${RUN_PATH}/.." || exit; pwd) #This is a cleaner way of getting the absolute path for the install directory. +function print() { + log_prefix="${VIEWERNAME}DesktopIntegration:" + echo -e "${log_prefix} $*" +} + + function install_desktop_entry() { local installation_prefix="${1}" @@ -40,6 +46,8 @@ Name=Associate SLURLs Comment=Set this viewer as the default handler for secondlife:// links. desktopfile +#The above adds some options when the shortcut is right-clicked, to launch on the default (usually integrated) GPU, and to force MIME type association. + #The "PrefersNonDefaultGPU" line should automatically run the viewer on the most powerful GPU in the system, if it is not default. If it is, this is ignored. # NOTE: DO NOT CHANGE THE "GenericName" FIELD - ONLY CHANGE THE "Name" FIELD. (This is to ensure that searching "Second Life" will show all the viewers installed in a user's system, regardless of their canonical name.) @@ -47,7 +55,7 @@ desktopfile echo " - Installing menu entries via XDG..." xdg-icon-resource install --novendor --size 256 "${install_prefix}/${VIEWERNAME,,}_icon.png" ${VIEWERNAME}-Viewer #NOTE: Above command takes the path to the icon to install && The name of the icon to be used by XDG. This should always be in the format of "x-Viewer" to avoid potential naming conflicts, as per XDG spec. - xdg-desktop-menu install --novendor ./${VIEWERNAME,,}-viewer.desktop + xdg-desktop-menu install --novendor "${installation_prefix}"/${VIEWERNAME,,}-viewer.desktop } if [ "$UID" == "0" ]; then -- GitLab