mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
trim version digits, release=YYYY.MM.0.0 else YYYY.MM.DD.0
This commit is contained in:
@@ -45,7 +45,19 @@ if "%2" == "1" (
|
|||||||
set nightly=0
|
set nightly=0
|
||||||
)
|
)
|
||||||
|
|
||||||
set odin_version_raw="dev-%curr_year%-%curr_month%"
|
if %release_mode% equ 0 (
|
||||||
|
set V1=%curr_year%
|
||||||
|
set V2=%curr_month%
|
||||||
|
set V3=%curr_day%
|
||||||
|
) else (
|
||||||
|
set V1=%curr_year%
|
||||||
|
set V2=%curr_month%
|
||||||
|
set V3=0
|
||||||
|
)
|
||||||
|
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
|
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
|
||||||
@@ -54,9 +66,9 @@ set compiler_flags= %compiler_flags% /utf-8
|
|||||||
set compiler_defines= -DODIN_VERSION_RAW=\"%odin_version_raw%\"
|
set compiler_defines= -DODIN_VERSION_RAW=\"%odin_version_raw%\"
|
||||||
|
|
||||||
rem fileversion is defined as {Major,Minor,Build,Private: u16} so a bit limited
|
rem fileversion is defined as {Major,Minor,Build,Private: u16} so a bit limited
|
||||||
set rc_flags=-nologo -v ^
|
set rc_flags=-nologo ^
|
||||||
-DV1=%curr_year% -DV2=%curr_month% -DV3=%curr_day% -DV4=%nightly% ^
|
-DV1=%V1% -DV2=%V2% -DV3=%V3% -DV4=%V4% ^
|
||||||
-DVF=%curr_year%.%curr_month%.%curr_day%.%nightly%
|
-DVF=%odin_version_full%
|
||||||
|
|
||||||
if not exist .git\ goto skip_git_hash
|
if not exist .git\ goto skip_git_hash
|
||||||
for /f "tokens=1,2" %%i IN ('git show "--pretty=%%cd %%h" "--date=format:%%Y-%%m" --no-patch --no-notes HEAD') do (
|
for /f "tokens=1,2" %%i IN ('git show "--pretty=%%cd %%h" "--date=format:%%Y-%%m" --no-patch --no-notes HEAD') do (
|
||||||
@@ -122,7 +134,7 @@ del *.ilk > NUL 2> NUL
|
|||||||
|
|
||||||
rc %rc_flags% %odin_rc%
|
rc %rc_flags% %odin_rc%
|
||||||
cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name%
|
cl %compiler_settings% "src\main.cpp" "src\libtommath.cpp" /link %linker_settings% -OUT:%exe_name%
|
||||||
mt -nologo -inputresource:%exe_name%;#1 -manifest misc\odin.manifest -outputresource:%exe_name%;#1 -validate_manifest -identity:"odin, processorArchitecture=amd64, version=%curr_year%.%curr_month%.%curr_day%.%nightly%, type=win32"
|
mt -nologo -inputresource:%exe_name%;#1 -manifest misc\odin.manifest -outputresource:%exe_name%;#1 -validate_manifest -identity:"odin, processorArchitecture=amd64, version=%odin_version_full%, type=win32"
|
||||||
if %errorlevel% neq 0 goto end_of_build
|
if %errorlevel% neq 0 goto end_of_build
|
||||||
|
|
||||||
call build_vendor.bat
|
call build_vendor.bat
|
||||||
|
|||||||
Reference in New Issue
Block a user