mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Disable update check for homebrew builds.
This commit is contained in:
parent
fd06b85ae9
commit
1c022196eb
@ -9,6 +9,7 @@
|
|||||||
- libopenmpt@0.6.9
|
- libopenmpt@0.6.9
|
||||||
- asio@1.27.0
|
- asio@1.27.0
|
||||||
* update to PDCursesMod@4.3.6 for Windows builds
|
* update to PDCursesMod@4.3.6 for Windows builds
|
||||||
|
* disable update check for `homebrew` builds
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -71,6 +71,13 @@ add_definitions(
|
|||||||
-D_WEBSOCKETPP_CPP11_RANDOM_DEVICE_
|
-D_WEBSOCKETPP_CPP11_RANDOM_DEVICE_
|
||||||
-DASIO_STANDALONE)
|
-DASIO_STANDALONE)
|
||||||
|
|
||||||
|
# disable update check for environments that we know will provided hosted,
|
||||||
|
# prebuilt binaries.
|
||||||
|
if (DEFINED ENV{HOMEBREW_PREFIX})
|
||||||
|
message(STATUS "[build] detected homebrew, disabling update check functionality.")
|
||||||
|
add_definitions(-DDISABLE_UPDATE_CHECK)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (${BUILD_STANDALONE} MATCHES "true")
|
if (${BUILD_STANDALONE} MATCHES "true")
|
||||||
find_vendor_library(LIBCURL curl)
|
find_vendor_library(LIBCURL curl)
|
||||||
find_vendor_library(LIBSSL ssl)
|
find_vendor_library(LIBSSL ssl)
|
||||||
|
@ -351,6 +351,7 @@ void MainLayout::OnTrackChanged(size_t index, musik::core::TrackPtr track) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainLayout::RunUpdateCheck() {
|
void MainLayout::RunUpdateCheck() {
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
if (!prefs->GetBool(cube::prefs::keys::AutoUpdateCheck, true)) {
|
if (!prefs->GetBool(cube::prefs::keys::AutoUpdateCheck, true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -360,4 +361,5 @@ void MainLayout::RunUpdateCheck() {
|
|||||||
UpdateCheck::ShowUpgradeAvailableOverlay(version, url);
|
UpdateCheck::ShowUpgradeAvailableOverlay(version, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,9 @@ static const std::string arrow = "> ";
|
|||||||
|
|
||||||
static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
|
static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
|
||||||
auto schema = std::make_shared<TSchema<>>();
|
auto schema = std::make_shared<TSchema<>>();
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
schema->AddBool(cube::prefs::keys::AutoUpdateCheck, false);
|
schema->AddBool(cube::prefs::keys::AutoUpdateCheck, false);
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_MINIMIZE_TO_TRAY
|
#ifdef ENABLE_MINIMIZE_TO_TRAY
|
||||||
schema->AddBool(cube::prefs::keys::MinimizeToTray, false);
|
schema->AddBool(cube::prefs::keys::MinimizeToTray, false);
|
||||||
schema->AddBool(cube::prefs::keys::StartMinimized, false);
|
schema->AddBool(cube::prefs::keys::StartMinimized, false);
|
||||||
@ -310,6 +312,7 @@ void SettingsLayout::OnAdvancedSettingsActivate(cursespp::TextLabel* label) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SettingsLayout::OnUpdateDropdownActivate(cursespp::TextLabel* label) {
|
void SettingsLayout::OnUpdateDropdownActivate(cursespp::TextLabel* label) {
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
updateCheck.Run([this](bool updateRequired, std::string version, std::string url) {
|
updateCheck.Run([this](bool updateRequired, std::string version, std::string url) {
|
||||||
if (updateRequired) {
|
if (updateRequired) {
|
||||||
UpdateCheck::ShowUpgradeAvailableOverlay(version, url, false);
|
UpdateCheck::ShowUpgradeAvailableOverlay(version, url, false);
|
||||||
@ -318,6 +321,7 @@ void SettingsLayout::OnUpdateDropdownActivate(cursespp::TextLabel* label) {
|
|||||||
UpdateCheck::ShowNoUpgradeFoundOverlay();
|
UpdateCheck::ShowNoUpgradeFoundOverlay();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsLayout::OnThemeDropdownActivate(cursespp::TextLabel* label) {
|
void SettingsLayout::OnThemeDropdownActivate(cursespp::TextLabel* label) {
|
||||||
@ -386,8 +390,9 @@ void SettingsLayout::OnLayout() {
|
|||||||
this->saveSessionCheckbox->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
this->saveSessionCheckbox->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
||||||
this->pluginsDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
this->pluginsDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
||||||
this->advancedDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
this->advancedDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
this->updateDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
this->updateDropdown->MoveAndResize(column2, y++, columnCx, kLabelHeight);
|
||||||
|
#endif
|
||||||
this->appVersion->MoveAndResize(0, cy - 1, cx, kLabelHeight);
|
this->appVersion->MoveAndResize(0, cy - 1, cx, kLabelHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,9 +450,11 @@ void SettingsLayout::InitializeWindows() {
|
|||||||
this->serverDropdown->Activated.connect(this, &SettingsLayout::OnServerDropdownActivate);
|
this->serverDropdown->Activated.connect(this, &SettingsLayout::OnServerDropdownActivate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
this->updateDropdown = std::make_shared<TextLabel>();
|
this->updateDropdown = std::make_shared<TextLabel>();
|
||||||
this->updateDropdown->SetText(arrow + _TSTR("settings_check_for_updates"));
|
this->updateDropdown->SetText(arrow + _TSTR("settings_check_for_updates"));
|
||||||
this->updateDropdown->Activated.connect(this, &SettingsLayout::OnUpdateDropdownActivate);
|
this->updateDropdown->Activated.connect(this, &SettingsLayout::OnUpdateDropdownActivate);
|
||||||
|
#endif
|
||||||
|
|
||||||
this->advancedDropdown = std::make_shared<TextLabel>();
|
this->advancedDropdown = std::make_shared<TextLabel>();
|
||||||
this->advancedDropdown->SetText(arrow + _TSTR("settings_advanced_settings"));
|
this->advancedDropdown->SetText(arrow + _TSTR("settings_advanced_settings"));
|
||||||
@ -496,7 +503,9 @@ void SettingsLayout::InitializeWindows() {
|
|||||||
this->saveSessionCheckbox->SetFocusOrder(order++);
|
this->saveSessionCheckbox->SetFocusOrder(order++);
|
||||||
this->pluginsDropdown->SetFocusOrder(order++);
|
this->pluginsDropdown->SetFocusOrder(order++);
|
||||||
this->advancedDropdown->SetFocusOrder(order++);
|
this->advancedDropdown->SetFocusOrder(order++);
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
this->updateDropdown->SetFocusOrder(order++);
|
this->updateDropdown->SetFocusOrder(order++);
|
||||||
|
#endif
|
||||||
|
|
||||||
this->AddWindow(this->libraryTypeDropdown);
|
this->AddWindow(this->libraryTypeDropdown);
|
||||||
this->AddWindow(this->localLibraryLayout);
|
this->AddWindow(this->localLibraryLayout);
|
||||||
@ -528,7 +537,9 @@ void SettingsLayout::InitializeWindows() {
|
|||||||
this->AddWindow(this->saveSessionCheckbox);
|
this->AddWindow(this->saveSessionCheckbox);
|
||||||
this->AddWindow(this->pluginsDropdown);
|
this->AddWindow(this->pluginsDropdown);
|
||||||
this->AddWindow(this->advancedDropdown);
|
this->AddWindow(this->advancedDropdown);
|
||||||
|
#ifndef DISABLE_UPDATE_CHECK
|
||||||
this->AddWindow(this->updateDropdown);
|
this->AddWindow(this->updateDropdown);
|
||||||
|
#endif
|
||||||
this->AddWindow(this->appVersion);
|
this->AddWindow(this->appVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user