Skip to content

Commit

Permalink
~ Fix build date bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nikich340 committed May 27, 2022
1 parent 8a9c6a7 commit 74840e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WolvenKit/Forms/MVVM/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@ public override bool Equals(object obj)

private void UpdateTitle()
{
wkitVersionToolStripLabel.Text = $"v{Version}: {Assembly.GetExecutingAssembly().GetLinkerTime().ToString("yyyy MMMM dd")}";
var compileTime = new DateTime(Builtin.CompileTime, DateTimeKind.Utc);
wkitVersionToolStripLabel.Text = $"v{Version}: {compileTime.ToString("yyyy MMMM dd")}";

modNameToolStripLabel.Text = ActiveMod != null ? ActiveMod.Name : "No Mod Loaded!";

Expand Down
6 changes: 6 additions & 0 deletions WolvenKit/WolvenKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
<MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
</ItemGroup>
</Target>
<Target Name="Date" BeforeTargets="BeforeBuild">
<WriteLinesToFile File="$(IntermediateOutputPath)gen.cs" Lines="static partial class Builtin { public static long CompileTime = $([System.DateTime]::UtcNow.Ticks) %3B }" Overwrite="true" />
<ItemGroup>
<Compile Include="$(IntermediateOutputPath)gen.cs" />
</ItemGroup>
</Target>
<ItemGroup>
<PackageReference Include="AutoCompleteMenu-ScintillaNET" Version="1.6.2" />
<PackageReference Include="Autoupdater.NET.Official" Version="1.6.4" />
Expand Down

0 comments on commit 74840e0

Please sign in to comment.