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 <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
Christian Lohmaier 2022-06-29 13:35:01 +02:00
parent d121e7cdd4
commit b43f0b0295
4 changed files with 24 additions and 1 deletions

View file

@ -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

View file

@ -450,6 +450,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_MIN_REQUIRED=@MAC_OS_X_VERSION_MIN_REQUIRED@
export MANDIR=@MANDIR@

View file

@ -1899,6 +1899,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.]),
@ -3615,6 +3620,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)
@ -3625,6 +3642,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

View file

@ -22,5 +22,6 @@
<key>com.apple.security.personal-information.addressbook</key>
<true/>
@SDREMOTE_ENTITLEMENT@
@MACOSX_PROVISIONING_INFO@
</dict>
</plist>