desktopToDarwinBundle: Add X-macOS-Exec and log editing Exec

Co-authored-by: milahu <milahu@gmail.com>
main
toonn 2 years ago
parent b52a962141
commit 7ef15c96dc
No known key found for this signature in database
GPG Key ID: 44FF902A66DF4576
  1. 12
      pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh

@ -176,8 +176,16 @@ convertDesktopFile() {
local -r file=$1
local -r sharePath=$(dirname "$(dirname "$file")")
local -r name=$(getDesktopParam "${file}" "^Name")
local -r exec=$(getDesktopParam "${file}" "Exec" \
| sed -e 's/ %[fFuUick]//g')
local -r macOSExec=$(getDesktopParam "${file}" "X-macOS-Exec")
if [[ "$macOSExec" ]]; then
local -r exec="$macOSExec"
else
local -r execRaw=$(getDesktopParam "${file}" "Exec")
local -r exec="${execRaw// %[fFuUick]}"
if [[ "$exec" != "$execRaw" ]]; then
echo "desktopToDarwinBundle: Application bundles do not understand desktop entry field codes. Changed '$execRaw' to '$exec'."
fi
fi
local -r iconName=$(getDesktopParam "${file}" "^Icon")
local -r squircle=$(getDesktopParam "${file}" "X-macOS-SquircleIcon")

Loading…
Cancel
Save