mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Set version info to NT 4.0 Build 1381 Service Pack 6 and include ReactOS
version number after Windows version in szCSDVersion svn path=/trunk/; revision=12202
This commit is contained in:
parent
8afda8f04f
commit
598fa7fea7
3 changed files with 47 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: env.c,v 1.25 2004/01/23 21:16:03 ekohl Exp $
|
||||
/* $Id: env.c,v 1.26 2004/12/18 21:06:25 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -254,6 +254,7 @@ GetVersionExW(
|
|||
)
|
||||
{
|
||||
PPEB pPeb = NtCurrentPeb();
|
||||
WCHAR *RosVersion;
|
||||
|
||||
/* TODO: move this into RtlGetVersion */
|
||||
switch(lpVersionInformation->dwOSVersionInfoSize)
|
||||
|
@ -281,12 +282,18 @@ GetVersionExW(
|
|||
lpVersionInformation->dwBuildNumber = pPeb->OSBuildNumber;
|
||||
lpVersionInformation->dwPlatformId = pPeb->OSPlatformId;
|
||||
|
||||
/* version string is "ReactOS x.y.z" */
|
||||
/* First the Windows compatible string */
|
||||
_snwprintf(lpVersionInformation->szCSDVersion,
|
||||
sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR),
|
||||
L"Service Pack %u", pPeb->SPMajorVersion);
|
||||
/* Add the Reactos-specific string */
|
||||
RosVersion = lpVersionInformation->szCSDVersion + wcslen(lpVersionInformation->szCSDVersion) + 1;
|
||||
wcsncpy
|
||||
(
|
||||
lpVersionInformation->szCSDVersion,
|
||||
RosVersion,
|
||||
L"ReactOS " KERNEL_VERSION_STR L" (Build " KERNEL_VERSION_BUILD_STR L")",
|
||||
sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR)
|
||||
sizeof(lpVersionInformation->szCSDVersion) / sizeof(WCHAR) -
|
||||
((RosVersion - lpVersionInformation->szCSDVersion) + 1)
|
||||
);
|
||||
|
||||
/* null-terminate, just in case */
|
||||
|
@ -377,7 +384,24 @@ GetVersionExA(
|
|||
] = 0;
|
||||
wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR);
|
||||
|
||||
/* convert the version string */
|
||||
/* convert the win version string */
|
||||
nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
|
||||
|
||||
if(!NT_SUCCESS(nErrCode))
|
||||
{
|
||||
/* failure */
|
||||
SetLastErrorByStatus(nErrCode);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wstrVerStr.Buffer = oviVerInfo.szCSDVersion + wstrVerStr.Length / sizeof(WCHAR) + 1;
|
||||
wstrVerStr.MaximumLength = sizeof(oviVerInfo.szCSDVersion) - (wstrVerStr.Length + sizeof(WCHAR));
|
||||
wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR);
|
||||
strVerStr.Buffer = lpVersionInformation->szCSDVersion + strVerStr.Length + 1;
|
||||
strVerStr.MaximumLength = sizeof(lpVersionInformation->szCSDVersion) - (strVerStr.Length + 1);
|
||||
strVerStr.Length = 0;
|
||||
|
||||
/* convert the ReactOS version string */
|
||||
nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
|
||||
|
||||
if(!NT_SUCCESS(nErrCode))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: process.c,v 1.158 2004/12/05 15:42:42 weiden Exp $
|
||||
/* $Id: process.c,v 1.159 2004/12/18 21:06:25 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -499,7 +499,7 @@ PsCreatePeb(HANDLE ProcessHandle,
|
|||
|
||||
Peb->OSMajorVersion = 4;
|
||||
Peb->OSMinorVersion = 0;
|
||||
Peb->OSBuildNumber = 0;
|
||||
Peb->OSBuildNumber = 1381;
|
||||
Peb->OSPlatformId = 2; //VER_PLATFORM_WIN32_NT;
|
||||
Peb->SPMajorVersion = 6;
|
||||
|
||||
|
|
|
@ -27,17 +27,27 @@
|
|||
VOID ShortVersion (VOID)
|
||||
{
|
||||
OSVERSIONINFO VersionInfo;
|
||||
unsigned RosVersionLen;
|
||||
LPTSTR RosVersion;
|
||||
|
||||
ConOutPuts (_T("\n"
|
||||
SHELLINFO));
|
||||
VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if (GetVersionEx(&VersionInfo) && 0 == _tcsnicmp(VersionInfo.szCSDVersion, _T("ReactOS"), 7))
|
||||
{
|
||||
ConOutPrintf(_T("%S running on %s"), SHELLVER, VersionInfo.szCSDVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
ConOutPrintf(_T("%S"), SHELLVER);
|
||||
#else
|
||||
ConOutPrintf(_T("%s"), SHELLVER);
|
||||
#endif /* _UNICODE */
|
||||
memset(VersionInfo.szCSDVersion, 0, sizeof(VersionInfo.szCSDVersion));
|
||||
if (GetVersionEx(&VersionInfo))
|
||||
{
|
||||
RosVersion = VersionInfo.szCSDVersion + _tcslen(VersionInfo.szCSDVersion) + 1;
|
||||
RosVersionLen = sizeof(VersionInfo.szCSDVersion) / sizeof(VersionInfo.szCSDVersion[0]) -
|
||||
(RosVersion - VersionInfo.szCSDVersion);
|
||||
if (7 <= RosVersionLen && 0 == _tcsnicmp(RosVersion, _T("ReactOS"), 7))
|
||||
{
|
||||
ConOutPrintf(_T(" running on %s"), RosVersion);
|
||||
}
|
||||
}
|
||||
ConOutPuts (_T("\n"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue