Include Wabbajack fileversion in output

This commit is contained in:
erri120 2019-10-23 18:33:53 +02:00
parent 50e9c1a07f
commit 112bf5687f
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
3 changed files with 7 additions and 2 deletions

View File

@ -34,6 +34,7 @@ namespace Wabbajack.Lib
public string MO2Profile;
public string ModListName, ModListAuthor, ModListDescription, ModListWebsite, ModListImage, ModListReadme;
public FileVersionInfo WabbajackVersionInfo;
public Compiler(string mo2_folder)
{
@ -275,7 +276,7 @@ namespace Wabbajack.Lib
ModList = new ModList
{
GameType = GameRegistry.Games.Values.First(f => f.MO2Name == MO2Ini.General.gameName).Game,
WabbajackVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location),
WabbajackVersion = WabbajackVersionInfo,
Archives = SelectedArchives,
Directives = InstallDirectives,
Name = ModListName ?? MO2Profile,

View File

@ -47,6 +47,7 @@ namespace Wabbajack.Lib
public void Build(Compiler c, ModList lst)
{
Text($"### {lst.Name} by {lst.Author} - Installation Summary");
Text($"Build with Wabbajack Version {lst.WabbajackVersion.FileVersion}");
Text(lst.Description);
Text($"#### Website:");
NoWrapText($"[{lst.Website}]({lst.Website})");

View File

@ -34,6 +34,8 @@ namespace Wabbajack
{
public SlideShow Slideshow { get; }
public readonly FileVersionInfo WabbajackVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
private string _mo2Folder;
public readonly BitmapImage _noneImage = UIUtils.BitmapImageFromResource("Wabbajack.UI.none.jpg");
@ -350,7 +352,8 @@ namespace Wabbajack
ModListDescription = ChangedProperties ? this.Slideshow.Summary : null,
ModListImage = ChangedProperties ? newImagePath : null,
ModListWebsite = ChangedProperties ? this.Slideshow.NexusSiteURL : null,
ModListReadme = ChangedProperties ? readmePath : null
ModListReadme = ChangedProperties ? readmePath : null,
WabbajackVersionInfo = WabbajackVersionInfo
};
var th = new Thread(() =>
{