pidgin.next.minor: cbdbb7ac: Use an updated exchndl.dll that supports...
datallah at pidgin.im
datallah at pidgin.im
Sun Nov 1 03:20:33 EST 2009
-----------------------------------------------------------------
Revision: cbdbb7ac043dc9b65d022385df8998a15d5c6e1f
Ancestor: 8902ee53b8d5926d675d46728968cdeb8bf72c5b
Author: datallah at pidgin.im
Date: 2009-11-01T04:56:45
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/cbdbb7ac043dc9b65d022385df8998a15d5c6e1f
Modified files:
ChangeLog.win32 pidgin/win32/gtkwin32dep.c
pidgin/win32/nsis/pidgin-installer.nsi
pidgin/win32/winpidgin.c
ChangeLog:
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
<modulename>.dbgsym alongside <modulename>).
-------------- next part --------------
============================================================
--- ChangeLog.win32 7f35c17f66524d8fb519bfa3eceb20ce5deffa2d
+++ ChangeLog.win32 42965026299135db21395af0fdc5d0f3bce2dad3
@@ -2,6 +2,8 @@ version 2.7.0 (??/??/????):
* 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
============================================================
--- pidgin/win32/gtkwin32dep.c 12455579af84c1afa2c35f323684c925a4838814
+++ pidgin/win32/gtkwin32dep.c fa82df91d0f21367f46723126f92be6cd439d615
@@ -383,6 +383,7 @@ void winpidgin_init(HINSTANCE hint) {
}
void winpidgin_init(HINSTANCE hint) {
+ FARPROC exchndl_SetLogFile;
purple_debug_info("winpidgin", "winpidgin_init start\n");
@@ -400,6 +401,16 @@ void winpidgin_init(HINSTANCE hint) {
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");
}
============================================================
--- pidgin/win32/nsis/pidgin-installer.nsi 50bf9a91b531c9e68adbd8a80033488aea312bc4
+++ pidgin/win32/nsis/pidgin-installer.nsi c9f6f835b6d81bedf0f9d3bead07656b5074daa6
@@ -52,7 +52,7 @@ SetDateSave on
;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"
============================================================
--- pidgin/win32/winpidgin.c 66b9b4b918071e3c93ec3458e371b0a1773e0aae
+++ pidgin/win32/winpidgin.c 018e9ee4d141f6a15e5eb29cece957f4fba4da1c
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
+#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 @@ WinMain (struct HINSTANCE__ *hInstance,
/* 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();
More information about the Commits
mailing list