Kaydet (Commit) 6fd00998 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

Put crash directory config in soffice.ini, instead of own ini file

Change-Id: I3a7aa394792c47c6c5a3a553174d177e66ade617
Reviewed-on: https://gerrit.libreoffice.org/33582Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 3aae650d
......@@ -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;
......
......@@ -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)
......
......@@ -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:
......@@ -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
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