Merge pull request #3906

9b7bca6 main: add compile time option to disable updates (selsta)
This commit is contained in:
luigi1111 2022-06-09 13:56:25 -05:00
commit 17dfd2e9ed
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
2 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,7 @@ option(STATIC "Link libraries statically, requires static Qt")
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
option(WITH_UPDATER "Regularly check for new updates" ON)
option(DEV_MODE "Checkout latest monero master on build" OFF)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
@ -87,6 +88,10 @@ if(WITH_DESKTOP_ENTRY)
add_definitions(-DWITH_DESKTOP_ENTRY)
endif()
if(WITH_UPDATER)
add_definitions(-DWITH_UPDATER)
endif()
# Sodium
find_library(SODIUM_LIBRARY sodium)
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")

View file

@ -498,7 +498,11 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
engine.rootContext()->setContextProperty("homePath", QDir::homePath());
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
engine.rootContext()->setContextProperty("idealThreadCount", QThread::idealThreadCount());
#ifdef WITH_UPDATER
engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", parser.isSet(disableCheckUpdatesOption));
#else
engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", true);
#endif
engine.rootContext()->setContextProperty("socksProxyFlag", parser.value(socksProxyOption));
engine.rootContext()->setContextProperty("socksProxyFlagSet", parser.isSet(socksProxyOption));