feat: show client structs hash in Game submenu

This commit is contained in:
goaaats 2021-12-05 02:08:43 +01:00
parent 9588e12619
commit 6a977fb59e
No known key found for this signature in database
GPG key ID: F18F057873895461
4 changed files with 33 additions and 3 deletions

View file

@ -105,16 +105,22 @@
<PropertyGroup>
<!-- temp file for the git version (lives in "obj" folder)-->
<VerFile>$(IntermediateOutputPath)gitver</VerFile>
<VerFileClientStructs>$(IntermediateOutputPath)csver</VerFileClientStructs>
</PropertyGroup>
<!-- write the hash to the temp file.-->
<Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))&quot; describe --long --always --dirty &gt; $(VerFile)" />
<Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))\..\lib\FFXIVClientStructs&quot; describe --long --always --dirty &gt; $(VerFileClientStructs)" />
<!-- read the version into the GitVersion itemGroup-->
<ReadLinesFromFile File="$(VerFile)">
<Output TaskParameter="Lines" ItemName="GitVersion" />
</ReadLinesFromFile>
<ReadLinesFromFile File="$(VerFileClientStructs)">
<Output TaskParameter="Lines" ItemName="GitVersionClientStructs" />
</ReadLinesFromFile>
<!-- Set the BuildHash property to contain the GitVersion, if it wasn't already set.-->
<PropertyGroup>
<BuildHash>@(GitVersion)</BuildHash>
<BuildHashClientStructs>@(GitVersionClientStructs)</BuildHashClientStructs>
</PropertyGroup>
</Target>
<Target Name="WriteGitHash" BeforeTargets="CoreCompile">
@ -132,6 +138,10 @@
<_Parameter1>GitHash</_Parameter1>
<_Parameter2>$(BuildHash)</_Parameter2>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyMetadata">
<_Parameter1>GitHashClientStructs</_Parameter1>
<_Parameter2>$(BuildHashClientStructs)</_Parameter2>
</AssemblyAttributes>
</ItemGroup>
<!-- writes the attribute to the customAssemblyInfo file -->
<WriteCodeFragment Language="C#" OutputFile="$(CustomAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />