diff --git a/.travis.yml b/.travis.yml index 2e03511a6d7e3..19e7174475be8 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 7d4793b97d00b..e2695b6f7bc77 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 c73ea0f730816..3686aaf1f877e 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 226a1cc93554a..fd343f701017c 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 4e58bec74e395..a1c943d60bbd7 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 a07dbd1e1d8a5..486a505b60fce 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 b7eaa6eaf4e9a..ad0c42ab31c0b 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 5ca6d9d015b45..17b4ee47dea56 100644 --- a/share/qt/Info.plist.in +++ b/share/qt/Info.plist.in @@ -3,7 +3,7 @@ LSMinimumSystemVersion - 10.8.0 + 10.10.0 LSArchitecturePriority diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h index c331af2b5e646..bfb80bd632dab 100644 --- a/src/compat/byteswap.h +++ b/src/compat/byteswap.h @@ -15,7 +15,7 @@ #include #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 3454d3421ea57..5d0e384cf8670 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 acd9f7b35cea1..3ec8c340bef0f 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 e965a91d181fc..199aa9474fd6b 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 8df23dd08fbce..2f81f50a713c7 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;