mirror of
https://github.com/StudentBlake/XCI-Explorer
synced 2024-11-10 06:34:15 +00:00
Merge pull request #24 from garoxas/master
NSP update version based on .cnmt.xml
This commit is contained in:
commit
ed60192436
1 changed files with 8 additions and 1 deletions
|
@ -295,6 +295,7 @@ namespace XCI_Explorer {
|
|||
try {
|
||||
FileStream fileStream = File.OpenRead(TB_File.Text);
|
||||
string ncaTarget = "";
|
||||
string xmlVersion = "";
|
||||
|
||||
List<char> chars = new List<char>();
|
||||
byte[] array = new byte[16];
|
||||
|
@ -336,6 +337,8 @@ namespace XCI_Explorer {
|
|||
XDocument xml = XDocument.Parse(Encoding.UTF8.GetString(array4));
|
||||
TB_TID.Text = xml.Element("ContentMeta").Element("Id").Value.Remove(1, 2).ToUpper();
|
||||
contentType = xml.Element("ContentMeta").Element("Type").Value;
|
||||
if (contentType == "Patch")
|
||||
xmlVersion = " (v" + xml.Element("ContentMeta").Element("Version").Value + ")";
|
||||
|
||||
/*string titleIDBaseGame = TB_TID.Text;
|
||||
if (contentType != "Application") {
|
||||
|
@ -439,7 +442,7 @@ namespace XCI_Explorer {
|
|||
}
|
||||
}
|
||||
}
|
||||
TB_GameRev.Text = NACP.NACP_Datas[0].GameVer.Replace("\0", ""); ;
|
||||
TB_GameRev.Text = NACP.NACP_Datas[0].GameVer.Replace("\0", "") + xmlVersion; ;
|
||||
TB_ProdCode.Text = NACP.NACP_Datas[0].GameProd.Replace("\0", ""); ;
|
||||
if (TB_ProdCode.Text == "") {
|
||||
TB_ProdCode.Text = "No Prod. ID";
|
||||
|
@ -463,6 +466,10 @@ namespace XCI_Explorer {
|
|||
/*if (contentType == "Patch") {
|
||||
}*/
|
||||
}
|
||||
else {
|
||||
TB_GameRev.Text = "";
|
||||
TB_ProdCode.Text = "No Prod. ID";
|
||||
}
|
||||
|
||||
// Lets get SDK Version, Distribution Type and Masterkey revision
|
||||
// This is far from the best aproach, but it's what we have for now
|
||||
|
|
Loading…
Reference in a new issue