linux: Name desktop file correctly during bundle (#45508)
Closes #45507 There have been 5+ PRs attempting to fix Linux desktop icon association by adding `StartupWMClass` back to the `.desktop.in` template (#15763, #20644, #23459, #33019, #37962), all closed because `StartupWMClass` is an X11-specific key that GNOME happens to misuse on Wayland, and the correct fix per the FreeDesktop spec is to name the `.desktop` file to match the app's Wayland `app_id` / X11 `WM_CLASS`. Refer: https://github.com/zed-industries/zed/issues/12707#issuecomment-2168742761 The root cause is that `bundle-linux` was never updated to produce the correct filename in the tarball. The only consumers of the tarball's desktop file are `install.sh` and manual extractors. So this fix is for people who download the tarball and extract it without `install.sh`. The docs already tell them to rename, but as @wcbing points out, not everyone reads that carefully. We are now making `bundle-linux` produce the correctly named desktop file from the start. Release Notes: - N/A --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
1 parent
c28624733e
commit
628bb8f0ff
3 files changed
+14
-4
No files matched your search
+6
-2
@@ -164,17 +164,21 @@ export APP_ICON="zed"
|
||||
export APP_ARGS="%U"
|
||||
if [[ "$channel" == "preview" ]]; then
|
||||
export APP_NAME="Zed Preview"
|
||||
APP_ID="dev.zed.Zed-Preview"
|
||||
elif [[ "$channel" == "nightly" ]]; then
|
||||
export APP_NAME="Zed Nightly"
|
||||
APP_ID="dev.zed.Zed-Nightly"
|
||||
elif [[ "$channel" == "dev" ]]; then
|
||||
export APP_NAME="Zed Devel"
|
||||
APP_ID="dev.zed.Zed-Dev"
|
||||
else
|
||||
export APP_NAME="Zed"
|
||||
APP_ID="dev.zed.Zed"
|
||||
fi
|
||||
|
||||
mkdir -p "${zed_dir}/share/applications"
|
||||
envsubst < "crates/zed/resources/zed.desktop.in" > "${zed_dir}/share/applications/zed$suffix.desktop"
|
||||
chmod +x "${zed_dir}/share/applications/zed$suffix.desktop"
|
||||
envsubst < "crates/zed/resources/zed.desktop.in" > "${zed_dir}/share/applications/$APP_ID.desktop"
|
||||
chmod +x "${zed_dir}/share/applications/$APP_ID.desktop"
|
||||
|
||||
# Copy generated licenses so they'll end up in archive too
|
||||
cp "assets/licenses.md" "${zed_dir}/licenses.md"
|
||||
|
||||
Reference in new issue
Block a user