|
@@ -901,14 +901,23 @@ static bool __fastcall DoQueryUpdates(TUpdatesConfiguration & Updates, bool Coll
|
|
|
URL += L"&localever=" + LocaleVersion;
|
|
|
URL += L"&localecompl=" + LoadStr(TRANSLATION_COMPLETENESS);
|
|
|
}
|
|
|
- // Even if donor email is inherited from normal installation,
|
|
|
- // do not use it as this all is merely to report usage statistics, not to check for updates, in UWP.
|
|
|
- if (!Updates.AuthenticationEmail.IsEmpty() && !IsUWP())
|
|
|
+ URL += L"&firstrun=" + EncodeUrlString(WinConfiguration->FirstRun);
|
|
|
+ if (!IsUWP())
|
|
|
{
|
|
|
- RawByteString AuthenticationEmailBuf = RawByteString(UTF8String(Updates.AuthenticationEmail.LowerCase()));
|
|
|
- URL += L"&authentication=" + Sha256(AuthenticationEmailBuf.c_str(), AuthenticationEmailBuf.Length()).LowerCase();
|
|
|
+ // Even if donor email is inherited from normal installation,
|
|
|
+ // do not use it as this all is merely to report usage statistics, not to check for updates, in UWP.
|
|
|
+ if (!Updates.AuthenticationEmail.IsEmpty())
|
|
|
+ {
|
|
|
+ RawByteString AuthenticationEmailBuf = RawByteString(UTF8String(Updates.AuthenticationEmail.LowerCase()));
|
|
|
+ URL += L"&authentication=" + Sha256(AuthenticationEmailBuf.c_str(), AuthenticationEmailBuf.Length()).LowerCase();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ URL += L"&package=" + EncodeUrlString(GetPackageName());
|
|
|
}
|
|
|
|
|
|
+ AppLogFmt(L"Updates check URL: %s", (URL));
|
|
|
CheckForUpdatesHTTP->URL = URL;
|
|
|
// sanity check
|
|
|
CheckForUpdatesHTTP->ResponseLimit = 102400;
|
|
@@ -934,6 +943,7 @@ static bool __fastcall DoQueryUpdates(TUpdatesConfiguration & Updates, bool Coll
|
|
|
throw;
|
|
|
}
|
|
|
Response = CheckForUpdatesHTTP->Response;
|
|
|
+ AppLogFmt(L"Updates check response: %s", (Response));
|
|
|
}
|
|
|
__finally
|
|
|
{
|
|
@@ -1148,19 +1158,26 @@ void __fastcall GetUpdatesMessage(UnicodeString & Message, bool & New,
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- New = (Updates.Results.Version > 0);
|
|
|
- if (New)
|
|
|
+ if (IsUWP())
|
|
|
{
|
|
|
- UnicodeString Version = VersionStrFromCompoundVersion(Updates.Results.Version);
|
|
|
- if (!Updates.Results.Release.IsEmpty())
|
|
|
- {
|
|
|
- Version = FORMAT(L"%s %s", (Version, Updates.Results.Release));
|
|
|
- }
|
|
|
- Message = FMTLOAD(NEW_VERSION4, (Version));
|
|
|
+ New = false;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Message = LoadStr(NO_NEW_VERSION);
|
|
|
+ New = (Updates.Results.Version > 0);
|
|
|
+ if (New)
|
|
|
+ {
|
|
|
+ UnicodeString Version = VersionStrFromCompoundVersion(Updates.Results.Version);
|
|
|
+ if (!Updates.Results.Release.IsEmpty())
|
|
|
+ {
|
|
|
+ Version = FORMAT(L"%s %s", (Version, Updates.Results.Release));
|
|
|
+ }
|
|
|
+ Message = FMTLOAD(NEW_VERSION4, (Version));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Message = LoadStr(NO_NEW_VERSION);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1175,7 +1192,7 @@ void __fastcall GetUpdatesMessage(UnicodeString & Message, bool & New,
|
|
|
FMTLOAD(UPDATE_MESSAGE, (FormatUpdatesMessage(Updates.Results.Message, Updates)));
|
|
|
}
|
|
|
|
|
|
- if (!Updates.Results.AuthenticationError.IsEmpty())
|
|
|
+ if (!Updates.Results.AuthenticationError.IsEmpty() && !IsUWP())
|
|
|
{
|
|
|
Message +=
|
|
|
FMTLOAD(UPDATE_MESSAGE, (FormatUpdatesMessage(Updates.Results.AuthenticationError, Updates)));
|