diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-07-25 06:52:39 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-07-25 06:52:45 -0400 |
commit | cf7f9ae34e66450c23173f04012b3cabb5da6dc3 (patch) | |
tree | 528cd0f9f194b5abc47a875f0aae5ba7148e8eb6 | |
parent | 1211b15bf6c0b2904d90b96a9b3834c5cb9e7b4e (diff) | |
parent | 3828a797115a879705085ccbb373e607def61234 (diff) |
Merge #13617: release: require macOS 10.10+
3828a79711 scripted-diff: prefer MAC_OSX over __APPLE__ (fanquake)
fa6e841e89 gui: remove macOS ProgressBar workaround (fanquake)
68c272527f gui: remove SubstituteFonts (fanquake)
6c6dbd8af5 doc: mention that macOS 10.10 is now required (fanquake)
84b0cfa8b6 release: bump minimum required macOS to 10.10 (fanquake)
26b15df99d depends: set OSX_MIN_VERSION to 10.10 (fanquake)
Pull request description:
Closes #13362
d99abfddb0c8f2111340a6127e77cc686e0043d8
This workaround should no longer be required, as it should have only been in use when compiled with the 10.7 SDK, which we haven't been building with for a while now.
5bc5ae30982a0f0f6a9804b05d99434af770c724
The bugreport linked with this code is for an unrelated? issue, however from what I can tell the correct QTBUG is this one https://bugreports.qt.io/browse/QTBUG-20880. Reading though the discussion there, it seems that the way progress bars are animated changed in macOS 10.10.
Qt was patched [here (5.5+)](https://codereview.qt-project.org/#/c/112379/):
> Disable progress bar animations on 10.10 Yosemite and higher - the native style does not animate them any more. Keep the indeterminate progress bar animation.
Given all of that, I don't think this is worth keeping around, as it would seem to only be useful in the case that a macOS user is compiling with a Qt < 5.5. That should be pretty unlikely, as we don't support downloaded Qt binaries, and brew currently provides [5.11.1](https://github.com/Homebrew/homebrew-core/blob/571b46213c70ca1573da6d0425b0bd6df34961ee/Formula/qt.rb).
Tree-SHA512: 4278cb30cc9bcb313e166129ecf032c808995f8b51a3123637c47860a0010ac88f86f82ec44792153b6b1e5cca595f25013b2eaeae80194647b9ce4f7eaf32c1
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | contrib/gitian-descriptors/gitian-osx.yml | 2 | ||||
-rw-r--r-- | depends/Makefile | 2 | ||||
-rw-r--r-- | depends/README.md | 2 | ||||
-rw-r--r-- | depends/hosts/darwin.mk | 2 | ||||
-rw-r--r-- | doc/build-osx.md | 2 | ||||
-rw-r--r-- | doc/release-notes.md | 5 | ||||
-rw-r--r-- | share/qt/Info.plist.in | 2 | ||||
-rw-r--r-- | src/compat/byteswap.h | 4 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 1 | ||||
-rw-r--r-- | src/qt/guiutil.cpp | 46 | ||||
-rw-r--r-- | src/qt/guiutil.h | 15 | ||||
-rw-r--r-- | src/util.cpp | 2 |
13 files changed, 14 insertions, 73 deletions
diff --git a/.travis.yml b/.travis.yml index 2e03511a6d..19e7174475 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ env: # x86_64 Linux, No wallet - HOST=x86_64-unknown-linux-gnu PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" # Cross-Mac - - HOST=x86_64-apple-darwin11 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" OSX_SDK=10.11 GOAL="all deploy" + - HOST=x86_64-apple-darwin14 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" OSX_SDK=10.11 GOAL="all deploy" before_install: - export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g") diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 7d4793b97d..e2695b6f7b 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -34,7 +34,7 @@ files: - "MacOSX10.11.sdk.tar.gz" script: | WRAP_DIR=$HOME/wrapped - HOSTS="x86_64-apple-darwin11" + HOSTS="x86_64-apple-darwin14" CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="ar ranlib date dmg genisoimage" diff --git a/depends/Makefile b/depends/Makefile index c73ea0f730..3686aaf1f8 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -178,7 +178,7 @@ install: check-packages $(host_prefix)/share/config.site download-one: check-sources $(all_sources) download-osx: - @$(MAKE) -s HOST=x86_64-apple-darwin11 download-one + @$(MAKE) -s HOST=x86_64-apple-darwin14 download-one download-linux: @$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one download-win: diff --git a/depends/README.md b/depends/README.md index 226a1cc935..fd343f7010 100644 --- a/depends/README.md +++ b/depends/README.md @@ -22,7 +22,7 @@ Common `host-platform-triplets` for cross compilation are: - `i686-w64-mingw32` for Win32 - `x86_64-w64-mingw32` for Win64 -- `x86_64-apple-darwin11` for macOS +- `x86_64-apple-darwin14` for macOS - `arm-linux-gnueabihf` for Linux ARM 32 bit - `aarch64-linux-gnu` for Linux ARM 64 bit - `riscv32-linux-gnu` for Linux RISC-V 32 bit diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 4e58bec74e..a1c943d60b 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,4 +1,4 @@ -OSX_MIN_VERSION=10.8 +OSX_MIN_VERSION=10.10 OSX_SDK_VERSION=10.11 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk LD64_VERSION=253.9 diff --git a/doc/build-osx.md b/doc/build-osx.md index a07dbd1e1d..486a505b60 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -91,6 +91,6 @@ Other commands: Notes ----- -* Tested on OS X 10.8 Mountain Lion through macOS 10.13 High Sierra on 64-bit Intel processors only. +* Tested on OS X 10.10 Yosemite through macOS 10.13 High Sierra on 64-bit Intel processors only. * Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714) diff --git a/doc/release-notes.md b/doc/release-notes.md index b7eaa6eaf4..ad0c42ab31 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -48,11 +48,14 @@ Compatibility ============== Bitcoin Core is extensively tested on multiple operating systems using -the Linux kernel, macOS 10.8+, and Windows 7 and newer (Windows XP is not supported). +the Linux kernel, macOS 10.10+, and Windows 7 and newer (Windows XP is not supported). Bitcoin Core should also work on most other Unix-like systems but is not frequently tested on them. +From 0.17.0 onwards macOS <10.10 is no longer supported. 0.17.0 is built using Qt 5.9.x, which doesn't +support versions of macOS older than 10.10. + Notable changes =============== diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in index 5ca6d9d015..17b4ee47de 100644 --- a/share/qt/Info.plist.in +++ b/share/qt/Info.plist.in @@ -3,7 +3,7 @@ <plist version="0.9"> <dict> <key>LSMinimumSystemVersion</key> - <string>10.8.0</string> + <string>10.10.0</string> <key>LSArchitecturePriority</key> <array> diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h index c331af2b5e..bfb80bd632 100644 --- a/src/compat/byteswap.h +++ b/src/compat/byteswap.h @@ -15,7 +15,7 @@ #include <byteswap.h> #endif -#if defined(__APPLE__) +#if defined(MAC_OSX) #if !defined(bswap_16) @@ -61,6 +61,6 @@ inline uint64_t bswap_64(uint64_t x) } #endif // HAVE_DECL_BSWAP64 == 0 -#endif // defined(__APPLE__) +#endif // defined(MAC_OSX) #endif // BITCOIN_COMPAT_BYTESWAP_H diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 3454d3421e..5d0e384cf8 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -614,7 +614,6 @@ int main(int argc, char *argv[]) QApplication::setOrganizationName(QAPP_ORG_NAME); QApplication::setOrganizationDomain(QAPP_ORG_DOMAIN); QApplication::setApplicationName(QAPP_APP_NAME_DEFAULT); - GUIUtil::SubstituteFonts(GetLangTerritory()); /// 4. Initialization of translations, so that intro dialog is in user's language // Now that QSettings are accessible, initialize translations diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index acd9f7b35c..3ec8c340be 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -63,16 +63,6 @@ static fs::detail::utf8_codecvt_facet utf8; -#if defined(Q_OS_MAC) -extern double NSAppKitVersionNumber; -#if !defined(NSAppKitVersionNumber10_8) -#define NSAppKitVersionNumber10_8 1187 -#endif -#if !defined(NSAppKitVersionNumber10_9) -#define NSAppKitVersionNumber10_9 1265 -#endif -#endif - namespace GUIUtil { QString dateTimeStr(const QDateTime &date) @@ -391,42 +381,6 @@ bool openBitcoinConf() return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig))); } -void SubstituteFonts(const QString& language) -{ -#if defined(Q_OS_MAC) -// Background: -// OSX's default font changed in 10.9 and Qt is unable to find it with its -// usual fallback methods when building against the 10.7 sdk or lower. -// The 10.8 SDK added a function to let it find the correct fallback font. -// If this fallback is not properly loaded, some characters may fail to -// render correctly. -// -// The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default. -// -// Solution: If building with the 10.7 SDK or lower and the user's platform -// is 10.9 or higher at runtime, substitute the correct font. This needs to -// happen before the QApplication is created. -#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 - if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) - { - if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9) - /* On a 10.9 - 10.9.x system */ - QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); - else - { - /* 10.10 or later system */ - if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese - QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC"); - else if (language == "ja") // Japanese - QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC"); - else - QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande"); - } - } -#endif -#endif -} - ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) : QObject(parent), size_threshold(_size_threshold) diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index e965a91d18..199aa9474f 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -120,9 +120,6 @@ namespace GUIUtil // Open the config file bool openBitcoinConf(); - // Replace invalid default fonts with known good ones - void SubstituteFonts(const QString& language); - /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. This assures that Qt can word-wrap long tooltip messages. Tooltips longer than the provided size threshold (in characters) are wrapped. @@ -233,19 +230,7 @@ namespace GUIUtil void mouseReleaseEvent(QMouseEvent *event); }; -#if defined(Q_OS_MAC) - // workaround for Qt OSX Bug: - // https://bugreports.qt-project.org/browse/QTBUG-15631 - // QProgressBar uses around 10% CPU even when app is in background - class ProgressBar : public ClickableProgressBar - { - bool event(QEvent *e) { - return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false; - } - }; -#else typedef ClickableProgressBar ProgressBar; -#endif } // namespace GUIUtil diff --git a/src/util.cpp b/src/util.cpp index 8df23dd08f..2f81f50a71 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1021,7 +1021,7 @@ bool FileCommit(FILE *file) LogPrintf("%s: fdatasync failed: %d\n", __func__, errno); return false; } - #elif defined(__APPLE__) && defined(F_FULLFSYNC) + #elif defined(MAC_OSX) && defined(F_FULLFSYNC) if (fcntl(fileno(file), F_FULLFSYNC, 0) == -1) { // Manpage says "value other than -1" is returned on success LogPrintf("%s: fcntl F_FULLFSYNC failed: %d\n", __func__, errno); return false; |