diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-16 23:18:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-16 23:18:02 +0300 |
commit | 66a46556ddeb7b8dbc061d325b55364839a86a26 (patch) | |
tree | 9c101c840a49c199c904815adafa1fa572338b1b /src | |
parent | 4f5e0e5863d869a5752fc485ac5f4457bd58404b (diff) | |
download | manaplus-66a46556ddeb7b8dbc061d325b55364839a86a26.tar.gz manaplus-66a46556ddeb7b8dbc061d325b55364839a86a26.tar.bz2 manaplus-66a46556ddeb7b8dbc061d325b55364839a86a26.tar.xz manaplus-66a46556ddeb7b8dbc061d325b55364839a86a26.zip |
Move mirrors for get client version into branding file.
New branding options: updateMirrorX
where X is from 1 to 7.
Diffstat (limited to 'src')
-rw-r--r-- | src/defaults.cpp | 7 | ||||
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 15 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp index 2db7acd41..386b58c5f 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -462,6 +462,13 @@ DefaultsData* getBrandingDefaults() AddDEF("windowsDownloadUrl", "http://download.evolonline.org/" "manaplus/download/manaplus-win32.exe"); AddDEF("windowsDownloadText", "download here"); + AddDEF("updateMirror1", "http://manaplus.org/update/"); + AddDEF("updateMirror2", "http://www.manaplus.org/update/"); + AddDEF("updateMirror3", "http://www2.manaplus.org/update/"); + AddDEF("updateMirror4", "http://www3.manaplus.org/update/"); + AddDEF("updateMirror5", ""); + AddDEF("updateMirror6", ""); + AddDEF("updateMirror7", ""); return configData; } diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 4c1a94a13..e2c1b6128 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -560,15 +560,16 @@ void UpdaterWindow::download() if (mDownloadStatus == UPDATE_PATCH) { mDownload = new Net::Download(this, - "http://manaplus.org/update/" + mCurrentFile, + branding.getStringValue("updateMirror1") + mCurrentFile, &updateProgress, true, false, mValidateXml); - mDownload->addMirror("http://www.manaplus.org/update/" - + mCurrentFile); - mDownload->addMirror("http://www2.manaplus.org/update/" - + mCurrentFile); - mDownload->addMirror("http://www3.manaplus.org/update/" - + mCurrentFile); + for (int f = 2; f < 8; f ++) + { + const std::string url = branding.getStringValue( + "updateMirror" + toString(f)); + if (!url.empty()) + mDownload->addMirror(url + mCurrentFile); + } } else { |