mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
perf.以一种更加优雅的方式生成版本号
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/utf-8 /MP $(ExternalCompilerOptions) %(AdditionalOptions)</AdditionalOptions>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,4 +9,4 @@ else
|
||||
Version="c""$LatestCommitId"
|
||||
fi
|
||||
|
||||
echo "Version: $Version"
|
||||
echo "$Version"
|
||||
|
||||
Reference in New Issue
Block a user