diff --git a/reactos/include/reactos/version.cmake b/reactos/include/reactos/version.cmake index 641fb00eafb..027be3c584f 100644 --- a/reactos/include/reactos/version.cmake +++ b/reactos/include/reactos/version.cmake @@ -1,7 +1,9 @@ macro(today RESULT) if(CMAKE_HOST_WIN32) - execute_process(COMMAND "${REACTOS_SOURCE_DIR}/tools/getdate.exe" OUTPUT_VARIABLE ${RESULT}) - string(STRIP ${${RESULT}} ${RESULT}) + execute_process(COMMAND wmic os get LocalDateTime OUTPUT_VARIABLE RAWDATE) + string(REPLACE "\n" ";" RAWDATE ${RAWDATE}) + LIST(GET RAWDATE 1 RAWDATE) + string(SUBSTRING ${RAWDATE} 0 8 ${RESULT}) elseif(CMAKE_HOST_UNIX) execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE ${RESULT}) string(STRIP ${${RESULT}} ${RESULT}) diff --git a/reactos/tools/getdate.c b/reactos/tools/getdate.c deleted file mode 100644 index 892a8ea40fa..00000000000 --- a/reactos/tools/getdate.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -void main() -{ - char curdate[9]; - time_t now; - struct tm *tm_now; - - time(&now); - tm_now=localtime(&now); - strftime(curdate, sizeof(curdate), "%Y%m%d", tm_now); - printf("%s", curdate); -} diff --git a/reactos/tools/getdate.cmd b/reactos/tools/getdate.cmd deleted file mode 100644 index 324e24d6ece..00000000000 --- a/reactos/tools/getdate.cmd +++ /dev/null @@ -1 +0,0 @@ -gcc getdate.c -o getdate.exe -s diff --git a/reactos/tools/getdate.exe b/reactos/tools/getdate.exe deleted file mode 100644 index d3e80076f83..00000000000 Binary files a/reactos/tools/getdate.exe and /dev/null differ