This is an automated email from the git hooks/post-receive script.
root pushed a commit to branch master
in repository reactos.
View the commit online:
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3d6040615a63c8d6f313b…
The following commit(s) were added to refs/heads/master by this push:
new 3d6040615a Make ReactOS report the Git revision as output by "git
describe".
3d6040615a is described below
commit 3d6040615a63c8d6f313b711a1fbb6e81227762a
Author: Colin Finck <colin(a)reactos.org>
AuthorDate: Tue Oct 3 12:55:38 2017 +0200
Make ReactOS report the Git revision as output by "git describe".
- REVISION is now something like "0.4.7-dev-53-g1304b53" instead of
"r12345".
- Change WINDOWS_NT_BANNER to better represent the ReactOS version and the reported NT
version.
- Introduce REACTOS_COMMIT_HASH which contains the full 40-character commit hash (for
comparing revisions, e.g. in rosautotest/testman).
---
modules/rostests/rosautotest/CConfiguration.cpp | 2 +-
ntoskrnl/ex/init.c | 6 +-
sdk/include/reactos/buildno.h.cmake | 3 +-
sdk/include/reactos/mc/bugcodes.mc | 4 +-
sdk/include/reactos/version.cmake | 81 +++++++++++--------------
sdk/include/reactos/version.h.cmake | 5 --
6 files changed, 43 insertions(+), 58 deletions(-)
diff --git a/modules/rostests/rosautotest/CConfiguration.cpp
b/modules/rostests/rosautotest/CConfiguration.cpp
index 51d3f98615..2a605b4502 100644
--- a/modules/rostests/rosautotest/CConfiguration.cpp
+++ b/modules/rostests/rosautotest/CConfiguration.cpp
@@ -119,7 +119,7 @@ CConfiguration::GetSystemInformation()
/* Get the build from the define */
ss << "&revision=";
- ss << KERNEL_VERSION_BUILD_HEX;
+ ss << KERNEL_VERSION_COMMIT_HASH;
ss << "&platform=";
diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c
index 1c1d264255..71f27efe60 100644
--- a/ntoskrnl/ex/init.c
+++ b/ntoskrnl/ex/init.c
@@ -1428,15 +1428,12 @@ Phase1InitializationDiscard(IN PVOID Context)
if (CmCSDVersionString.Length)
{
/* Print the version string */
- /* ReactOS specific: Append also the revision number */
Status = RtlStringCbPrintfExA(StringBuffer,
Remaining,
&EndBuffer,
&Remaining,
0,
- " r%u"
": %wZ",
- KERNEL_VERSION_BUILD_HEX,
&CmCSDVersionString);
if (!NT_SUCCESS(Status))
{
@@ -1471,9 +1468,12 @@ Phase1InitializationDiscard(IN PVOID Context)
if (NT_SUCCESS(MsgStatus))
{
/* Create the banner message */
+ /* ReactOS specific: Report ReactOS version, NtBuildLab information and reported
NT kernel version */
Status = RtlStringCbPrintfA(EndBuffer,
Remaining,
(PCHAR)MsgEntry->Text,
+ KERNEL_VERSION_STR,
+ NtBuildLab,
StringBuffer,
NtBuildNumber & 0xFFFF,
BeginBuffer);
diff --git a/sdk/include/reactos/buildno.h.cmake b/sdk/include/reactos/buildno.h.cmake
index 4f1e912a87..0dfc9f3171 100644
--- a/sdk/include/reactos/buildno.h.cmake
+++ b/sdk/include/reactos/buildno.h.cmake
@@ -3,13 +3,14 @@
#define _INC_REACTOS_BUILDNO
#define KERNEL_VERSION_BUILD @KERNEL_VERSION_BUILD@
-#define KERNEL_VERSION_BUILD_HEX 0x@KERNEL_VERSION_BUILD_HEX@
#define KERNEL_VERSION_BUILD_STR "@KERNEL_VERSION_BUILD@-@REVISION@"
#define KERNEL_VERSION_BUILD_RC "@KERNEL_VERSION_BUILD@-@REVISION@\0"
#define KERNEL_VERSION_RC "@KERNEL_VERSION@\0"
#define KERNEL_VERSION_STR "@KERNEL_VERSION@"
+#define KERNEL_VERSION_COMMIT_HASH "@COMMIT_HASH@"
+
#define REACTOS_DLL_VERSION_MAJOR @REACTOS_DLL_VERSION_MAJOR@
#define REACTOS_DLL_VERSION_RC "@DLL_VERSION_STR@\0"
#define REACTOS_DLL_VERSION_STR "@DLL_VERSION_STR@"
diff --git a/sdk/include/reactos/mc/bugcodes.mc b/sdk/include/reactos/mc/bugcodes.mc
index 005447a430..574e006027 100644
--- a/sdk/include/reactos/mc/bugcodes.mc
+++ b/sdk/include/reactos/mc/bugcodes.mc
@@ -19,7 +19,9 @@ Severity=Informational
Facility=System
SymbolicName=WINDOWS_NT_BANNER
Language=English
-ReactOS (R) Kernel Version %hs (Build %u%hs)
+ReactOS Version %s
+Build %s
+Reporting NT %s (Build %u%s)
.
MessageId=0x87
diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake
index e5f0bb1bed..6c2247aafa 100644
--- a/sdk/include/reactos/version.cmake
+++ b/sdk/include/reactos/version.cmake
@@ -1,63 +1,50 @@
-macro(inttohex INTVALUE OUTPUT_VARIABLE)
- list(APPEND HEXLIST 0 1 2 3 4 5 6 7 8 9 a b c d e f)
- list(GET HEXLIST ${INTVALUE} ${OUTPUT_VARIABLE})
-endmacro()
-
-macro(converttohex INTVALUE OUTPUT_VARIABLE)
- set(${OUTPUT_VARIABLE} "")
- set(REMAINING ${INTVALUE})
- while(REMAINING)
- math(EXPR REMAINDER "${REMAINING}%16")
- inttohex(${REMAINDER} HEXCHAR)
- math(EXPR REMAINING "${REMAINING}/16")
- set(${OUTPUT_VARIABLE} "${HEXCHAR}${${OUTPUT_VARIABLE}}")
- endwhile()
-endmacro()
-
string(TIMESTAMP KERNEL_VERSION_BUILD %Y%m%d UTC)
set(KERNEL_VERSION_MAJOR "0")
-set(KERNEL_VERSION_MINOR "5")
-set(KERNEL_VERSION_PATCH_LEVEL "0")
+set(KERNEL_VERSION_MINOR "4")
+set(KERNEL_VERSION_PATCH_LEVEL "7")
set(COPYRIGHT_YEAR "2017")
-# KERNEL_VERSION_BUILD_TYPE is "SVN" or "" (for the release)
-set(KERNEL_VERSION_BUILD_TYPE "SVN")
+# KERNEL_VERSION_BUILD_TYPE is "dev" for Git builds
+# or "RC1", "RC2", "" for releases.
+set(KERNEL_VERSION_BUILD_TYPE "dev")
-# KERNEL_VERSION_RELEASE_TYPE is "RC1", "RC2" or "" (for
the final one)
-set(KERNEL_VERSION_RELEASE_TYPE "")
-
-set(KERNEL_VERSION "${KERNEL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}")
-if(KERNEL_VERSION_PATCH_LEVEL)
- set(KERNEL_VERSION "${KERNEL_VERSION}.${KERNEL_VERSION_PATCH_LEVEL}")
-endif()
-if(KERNEL_VERSION_BUILD_TYPE STREQUAL "SVN")
+set(KERNEL_VERSION
"${KERNEL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}.${KERNEL_VERSION_PATCH_LEVEL}")
+if(NOT KERNEL_VERSION_BUILD_TYPE STREQUAL "")
set(KERNEL_VERSION "${KERNEL_VERSION}-${KERNEL_VERSION_BUILD_TYPE}")
-elseif(NOT KERNEL_VERSION_RELEASE_TYPE STREQUAL "")
- set(KERNEL_VERSION "${KERNEL_VERSION}-${KERNEL_VERSION_RELEASE_TYPE}")
endif()
math(EXPR REACTOS_DLL_VERSION_MAJOR "${KERNEL_VERSION_MAJOR}+42")
-set(DLL_VERSION_STR "${REACTOS_DLL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}")
-if(KERNEL_VERSION_PATCH_LEVEL)
- set(DLL_VERSION_STR "${DLL_VERSION_STR}.${KERNEL_VERSION_PATCH_LEVEL}")
-endif()
-if(KERNEL_VERSION_BUILD_TYPE STREQUAL "SVN")
+set(DLL_VERSION_STR
"${REACTOS_DLL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}.${KERNEL_VERSION_PATCH_LEVEL}")
+if(NOT KERNEL_VERSION_BUILD_TYPE STREQUAL "")
set(DLL_VERSION_STR "${DLL_VERSION_STR}-${KERNEL_VERSION_BUILD_TYPE}")
-elseif(NOT KERNEL_VERSION_RELEASE_TYPE STREQUAL "")
- set(DLL_VERSION_STR "${DLL_VERSION_STR}-${KERNEL_VERSION_RELEASE_TYPE}")
endif()
-# get svn revision number
-set(REVISION "rUNKNOWN")
-set(KERNEL_VERSION_BUILD_HEX "0")
-if(EXISTS "${REACTOS_SOURCE_DIR}/.svn" OR EXISTS
"${REACTOS_SOURCE_DIR}/../.svn")
- find_package(Subversion)
- if(Subversion_FOUND)
- subversion_wc_info(${REACTOS_SOURCE_DIR} SVNINFO)
- if(SVNINFO_WC_REVISION)
- set(REVISION "r${SVNINFO_WC_REVISION}")
- converttohex(${SVNINFO_WC_REVISION} KERNEL_VERSION_BUILD_HEX)
+# Get Git revision through "git describe"
+set(COMMIT_HASH "unknown-hash")
+set(REVISION "unknown-revision")
+
+if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
+ find_package(Git)
+ if(GIT_FOUND)
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
+ OUTPUT_VARIABLE GIT_COMMIT_HASH
+ RESULT_VARIABLE GIT_CALL_RESULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(GIT_CALL_RESULT EQUAL 0)
+ set(COMMIT_HASH "${GIT_COMMIT_HASH}")
+ endif()
+
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" describe
+ OUTPUT_VARIABLE GIT_DESCRIBE_REVISION
+ RESULT_VARIABLE GIT_CALL_RESULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(GIT_CALL_RESULT EQUAL 0)
+ set(REVISION "${GIT_DESCRIBE_REVISION}")
endif()
endif()
endif()
diff --git a/sdk/include/reactos/version.h.cmake b/sdk/include/reactos/version.h.cmake
index 628d4974d6..2ac1a47338 100644
--- a/sdk/include/reactos/version.h.cmake
+++ b/sdk/include/reactos/version.h.cmake
@@ -22,11 +22,6 @@
#define COPYRIGHT_YEAR "@COPYRIGHT_YEAR@"
-/* KERNEL_VERSION_BUILD_TYPE is "SVN" or "" (for the release) */
-#define KERNEL_VERSION_BUILD_TYPE "@KERNEL_VERSION_BUILD_TYPE@"
-/* KERNEL_VERSION_RELEASE_TYPE is "RC1", "RC2" or "" (for
the final one) */
-#define KERNEL_VERSION_RELEASE_TYPE "@KERNEL_VERSION_RELEASE_TYPE@"
-
#endif
/* EOF */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.