From babd850db840eebd59b71730b446c0d89de87d3a Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Thu, 14 Jul 2022 10:28:09 +0200 Subject: [PATCH] macOS sandbox: disable donation info bar & help entries even when you are a verified non-profit, you still cannot just point to a donation site/you still would have to offer apple-pay... the helpmenu one is ugly since it changes the endresult compared to what is assembled in instdir, but is the least intrusive way for now... Change-Id: Id348d69371048bdd04d2961cad564fc73f11fd45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137050 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- officecfg/Configuration_officecfg.mk | 1 + .../data/org/openoffice/Office/UI/Infobar.xcu | 17 +++++++++++++++++ postprocess/CustomTarget_registry.mk | 4 ++++ solenv/bin/macosx-codesign-app-bundle | 3 +++ 4 files changed, 25 insertions(+) create mode 100644 officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk index dc8802628451..89a8a57504e9 100644 --- a/officecfg/Configuration_officecfg.mk +++ b/officecfg/Configuration_officecfg.mk @@ -118,6 +118,7 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat org/openoffice/Office/UI/WriterWindowState-librelogo.xcu \ ) \ org/openoffice/Office/UI/Controller-reportbuilder.xcu \ + org/openoffice/Office/UI/Infobar-macosxsandbox.xcu \ org/openoffice/TypeDetection/UISort-writer.xcu \ org/openoffice/TypeDetection/UISort-calc.xcu \ org/openoffice/TypeDetection/UISort-draw.xcu \ diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu new file mode 100644 index 000000000000..109e2198d408 --- /dev/null +++ b/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu @@ -0,0 +1,17 @@ + + + + + + + false + + + diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index fa30e33ae0c7..9e7fbb1398ae 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -306,6 +306,10 @@ ifneq ($(WITH_WEBDAV),) postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/ucb/Configuration-webdav.xcu endif +ifneq ($(ENABLE_MACOSX_SANDBOX),) +postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/Office/UI/Infobar-macosxsandbox.xcu +endif + ifneq (,$(SYSTEM_LIBEXTTEXTCAT_DATA)) postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/Office/Paths-externallibexttextcatdata.xcu else diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle index b79c3d8003b3..a29b339de744 100755 --- a/solenv/bin/macosx-codesign-app-bundle +++ b/solenv/bin/macosx-codesign-app-bundle @@ -31,6 +31,9 @@ if test -n "$ENABLE_MACOSX_SANDBOX"; then # All data files are in Resources and included in the app bundle signature # through that. I think. other_files='' + # HACK: remove donate menu entries, need to support apple-pay and be verified + # as non profit as a bare minimum to allow asking.... + sed -I "" -e '\##d' $APP_BUNDLE/Contents/Resources/config/soffice.cfg/modules/*/menubar/menubar.xml else # We then want to sign data files, too, hmm. entitlements="--entitlements $BUILDDIR/hardened_runtime.xcent"