call wineDEBSUFFIX instead of wine from desktop launchers
authorMichael Gilbert <mgilbert@debian.org>
Wed, 6 Jul 2022 00:44:32 +0000 (01:44 +0100)
committerMichael Gilbert <mgilbert@debian.org>
Wed, 6 Jul 2022 00:44:32 +0000 (01:44 +0100)
forwarded: not-needed

Gbp-Pq: Topic debianization
Gbp-Pq: Name desktop-launchers.patch

programs/winemenubuilder/Makefile.in
programs/winemenubuilder/winemenubuilder.c

index 12326d1e4e2356548cd900562bd04b602bc15768..4109fab622c170201514cd56de691c9e5b980851 100644 (file)
@@ -1,5 +1,6 @@
 MODULE    = winemenubuilder.exe
 IMPORTS   = uuid windowscodecs shell32 shlwapi ole32 user32 advapi32
+EXTRADEFS = -DDEBSUFFIX="\"${DEBSUFFIX}\""
 
 EXTRADLLFLAGS = -mwindows -municode
 
index 16dc32a8859e5105598eea2ce5a6b0e53cb58da8..07e43e81ff498aaf28187ac7bae000ca1af345c7 100644 (file)
@@ -97,6 +97,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
 #define IS_OPTION_TRUE(ch) \
     ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
 
+static const char wine_debsuffix[] = "wine" DEBSUFFIX;
+
 /* link file formats */
 
 #include "pshpack1.h"
@@ -1275,7 +1277,7 @@ static BOOL write_desktop_entry(const WCHAR *link, const WCHAR *location, const
         fprintf(file, "env WINEPREFIX=\"%s\" ", path);
         heap_free( path );
     }
-    fprintf(file, "wine %s", escape(path));
+    fprintf(file, "%s %s", wine_debsuffix, escape(path));
     if (args) fprintf(file, " %s", escape(args) );
     fputc( '\n', file );
     fprintf(file, "Type=Application\n");
@@ -1985,11 +1987,11 @@ static BOOL write_freedesktop_association_entry(const WCHAR *desktopPath, const
         if (prefix)
         {
             char *path = wine_get_unix_file_name( prefix );
-            fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" wine start /ProgIDOpen %s %%f\n", path, escape(progId));
+            fprintf(desktop, "Exec=env WINEPREFIX=\"%s\" %s start /ProgIDOpen %s %%f\n", path, wine_debsuffix, escape(progId));
             heap_free( path );
         }
         else
-            fprintf(desktop, "Exec=wine start /ProgIDOpen %s %%f\n", escape(progId));
+            fprintf(desktop, "Exec=%s start /ProgIDOpen %s %%f\n", wine_debsuffix, escape(progId));
         fprintf(desktop, "NoDisplay=true\n");
         fprintf(desktop, "StartupNotify=true\n");
         if (openWithIcon)