Skip to content
Snippets Groups Projects
Commit 5423377c authored by JennaHuntsman's avatar JennaHuntsman
Browse files

Merge suggestions from @Xenny Heartsong

parent 80f25b17
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment