Changed to check for updates from GitHub rather than Google Code

This commit is contained in:
Birunthan Mohanathas 2012-04-05 13:27:34 +03:00
parent 1def58618c
commit 22c5d6a340

View File

@ -27,18 +27,19 @@ void CheckVersion(void* dummy)
{ {
int version = 0; int version = 0;
HINTERNET hRootHandle = InternetOpen(L"Rainmeter", HINTERNET hRootHandle = InternetOpen(
L"Rainmeter",
INTERNET_OPEN_TYPE_PRECONFIG, INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL,
NULL, NULL,
0); 0);
if (hRootHandle == NULL) if (hRootHandle == NULL)
{ {
Log(LOG_ERROR, L"CheckUpdate: InternetOpen failed");
return; return;
} }
HINTERNET hUrlDump = InternetOpenUrl(hRootHandle, L"http://rainmeter.googlecode.com/svn/version", NULL, NULL, INTERNET_FLAG_RESYNCHRONIZE, 0); HINTERNET hUrlDump = InternetOpenUrl(hRootHandle, L"http://rainmeter.github.com/rainmeter/release", NULL, NULL, INTERNET_FLAG_RESYNCHRONIZE, 0);
if (hUrlDump) if (hUrlDump)
{ {
DWORD dwSize; DWORD dwSize;
@ -79,16 +80,8 @@ void CheckVersion(void* dummy)
Rainmeter->SetNewVersion(false); Rainmeter->SetNewVersion(false);
} }
} }
else
{
Log(LOG_ERROR, L"CheckUpdate: InternetReadFile failed");
}
InternetCloseHandle(hUrlDump); InternetCloseHandle(hUrlDump);
} }
else
{
Log(LOG_ERROR, L"CheckUpdate: InternetOpenUrl failed");
}
InternetCloseHandle(hRootHandle); InternetCloseHandle(hRootHandle);
} }