Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions client/client_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,16 +929,23 @@ int CLIENT_STATE::init() {
// if Docker not present, notify user
//
#ifndef ANDROID
#ifdef _WIN32
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Windows";
#elif defined(__APPLE__)
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Mac";
#else
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Linux";
#endif
Comment on lines +932 to +938
Copy link

Copilot AI Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] These platform-specific URLs are repeated; consider centralizing them in a constant map or helper function to reduce duplication and ease future updates.

Suggested change
#ifdef _WIN32
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Windows";
#elif defined(__APPLE__)
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Mac";
#else
const char* url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Linux";
#endif
const char* url = get_docker_install_url();

Copilot uses AI. Check for mistakes.
if (!host_info.have_docker()) {
msg_printf(NULL, MSG_INFO,
"Some projects require Docker."
);
msg_printf(NULL, MSG_INFO,
"To install Docker, visit https://github.com/BOINC/boinc/wiki/Installing-Docker"
"To install Docker, visit %s", url
);
NOTICE n;
n.description = "Some projects require Docker. We recommend that you install it. Instructions are <a href=https://github.com/BOINC/boinc/wiki/Installing-Docker>here</a>.";
strcpy(n.link, "https://github.com/BOINC/boinc/wiki/Installing-Docker");
n.description = "Some projects require Docker. We recommend that you install it. Instructions are <a href=" + (string)url + (string)">here</a>.";
strcpy(n.link, url);
n.create_time = now;
n.arrival_time = now;
strcpy(n.category, "client");
Expand Down
4 changes: 2 additions & 2 deletions client/hostinfo_wsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,10 @@ static void get_docker_compose_version(WSL_CMD& rs, WSL_DISTRO &wd) {
//
void show_wsl_messages() {
int bdv = gstate.host_info.wsl_distros.boinc_distro_version();
const char *url = "https://github.com/BOINC/boinc/wiki/Installing-Docker";
const char *url = "https://github.com/BOINC/boinc/wiki/Installing-Docker-on-Windows";
if (bdv == 0) {
msg_printf_notice(0, true, url,
"Some BOINC projects require Windows Subsystem for Linux (WSL). <a href=%s>Learn how to enable WSL</a>",
"Some BOINC projects require Docker. <a href=%s>Learn how to install it</a>",
url
);
} else if (bdv < gstate.latest_boinc_buda_runner_version) {
Expand Down