From 528db6a9b4015f6653c4b6681f43d764b8bbc8a3 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Sat, 28 Jun 2014 19:13:56 +0300 Subject: [PATCH] mingw: improve crash information reporting Up to now we have always released libsipe.dll without stripping it. But Pidgin crash reporter expects files with debug symbols at a special location. Update the MinGW build to also generate & install a stripped libsipe.dll, just like Pidgin Windows does. Update the NSIS installer to copy the stripped libsipe.dll to the usual place and the non-stripped libsipe.dll.dbgsym into the same location where Pidgin expects files with debug symbols. The Pidgin.RPT file should now contain more information when SIPE causes a crash. --- Makefile.mingw | 4 +++- contrib/opensuse-build-service/pidgin-sipe.nsi.template | 3 +++ contrib/opensuse-build-service/pidgin-sipe.spec | 1 + src/core/Makefile.mingw | 7 ++++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile.mingw b/Makefile.mingw index 5ea24382..07680c21 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -1,6 +1,6 @@ ################################### tell Emacs this is a -*- makefile-gmake -*- # -# Copyright (C) 2012 SIPE Project +# Copyright (C) 2012-2014 SIPE Project # # Makefile.mingw # @@ -22,6 +22,7 @@ export CFLAGS=-Werror WIX3_HOME := /cygdrive/c/Program\ Files/Windows\ Installer\ XML\ v3 WXS_NAME := pidgin-sipe export VERSION := $(shell cat VERSION) +PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION) .PHONY: all clean install msi dev devinst nsis @@ -72,6 +73,7 @@ cross-compile-nsis: >$(PIDGIN_INSTALL_DIR)/pidgin-sipe.nsi set -e; cd $(PIDGIN_INSTALL_DIR); \ makensis \ + -DPIDGIN_VERSION=$(PIDGIN_VERSION) \ -DVERSION=$(VERSION) \ -DMINGW_LIBDIR=. \ -DMINGW_DATADIR=. \ diff --git a/contrib/opensuse-build-service/pidgin-sipe.nsi.template b/contrib/opensuse-build-service/pidgin-sipe.nsi.template index 6aaddc8e..67d8d85b 100644 --- a/contrib/opensuse-build-service/pidgin-sipe.nsi.template +++ b/contrib/opensuse-build-service/pidgin-sipe.nsi.template @@ -51,6 +51,8 @@ SetCompressorDictSize 64 Section "PidginSIPE" SecPidginSIPE SetOutPath "$INSTDIR\plugins" File "${MINGW_LIBDIR}\purple-2\libsipe.dll" +SetOutPath "$INSTDIR\pidgin-${PIDGIN_VERSION}-dbgsym\plugins" +File "${MINGW_LIBDIR}\purple-2\libsipe.dll.dbgsym" SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\16" File "${MINGW_DATADIR}\pixmaps\pidgin\protocols\16\sipe.png" SetOutPath "$INSTDIR\pixmaps\pidgin\protocols\22" @@ -84,6 +86,7 @@ Section "Uninstall" Delete "$INSTDIR\Uninstall-pidgin-sipe.exe" Delete "$INSTDIR\plugins\libsipe.dll" +Delete "$INSTDIR\pidgin-${PIDGIN_VERSION}-dbgsym\plugins\libsipe.dll.dbgsym" Delete "$INSTDIR\pixmaps\pidgin\protocols\16\sipe.png" Delete "$INSTDIR\pixmaps\pidgin\protocols\22\sipe.png" Delete "$INSTDIR\pixmaps\pidgin\protocols\48\sipe.png" diff --git a/contrib/opensuse-build-service/pidgin-sipe.spec b/contrib/opensuse-build-service/pidgin-sipe.spec index 3ba60bb0..b3bae4b2 100644 --- a/contrib/opensuse-build-service/pidgin-sipe.spec +++ b/contrib/opensuse-build-service/pidgin-sipe.spec @@ -445,6 +445,7 @@ perl contrib/opensuse-build-service/generate_nsi.pl po/LINGUAS \ set -e; \ cd %{buildroot}; \ makensis \ + -DPIDGIN_VERSION=UNKNOWN \ -DVERSION=%{version} \ -DMINGW_LIBDIR=%{buildroot}%{mingw_libdir} \ -DMINGW_DATADIR=%{buildroot}%{mingw_datadir} \ diff --git a/src/core/Makefile.mingw b/src/core/Makefile.mingw index e4b90fda..6306fd12 100644 --- a/src/core/Makefile.mingw +++ b/src/core/Makefile.mingw @@ -1,6 +1,6 @@ ################################### tell Emacs this is a -*- makefile-gmake -*- # -# Copyright (C) 2011-2013 SIPE Project +# Copyright (C) 2011-2014 SIPE Project # # Makefile.mingw # @@ -209,7 +209,8 @@ libsiperc.rc: libsiperc.rc.in $(OBJECTS): $(PURPLE_CONFIG_H) $(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS) - $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll + $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $@.dbgsym + $(STRIP) --strip-unneeded $@.dbgsym -o $@ ## ## CLEAN RULES @@ -224,7 +225,7 @@ rmbak: install: test -z "$(DLL_INSTALL_DIR)" || mkdir -p "$(DLL_INSTALL_DIR)" - /usr/bin/install -c $(TARGET).dll '$(DLL_INSTALL_DIR)' + /usr/bin/install -c $(TARGET).dll $(TARGET).dll.dbgsym '$(DLL_INSTALL_DIR)' $(TEST_OBJECTS): -- 2.11.4.GIT