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

Update indra/newview/linux_tools/refresh_desktop_app_entry.sh

parent f479baa0
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ VIEWERNAME="Alchemy" #Store the viewer's name as a variable, for portability. Th
SCRIPTSRC="$(readlink -f "$0" || echo "$0")"
RUN_PATH="$(dirname "${SCRIPTSRC}" || echo .)"
install_prefix="${RUN_PATH}"/..
install_prefix=$(builtin cd "${RUN_PATH}/.." || exit; pwd) #This is a cleaner way of getting the absolute path for the install directory.
function install_desktop_entry()
{
......@@ -20,7 +20,7 @@ GenericName=Second Life Viewer
Comment=Client for the Online Virtual World, Second Life
Exec=${installation_prefix}/${VIEWERNAME,,}
Icon=${VIEWERNAME}-Viewer
Terminal=false
Terminal=true
Type=Application
Categories=Game;Simulation;
StartupNotify=true
......@@ -29,13 +29,13 @@ PrefersNonDefaultGPU=true
Actions=DefaultGPU;AssociateMIME;
[Desktop Action DefaultGPU]
Exec=${installation_prefix}/${VIEWERNAME}
Exec=${installation_prefix}/${VIEWERNAME,,}
Name=Launch on default GPU
Comment=Launch the viewer using the system's integrated GPU, instead of the dedicated one. (if available)
PrefersNonDefaultGPU=false
[Desktop Action AssociateMIME]
Exec=${installation_prefix}/etc/register_secondlifeprotocol.sh
Exec=.${installation_prefix}/etc/register_secondlifeprotocol.sh
Name=Associate SLURLs
Comment=Set this viewer as the default handler for secondlife:// links.
Terminal=true
......@@ -46,9 +46,9 @@ desktopfile
# 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.)
echo " - Installing menu entries via XDG..."
xdg-icon-resource install --novendor "${install_prefix}/${VIEWERNAME,,}_icon.png" ${VIEWERNAME}-Viewer
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 ./alchemy-viewer.desktop
xdg-desktop-menu install --novendor ./${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