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@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 3498cd3e7b
)
Reviewed-on: https://gerrit.libreoffice.org/26915
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
parent
7001ca25ec
commit
f4c68d3ad8
8 changed files with 24 additions and 15 deletions
|
@ -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) \
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <memory>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
|
@ -178,6 +179,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);
|
||||
|
@ -199,4 +202,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 \
|
||||
|
|
|
@ -60,7 +60,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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue