From f780504b6818e81fdd767b2056e92265291ad617 Mon Sep 17 00:00:00 2001 From: Joey Riches Date: Thu, 13 Jun 2024 01:41:25 +0100 Subject: [PATCH] zed.desktop.in: Don't hardcode executable name due to binary conflicts (#12951) > * There are a couple of other `zed` binaries that may be present on linux systems ([1](https://openzfs.github.io/openzfs-docs/man/v2.2/8/zed.8.html), [2](https://zed.brimdata.io/docs/commands/zed)). If you want to rename our CLI binary because of these issues, we suggest `zedit`, `zeditor`, or `zed-cli`. Due to aformentioned issue don't hardcode the executable name in the .desktop file so envsubst can change it in accordance with the distributor's requirement. Resolves #12290. Release Notes: - N/A --- crates/zed/resources/zed.desktop.in | 4 ++-- script/bundle-linux | 1 + script/flatpak/bundle-flatpak | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/zed/resources/zed.desktop.in b/crates/zed/resources/zed.desktop.in index 45295c5a9d..9b85cb5436 100644 --- a/crates/zed/resources/zed.desktop.in +++ b/crates/zed/resources/zed.desktop.in @@ -4,9 +4,9 @@ Type=Application Name=$APP_NAME GenericName=Text Editor Comment=A high-performance, multiplayer code editor. -TryExec=zed +TryExec=$APP_CLI StartupNotify=$DO_STARTUP_NOTIFY -Exec=zed $APP_ARGS +Exec=$APP_CLI $APP_ARGS Icon=$APP_ICON Categories=Utility;TextEditor;Development;IDE; Keywords=zed; diff --git a/script/bundle-linux b/script/bundle-linux index 25eb97093b..60a83d8aff 100755 --- a/script/bundle-linux +++ b/script/bundle-linux @@ -80,6 +80,7 @@ cp "crates/zed/resources/app-icon$suffix@2x.png" "${zed_dir}/share/icons/hicolor # .desktop export DO_STARTUP_NOTIFY="true" +export APP_CLI="zed" export APP_ICON="zed" if [[ "$channel" == "preview" ]]; then export APP_NAME="Zed Preview" diff --git a/script/flatpak/bundle-flatpak b/script/flatpak/bundle-flatpak index effaa7bdfa..934ad952c5 100755 --- a/script/flatpak/bundle-flatpak +++ b/script/flatpak/bundle-flatpak @@ -11,6 +11,7 @@ channel=$(