diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-09-15 06:54:46 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-09-15 09:54:39 +0800 |
commit | 4c74344f464928864ef7f70835628be1d92969c3 (patch) | |
tree | 72814839d439f6969593ffcd89d85d6ce74acbab /indra/newview/llstartup.cpp | |
parent | df871e95234b670012908d06a6ecc62418e18aa2 (diff) | |
parent | 175400230869963df7a3f126122ace14456c56cb (diff) |
Merge tag 'Second_Life_Release#17540023-2025.07' into 2025.07
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8d010553a0..eca5ba82ac 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -61,6 +61,7 @@ #include "lllocationhistory.h" #include "llgltfmateriallist.h" #include "llimageworker.h" +#include "llregex.h" #include "llloginflags.h" #include "llmd5.h" @@ -349,13 +350,11 @@ void pump_idle_startup_network(void) { // while there are message to process: // process one then call display_startup() - S32 num_messages = 0; { LockMessageChecker lmc(gMessageSystem); while (lmc.checkAllMessages(gFrameCount, gServicePump)) { display_startup(); - ++num_messages; } lmc.processAcks(); } @@ -406,6 +405,7 @@ bool idle_startup() LL_WARNS_ONCE() << "gViewerWindow is not initialized" << LL_ENDL; return false; // No world yet } + LL_PROFILE_ZONE_SCOPED; const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); static LLTimer timeout; @@ -2588,6 +2588,27 @@ void release_notes_coro(const std::string url) LLWeb::loadURLInternal(url); } +void validate_release_notes_coro(const std::string url) +{ + LLVersionInfo& versionInfo(LLVersionInfo::instance()); + const boost::regex version_regex(R"(\b\d+\.\d+\.\d+\.\d+\b)"); + + if (url.find(versionInfo.getVersion()) == std::string::npos // has no our build version + && ll_regex_search(url, version_regex)) // has any version + { + LL_INFOS() << "Received release notes url \"" << url << "\" wwith mismatching build, falling back to locally generated url" << LL_ENDL; + // Updater only provides notes for a most recent version, if it is not + // the current one, fall back to the hardcoded URL. + LLSD info(LLAppViewer::instance()->getViewerInfo()); + std::string alt_url = info["VIEWER_RELEASE_NOTES_URL"].asString(); + release_notes_coro(alt_url); + } + else + { + release_notes_coro(url); + } +} + /** * Check if user is running a new version of the viewer. * Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. @@ -2621,7 +2642,7 @@ void show_release_notes_if_required() "showrelnotes", [](const LLSD& url) { LLCoros::instance().launch("releaseNotesCoro", - boost::bind(&release_notes_coro, url.asString())); + boost::bind(&validate_release_notes_coro, url.asString())); return false; }); } |