BRAND_BIN_SUBDIR -> BRAND_INI_DIR, to cater for new Mac OS X layout

Change-Id: Ic367545895a25a4cf6e95fc1be2f5db9f36a221b
Typo

Change-Id: I0a7d2f89fc8a01c128c65fc8708d98205072f2eb
(cherry picked from commit edcbe70b4daf352976b5393148e34d199c8e08b8)
We don't want those bin/InfoPlist_*.zip files in the app bundle

Change-Id: I29eefa599f175d98303fca8f5ccf1c8fe85b0bbc
(cherry picked from commit 7956d38fa3c0db77b9b2b41f870bd3587e3dc1af)
Unzip the InfoPlist.strings files into correct locations

Not sure how useful it is to only provide translations for the ODF
document format names, though.

Change-Id: I22a2e5b896e077ca3067a30635f7cdf67c2f5e7c
(cherry picked from commit 16f62d80c38f3920a40fc078edecad905ba2b196)
We need CFBundleVersion, too

Change-Id: I50c12ffd741baf12589069d90f47566c5324ce7f
(cherry picked from commit 68d186d3428df91c3efddb26294807d573c6306e)
Use correct CFBundleExecutable for the LibreOfficePython framework

It should be the basename of the framework. The Python
configury already provides that as @PYTHONFRAMEWORK@.

Change-Id: I116a34c3bcc8f661abe16b2b5cc1b9268ecd2780
(cherry picked from commit bb03775f9a73aeb4f25ad25c733bd88a2b6677d9)
Use correct CFBundleExecutable in the Info.plist for Python.app

Apparently the Python build machinery apparently does not use proper
autoconfigury to expand this Info.plist.in file, so can't use
@PYTHONFRAMEWORK@ as for the Info.plist for the framework itself, but
have to hardcode LibreOfficePython.

As such I am not sure that Python's way of including an app bundle
inside a framework's Resources subtree is acceptable in the stricter
code signing and Gatekeeper rules that soon will be in effect. Will
see.

Change-Id: I1ef9e7b748d41ec4b32d80e721d5fba5e7a90d18
(cherry picked from commit a925583c009d2829e313cea11ed6cf7b40eca097)
OS X code signing fixes

Remove unnecessary Python executables and stuff that complicates code
signing in the test-install target.

Sign executables in codesign-macosx-app-bundle, not when building
them. It is more uniform to do all code signing in just one place.

Don't bother signing data files in the sandboxed case, we assume we
then also use the "Mac-like" app structure and they are all under
Resources anyway and get handled that way.

All executables must have the com.apple.security.app-sandbox
entitlement.

The bundle signature's identifier must equal the bundle identifier.

The code signature identifiers of an embedded bundle needs to match
the embedded bundle's identifier.

Need the entitlements for embedded app executables too.

Change-Id: Ic6a640eb03964fe9ce75d3a8fff071971a3e1939
Skip some executables in the OS X sandboxed (Mac App Store) case

I doubt end-users will miss gengal.bin, regview, or regmerge.

Change-Id: I353610c0d039f25fa415f35902fe2b9890cd423f
(cherry picked from commit beb30bbd867f9a28878e0d004458c3507f6c0956)
This test was the wrong way surely?

Change-Id: I3470fbd2992cd96a772452d75fb2f0320bb529bf
Info.plist is invalid: CFBundleTypeName keys missing

Each dictionary that is an entry in the CFBundleDocumentTypes array
must have a CFBundleTypeName key.

So split the long list into separate entries with a CFBundleTypeName.

Dropped some weird document types that I seriously doubt we have good
enough (import) support for.

Drop image types, we should not pretend to be an image editor. That is
counter-productive. It is fairly pointless to advertise ourselves as
an XML editor, too, when we open arbitrary XML as simple text.

Drop types mentioned in the entry with LSItemContentTypes.

But actually, I wonder why we can't just drop the
CFBundleDocumentTypes as it has been documented as obsolete for a long
time. Is it because the icon entries are missing from the
corresponding UTExportedTypeDeclarations entries? Need to fix that
then. (See https://gerrit.libreoffice.org/#/c/6103/ )

Change-Id: I9ed90254be25c39819b6ccf640052ef78a40e964
(cherry picked from commit bccf009a0f47d4b87804ae6c04f90207f9415c27)
Drop the deprecated CFBundleDocumentTypes and just have the UTI stuff

Add icon file entries to the UTIs, and add missing UTIs. Let's hope
CFBundleDocumentTypes really *is* deprecated and it works to just have
the UTI thingies...

Change-Id: Ia3c5cfd674ee6ae57621b63bceeea6ec50a0e6fe
(cherry picked from commit b1df4e4cd39a7aa64d4ede3e1090e703e0c6c760)
Disable the email sending menu entries when sandboxed on OS X

The way we send email doesn't work anyway in a sandboxed app on OS X
anyway. If we want to offer the functionality, we need to implement it
in an OS X -specific way, perhaps using the Scripting Target
functionality of Mail.app.

What we need, to be really "native" in this regards on OS X, would be
to have a "share" functionality that would in addition to sharing
through email offer AirDrop, Facebook, Twitter etc. Like Apple's own
apps. Quite possibly there are system APIs that automate much of
that. But they probably require your app to be more "native" in other
ways, too, like using NSDocument etc. Later...

Change-Id: Id1424377b7d493d4ec696f3242dae55a2a67dfc7
(cherry picked from commit 6bc38d2758c3535ed32bfe0bd2a475b7938f6fc1)
Don't try to write Python bytecode files in case of a read-only installset

It causes annoying messages in the system log in the OS X sandboxed
case.

Change-Id: I8ae3eb34df2c045bdbdfc63cae9007f973c42537
(cherry picked from commit 1140e24abe731f2f94bca072147aa570ea686583)
We don't build the Apple Remote code when sandboxed

So no need for the related entitlements.

Change-Id: I54ba7c0586ee77f30096b50755a9a85bbb7965a5
(cherry picked from commit a1379c6d2555c77b1b096165ac2aab42808e90a7)
The com.apple.application-identifier value should be prefixed with the teamid

Change-Id: I6b58492ba051bb5032870aa47cfacbe3a292e31f
We need the gengal program at build time

But don't bother shipping it on OS X, at least not in the sandboxed
(App Store) case.

Change-Id: Id73bef1ba71d126c2d2962fe846e9c31963d6c24
(cherry picked from commit 11b4f4bfbee257d63f6a52808fb02b903ddea0d5)
Make the patch apply

Change-Id: Ib4d7bc4e703a1c67380d6afaa6ab5fc22c43aed9
Seems that we don't need the com.apple.application-identifier after all

Change-Id: I3bc499b15c31724dca2d49123dcdbec8dfd934f6
Drop ui-previewer and unopkg.bin in the sandboxed (Mac App Store) case

Change-Id: I99b7d0d53a2774ccbf0a0c353322e677c4fe43f4