mirror of
https://github.com/WiiDatabase/nusdownloader.git
synced 2024-12-24 17:41:51 +01:00
Fixed IOS patching
Unchecking all IOS patches now also unchecks main IOS patch checkbox Increased size of header, in hope that the date won't be cut off... Changed TODO list stuff VERIFIED UNDER: Windows TO VERIFY: Linux (not sure if outputting WADs correctly, should be checked) Mac OS X (not such a priority, as mono can be quite hard to set up on OS X)
This commit is contained in:
parent
c27c71899c
commit
5ba688d4c3
@ -1,4 +1,11 @@
|
||||
using System;
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: Database.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
9
NUS Downloader/Form1.Designer.cs
generated
9
NUS Downloader/Form1.Designer.cs
generated
@ -1,4 +1,11 @@
|
||||
namespace NUS_Downloader
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: Form1.Designer.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
namespace NUS_Downloader
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
///////////////////////////////////////
|
||||
// NUS Downloader: Form1.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: Form1.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
// Copyright (C) 2010
|
||||
@ -515,9 +515,13 @@ namespace NUS_Downloader
|
||||
}
|
||||
|
||||
if (iosPatchCheckbox.Checked == true) { // Apply patches then...
|
||||
bool didpatch = false;
|
||||
int noofpatches = 0;
|
||||
string appendpatch = "";
|
||||
// Okay, it's checked.
|
||||
libWiiSharp.IosPatcher iosp = new libWiiSharp.IosPatcher();
|
||||
libWiiSharp.WAD ioswad = new libWiiSharp.WAD();
|
||||
wadName = wadName.Replace("[v]", nusClient.TitleVersion.ToString());
|
||||
if (wadName.Contains(Path.DirectorySeparatorChar.ToString()) || wadName.Contains(Path.AltDirectorySeparatorChar.ToString()))
|
||||
ioswad.LoadFile(wadName);
|
||||
else
|
||||
@ -537,20 +541,47 @@ namespace NUS_Downloader
|
||||
if (iosPatchesListBox.GetItemCheckState(iosPatchesListBox.Items.IndexOf(checkItem)).ToString() == "Checked") {
|
||||
switch (checkItem.ToString()) {
|
||||
case "Trucha bug":
|
||||
if (iosp.PatchFakeSigning() > 0)
|
||||
WriteStatus(" - Patched in fake-signing");
|
||||
noofpatches = iosp.PatchFakeSigning();
|
||||
if (noofpatches > 0)
|
||||
{
|
||||
WriteStatus(" - Patched in fake-signing:");
|
||||
if (noofpatches > 1)
|
||||
appendpatch = "es";
|
||||
else
|
||||
appendpatch = "";
|
||||
WriteStatus(String.Format(" {0} patch{1} applied.", noofpatches, appendpatch));
|
||||
didpatch = true;
|
||||
}
|
||||
else
|
||||
WriteStatus(" - Could not patch fake-signing");
|
||||
break;
|
||||
case "ES_Identify":
|
||||
if (iosp.PatchEsIdentify() > 0)
|
||||
noofpatches = iosp.PatchEsIdentify();
|
||||
if (noofpatches > 0)
|
||||
{
|
||||
WriteStatus(" - Patched in ES_Identify");
|
||||
if (noofpatches > 1)
|
||||
appendpatch = "es";
|
||||
else
|
||||
appendpatch = "";
|
||||
WriteStatus(String.Format(" {0} patch{1} applied.", noofpatches, appendpatch));
|
||||
didpatch = true;
|
||||
}
|
||||
else
|
||||
WriteStatus(" - Could not patch ES_Identify");
|
||||
break;
|
||||
case "NAND permissions":
|
||||
if (iosp.PatchNandPermissions() > 0)
|
||||
noofpatches = iosp.PatchNandPermissions();
|
||||
if (noofpatches > 0)
|
||||
{
|
||||
WriteStatus(" - Patched in NAND permissions");
|
||||
if (noofpatches > 1)
|
||||
appendpatch = "es";
|
||||
else
|
||||
appendpatch = "";
|
||||
WriteStatus(String.Format(" {0} patch{1} applied.", noofpatches, appendpatch));
|
||||
didpatch = true;
|
||||
}
|
||||
else
|
||||
WriteStatus(" - Could not patch NAND permissions");
|
||||
break;
|
||||
@ -560,6 +591,22 @@ namespace NUS_Downloader
|
||||
// WriteStatus(iosPatchesListBox.GetItemCheckState(iosPatchesListBox.Items.IndexOf(checkItem)).ToString());
|
||||
}
|
||||
}
|
||||
if (didpatch)
|
||||
{
|
||||
wadName = wadName.Replace(".wad",".patched.wad");
|
||||
try
|
||||
{
|
||||
if (wadName.Contains(Path.DirectorySeparatorChar.ToString()) || wadName.Contains(Path.AltDirectorySeparatorChar.ToString()))
|
||||
ioswad.Save(wadName);
|
||||
else
|
||||
ioswad.Save(Path.Combine(Path.Combine(Path.Combine(Path.Combine(CURRENT_DIR, "titles"), titleidbox.Text), nusClient.TitleVersion.ToString()), wadName));
|
||||
WriteStatus(String.Format("Patched WAD saved as: {0}", Path.GetFileName(wadName)));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WriteStatus(String.Format("Couldn't save patched WAD: \"{0}\" :(",ex.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WriteStatus("NUS Download Finished.");
|
||||
@ -2247,6 +2294,9 @@ namespace NUS_Downloader
|
||||
{
|
||||
SetAllEnabled(true);
|
||||
iosPatchGroupBox.Visible = false;
|
||||
if (iosPatchesListBox.CheckedIndices.Count == 0)
|
||||
// Uncheck the checkbox to indicate no patches
|
||||
iosPatchCheckbox.Checked = false;
|
||||
//packbox.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
@ -431,6 +431,7 @@ namespace libWiiSharp
|
||||
|
||||
fireDebug(" Creating WAD...");
|
||||
WAD wad = WAD.Create(cert, tik, tmd, contents);
|
||||
wadName = wadName.Replace("[v]", this.TitleVersion.ToString());
|
||||
if (wadName.Contains(Path.DirectorySeparatorChar.ToString()) || wadName.Contains(Path.AltDirectorySeparatorChar.ToString()))
|
||||
wad.Save(wadName);
|
||||
else
|
||||
|
@ -1,9 +1,9 @@
|
||||
///////////////////////////////////////
|
||||
// NUS Downloader: Program.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: Program.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
|
||||
using System;
|
||||
|
@ -1,15 +1,14 @@
|
||||
///////////////////////////////////////
|
||||
// NUS Downlodaer: TODO //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: TODO //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
Make more compatible with mono for Linux.
|
||||
Broken stuff:
|
||||
- Downloading anything
|
||||
- Bottom part of dialog cut off
|
||||
Working stuff:
|
||||
- Downloading anything
|
||||
- Displaying Form1
|
||||
- Loading database
|
||||
- Generating update scripts
|
||||
|
@ -1,9 +1,9 @@
|
||||
///////////////////////////////////////
|
||||
// NUS Downloader: WADPacker.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////
|
||||
///////////////////////////////////////////
|
||||
// NUS Downloader: WADPacker.cs //
|
||||
// $Rev:: $ //
|
||||
// $Author:: $ //
|
||||
// $Date:: $ //
|
||||
///////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
// Copyright (C) 2010
|
||||
|
Loading…
Reference in New Issue
Block a user