mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 12:19:54 +02:00
Fix default_tag in win32 launcher not working
This commit is contained in:
parent
328896b9ed
commit
cf64492185
1 changed files with 5 additions and 2 deletions
|
@ -476,9 +476,11 @@ void LauncherManager::getMostRecentBuilds(CString& launcherUrlOut, CString& laun
|
||||||
LauncherUtils::ResponseError error = LauncherUtils::ResponseError(err);
|
LauncherUtils::ResponseError error = LauncherUtils::ResponseError(err);
|
||||||
if (error == LauncherUtils::ResponseError::NoError) {
|
if (error == LauncherUtils::ResponseError::NoError) {
|
||||||
Json::Value& json = _latestBuilds;
|
Json::Value& json = _latestBuilds;
|
||||||
_defaultBuildTag = json.get("default_tag", "hqlauncher").asCString();
|
|
||||||
auto buildTag = _organizationBuildTag.IsEmpty() ? _defaultBuildTag : _organizationBuildTag;
|
|
||||||
if (LauncherUtils::parseJSON(response, json)) {
|
if (LauncherUtils::parseJSON(response, json)) {
|
||||||
|
_defaultBuildTag = json.get("default_tag", "").asCString();
|
||||||
|
auto buildTag = _organizationBuildTag.IsEmpty() ? _defaultBuildTag : _organizationBuildTag;
|
||||||
|
addToLog(_T("Build tag is: ") + buildTag);
|
||||||
|
|
||||||
if (json["launcher"].isObject()) {
|
if (json["launcher"].isObject()) {
|
||||||
if (json["launcher"]["windows"].isObject() && json["launcher"]["windows"]["url"].isString()) {
|
if (json["launcher"]["windows"].isObject() && json["launcher"]["windows"]["url"].isString()) {
|
||||||
launcherUrlOut = json["launcher"]["windows"]["url"].asCString();
|
launcherUrlOut = json["launcher"]["windows"]["url"].asCString();
|
||||||
|
@ -494,6 +496,7 @@ void LauncherManager::getMostRecentBuilds(CString& launcherUrlOut, CString& laun
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!findBuildInResponse(json, buildTag, _latestApplicationURL, _latestVersion)) {
|
if (!findBuildInResponse(json, buildTag, _latestApplicationURL, _latestVersion)) {
|
||||||
|
addToLog(_T("Failed to find build"));
|
||||||
error = LauncherUtils::ResponseError::ParsingJSON;
|
error = LauncherUtils::ResponseError::ParsingJSON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue