This commit is contained in:
DavidXanatos 2023-04-25 12:53:24 +02:00
parent 1ce0013334
commit e68e650ecb
5 changed files with 17 additions and 6 deletions

View File

@ -240,6 +240,7 @@ std::wstring GetJSONStringSafe(const JSONObject& root, const std::wstring& key,
// QueryUpdateData
//---------------------------------------------------------------------------
extern "C" int LCIDToLocaleName(LCID Locale, LPWSTR lpName, int cchName, DWORD dwFlags);
BOOLEAN CUpdater::QueryUpdateData(UPDATER_DATA* Context)
{
@ -253,7 +254,11 @@ BOOLEAN CUpdater::QueryUpdateData(UPDATER_DATA* Context)
JSONObject release;
JSONObject installer;
Path.Format(L"/update.php?action=update&software=sandboxie&channel=stable&version=%S&system=windows-%d.%d.%d-%s&language=%d&auto=%s",
wchar_t StrLang[16];
LCIDToLocaleName(SbieDll_GetLanguage(NULL), StrLang, ARRAYSIZE(StrLang), 0);
if (StrLang[2] == L'-') StrLang[2] = '_';
Path.Format(L"/update.php?action=update&software=sandboxie&channel=stable&version=%S&system=windows-%d.%d.%d-%s&language=%s&auto=%s",
MY_VERSION_STRING, m_osvi.dwMajorVersion, m_osvi.dwMinorVersion, m_osvi.dwBuildNumber,
#ifdef _M_ARM64
L"ARM64",
@ -262,7 +267,7 @@ BOOLEAN CUpdater::QueryUpdateData(UPDATER_DATA* Context)
#else
L"i386",
#endif
SbieDll_GetLanguage(NULL), Context->Manual ? L"0" : L"1");
StrLang, Context->Manual ? L"0" : L"1");
CString update_key;
CSbieIni::GetInstance().GetText(_GlobalSettings, L"UpdateKey", update_key);

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,64,2
#define MY_VERSION_STRING "5.64.2"
#define MY_VERSION_BINARY 5,64,3
#define MY_VERSION_STRING "5.64.3"
#define MY_ABI_VERSION 0x56000
// These #defines are used by either Resource Compiler or NSIS installer

View File

@ -758,6 +758,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
params << L"&system=windows-" << g_osvi.dwMajorVersion << L"." << g_osvi.dwMinorVersion << L"." << g_osvi.dwBuildNumber << "-" << arch;
wchar_t StrLang[16];
LCIDToLocaleName(GetUserDefaultLCID(), StrLang, ARRAYSIZE(StrLang), 0);
if (StrLang[2] == L'-') StrLang[2] = '_';
params << L"&language=" << StrLang;
std::wstring update_key = GetArgument(arguments, L"update_key");
if (!update_key.empty()) params << L"&update_key=" + update_key;

View File

@ -162,7 +162,7 @@ void COnlineUpdater::GetUpdates(QObject* receiver, const char* member, const QVa
//Query.addQueryItem("version", QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV) + "." + QString::number(VERSION_UPD));
Query.addQueryItem("version", QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV));
Query.addQueryItem("system", "windows-" + QSysInfo::kernelVersion() + "-" + QSysInfo::currentCpuArchitecture());
Query.addQueryItem("language", QString::number(theGUI->m_LanguageId));
Query.addQueryItem("language", QLocale::system().name());
QString UpdateKey = GetArguments(g_Certificate, L'\n', L':').value("UPDATEKEY");
if (UpdateKey.isEmpty())

View File

@ -2,7 +2,7 @@
#define VERSION_MJR 1
#define VERSION_MIN 9
#define VERSION_REV 2
#define VERSION_REV 3
#define VERSION_UPD 0
#ifndef STR