[RAPPS] Rework application handling

Previously, there would be function duplication between installed and available applications.
Now this is handled with polymorphism, which allows to re-use a lot of code.
Additionally, toolbar buttons are properly disabled now.
The mutex used to guard rapps' single instance is renamed,
so that the 'new' and old rapps can be run at the same time for testing.

CORE-18459
This commit is contained in:
Mark Jansen
2023-02-20 19:30:02 +01:00
parent 0cd80c17f6
commit 33c2903e6d
30 changed files with 3758 additions and 4076 deletions
+4 -3
View File
@@ -3,14 +3,15 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Various integrity check mechanisms
* COPYRIGHT: Copyright Ismael Ferreras Morezuelas ([email protected])
* Copyright Mark Jansen
* Copyright 2016 Mark Jansen <[email protected]>
*/
#include "rapps.h"
#include <sha1.h>
BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
BOOL
VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
{
BOOL ret = FALSE;
@@ -48,7 +49,7 @@ BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
WCHAR buf[(sizeof(sha) * 2) + 1];
for (UINT i = 0; i < sizeof(sha); i++)
swprintf(buf + 2 * i, L"%02x", ((unsigned char *) sha)[i]);
swprintf(buf + 2 * i, L"%02x", ((unsigned char *)sha)[i]);
/* does the resulting SHA1 match with the provided one? */
if (!_wcsicmp(buf, lpSHA1Hash))
ret = TRUE;