[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - desktop/Executable_minidump_upload.mk desktop/Library_crashreport.mk desktop/Module_desktop.mk desktop/source include/desktop svx/Library_svx.mk svx/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Jun 8 13:38:16 UTC 2016


 desktop/Executable_minidump_upload.mk       |    5 +++--
 desktop/Library_crashreport.mk              |    6 +++++-
 desktop/Module_desktop.mk                   |    2 +-
 desktop/source/minidump/minidump.cxx        |    5 +++++
 desktop/source/minidump/minidump_upload.cxx |    3 ++-
 include/desktop/minidump.hxx                |    8 +++++++-
 svx/Library_svx.mk                          |    8 --------
 svx/source/dialog/crashreportdlg.cxx        |    2 +-
 8 files changed, 24 insertions(+), 15 deletions(-)

New commits:
commit 3498cd3e7b2c820fc3f3025eb4434666a444fda1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jun 8 12:14:30 2016 +0200

    use a dynamic library for minidump shared code
    
    This has the disadvantage to make the minidump_upload executable depend on LibreOffice libraries but there seems to be no other way to make the 7.1 SDK happy.
    
    Change-Id: I82c37f503ed29cb50711eae7db22063f49747a48
    Reviewed-on: https://gerrit.libreoffice.org/26055
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/desktop/Executable_minidump_upload.mk b/desktop/Executable_minidump_upload.mk
index 2c02023..959d4af8 100644
--- a/desktop/Executable_minidump_upload.mk
+++ b/desktop/Executable_minidump_upload.mk
@@ -10,11 +10,12 @@
 $(eval $(call gb_Executable_Executable,minidump_upload))
 
 $(eval $(call gb_Executable_use_libraries,minidump_upload,\
+	crashreport \
     sal \
 ))
 
-$(eval $(call gb_Executable_use_static_libraries,minidump_upload,\
-	minidump \
+$(eval $(call gb_Executable_add_defs,minidump_upload,\
+	-DUNICODE \
 ))
 
 $(eval $(call gb_Executable_use_external,minidump_upload,curl))
diff --git a/desktop/Library_crashreport.mk b/desktop/Library_crashreport.mk
index 5b14519..ba2f348 100644
--- a/desktop/Library_crashreport.mk
+++ b/desktop/Library_crashreport.mk
@@ -14,7 +14,10 @@ $(eval $(call gb_Library_set_include,crashreport,\
     -I$(SRCDIR)/desktop/inc \
 ))
 
-$(eval $(call gb_Library_use_external,crashreport,breakpad))
+$(eval $(call gb_Library_use_externals,crashreport,\
+    breakpad \
+curl \
+))
 
 $(eval $(call gb_Library_add_defs,crashreport,\
     -DCRASHREPORT_DLLIMPLEMENTATION \
@@ -38,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,crashreport,\
 
 $(eval $(call gb_Library_add_exception_objects,crashreport,\
     desktop/source/app/crashreport \
+    desktop/source/minidump/minidump \
 ))
 
 
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 22d3647..e52c1b5 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
     Library_sofficeapp \
     $(if $(ENABLE_BREAKPAD), \
         Library_crashreport \
-        StaticLibrary_minidump) \
+        ) \
     $(if $(ENABLE_HEADLESS),,Library_spl) \
     Package_branding \
     $(if $(CUSTOM_BRAND_DIR),Package_branding_custom) \
diff --git a/desktop/source/minidump/minidump.cxx b/desktop/source/minidump/minidump.cxx
index 0075ca9..4661695 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -14,6 +14,7 @@
 #include <iostream>
 #include <fstream>
 #include <sstream>
+#include <string>
 
 #include <curl/curl.h>
 
@@ -183,6 +184,8 @@ bool uploadContent(std::map<std::string, std::string>& parameters, std::string&
     return true;
 }
 
+namespace crashreport {
+
 bool readConfig(const std::string& iniPath, std::string& response)
 {
     std::ifstream file(iniPath);
@@ -204,4 +207,6 @@ bool readConfig(const std::string& iniPath, std::string& response)
     return uploadContent(parameters, response);
 }
 
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/minidump/minidump_upload.cxx b/desktop/source/minidump/minidump_upload.cxx
index 934f1ad..ded2f1d 100644
--- a/desktop/source/minidump/minidump_upload.cxx
+++ b/desktop/source/minidump/minidump_upload.cxx
@@ -10,6 +10,7 @@
 #include <desktop/minidump.hxx>
 
 #include <iostream>
+#include <string>
 
 int main(int argc, char** argv)
 {
@@ -21,7 +22,7 @@ int main(int argc, char** argv)
 
     std::string iniPath(argv[1]);
     std::string response;
-    if (!readConfig(iniPath, response))
+    if (!crashreport::readConfig(iniPath, response))
         return EXIT_FAILURE;
 
     std::cout << "Response: " << response << std::endl;
diff --git a/include/desktop/minidump.hxx b/include/desktop/minidump.hxx
index bdd91b2..63336ca 100644
--- a/include/desktop/minidump.hxx
+++ b/include/desktop/minidump.hxx
@@ -12,7 +12,13 @@
 
 #include <string>
 
-bool readConfig(const std::string& iniPath, std::string& response);
+#include <desktop/dllapi.h>
+
+namespace crashreport {
+
+CRASHREPORT_DLLPUBLIC bool readConfig(const std::string& iniPath, std::string& response);
+
+}
 
 #endif
 
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index c026002..f650099 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -40,14 +40,6 @@ $(eval $(call gb_Library_add_defs,svx,\
 
 $(eval $(call gb_Library_set_precompiled_header,svx,$(SRCDIR)/svx/inc/pch/precompiled_svx))
 
-ifeq ($(ENABLE_BREAKPAD),TRUE)
-
-$(eval $(call gb_Library_use_static_libraries,svx, \
-	minidump \
-))
-
-endif
-
 $(eval $(call gb_Library_use_libraries,svx,\
     basegfx \
     sb \
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx
index 8cb5c29..973a593 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -55,7 +55,7 @@ IMPL_LINK_TYPED(CrashReportDialog, BtnHdl, Button*, pBtn, void)
         std::string ini_path = CrashReporter::getIniFileName();
 
         std::string response;
-        bool bSuccess = readConfig(ini_path, response);
+        bool bSuccess = crashreport::readConfig(ini_path, response);
 
         OUString aCrashID = OUString::createFromAscii(response.c_str());
 


More information about the Libreoffice-commits mailing list