# HG changeset patch # User Daniel Atallah # Date 1257019406 0 # Node ID 3be6a18e0bcbc13f507d4becd2fa079d8fd2a8fe # Parent 8d10605105f26bffe30146fd793dccb6f030b44d No need to access SHGetFolderPath() indirectly any more with required versions of Windows. diff -r 8d10605105f2 -r 3be6a18e0bcb libpurple/win32/win32dep.c --- a/libpurple/win32/win32dep.c Sat Oct 31 19:42:18 2009 +0000 +++ b/libpurple/win32/win32dep.c Sat Oct 31 20:03:26 2009 +0000 @@ -30,14 +30,6 @@ #include "notify.h" /* - * DEFINES & MACROS - */ - -/* For shfolder.dll */ -typedef HRESULT (CALLBACK* LPFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR); -typedef HRESULT (CALLBACK* LPFNSHGETFOLDERPATHW)(HWND, int, HANDLE, DWORD, LPWSTR); - -/* * LOCALS */ static char *app_data_dir = NULL, *install_dir = NULL, @@ -115,21 +107,12 @@ /* Get paths to special Windows folders. */ gchar *wpurple_get_special_folder(int folder_type) { - static LPFNSHGETFOLDERPATHW MySHGetFolderPathW = NULL; gchar *retval = NULL; - - if (!MySHGetFolderPathW) { - MySHGetFolderPathW = (LPFNSHGETFOLDERPATHW) - wpurple_find_and_loadproc("shfolder.dll", "SHGetFolderPathW"); - } + wchar_t utf_16_dir[MAX_PATH + 1]; - if (MySHGetFolderPathW) { - wchar_t utf_16_dir[MAX_PATH + 1]; - - if (SUCCEEDED(MySHGetFolderPathW(NULL, folder_type, NULL, - SHGFP_TYPE_CURRENT, utf_16_dir))) { - retval = g_utf16_to_utf8(utf_16_dir, -1, NULL, NULL, NULL); - } + if (SUCCEEDED(SHGetFolderPathW(NULL, folder_type, NULL, + SHGFP_TYPE_CURRENT, utf_16_dir))) { + retval = g_utf16_to_utf8(utf_16_dir, -1, NULL, NULL, NULL); } return retval; diff -r 8d10605105f2 -r 3be6a18e0bcb pidgin/win32/nsis/pidgin-installer.nsi --- a/pidgin/win32/nsis/pidgin-installer.nsi Sat Oct 31 19:42:18 2009 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Sat Oct 31 20:03:26 2009 +0000 @@ -480,14 +480,6 @@ File "${PIDGIN_INSTALLER_DEPS}\exchndl.dll" !endif - ; Install shfolder.dll if need be.. - SearchPath $R4 "shfolder.dll" - StrCmp $R4 "" 0 got_shfolder - SetOutPath "$SYSDIR" - File "${PIDGIN_INSTALLER_DEPS}\shfolder.dll" - SetOutPath "$INSTDIR" - got_shfolder: - ; Check if Perl is installed, if so add it to the AppPaths ReadRegStr $R2 HKLM ${PERL_REG_KEY} "" StrCmp $R2 "" 0 perl_exists