From 435623df6f9aa3825513be0d369fec8209140c11 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 18 Jun 2004 22:29:56 +0000 Subject: [PATCH] Hardcode "wineshelllink" in winemenubuilder, remove it from the config file. --- documentation/samples/config | 1 - programs/winemenubuilder/winemenubuilder.c | 33 +++--------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/documentation/samples/config b/documentation/samples/config index 5ef8b86d9d4..86d951b0cce 100644 --- a/documentation/samples/config +++ b/documentation/samples/config @@ -14,7 +14,6 @@ WINE REGISTRY Version 2 "GraphicsDriver" = "x11drv" ;"ShowDirSymlinks" = "1" ;"ShowDotFiles" = "1" -"ShellLinker" = "wineshelllink" # [wineconf] diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 4070ccb711e..a2d13658b9a 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -618,27 +618,6 @@ static int fork_and_wait( char *linker, char *link_name, char *path, return retcode; } -/* write the name of the ShellLinker into the buffer provided */ -static BOOL GetLinkerName( LPSTR szLinker, DWORD max ) -{ - LONG r; - DWORD type = 0; - HKEY hkey; - - szLinker[0] = 0; - r = RegOpenKeyExA( HKEY_LOCAL_MACHINE, - "Software\\Wine\\Wine\\Config\\Wine", - 0, KEY_ALL_ACCESS, &hkey ); - if( r ) - return FALSE; - r = RegQueryValueExA( hkey, "ShellLinker", 0, &type, szLinker, &max ); - RegCloseKey( hkey ); - if( r || ( type != REG_SZ ) ) - return FALSE; - - return TRUE ; -} - static char *cleanup_link( LPCWSTR link ) { char *p, *link_name; @@ -711,7 +690,7 @@ static BOOL InvokeShellLinker( IShellLinkA *sl, LPCWSTR link ) char *link_name, *p, *icon_name = NULL, *work_dir = NULL; char *escaped_path = NULL, *escaped_args = NULL; CHAR szDescription[MAX_PATH], szPath[MAX_PATH], szWorkDir[MAX_PATH]; - CHAR szArgs[MAX_PATH], szIconPath[MAX_PATH], szLinker[MAX_PATH]; + CHAR szArgs[MAX_PATH], szIconPath[MAX_PATH]; int iIconId = 0, r; DWORD ofs=0, csidl= -1; @@ -721,12 +700,6 @@ static BOOL InvokeShellLinker( IShellLinkA *sl, LPCWSTR link ) return FALSE; } - if( !GetLinkerName( szLinker, MAX_PATH ) ) - { - WINE_ERR("Can't find the name of the linker script\n"); - return FALSE; - } - if( !GetLinkLocation( link, &ofs, &csidl ) ) { WINE_WARN("Unknown link location (%08lx). Ignoring\n", csidl); @@ -811,7 +784,7 @@ static BOOL InvokeShellLinker( IShellLinkA *sl, LPCWSTR link ) if (szArgs) escaped_args = escape(szArgs); - r = fork_and_wait(szLinker, link_name, escaped_path, + r = fork_and_wait("wineshelllink", link_name, escaped_path, (csidl == CSIDL_DESKTOPDIRECTORY), escaped_args, icon_name, work_dir ? work_dir : "", szDescription ); @@ -825,7 +798,7 @@ static BOOL InvokeShellLinker( IShellLinkA *sl, LPCWSTR link ) if (r) { - WINE_ERR("failed to fork and exec %s\n", szLinker ); + WINE_ERR("failed to fork and exec wineshelllink\n" ); return FALSE; } -- 2.11.4.GIT