mesen: don't use absolute path for Exec in generated .desktop files (#431989)

This commit is contained in:
Toma 2025-08-09 14:00:18 +02:00 committed by GitHub
commit e2484e06d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/UI/Config/FileAssociationHelper.cs b/UI/Config/FileAssociationHelper.cs
index bcd40ce..4965c7a 100644
--- a/UI/Config/FileAssociationHelper.cs
+++ b/UI/Config/FileAssociationHelper.cs
@@ -152,7 +152,7 @@ namespace Mesen.Config
"Comment=Emulator" + Environment.NewLine +
"Keywords=game;emulator;emu" + Environment.NewLine +
"Categories=GNOME;GTK;Game;Emulator;" + Environment.NewLine +
- "Exec=" + mainModule.FileName + " %f" + Environment.NewLine +
+ "Exec=" + "Mesen" + " %f" + Environment.NewLine +
"NoDisplay=false" + Environment.NewLine +
"StartupNotify=true" + Environment.NewLine +
"Icon=MesenIcon" + Environment.NewLine;

View File

@ -26,6 +26,8 @@ buildDotnetModule rec {
./dont-use-nightly-avalonia.patch
# upstream has a weird library loading mechanism, which we override with a more sane alternative
./dont-zip-libraries.patch
# without this the generated .desktop file uses an absolute (and incorrect) path for the binary
./desktop-make-non-absolute-exec.patch
];
dotnet-sdk = dotnetCorePackages.sdk_8_0;