Author: spetreolle
Date: Sat Jun 22 22:33:49 2013
New Revision: 59294
URL:
http://svn.reactos.org/svn/reactos?rev=59294&view=rev
Log:
[VERSION]
Replace binary tool in repository by a Windows one to get current date. (supported since
Windows XP/2003)
Removed:
trunk/reactos/tools/getdate.c
trunk/reactos/tools/getdate.cmd
trunk/reactos/tools/getdate.exe
Modified:
trunk/reactos/include/reactos/version.cmake
Modified: trunk/reactos/include/reactos/version.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/version.cm…
==============================================================================
--- trunk/reactos/include/reactos/version.cmake [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/version.cmake [iso-8859-1] Sat Jun 22 22:33:49 2013
@@ -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})
Removed: trunk/reactos/tools/getdate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/getdate.c?rev=59293&…
==============================================================================
--- trunk/reactos/tools/getdate.c [iso-8859-1] (original)
+++ trunk/reactos/tools/getdate.c (removed)
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <time.h>
-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);
-}
Removed: trunk/reactos/tools/getdate.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/getdate.cmd?rev=5929…
==============================================================================
--- trunk/reactos/tools/getdate.cmd [iso-8859-1] (original)
+++ trunk/reactos/tools/getdate.cmd (removed)
@@ -1 +0,0 @@
-gcc getdate.c -o getdate.exe -s
Removed: trunk/reactos/tools/getdate.exe
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/getdate.exe?rev=5929…
==============================================================================
Binary file - no diff available.