# HG changeset patch # User Daniel Atallah # Date 1257051405 0 # Node ID e7b9cf2f23865adbdb5b31565936c4024c26a333 # Parent 3f33a8fbf871e8605bfa995661b30103c3a4e86b Use an updated exchndl.dll that supports setting the log file path manually and external debug symbols (looks in the specified debug symbols dir and also for a .dbgsym alongside ). diff -r 3f33a8fbf871 -r e7b9cf2f2386 ChangeLog.win32 --- a/ChangeLog.win32 Sun Nov 01 03:34:32 2009 +0000 +++ b/ChangeLog.win32 Sun Nov 01 04:56:45 2009 +0000 @@ -2,6 +2,8 @@ * Minimum required GTK+ version increased to 2.14.0 * Private GTK+ Runtime now used (GTK+ Installer no longer supported) * Win9x no longer supported. + * Crash Report files (pidgin.RPT) are now generated in the ~/.purple + directory instead of the installation directory. version 2.6.3 (10/16/2009): * No changes diff -r 3f33a8fbf871 -r e7b9cf2f2386 pidgin/win32/gtkwin32dep.c --- a/pidgin/win32/gtkwin32dep.c Sun Nov 01 03:34:32 2009 +0000 +++ b/pidgin/win32/gtkwin32dep.c Sun Nov 01 04:56:45 2009 +0000 @@ -383,6 +383,7 @@ } void winpidgin_init(HINSTANCE hint) { + FARPROC exchndl_SetLogFile; purple_debug_info("winpidgin", "winpidgin_init start\n"); @@ -400,6 +401,16 @@ MyFlashWindowEx = (LPFNFLASHWINDOWEX) wpurple_find_and_loadproc("user32.dll", "FlashWindowEx"); + exchndl_SetLogFile = wpurple_find_and_loadproc("exchndl.dll", "SetLogFile"); + if (exchndl_SetLogFile) { + gchar *filename = g_build_filename(purple_user_dir(), + "pidgin.RPT", NULL); + purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", + filename); + (exchndl_SetLogFile)(filename); + g_free(filename); + } + purple_debug_info("winpidgin", "winpidgin_init end\n"); } diff -r 3f33a8fbf871 -r e7b9cf2f2386 pidgin/win32/nsis/pidgin-installer.nsi --- a/pidgin/win32/nsis/pidgin-installer.nsi Sun Nov 01 03:34:32 2009 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Sun Nov 01 04:56:45 2009 +0000 @@ -52,7 +52,7 @@ ;Defines !define PIDGIN_NSIS_INCLUDE_PATH "." -!define PIDGIN_INSTALLER_DEPS "..\..\..\..\win32-dev\pidgin-inst-deps" +!define PIDGIN_INSTALLER_DEPS "..\..\..\..\win32-dev\pidgin-inst-deps-0.2" ; Remove these and the stuff that uses them at some point !define OLD_GAIM_REG_KEY "SOFTWARE\gaim" diff -r 3f33a8fbf871 -r e7b9cf2f2386 pidgin/win32/winpidgin.c --- a/pidgin/win32/winpidgin.c Sun Nov 01 03:34:32 2009 +0000 +++ b/pidgin/win32/winpidgin.c Sun Nov 01 04:56:45 2009 +0000 @@ -36,6 +36,7 @@ #include #include #include +#include "config.h" /* These will hopefully be in the win32api next time it is updated - at which point, we'll remove them */ #ifndef LANG_PERSIAN @@ -672,28 +673,49 @@ /* Load exception handler if we have it */ if (GetModuleFileName(NULL, pidgin_dir, MAX_PATH) != 0) { - char *prev = NULL; - tmp = pidgin_dir; /* primitive dirname() */ - while ((tmp = strchr(tmp, '\\'))) { - prev = tmp; - tmp++; - } + tmp = strrchr(pidgin_dir, '\\'); - if (prev) { + if (tmp) { HMODULE hmod; - prev[0] = '\0'; + tmp[0] = '\0'; - /* prev++ will now point to the executable file name */ - strcpy(exe_name, prev + 1); + /* tmp++ will now point to the executable file name */ + strcpy(exe_name, tmp + 1); strcat(pidgin_dir, "\\exchndl.dll"); if ((hmod = LoadLibrary(pidgin_dir))) { + FARPROC proc; + char debug_dir[MAX_PATH]; printf("Loaded exchndl.dll\n"); + /* Temporarily override exchndl.dll's logfile + * to something sane (Pidgin will override it + * again when it initializes) */ + proc = GetProcAddress(hmod, "SetLogFile"); + if (proc) { + if (GetTempPath(sizeof(debug_dir), debug_dir) != 0) { + strcat(debug_dir, "pidgin.RPT"); + printf(" Setting exchndl.dll LogFile to %s\n", + debug_dir); + (proc)(debug_dir); + } + } + proc = GetProcAddress(hmod, "SetDebugInfoDir"); + if (proc) { + tmp[0] = '\0'; + _snprintf(debug_dir, sizeof(debug_dir), + "%s\\pidgin-%s-dbgsym", + pidgin_dir, VERSION); + debug_dir[sizeof(debug_dir) - 1] = '\0'; + printf(" Setting exchndl.dll DebugInfoDir to %s\n", + debug_dir); + (proc)(debug_dir); + } + } - prev[0] = '\0'; + tmp[0] = '\0'; } } else { DWORD dw = GetLastError();