mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added Readme to output
This commit is contained in:
parent
ec6e40e8bc
commit
ed3b46e99b
@ -33,7 +33,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
|
|
||||||
public string MO2Profile;
|
public string MO2Profile;
|
||||||
public string ModListName, ModListAuthor, ModListDescription, ModListWebsite, ModListImage;
|
public string ModListName, ModListAuthor, ModListDescription, ModListWebsite, ModListImage, ModListReadme;
|
||||||
|
|
||||||
public Compiler(string mo2_folder)
|
public Compiler(string mo2_folder)
|
||||||
{
|
{
|
||||||
@ -280,6 +280,7 @@ namespace Wabbajack
|
|||||||
Name = ModListName ?? MO2Profile,
|
Name = ModListName ?? MO2Profile,
|
||||||
Author = ModListAuthor ?? "",
|
Author = ModListAuthor ?? "",
|
||||||
Description = ModListDescription ?? "",
|
Description = ModListDescription ?? "",
|
||||||
|
Readme = ModListReadme ?? "",
|
||||||
Image = ModListImage ?? "",
|
Image = ModListImage ?? "",
|
||||||
Website = ModListWebsite ?? ""
|
Website = ModListWebsite ?? ""
|
||||||
};
|
};
|
||||||
@ -675,12 +676,26 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
return source =>
|
return source =>
|
||||||
{
|
{
|
||||||
if (source.AbsolutePath != ModListImage) return null;
|
var files = new HashSet<string>
|
||||||
if (!File.Exists(ModListImage)) return null;
|
{
|
||||||
|
ModListImage, ModListReadme
|
||||||
|
};
|
||||||
|
if (!files.Any(f => source.AbsolutePath.Equals(f))) return null;
|
||||||
|
if (!File.Exists(source.AbsolutePath)) return null;
|
||||||
|
var isBanner = source.AbsolutePath == ModListImage;
|
||||||
|
//var isReadme = source.AbsolutePath == ModListReadme;
|
||||||
var result = source.EvolveTo<PropertyFile>();
|
var result = source.EvolveTo<PropertyFile>();
|
||||||
result.Type = PropertyType.Banner;
|
result.SourceDataID = IncludeFile(File.ReadAllBytes(source.AbsolutePath));
|
||||||
result.SourceDataID = IncludeFile(File.ReadAllBytes(ModListImage));
|
if (isBanner)
|
||||||
ModListImage = result.SourceDataID;
|
{
|
||||||
|
result.Type = PropertyType.Banner;
|
||||||
|
ModListImage = result.SourceDataID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Type = PropertyType.Readme;
|
||||||
|
ModListReadme = result.SourceDataID;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ namespace Wabbajack
|
|||||||
public string Description;
|
public string Description;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Image of the ModList
|
/// Hash of the banner-image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Image;
|
public string Image;
|
||||||
|
|
||||||
@ -74,6 +74,11 @@ namespace Wabbajack
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Website;
|
public string Website;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hash of the readme
|
||||||
|
/// </summary>
|
||||||
|
public string Readme;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Content Report in HTML form
|
/// Content Report in HTML form
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -111,7 +116,7 @@ namespace Wabbajack
|
|||||||
public string SourceDataID;
|
public string SourceDataID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PropertyType { Banner }
|
public enum PropertyType { Banner, Readme }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// File meant to be extracted before the installation
|
/// File meant to be extracted before the installation
|
||||||
|
Loading…
Reference in New Issue
Block a user