[Libreoffice-commits] core.git: desktop/source instsetoo_native/CustomTarget_setup.mk instsetoo_native/Package_setup.mk scp2/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Fri Jan 27 11:26:15 UTC 2017
desktop/source/app/crashreport.cxx | 14 +++++++++++---
instsetoo_native/CustomTarget_setup.mk | 10 ++--------
instsetoo_native/Package_setup.mk | 1 -
scp2/source/ooo/common_brand.scp | 22 ++++++++--------------
4 files changed, 21 insertions(+), 26 deletions(-)
New commits:
commit 6fd00998fa63e4f679b4dd00d7a2a7d45f4a30f4
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Thu Jan 26 13:53:21 2017 +0100
Put crash directory config in soffice.ini, instead of own ini file
Change-Id: I3a7aa394792c47c6c5a3a553174d177e66ade617
Reviewed-on: https://gerrit.libreoffice.org/33582
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx
index ce083d8..2d104e0 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -92,12 +92,20 @@ namespace {
OUString getCrashDirectory()
{
- OUString aCrashURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("crashreport") ":CrashDirectory}/");
- rtl::Bootstrap::expandMacros(aCrashURL);
+ OUString aCrashURL;
+ rtl::Bootstrap::get("CrashDirectory", aCrashURL);
// Need to convert to URL in case of user-defined path
osl::FileBase::getFileURLFromSystemPath(aCrashURL, aCrashURL);
- osl::Directory::create(aCrashURL);
+ if (aCrashURL.isEmpty()) { // Fall back to user profile
+ aCrashURL = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/crash/";
+ rtl::Bootstrap::expandMacros(aCrashURL);
+ }
+
+ if (!aCrashURL.endsWith("/"))
+ aCrashURL += "/";
+
+ osl::Directory::create(aCrashURL);
OUString aCrashPath;
osl::FileBase::getSystemPathFromFileURL(aCrashURL, aCrashPath);
return aCrashPath;
diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk
index 73042e3..2fe644c 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -131,7 +131,8 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'SecureUserConfigCompress=true' \
&& echo 'SecureUserConfigNumCopies=2' \
&& echo 'SecureUserConfigMode=1' \
- && echo 'SecureUserConfigExtensions=true' \
+ && echo 'SecureUserConfigExtensions=true' \
+ && echo 'CrashDirectory=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/crash' \
) > $@
$(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,uno) :
@@ -145,13 +146,6 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'UNO_SERVICES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)services.rdb $${URE_MORE_SERVICES}' \
) > $@
-$(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,crashreport) :
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
- ( \
- echo '[CrashReport]' \
- && echo 'CrashDirectory=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/crash' \
- ) > $@
-
.PHONY: $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version)
$(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version) :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
diff --git a/instsetoo_native/Package_setup.mk b/instsetoo_native/Package_setup.mk
index 6ee95dc..5b1e427 100644
--- a/instsetoo_native/Package_setup.mk
+++ b/instsetoo_native/Package_setup.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_Package_add_files,instsetoo_native_setup,$(LIBO_ETC_FOLDER),\
$(call gb_Helper_get_rcfile,soffice) \
$(call gb_Helper_get_rcfile,louno) \
$(call gb_Helper_get_rcfile,version) \
- $(call gb_Helper_get_rcfile,crashreport) \
))
# vim: set noet sw=4 ts=4:
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 5ba90d0..ff562ea 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -634,12 +634,6 @@ Profile gid_Brand_Profile_Fundamental_Ini
Dir = GID_BRAND_DIR_ETC;
End
-Profile gid_Brand_Profile_Crashreport_Ini
- ModuleID = gid_Module_Root_Brand;
- Name = PROFILENAME(crashreport);
- Dir = GID_BRAND_DIR_ETC;
-End
-
#if !defined MACOSX
Profile gid_Brand_Profile_Redirect_Ini
ModuleID = gid_Module_Root_Brand;
@@ -772,6 +766,14 @@ ProfileItem gid_Brand_Profileitem_Soffice_Hideeula
Value = "1";
End
+ProfileItem gid_Brand_Profileitem_Soffice_CrashDirectory
+ ProfileID = gid_Brand_Profile_Soffice_Ini;
+ ModuleID = gid_Module_Root_Brand;
+ Section = "Bootstrap";
+ Key = "CrashDirectory";
+ Value = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/crash";
+End
+
ProfileItem gid_Brand_Profileitem_Version_Buildid
ProfileID = gid_Brand_Profile_Version_Ini;
ModuleID = gid_Module_Root_Brand;
@@ -1205,11 +1207,3 @@ ProfileItem gid_Brand_Profileitem_Setup_Install
Styles = (INIFILETABLE);
End
#endif
-
-ProfileItem gid_Brand_Profileitem_CrashReport_Path
- ProfileID = gid_Brand_Profile_Crashreport_Ini;
- ModuleID = gid_Module_Root_Brand;
- Section = "CrashReport";
- Key = "CrashDirectory";
- Value = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" PROFILENAME(bootstrap) ":UserInstallation}/crash";
-End
More information about the Libreoffice-commits
mailing list