feat(mining): "Update miner" button + dialog wiring the xmrig updater
Wires util::XmrigUpdater into the GUI: - ui/windows/xmrig_download_dialog.h: a modal (mirrors BootstrapDownloadDialog) that drives the updater — Checking -> Up-to-date/Update-available -> Downloading/Verifying/Extracting -> Done/Failed, with a progress bar and a "verified against its published checksum" note. On success it persists the installed release tag to settings. Rendered each frame from App::render. - mining_tab: an "Update miner…" button in the pool section, disabled (with a tooltip) while xmrig is running so a live binary is never replaced. - settings: persist the installed DRG-XMRig tag (xmrig_version) for update detection. Both variants build; suite passes; GUI smoke-launched without crashing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "mining_benchmark.h"
|
||||
#include "mining_tab_helpers.h"
|
||||
#include "mining_pool_panel.h"
|
||||
#include "xmrig_download_dialog.h"
|
||||
#include "../../app.h"
|
||||
#include "../../util/i18n.h"
|
||||
#include "../../config/version.h"
|
||||
@@ -1574,6 +1575,21 @@ static void RenderMiningTabContent(App* app)
|
||||
ImGui::Dummy(ImVec2(0, gap));
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// POOL MINER — download / update the bundled DRG-XMRig miner from the project release server.
|
||||
// (Pool mode uses xmrig; disabled while it's running so we never replace a live binary.)
|
||||
// ================================================================
|
||||
if (s_pool_mode) {
|
||||
const bool minerBusy = state.pool_mining.xmrig_running;
|
||||
ImGui::BeginDisabled(minerBusy);
|
||||
if (TactileButton("Update miner…", ImVec2(availWidth, 0)))
|
||||
XmrigDownloadDialog::show(app);
|
||||
ImGui::EndDisabled();
|
||||
if (minerBusy && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled))
|
||||
ImGui::SetTooltip("Stop mining before updating the miner.");
|
||||
ImGui::Dummy(ImVec2(0, gap));
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
// HASHRATE + STATS — Combined glass card: stat values on top, chart below
|
||||
// (Or full-card log view when toggled in pool mode)
|
||||
|
||||
Reference in New Issue
Block a user