mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
@@ -19,7 +19,11 @@ if "%VSCMD_ARG_TGT_ARCH%" neq "x64" (
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
for /f %%i in ('powershell get-date -format "{yyyyMMdd}"') do (
|
pushd misc
|
||||||
|
cl get-date.c
|
||||||
|
popd
|
||||||
|
|
||||||
|
for /f %%i in ('misc\get-date') do (
|
||||||
set CURR_DATE_TIME=%%i
|
set CURR_DATE_TIME=%%i
|
||||||
)
|
)
|
||||||
set curr_year=%CURR_DATE_TIME:~0,4%
|
set curr_year=%CURR_DATE_TIME:~0,4%
|
||||||
@@ -58,7 +62,6 @@ set V4=0
|
|||||||
set odin_version_full="%V1%.%V2%.%V3%.%V4%"
|
set odin_version_full="%V1%.%V2%.%V3%.%V4%"
|
||||||
set odin_version_raw="dev-%V1%-%V2%"
|
set odin_version_raw="dev-%V1%-%V2%"
|
||||||
|
|
||||||
|
|
||||||
set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -EHsc- -GR- -GF
|
set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -EHsc- -GR- -GF
|
||||||
rem Parse source code as utf-8 even on shift-jis and other codepages
|
rem Parse source code as utf-8 even on shift-jis and other codepages
|
||||||
rem See https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
|
rem See https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
Prints the current date as YYYYMMDD
|
||||||
|
|
||||||
|
e.g. 2024-12-25
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int main(int arg_count, char const **arg_ptr) {
|
||||||
|
time_t t = time(NULL);
|
||||||
|
struct tm* now = localtime(&t);
|
||||||
|
printf("%04d%02d%02d", now->tm_year + 1900, now->tm_mon + 1, now->tm_mday);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user