Updated the version number for the upcoming release candidate.

This commit is contained in:
Kimmo Pekkola 2009-08-02 11:32:12 +00:00
parent 9cc9310ad8
commit 7fbb09d4ca
3 changed files with 27 additions and 10 deletions

View File

@ -1311,8 +1311,15 @@ void CMeterWindow::ReadSkin()
{ {
WCHAR buffer[256]; WCHAR buffer[256];
std::wstring text; std::wstring text;
wsprintf(buffer, L"%i.%i", appVersion / 1000, appVersion % 1000); if (appVersion % 1000 != 0)
text = L"This skin needs Rainmeter version 0."; {
wsprintf(buffer, L"%i.%i.%i", appVersion / 1000000, (appVersion / 1000) % 1000, appVersion % 1000);
}
else
{
wsprintf(buffer, L"%i.%i", appVersion / 1000000, appVersion / 1000);
}
text = L"This skin needs Rainmeter version ";
text += buffer; text += buffer;
text += L" or newer.\nIt might not function as well as it should.\nYou should get an updated version or Rainmeter\nfrom http://www.rainmeter.net"; text += L" or newer.\nIt might not function as well as it should.\nYou should get an updated version or Rainmeter\nfrom http://www.rainmeter.net";
MessageBox(m_Window, text.c_str(), L"Rainmeter", MB_OK); MessageBox(m_Window, text.c_str(), L"Rainmeter", MB_OK);

View File

@ -29,16 +29,16 @@
#define MAX_LINE_LENGTH 4096 #define MAX_LINE_LENGTH 4096
#define MAKE_VER(major, minor) major * 1000 + minor #define MAKE_VER(major, minor1, minor2) major * 1000000 + minor1 * 1000 + minor2
#define APPNAME L"Rainmeter" #define APPNAME L"Rainmeter"
#define APPVERSION L"0.14.1" #define APPVERSION L"1.0"
#ifdef _WIN64 #ifdef _WIN64
#define APPBITS L"(64-bit)" #define APPBITS L"(64-bit)"
#else #else
#define APPBITS L"(32-bit)" #define APPBITS L"(32-bit)"
#endif #endif
#define RAINMETER_VERSION MAKE_VER(14, 1) #define RAINMETER_VERSION MAKE_VER(1, 0, 0)
enum PLATFORM enum PLATFORM
{ {

View File

@ -52,13 +52,23 @@ void CheckVersion(void* dummy)
size_t pos = verStr.find('.'); size_t pos = verStr.find('.');
if (pos != std::wstring::npos) if (pos != std::wstring::npos)
{ {
std::string verStr1 = verStr.substr(pos + 1); std::string verMajor = verStr.substr(0, pos);
version = atoi(verStr1.c_str()) * 1000; std::string verMinor = verStr.substr(pos + 1);
pos = verStr.find('.', pos + 1);
version = atoi(verMajor.c_str()) * 1000000;
pos = verMinor.find('.');
if (pos != std::wstring::npos) if (pos != std::wstring::npos)
{ {
std::string verStr1 = verStr.substr(pos + 1); std::string verMinor1 = verMinor.substr(0, pos);
version += atoi(verStr1.c_str()); std::string verMinor2 = verMinor.substr(pos + 1);
version += atoi(verMinor1.c_str()) * 1000;
version += atoi(verMinor2.c_str());
}
else
{
version += atoi(verMinor.c_str()) * 1000;
} }
} }