[appstore] add AppStore version detection

* Also make sure we don't include appstore.listing.csv in the app
  and remove unneeded call to GetModuleHandle() in pki.c.
This commit is contained in:
Pete Batard 2021-02-07 20:25:21 +00:00
parent b3daef6a67
commit 1062dde076
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 65 additions and 49 deletions

View file

@ -212,7 +212,6 @@ char* GetSignatureName(const char* path, const char* country_code)
char *p = NULL, *mpath = NULL;
int i;
BOOL r;
HMODULE hm;
HCERTSTORE hStore = NULL;
HCRYPTMSG hMsg = NULL;
PCCERT_CONTEXT pCertContext = NULL;
@ -228,12 +227,7 @@ char* GetSignatureName(const char* path, const char* country_code)
szFileName = calloc(MAX_PATH, sizeof(wchar_t));
if (szFileName == NULL)
return NULL;
hm = GetModuleHandle(NULL);
if (hm == NULL) {
uprintf("PKI: Could not get current executable handle: %s", WinPKIErrorString());
goto out;
}
dwSize = GetModuleFileNameW(hm, szFileName, MAX_PATH);
dwSize = GetModuleFileNameW(NULL, szFileName, MAX_PATH);
if ((dwSize == 0) || ((dwSize == MAX_PATH) && (GetLastError() == ERROR_INSUFFICIENT_BUFFER))) {
uprintf("PKI: Could not get module filename: %s", WinPKIErrorString());
goto out;