winemenubuilder: Launch .lnk files directly from menus.
The arguments of a .lnk file are complex, with quoting and escaping rules and %windir%-style variable expansion, so winemenubuilder cannot always convert them accurately to a .desktop file. But start.exe and shell32 on the other hand can parse the .lnk file and run it themselves, so use them instead.
This commit is contained in:
parent
61493dee95
commit
55e4eba2ec
|
@ -2340,7 +2340,24 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
|
|||
}
|
||||
}
|
||||
else
|
||||
r = !write_menu_entry(unix_link, link_name, escaped_path, escaped_args, escaped_description, work_dir, icon_name);
|
||||
{
|
||||
char *arg = heap_printf("/Unix \"%s\"", unix_link);
|
||||
if (arg)
|
||||
{
|
||||
WCHAR *warg = utf8_chars_to_wchars(arg);
|
||||
if (warg)
|
||||
{
|
||||
char *menuarg = escape(warg);
|
||||
if (menuarg)
|
||||
{
|
||||
r = !write_menu_entry(unix_link, link_name, "start", menuarg, escaped_description, work_dir, icon_name);
|
||||
HeapFree(GetProcessHeap(), 0, menuarg);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, warg);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, arg);
|
||||
}
|
||||
}
|
||||
|
||||
ReleaseSemaphore( hsem, 1, NULL );
|
||||
|
||||
|
|
Loading…
Reference in New Issue