Merge #15208: Qt: remove macOS launch-at-startup when compiled with > macOS 10.11, fix memory missmanagement

da6011826a Fix macOS launch-at-startup memory issue (Jonas Schnelli)
516437a1b7 Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11 (Jonas Schnelli)

Pull request description:

  The launch-at-startup API Bitcoin Core uses on macOS where removed in macOS 10.11 leading to a segmentation-fault due to the weak-linking when not actively compiled against SDK 10.11 (`-mmacosx-version-min=10.11`)

  This PR removes the launch-at-startup feature on macOS when compiled with macOS min version > 10.11 (the default is always the macOS version you compile on).

  **The depends built binaries (Gitian) are not affected since we are building with min macOS 10.10.**

  Users self compiling on macOS > 10.11 can re-enable the feature by compiling with min version <= 10.11 (`CXXFLAGS="-mmacosx-version-min=10.11" CFLAGS="-mmacosx-version-min=10.11" ./configure`)

  **Isn't there a new API from Apple?**
  Yes, [there is](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html).
  It will require to create a helper application which needs to be embedded in the .app folder (needs code signing as well). Developers willing to go down that rabbit hole are welcome.

  Fixes #15142

Tree-SHA512: fa9cc4e39d5a2d2559919b7e22b7766f5e0269a361719294d4a4a2df2fd9d955e5b23b5907e68023fdeee297f652f844f3c447904bf18f9c1145348ad101c432
This commit is contained in:
Wladimir J. van der Laan
2019-01-22 22:52:51 +01:00
3 changed files with 23 additions and 11 deletions

View File

@@ -262,6 +262,12 @@ Graphical User Interface (GUI)
balance shown if the wallet was created using the `createwallet` RPC
and the `disable_private_keys` parameter was set to true.
- The launch-on-startup option is no longer available on macOS if
compiled with macosx min version greater than 10.11 (use
CXXFLAGS="-mmacosx-version-min=10.11"
CFLAGS="-mmacosx-version-min=10.11" for setting the deployment
sdk version)
Low-level changes
=================