aboutsummaryrefslogtreecommitdiff
path: root/build.bat
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-12-03 12:42:13 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-12-03 12:42:13 +0100
commitef5546aea521d806dcdb5a6f3fd15481ae8e9a6e (patch)
tree17e62774f732c7f33559609c0e11cce5d24fc8cd /build.bat
parentb94247988658f875bfaed6717b3f888d75d5e660 (diff)
Add misc\get-date.c
Prints the current date as YYYYMMDD without relying on PowerShell. Hopefully fixes #4540
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat7
1 files changed, 5 insertions, 2 deletions
diff --git a/build.bat b/build.bat
index 55c71ca9f..0d6d281b3 100644
--- a/build.bat
+++ b/build.bat
@@ -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_year=%CURR_DATE_TIME:~0,4%
@@ -58,7 +62,6 @@ set V4=0
set odin_version_full="%V1%.%V2%.%V3%.%V4%"
set odin_version_raw="dev-%V1%-%V2%"
-
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 See https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170