mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-10 05:34:13 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
7a476575d6
4 changed files with 344 additions and 89 deletions
|
@ -217,7 +217,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
neededspace = 35000000000;
|
||||
neededspace = 15000000000;
|
||||
}
|
||||
if (freeSpaceInBytes < neededspace)
|
||||
{
|
||||
|
@ -274,6 +274,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}catch(Exception e)
|
||||
{
|
||||
mvm.Progress = 100;
|
||||
|
||||
code = null;
|
||||
if(e.Message == "Failed this shit")
|
||||
{
|
||||
|
@ -285,10 +286,9 @@ namespace UWUVCI_AIO_WPF
|
|||
MessageBox.Show("Injection Failed because there are base files missing. \nPlease redownload the base, or redump if you used a custom base! ", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
}
|
||||
else if (e.Message.Contains("Images"))
|
||||
{
|
||||
var extraInfo = "TgaIco: " + Path.GetFileName(Configuration.TGAIco.ImgPath) + "\nTgaTv: " + Path.GetFileName(Configuration.TGATv.ImgPath) + "\nTgaDrc:" + Path.GetFileName(Configuration.TGADrc.ImgPath);
|
||||
MessageBox.Show("Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit\n\nExtra Info:\n" + extraInfo, "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
else if (e.Message.Contains("Images")){
|
||||
|
||||
MessageBox.Show("Injection Failed due to wrong BitDepth, please check if your Files are in a different bitdepth than 32bit or 24bit", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
else if (e.Message.Contains("Size"))
|
||||
{
|
||||
|
@ -309,7 +309,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else if (e.Message.Contains("12G"))
|
||||
{
|
||||
MessageBox.Show($" Please make sure to have atleast {FormatBytes(35000000000)} of storage left on the drive where you stored the Injector.", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show($" Please make sure to have atleast {FormatBytes(15000000000)} of storage left on the drive where you stored the Injector.", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}else if (e.Message.Contains("nkit"))
|
||||
{
|
||||
MessageBox.Show($"There is an issue with your NKIT.\nPlease try the original ISO, or redump your game and try again with that dump.", "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
@ -317,17 +317,7 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
else
|
||||
{
|
||||
var romName = Path.GetFileName(mvm.RomPath);
|
||||
var errorMessage = "Rom Name: " + romName;
|
||||
|
||||
if (romName.Contains("nkit") && Configuration.Console == GameConsoles.GCN)
|
||||
errorMessage += "\n\nLooks like you're using a compressed game, try either redumping or using the iso version instead.";
|
||||
else if (!romName.Contains("iso") && (Configuration.Console == GameConsoles.WII || Configuration.Console == GameConsoles.GCN))
|
||||
errorMessage += "\n\nLooks like you're using a compressed game, try either redumping or using the iso version instead.";
|
||||
else
|
||||
errorMessage += "\n\nIf you're using a compressed or trimmed version, try it with the uncompressed or untrimmed version instead.";
|
||||
|
||||
MessageBox.Show("Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord\n\nError Message:\n" + e.Message + "\n\nExtra Info:\n" + errorMessage, "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
MessageBox.Show("Injection Failed due to unknown circumstances, please contact us on the UWUVCI discord\n\nError Message:\n" + e.Message, "Injection Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
|
||||
}
|
||||
Clean();
|
||||
|
@ -2379,29 +2369,44 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
|
||||
string RomName = string.Empty;
|
||||
mvvm.msg = "Getting BaseRom Name...";
|
||||
var zipLocation = Path.Combine(baseRomPath, "content", "0010", "rom.zip");
|
||||
using (var zip = ZipFile.Open(zipLocation, ZipArchiveMode.Read))
|
||||
foreach (var file in zip.Entries)
|
||||
if (file.Name.Contains("WUP"))
|
||||
{
|
||||
RomName = file.Name;
|
||||
break;
|
||||
}
|
||||
mvvm.Progress = 15;
|
||||
var romPath = Directory.GetCurrentDirectory() + "\\" + RomName;
|
||||
|
||||
mvvm.msg = "Removing BaseRom...";
|
||||
File.Delete(romPath);
|
||||
File.Delete(zipLocation);
|
||||
File.Copy(injectRomPath, romPath);
|
||||
|
||||
using (var stream = new FileStream(zipLocation, FileMode.Create))
|
||||
using (var archive = new ZipArchive(stream, ZipArchiveMode.Create))
|
||||
archive.CreateEntryFromFile(romPath, Path.GetFileNameWithoutExtension(romPath));
|
||||
|
||||
mvvm.Progress = 80;
|
||||
using (Process getRomName = new Process())
|
||||
{
|
||||
mvvm.msg = "Getting BaseRom Name...";
|
||||
getRomName.StartInfo.UseShellExecute = false;
|
||||
getRomName.StartInfo.CreateNoWindow = false;
|
||||
getRomName.StartInfo.RedirectStandardOutput = true;
|
||||
getRomName.StartInfo.FileName = "cmd.exe";
|
||||
Console.WriteLine(Directory.GetCurrentDirectory());
|
||||
//getRomName.StartInfo.Arguments = $"/c \"Tools\\7za.exe\" l \"temp\\baserom\\content\\0010\\rom.zip\" | findstr \"WUP\"";
|
||||
getRomName.StartInfo.Arguments = "/c bin\\Tools\\7za.exe l bin\\temp\\baserom\\content\\0010\\rom.zip | findstr WUP";
|
||||
getRomName.Start();
|
||||
getRomName.WaitForExit();
|
||||
var s = getRomName.StandardOutput.ReadToEnd();
|
||||
var split = s.Split(' ');
|
||||
RomName = split[split.Length - 1].Replace("\r\n", "");
|
||||
mvvm.Progress = 15;
|
||||
}
|
||||
using (Process RomEdit = new Process())
|
||||
{
|
||||
mvvm.msg = "Removing BaseRom...";
|
||||
RomEdit.StartInfo.UseShellExecute = false;
|
||||
RomEdit.StartInfo.CreateNoWindow = true;
|
||||
RomEdit.StartInfo.RedirectStandardOutput = true;
|
||||
RomEdit.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
|
||||
//d Path.Combine(baseRomPath, "content", "0010", "rom.zip")
|
||||
RomEdit.StartInfo.Arguments = $"d bin\\temp\\baserom\\content\\0010\\rom.zip";
|
||||
RomEdit.Start();
|
||||
RomEdit.WaitForExit();
|
||||
mvvm.Progress = 40;
|
||||
mvvm.msg = "Injecting ROM...";
|
||||
File.Copy(injectRomPath, $"{RomName}");
|
||||
RomEdit.StartInfo.Arguments = $"u bin\\temp\\baserom\\content\\0010\\rom.zip {RomName}";
|
||||
RomEdit.Start();
|
||||
RomEdit.WaitForExit();
|
||||
mvvm.Progress = 80;
|
||||
}
|
||||
File.Delete(RomName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2710,8 +2710,10 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void getBootIMGGBA(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "gba/";
|
||||
IMG_Message img = null;
|
||||
using (var fs = new FileStream(rom,
|
||||
FileMode.Open,
|
||||
FileAccess.Read))
|
||||
|
@ -2735,6 +2737,56 @@ namespace UWUVCI_AIO_WPF
|
|||
repoids.Add(SystemType + repoid.Substring(0, 3) + "E");
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "P");
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
|
||||
foreach (var e in ext)
|
||||
{
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog();
|
||||
break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "E";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog();
|
||||
break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "P";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}g", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog();
|
||||
break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "J";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GetRepoImages(SystemType, repoid);
|
||||
checkForAdditionalFiles(GameConsoles.GBA, repoids);
|
||||
|
@ -2754,18 +2806,35 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
GetRepoImages(SystemType, repoid);
|
||||
checkForAdditionalFiles(GameConsoles.SNES, repoids);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void getBootIMGMSX(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "msx/";
|
||||
var repoid = GetFakeMSXTGProdcode(rom, true);
|
||||
List<string> repoids = new List<string>
|
||||
IMG_Message img = null;
|
||||
repoid = GetFakeMSXTGProdcode(rom, true);
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
List<string> repoids = new List<string>();
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
SystemType + repoid
|
||||
};
|
||||
repoids.Add(SystemType + repoid);
|
||||
foreach (var e in ext)
|
||||
{
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
}
|
||||
checkForAdditionalFiles(GameConsoles.MSX, repoids);
|
||||
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
|
@ -2776,9 +2845,14 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void getBootIMGTG(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "tg16/";
|
||||
var repoid = GetFakeMSXTGProdcode(rom, false);
|
||||
List<string> repoids = new List<string>
|
||||
IMG_Message img = null;
|
||||
repoid = GetFakeMSXTGProdcode(rom, false);
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
List<string> repoids = new List<string>();
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
SystemType + repoid
|
||||
};
|
||||
|
@ -2786,7 +2860,6 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
GetRepoImages(SystemType, repoid);
|
||||
checkForAdditionalFiles(GameConsoles.TG16, repoids);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2911,12 +2984,30 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void getBootIMGNES(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "nes/";
|
||||
var repoid = GetFakeNESProdcode(rom);
|
||||
List<string> repoids = new List<string>
|
||||
IMG_Message img = null;
|
||||
repoid = GetFakeNESProdcode(rom);
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
List<string> repoids = new List<string>();
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
SystemType + repoid
|
||||
};
|
||||
repoids.Add(SystemType + repoid);
|
||||
foreach (var e in ext)
|
||||
{
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
}
|
||||
checkForAdditionalFiles(GameConsoles.NES, repoids);
|
||||
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
|
@ -3041,8 +3132,10 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
public void getBootIMGNDS(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "nds/";
|
||||
IMG_Message img = null;
|
||||
using (var fs = new FileStream(rom,
|
||||
FileMode.Open,
|
||||
FileAccess.Read))
|
||||
|
@ -3059,6 +3152,7 @@ namespace UWUVCI_AIO_WPF
|
|||
fs.Close();
|
||||
Console.WriteLine("prodcode after scramble: " + repoid);
|
||||
}
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
List<string> repoids = new List<string>();
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
|
@ -3068,14 +3162,15 @@ namespace UWUVCI_AIO_WPF
|
|||
repoids.Add(SystemType + repoid.Substring(0, 3) + "J");
|
||||
GetRepoImages(SystemType, repoid);
|
||||
checkForAdditionalFiles(GameConsoles.NDS, repoids);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void getBootIMGN64(string rom)
|
||||
{
|
||||
string linkbase = "https://raw.githubusercontent.com/Flumpster/UWUVCI-Images/master/";
|
||||
string repoid = "";
|
||||
string SystemType = "n64/";
|
||||
IMG_Message img = null;
|
||||
List<string> repoids = new List<string>();
|
||||
using (var fs = new FileStream(rom,
|
||||
FileMode.Open,
|
||||
|
@ -3096,7 +3191,109 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
repoids.Add(SystemType + repoid);
|
||||
repoids.Add(SystemType + new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] }));
|
||||
|
||||
foreach (var e in ext)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.png") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "E";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "P";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "J";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else
|
||||
{
|
||||
repoid = new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] });
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + $"/iconTex.png") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "E";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + $"/iconTex.png") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "P";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.png", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + "/iconTex.png") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "J";
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
found = true;
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
Console.WriteLine(found);
|
||||
}
|
||||
|
||||
}
|
||||
GetRepoImages(SystemType, repoid);
|
||||
checkForAdditionalFiles(GameConsoles.N64, repoids);
|
||||
}
|
||||
|
@ -3122,10 +3319,11 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
SystemType = "gcn/";
|
||||
}
|
||||
var repoid = "";
|
||||
IMG_Message img;
|
||||
reader.BaseStream.Position = 0x00;
|
||||
char TempChar;
|
||||
//WBFS Check
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
List<string> repoids = new List<string>();
|
||||
if (new FileInfo(OpenGame).Extension.Contains("wbfs")) //Performs actions if the header indicates a WBFS file
|
||||
{
|
||||
|
@ -3139,10 +3337,75 @@ namespace UWUVCI_AIO_WPF
|
|||
while ((int)(TempChar = reader.ReadChar()) != 0) ret = ret + TempChar;
|
||||
reader.BaseStream.Position = 0x200;
|
||||
while ((int)(TempChar = reader.ReadChar()) != 0) TempString = TempString + TempChar;
|
||||
repoid = TempString;
|
||||
string repoid = TempString;
|
||||
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
repoids.Add(SystemType + repoid);
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2));
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2));
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2));
|
||||
foreach (var e in ext)
|
||||
{
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2);
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2);
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
else if (RemoteFileExists(linkbase + SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2) + $"/iconTex.{e}") == true)
|
||||
{
|
||||
repoid = repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2);
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
}
|
||||
if (test == GameConsoles.GCN)
|
||||
{
|
||||
checkForAdditionalFiles(GameConsoles.GCN, repoids);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkForAdditionalFiles(GameConsoles.WII, repoids);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
string repoid = "";
|
||||
reader.BaseStream.Position = 0x18;
|
||||
|
||||
reader.BaseStream.Position = 0x20;
|
||||
|
@ -3150,7 +3413,17 @@ namespace UWUVCI_AIO_WPF
|
|||
reader.BaseStream.Position = 0x00;
|
||||
while ((int)(TempChar = reader.ReadChar()) != 0) TempString = TempString + TempChar;
|
||||
repoid = TempString;
|
||||
}
|
||||
|
||||
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
repoids.Add(SystemType + repoid);
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "E" + repoid.Substring(4, 2));
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "P" + repoid.Substring(4, 2));
|
||||
repoids.Add(SystemType + repoid.Substring(0, 3) + "J" + repoid.Substring(4, 2));
|
||||
foreach (var e in ext)
|
||||
{
|
||||
|
||||
|
||||
if (CheckForInternetConnectionWOWarning())
|
||||
{
|
||||
|
@ -3485,9 +3758,10 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Was supposed to replace all of the code that reaches out to UWUVCI-Images, but I don't wanna have to test everything since this is already as Italian as code comes
|
||||
/// </summary>
|
||||
/// <param name="SystemType"></param>
|
||||
/// <param name="repoid"></param>
|
||||
/// <param name="repoids"></param>
|
||||
private void GetRepoImages(string SystemType, string repoid, List<string> repoids = null)
|
||||
{
|
||||
|
@ -3495,40 +3769,20 @@ namespace UWUVCI_AIO_WPF
|
|||
IMG_Message img = null;
|
||||
string[] ext = { "png", "tga", "jpg", "jpeg" };
|
||||
|
||||
if (repoids == null || repoids?.Count == 0)
|
||||
{
|
||||
var fakeId = new string(new char[] { repoid[0], repoid[2], repoid[1], repoid[3] });
|
||||
repoids = new List<string>
|
||||
{
|
||||
SystemType + repoid,
|
||||
SystemType + repoid.Substring(0, 3) + "E",
|
||||
SystemType + repoid.Substring(0, 3) + "P",
|
||||
SystemType + repoid.Substring(0, 3) + "J",
|
||||
|
||||
SystemType + fakeId,
|
||||
SystemType + fakeId.Substring(0, 3) + "E",
|
||||
SystemType + fakeId.Substring(0, 3) + "P",
|
||||
SystemType + fakeId.Substring(0, 3) + "J"
|
||||
};
|
||||
}
|
||||
|
||||
foreach (var e in ext)
|
||||
{
|
||||
foreach (var id in repoids)
|
||||
if (RemoteFileExists(linkbase + SystemType + repoid + $"/iconTex.{e}") == true)
|
||||
{
|
||||
if (RemoteFileExists(linkbase + id + $"/iconTex.{e}") == true)
|
||||
img = new IMG_Message(linkbase + SystemType + repoid + $"/iconTex.{e}", linkbase + SystemType + repoid + $"/bootTvTex.{e}", SystemType + repoid);
|
||||
try
|
||||
{
|
||||
img = new IMG_Message(linkbase + id + $"/iconTex.{e}", linkbase + id + $"/bootTvTex.{e}", id);
|
||||
try
|
||||
{
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog();
|
||||
return;
|
||||
img.Owner = mw;
|
||||
}
|
||||
catch (Exception) { }
|
||||
img.ShowDialog(); break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,9 +106,6 @@
|
|||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Octokit, Version=0.52.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Octokit.0.52.0\lib\net46\Octokit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Pfim, Version=0.10.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Pfim.0.10.3\lib\netstandard2.0\Pfim.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<package id="McMaster.Extensions.CommandLineUtils" version="2.4.2" targetFramework="net48" />
|
||||
<package id="NAudio" version="1.10.0" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||
<package id="Octokit" version="0.52.0" targetFramework="net472" />
|
||||
<package id="Pfim" version="0.10.3" targetFramework="net472" />
|
||||
<package id="SharpZipLib" version="1.3.3" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="net48" />
|
||||
|
|
Loading…
Reference in a new issue