MAINT-6419 Simplified the version check + buildfix

meow-7.2.2
AndreyL ProductEngine 2016-05-24 21:59:58 +03:00
parent 357f6d04ed
commit 0318e36167
3 changed files with 6 additions and 23 deletions

View File

@ -13285,7 +13285,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<string>1</string>
<integer>1</integer>
</map>
<key>UploadBakedTexOld</key>
<map>

View File

@ -5807,29 +5807,10 @@ void LLAppViewer::launchUpdater()
*/
void LLAppViewer::showReleaseNotesIfRequired()
{
if (!gLastRunVersion.empty() && gSavedSettings.getBOOL("UpdaterShowReleaseNotes"))
if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion && gSavedSettings.getBOOL("UpdaterShowReleaseNotes"))
{
try
{
boost::regex expr("(?<chan>[\\w\\s]+)\\s(?<maj>\\d+)\\.(?<min>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)", boost::regex::perl | boost::regex::icase);
boost::smatch matches;
if (boost::regex_search(gLastRunVersion, matches, expr))
{
if (LLVersionInfo::getChannel() == matches["chan"] && // don't show Release Notes when changing a channel
(LLVersionInfo::getBuild() > std::stoi(matches["build"])
|| LLVersionInfo::getPatch() > std::stoi(matches["patch"])
|| LLVersionInfo::getMinor() > std::stoi(matches["min"])
|| LLVersionInfo::getMajor() > std::stoi(matches["maj"])))
{
LLSD info(getViewerInfo());
LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
}
}
}
catch (boost::regex_error& e)
{
LL_WARNS() << "Can't parse previous run version, regex errpr: " << e.what() << LL_ENDL;
}
LLSD info(getViewerInfo());
LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
}
}

View File

@ -254,6 +254,8 @@ private:
void sendLogoutRequest();
void disconnectViewer();
void showReleaseNotesIfRequired();
// *FIX: the app viewer class should be some sort of singleton, no?
// Perhaps its child class is the singleton and this should be an abstract base.