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

Add ability to define viewer release channel to refresh_desktop_entry.sh to...

Add ability to define viewer release channel to refresh_desktop_entry.sh to avoid conflicts between installs of viewers on different release channels.
parent e13352e7
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,15 @@
VIEWERNAME="Alchemy" #Store the viewer's name as a variable, for portability. This should be correctly capitalized.
CHANNELNAME="AgileAkita" #THIS CAN BE BLANK! Store the viewer's channel (i.e. alpha, beta, etc.) as a variable, for portability. This should be correctly capitalized. Release versions should leave this blank, so the DE will show just VIEWERNAME, not VIEWERNAME CHANNELNAME
SCRIPTSRC="$(readlink -f "$0" || echo "$0")"
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:"
log_prefix="${VIEWERNAME}${CHANNELNAME}DesktopIntegration:"
echo -e "${log_prefix} $*"
}
......@@ -21,7 +23,7 @@ function install_desktop_entry()
cat >"${desktoppath}" <<desktopfile || print "Warning: Could not write $desktoppath"s
[Desktop Entry]
Version=1.4
Name=${VIEWERNAME}
Name=${VIEWERNAME} ${CHANNELNAME}
GenericName=Second Life Viewer
Comment=Client for the Online Virtual World, Second Life
Exec=${installation_prefix}/${VIEWERNAME,,}
......@@ -30,7 +32,7 @@ Terminal=false
Type=Application
Categories=Game;Simulation;
StartupNotify=true
StartupWMClass=${VIEWERNAME}
StartupWMClass=${VIEWERNAME} ${CHANNELNAME}
PrefersNonDefaultGPU=true
Actions=DefaultGPU;AssociateMIME;
......@@ -52,7 +54,7 @@ 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..."
print "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 "${installation_prefix}"/${VIEWERNAME,,}-viewer.desktop
......
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