Makefile.in | 4 +++- config_host.mk.in | 1 + configure.ac | 19 +++++++++++++++++++ lo.xcent.in | 1 + sfx2/source/appl/sfxhelp.cxx | 16 ++++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-)
New commits: commit 720db024133b42e92fd3258f953819a6d9a456d5 Author: Christian Lohmaier <[email protected]> AuthorDate: Wed Jun 29 13:35:01 2022 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Fri Jul 1 21:07:01 2022 +0200 allow to specify a macOS provisioning profile having one is one of the prerequisites of using TestFlight Change-Id: I9e20eb99905071fade4179dfbe2da5b7e5dd1c24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136618 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> (cherry picked from commit b43f0b0295953c8d5d16c5b9eccaddb5ec214bab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136695 diff --git a/Makefile.in b/Makefile.in index d3f1047be4ca..a5ae689b614e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -387,7 +387,9 @@ ifneq ($(ENABLE_MACOSX_SANDBOX),) rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo endif -# +ifneq ($(MACOSX_PROVISIONING_PROFILE),) + cp "$(MACOSX_PROVISIONING_PROFILE)" $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile +endif ifneq ($(MACOSX_CODESIGNING_IDENTITY),) # Then use the macosx-codesign-app-bundle script @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app diff --git a/config_host.mk.in b/config_host.mk.in index 02f6ec6aba46..847d63c13a50 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -425,6 +425,7 @@ export MACOSX_BUNDLE_IDENTIFIER=@MACOSX_BUNDLE_IDENTIFIER@ export MACOSX_CODESIGNING_IDENTITY=@MACOSX_CODESIGNING_IDENTITY@ export MACOSX_DEPLOYMENT_TARGET=@MACOSX_DEPLOYMENT_TARGET@ export MACOSX_PACKAGE_SIGNING_IDENTITY=@MACOSX_PACKAGE_SIGNING_IDENTITY@ +export MACOSX_PROVISIONING_PROFILE=@MACOSX_PROVISIONING_PROFILE@ export MACOSX_SDK_PATH=@MACOSX_SDK_PATH@ export MAC_OS_X_VERSION_MAX_ALLOWED=@MAC_OS_X_VERSION_MAX_ALLOWED@ export MAC_OS_X_VERSION_MIN_REQUIRED=@MAC_OS_X_VERSION_MIN_REQUIRED@ diff --git a/configure.ac b/configure.ac index db33c873cd83..55099b401f32 100644 --- a/configure.ac +++ b/configure.ac @@ -1848,6 +1848,11 @@ AC_ARG_WITH(macosx-bundle-identifier, org.libreoffice.script ("script", huh?).]), ,with_macosx_bundle_identifier=org.libreoffice.script) +AC_ARG_WITH(macosx-provisioning-profile, + AS_HELP_STRING([--with-macosx-provisioning-profile=/path/to/mac.provisionprofile], + [Specify the path to a provisioning profile to use]), +,) + AC_ARG_WITH(product-name, AS_HELP_STRING([--with-product-name='My Own Office Suite'], [Define the product name. Default is AC_PACKAGE_NAME.]), @@ -3549,6 +3554,18 @@ if test $_os = Darwin; then AC_MSG_CHECKING([what macOS app bundle identifier to use]) MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER]) + + if test -n "$with_macosx_provisioning_profile" ; then + if test ! -f "$with_macosx_provisioning_profile"; then + AC_MSG_ERROR([provisioning profile not found at $with_macosx_provisioning_profile]) + else + MACOSX_PROVISIONING_PROFILE=$with_macosx_provisioning_profile + MACOSX_PROVISIONING_INFO=$([security cms -D -i "$MACOSX_PROVISIONING_PROFILE" | \ + xmllint --xpath "//key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier'] \ + | //key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier']/following-sibling::string[1]" - | \ + sed -e 's#><#>\n\t<#g' -e 's#^#\t#']) + fi + fi fi AC_SUBST(MACOSX_SDK_PATH) AC_SUBST(MACOSX_DEPLOYMENT_TARGET) @@ -3560,6 +3577,8 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY) AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY) AC_SUBST(ENABLE_MACOSX_SANDBOX) AC_SUBST(MACOSX_BUNDLE_IDENTIFIER) +AC_SUBST(MACOSX_PROVISIONING_INFO) +AC_SUBST(MACOSX_PROVISIONING_PROFILE) dnl =================================================================== dnl Check iOS SDK and compiler diff --git a/lo.xcent.in b/lo.xcent.in index 9a0838fbc388..4b7303876e6b 100644 --- a/lo.xcent.in +++ b/lo.xcent.in @@ -22,5 +22,6 @@ <key>com.apple.security.personal-information.addressbook</key> <true/> @SDREMOTE_ENTITLEMENT@ +@MACOSX_PROVISIONING_INFO@ </dict> </plist> commit 5460aadf5b8539f6dc5f0215e89d0feb6730ce6f Author: Christian Lohmaier <[email protected]> AuthorDate: Thu Jun 30 22:23:30 2022 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Fri Jul 1 21:06:46 2022 +0200 tdf#149603 macOS: fix workaround to use web help if Safari is the default browser Safari won't access the local helpfiles from LO's app folder unless you enable Safari's webdeveloper menu. The workaround broke since f31f0038f5fd9254584a06665066faf9715d1cd8 switched from window to widget references and hence using a different codepath, skipping the workaround added in 44893662d510c4173e55ba27af02d0258a697a5d Change-Id: I0c59066fe1cef1514c6595e0439d31d3e60e02f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136685 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> (cherry picked from commit 82acd35e3cc5dc458930daaf6de9f41c7deb73dc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136704 diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 73d86cba8266..889c669241d0 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -1281,6 +1281,22 @@ bool SfxHelp::Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUSt impl_showOnlineHelp(aHelpURL, pWidget); return true; } +#ifdef MACOSX + if (@available(macOS 10.14, *)) { + // Workaround: Safari sandboxing prevents it from accessing files in the LibreOffice.app folder + // force online-help instead if Safari is default browser. + CFURLRef pBrowser = LSCopyDefaultApplicationURLForURL( + CFURLCreateWithString( + kCFAllocatorDefault, + static_cast<CFStringRef>(@"https://www.libreoffice.org"), + nullptr), + kLSRolesAll, nullptr); + if([static_cast<NSString*>(CFURLGetString(pBrowser)) isEqualToString:@"file:///Applications/Safari.app/"]) { + impl_showOnlineHelp(aHelpURL, pWidget); + return true; + } + } +#endif // If the HTML or no help is installed, but aHelpURL nevertheless references valid help content, // that implies that help content belongs to an extension (and thus would not be available
