Kaydet (Commit) 3498cd3e authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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/26055Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 1a9e0f42
......@@ -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))
......
......@@ -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 \
))
......
......@@ -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) \
......
......@@ -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: */
......@@ -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;
......
......@@ -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
......
......@@ -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 \
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment