[misc] add build number to Windows version for Windows 8 or later

* Also set rufus-next to 2.5
This commit is contained in:
Pete Batard 2015-09-30 23:08:07 +01:00
parent 809d94bf09
commit 4a5aa4bd2f
4 changed files with 28 additions and 17 deletions

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.4.761"
CAPTION "Rufus 2.5.762"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -319,8 +319,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,761,0
PRODUCTVERSION 2,4,761,0
FILEVERSION 2,5,762,0
PRODUCTVERSION 2,5,762,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -337,13 +337,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.4.761"
VALUE "FileVersion", "2.5.762"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.4.761"
VALUE "ProductVersion", "2.5.762"
END
END
BLOCK "VarFileInfo"

View file

@ -223,7 +223,7 @@ void GetWindowsVersion(void)
OSVERSIONINFOEXA vi, vi2;
const char* w = 0;
const char* w64 = "32 bit";
char* vptr;
char *vptr, build_number[10] = "";
size_t vlen;
unsigned major, minor;
ULONGLONG major_equal, minor_equal;
@ -318,6 +318,17 @@ void GetWindowsVersion(void)
safe_sprintf(vptr, vlen, "%s SP%u %s", w, vi.wServicePackMajor, w64);
else
safe_sprintf(vptr, vlen, "%s %s", w, w64);
// Add the build number for Windows 8.0 and later
if (nWindowsVersion >= 0x62) {
GetRegistryKeyStr(REGKEY_HKLM, "Microsoft\\Windows NT\\CurrentVersion\\CurrentBuildNumber", build_number, sizeof(build_number));
if (build_number[0] != 0) {
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), " (Build ");
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), build_number);
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), ")");
}
}
}
/*