mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
GUI: If QWinTaskbarButton is missing, just build without it
This commit is contained in:
parent
8e126fbb3d
commit
89206d8109
@ -253,6 +253,20 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
AC_MSG_RESULT([$bitcoin_enable_qt])
|
AC_MSG_RESULT([$bitcoin_enable_qt])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to build with QWinTaskbarProgress support])
|
||||||
|
BITCOIN_QT_CHECK([
|
||||||
|
if test "x$have_qt_winextras" != xyes; then
|
||||||
|
AC_MSG_RESULT([no, ${qt_lib_prefix}WinExtras $qt_version not found])
|
||||||
|
elif test "x$have_dwmapi" != xyes; then
|
||||||
|
AC_MSG_RESULT([no, dwmapi missing])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
QT_INCLUDES="$QT_INCLUDES $QT_WINEXTRAS_CFLAGS"
|
||||||
|
QT_LIBS="$QT_LIBS $QT_WINEXTRAS_LIBS"
|
||||||
|
AC_DEFINE(BITCOIN_QT_WIN_TASKBAR, 1, [Define this symbol if building with QWinTaskbarProgress])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
AC_SUBST(QT_PIE_FLAGS)
|
AC_SUBST(QT_PIE_FLAGS)
|
||||||
AC_SUBST(QT_INCLUDES)
|
AC_SUBST(QT_INCLUDES)
|
||||||
AC_SUBST(QT_LIBS)
|
AC_SUBST(QT_LIBS)
|
||||||
@ -375,10 +389,9 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[
|
|||||||
BITCOIN_QT_CHECK([
|
BITCOIN_QT_CHECK([
|
||||||
if test "x$TARGET_OS" = xwindows; then
|
if test "x$TARGET_OS" = xwindows; then
|
||||||
PKG_CHECK_MODULES([QT_WINEXTRAS], [${qt_lib_prefix}WinExtras $qt_version], [
|
PKG_CHECK_MODULES([QT_WINEXTRAS], [${qt_lib_prefix}WinExtras $qt_version], [
|
||||||
QT_INCLUDES="$QT_INCLUDES $QT_WINEXTRAS_CFLAGS"
|
have_qt_winextras=yes
|
||||||
QT_LIBS="$QT_LIBS $QT_WINEXTRAS_LIBS"
|
|
||||||
],[
|
],[
|
||||||
BITCOIN_QT_FAIL([${qt_lib_prefix}WinExtras $qt_version not found])
|
have_qt_winextras=no
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
@ -634,7 +634,7 @@ case $host in
|
|||||||
AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])])
|
AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])])
|
||||||
AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])])
|
AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])])
|
||||||
AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])])
|
AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])])
|
||||||
AC_CHECK_LIB([dwmapi], [main], [], [AC_MSG_ERROR([libdwmapi missing])])
|
AC_CHECK_LIB([dwmapi], [main], [have_dwmapi=yes], [have_dwmapi=no])
|
||||||
|
|
||||||
dnl -static is interpreted by libtool, where it has a different meaning.
|
dnl -static is interpreted by libtool, where it has a different meaning.
|
||||||
dnl In libtool-speak, it's -all-static.
|
dnl In libtool-speak, it's -all-static.
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
#include <qt/macdockiconhandler.h>
|
#include <qt/macdockiconhandler.h>
|
||||||
#elif defined Q_OS_WIN
|
#endif
|
||||||
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
#include <QWinTaskbarButton>
|
#include <QWinTaskbarButton>
|
||||||
#include <QWinTaskbarProgress>
|
#include <QWinTaskbarProgress>
|
||||||
#endif
|
#endif
|
||||||
@ -225,7 +226,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
m_app_nap_inhibitor = new CAppNapInhibitor;
|
m_app_nap_inhibitor = new CAppNapInhibitor;
|
||||||
#elif defined Q_OS_WIN
|
#endif
|
||||||
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
m_taskbar_button = new QWinTaskbarButton(this);
|
m_taskbar_button = new QWinTaskbarButton(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1159,7 +1161,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|||||||
|
|
||||||
tooltip = tr("Processed %n block(s) of transaction history.", "", count);
|
tooltip = tr("Processed %n block(s) of transaction history.", "", count);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
m_taskbar_button->setWindow(windowHandle());
|
m_taskbar_button->setWindow(windowHandle());
|
||||||
QWinTaskbarProgress* taskbar_progress = m_taskbar_button->progress();
|
QWinTaskbarProgress* taskbar_progress = m_taskbar_button->progress();
|
||||||
#endif
|
#endif
|
||||||
@ -1179,7 +1181,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|||||||
|
|
||||||
progressBarLabel->setVisible(false);
|
progressBarLabel->setVisible(false);
|
||||||
progressBar->setVisible(false);
|
progressBar->setVisible(false);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
taskbar_progress->setVisible(false);
|
taskbar_progress->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1192,7 +1194,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
|
|||||||
progressBar->setMaximum(1000000000);
|
progressBar->setMaximum(1000000000);
|
||||||
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
progressBar->setValue(nVerificationProgress * 1000000000.0 + 0.5);
|
||||||
progressBar->setVisible(true);
|
progressBar->setVisible(true);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
taskbar_progress->setValue(qRound(nVerificationProgress * 100.0));
|
taskbar_progress->setValue(qRound(nVerificationProgress * 100.0));
|
||||||
taskbar_progress->setVisible(true);
|
taskbar_progress->setVisible(true);
|
||||||
#endif
|
#endif
|
||||||
|
@ -173,7 +173,7 @@ private:
|
|||||||
Notificator* notificator = nullptr;
|
Notificator* notificator = nullptr;
|
||||||
RPCConsole* rpcConsole = nullptr;
|
RPCConsole* rpcConsole = nullptr;
|
||||||
HelpMessageDialog* helpMessageDialog = nullptr;
|
HelpMessageDialog* helpMessageDialog = nullptr;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef BITCOIN_QT_WIN_TASKBAR
|
||||||
QWinTaskbarButton* m_taskbar_button = nullptr;
|
QWinTaskbarButton* m_taskbar_button = nullptr;
|
||||||
#endif
|
#endif
|
||||||
ModalOverlay* modalOverlay = nullptr;
|
ModalOverlay* modalOverlay = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user