Skip to content

Commit ce9dfbd

Browse files
committed
auto-download executable on click for upgrade
1 parent 9f02d9a commit ce9dfbd

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.3
1+
1.9.4

include/entropy/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace entropy {
44

5-
#define EV_VERSION "1.9.3"
5+
#define EV_VERSION "1.9.4"
66
#define EV_DATE "09.03.2026"
77

88
} // namespace entropy

src/update.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ void startUpdateCheck(UiState &uiState, const std::string &file_path, bool manua
6161
std::thread([&uiState, file_path, manual]() {
6262
const std::string base = "https://raw.githubusercontent.com/maede97/EntropyVisualizer/refs/heads/main/";
6363
const std::string full_url = base + file_path;
64-
const std::string release_page = "https://github.com/maede97/EntropyVisualizer/releases";
6564

6665
std::string response;
6766
#ifdef __linux__
67+
const std::string release_page = "https://github.com/maede97/EntropyVisualizer/releases/download/"; // + version + EntropyVisualizer
68+
const std::string suffix = "/EntropyVisualizer";
69+
6870
CURL *curl = curl_easy_init();
6971
if (!curl) {
7072
uiState.updateChecked = true;
@@ -89,6 +91,8 @@ void startUpdateCheck(UiState &uiState, const std::string &file_path, bool manua
8991
curl_easy_cleanup(curl);
9092
#endif
9193
#ifdef _WIN32
94+
const std::string release_page = "https://github.com/maede97/EntropyVisualizer/releases/download/"; // + version + EntropyVisualizer
95+
const std::string suffix = "/EntropyVisualizer.exe";
9296
DWORD dwSize = 0;
9397
DWORD dwDownloaded = 0;
9498
BOOL bResults = FALSE;
@@ -189,7 +193,7 @@ void startUpdateCheck(UiState &uiState, const std::string &file_path, bool manua
189193
{
190194
std::lock_guard<std::mutex> lk(uiState.updateMutex);
191195
uiState.latestVersion = remote_version;
192-
uiState.updateUrl = release_page;
196+
uiState.updateUrl = release_page + "v" + remote_version + suffix;
193197
}
194198
uiState.updateAvailable = true;
195199
} else {

0 commit comments

Comments
 (0)