1.7.3
This commit is contained in:
parent
14924c0b8c
commit
b328e98444
|
@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
- moved the "Support" settings page the above "Advance Options" page and renamed it to "Support & Updates"
|
||||
- when dragging and dropping a file on to the sandman UI to run it the currently selected box will be pre-selected in the box picker dialog
|
||||
- improved access rule handling [#2633](https://github.com/sandboxie-plus/Sandboxie/discussions/2633)
|
||||
- sbiectrl now uses the new update format when checking for updates
|
||||
|
||||
### Fixed
|
||||
- added AppContainer support for Compartment type boxes
|
||||
|
|
|
@ -208,6 +208,20 @@ CleanupExit:
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// GetJSONObjectSafe
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
JSONObject GetJSONObjectSafe(const JSONObject& root, const std::wstring& key)
|
||||
{
|
||||
auto I = root.find(key);
|
||||
if (I == root.end() || !I->second->IsObject())
|
||||
return JSONObject();
|
||||
return I->second->AsObject();
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// GetJSONStringSafe
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -236,8 +250,10 @@ BOOLEAN CUpdater::QueryUpdateData(UPDATER_DATA* Context)
|
|||
char* jsonString = NULL;
|
||||
JSONValue* jsonObject = NULL;
|
||||
JSONObject jsonRoot;
|
||||
JSONObject release;
|
||||
JSONObject installer;
|
||||
|
||||
Path.Format(L"/update.php?software=sandboxie&version=%S&system=windows-%d.%d.%d-%s&language=%d&auto=%s",
|
||||
Path.Format(L"/update.php?action=update&software=sandboxie&channel=stable&version=%S&system=windows-%d.%d.%d-%s&language=%d&auto=%s",
|
||||
MY_VERSION_STRING, m_osvi.dwMajorVersion, m_osvi.dwMinorVersion, m_osvi.dwBuildNumber,
|
||||
#ifdef _M_ARM64
|
||||
L"ARM64",
|
||||
|
@ -269,11 +285,14 @@ BOOLEAN CUpdater::QueryUpdateData(UPDATER_DATA* Context)
|
|||
Context->userMsg = GetJSONStringSafe(jsonRoot, L"userMsg").c_str();
|
||||
Context->infoUrl = GetJSONStringSafe(jsonRoot, L"infoUrl").c_str();
|
||||
|
||||
Context->version = GetJSONStringSafe(jsonRoot, L"version").c_str();
|
||||
release = GetJSONObjectSafe(jsonRoot, L"release");
|
||||
Context->updateMsg = GetJSONStringSafe(release, L"infoMsg").c_str();
|
||||
Context->updateUrl = GetJSONStringSafe(release, L"infoUrl").c_str();
|
||||
Context->version = GetJSONStringSafe(release, L"version").c_str();
|
||||
//Context->updated = (uint64_t)jsonRoot[L"updated"]->AsNumber();
|
||||
Context->updateMsg = GetJSONStringSafe(jsonRoot, L"updateMsg").c_str();
|
||||
Context->updateUrl = GetJSONStringSafe(jsonRoot, L"updateUrl").c_str();
|
||||
Context->downloadUrl = GetJSONStringSafe(jsonRoot, L"downloadUrl").c_str();
|
||||
|
||||
installer = GetJSONObjectSafe(release, L"installer");
|
||||
Context->downloadUrl = GetJSONStringSafe(installer, L"downloadUrl").c_str();
|
||||
|
||||
success = TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue