Skip to content

Commit

Permalink
BUILD: appimage - append +qwurl %u to exec entry in desktop file, the…
Browse files Browse the repository at this point in the history
… uri should be passed in as first argument regardless but it would appear under some circumstances this doesn't happen. depending on how the desktop file is being processed it may or may not use the path variable properly, in which case fallback to directory of appimage file. (#870)

asdf
  • Loading branch information
ciscon committed Nov 22, 2023
1 parent a7c48ba commit b91e748
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions misc/appimage/appimage-manual_creation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ int main(){

QUAKE_SCRIPT='#!/usr/bin/env bash
export LD_LIBRARY_PATH="${APPIMAGE_LIBRARY_PATH}:${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
cd "$OWD"
if [ ! -e "$OWD/id1" ];then
cd "$(dirname "$APPIMAGE")"
else
cd "$OWD"
fi
"${APPDIR}/usr/bin/test" >/dev/null 2>&1 |:
FAIL=${PIPESTATUS[0]}
if [ $FAIL -eq 0 ];then
Expand All @@ -49,11 +53,10 @@ else
"${APPDIR}/usr/lib-override/ld-linux-'$ARCHDASH'.so.2" "${APPDIR}/usr/bin/ezquake-linux-'$ARCH'" $*
fi
exitstatus=$?
if [ $exitstatus -eq 0 ];then
#fix qwurl association if set for appimage
grep -q "^Exec=/tmp/.mount_" "${HOME}/.local/share/applications/qw-url-handler.desktop" && \
sed -i "s|^Exec=.*|Exec=${APPIMAGE}|g" "${HOME}/.local/share/applications/qw-url-handler.desktop"
sed -i "s|^Exec=.*|Exec=${APPIMAGE} +qwurl %u|g" "${HOME}/.local/share/applications/qw-url-handler.desktop"
fi
exit $exitstatus
'
Expand Down

0 comments on commit b91e748

Please sign in to comment.