mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-12 15:28:42 -06:00
build: Added option to disable update checking (#1036)
This is aimed at use by linux distros, where package updates come from a central location, and users shouldn't need to worry about updating ImHex on their own. This disables parts of the ImHex UI that would not be useful in that case. Tested and confirmed that this works in both states of the of the `-DIMHEX_DISABLE_UPDATE_CHECK` switch.
This commit is contained in:
@@ -30,6 +30,7 @@ namespace hex::init {
|
||||
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
#if defined(HEX_UPDATE_CHECK)
|
||||
static bool checkForUpdates() {
|
||||
int showCheckForUpdates = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.check_for_updates", 2);
|
||||
|
||||
@@ -69,6 +70,7 @@ namespace hex::init {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool setupEnvironment() {
|
||||
hex::log::debug("Using romfs: '{}'", romfs::name());
|
||||
@@ -475,7 +477,9 @@ namespace hex::init {
|
||||
#endif
|
||||
{ "Loading settings", loadSettings, false },
|
||||
{ "Loading plugins", loadPlugins, false },
|
||||
#if defined(HEX_UPDATE_CHECK)
|
||||
{ "Checking for updates", checkForUpdates, true },
|
||||
#endif
|
||||
{ "Loading fonts", loadFonts, true },
|
||||
};
|
||||
}
|
||||
@@ -488,4 +492,4 @@ namespace hex::init {
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user