diff --git a/src/MeoAssistant/MeoAssistant.vcxproj b/src/MeoAssistant/MeoAssistant.vcxproj index 1bf1ec98b3..57301506fc 100644 --- a/src/MeoAssistant/MeoAssistant.vcxproj +++ b/src/MeoAssistant/MeoAssistant.vcxproj @@ -248,7 +248,7 @@ stdc11 MultiThreaded MaxSpeed - /utf-8 /MP %(AdditionalOptions) + /utf-8 /MP $(ExternalCompilerOptions) %(AdditionalOptions) true diff --git a/src/MeoAssistant/Version.h b/src/MeoAssistant/Version.h index de415f9699..c24e3b7c70 100644 --- a/src/MeoAssistant/Version.h +++ b/src/MeoAssistant/Version.h @@ -2,5 +2,10 @@ namespace asst { - constexpr static const char* Version = "DEBUG VERSION"; + constexpr static const char* Version = +#ifdef MAA_VERSION + MAA_VERSION; +#else + "DEBUG VERSION"; +#endif } diff --git a/tools/build_release.bat b/tools/build_release.bat index e00d15e635..ebafb944ae 100644 --- a/tools/build_release.bat +++ b/tools/build_release.bat @@ -1,4 +1,4 @@ -sh ./update_version.sh +for /f "delims=" %%i in ('sh ./version.sh') do set ExternalCompilerOptions=/DMAA_VERSION=\"%%i\" MSBuild.exe ..\MeoAssistantArknights.sln /p:Configuration=Release /p:Platform=x64 /t:Rebuild call .\update_resource_rel.bat pause diff --git a/tools/version.sh b/tools/version.sh index f85663a5f9..d3610e1d10 100644 --- a/tools/version.sh +++ b/tools/version.sh @@ -9,4 +9,4 @@ else Version="c""$LatestCommitId" fi -echo "Version: $Version" +echo "$Version"