Commit 39d444fb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

appwiz.cpl: Moved addon SHA and version to addon_info_t.

parent 3e5c4551
...@@ -65,12 +65,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl); ...@@ -65,12 +65,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
#endif #endif
typedef struct { typedef struct {
const char *version;
const char *file_name; const char *file_name;
const char *sha;
} addon_info_t; } addon_info_t;
static const addon_info_t addons_info[] = { static const addon_info_t addons_info[] = {
{ {
"wine_gecko-" GECKO_VERSION "-" ARCH_STRING ".msi" GECKO_VERSION,
"wine_gecko-" GECKO_VERSION "-" ARCH_STRING ".msi",
GECKO_SHA
} }
}; };
...@@ -131,10 +135,10 @@ static BOOL sha_check(const WCHAR *file_name) ...@@ -131,10 +135,10 @@ static BOOL sha_check(const WCHAR *file_name)
for(i=0; i < sizeof(sha); i++) for(i=0; i < sizeof(sha); i++)
sprintf(buf + i*2, "%02x", *((unsigned char*)sha+i)); sprintf(buf + i*2, "%02x", *((unsigned char*)sha+i));
if(strcmp(buf, GECKO_SHA)) { if(strcmp(buf, addon->sha)) {
WCHAR message[256]; WCHAR message[256];
WARN("Got %s, expected %s\n", buf, GECKO_SHA); WARN("Got %s, expected %s\n", buf, addon->sha);
if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR))) if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR)))
MessageBoxW(NULL, message, NULL, MB_ICONERROR); MessageBoxW(NULL, message, NULL, MB_ICONERROR);
...@@ -426,7 +430,7 @@ static LPWSTR get_url(void) ...@@ -426,7 +430,7 @@ static LPWSTR get_url(void)
len += MultiByteToWideChar(CP_ACP, 0, ARCH_STRING, sizeof(ARCH_STRING), url+len, size/sizeof(WCHAR)-len)-1; len += MultiByteToWideChar(CP_ACP, 0, ARCH_STRING, sizeof(ARCH_STRING), url+len, size/sizeof(WCHAR)-len)-1;
memcpy(url+len, v_formatW, sizeof(v_formatW)); memcpy(url+len, v_formatW, sizeof(v_formatW));
len += sizeof(v_formatW)/sizeof(WCHAR); len += sizeof(v_formatW)/sizeof(WCHAR);
MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+len, size/sizeof(WCHAR)-len); MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len);
} }
TRACE("Got URL %s\n", debugstr_w(url)); TRACE("Got URL %s\n", debugstr_w(url));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment