Revert "Release 3.0.2"

This commit is contained in:
ZestyTS 2022-07-14 08:25:28 -07:00 committed by GitHub
parent bee9d9478b
commit d329265fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 582 additions and 291 deletions

View file

@ -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);
}

View file

@ -4,7 +4,6 @@ using System.Diagnostics;
using System.IO;
using System.Net;
using System.Security.Cryptography;
using System.Threading.Tasks;
namespace UWUVCI_AIO_WPF.Classes
{
@ -64,17 +63,21 @@ namespace UWUVCI_AIO_WPF.Classes
public static bool DoesToolsFolderExist()
{
return Directory.Exists(FolderName);
if (Directory.Exists(FolderName))
{
return true;
}
return false;
}
public static async Task<bool> IsToolRightAsync(string name)
public static bool IsToolRight(string name)
{
bool ret = false;
WebClient client = new WebClient();
await client.DownloadFileTaskAsync(backupulr + name + ".md5", name + ".md5");
client.DownloadFile(backupulr + name + ".md5", name + ".md5");
StreamReader sr = new StreamReader(name + ".md5");
var md5 = sr.ReadLine();
if (CalculateMD5(name) == md5)
if(CalculateMD5(name) == md5)
{
ret = true;
}
@ -89,6 +92,7 @@ namespace UWUVCI_AIO_WPF.Classes
using (var stream = File.OpenRead(filename))
{
string ret = BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLower();
stream.Close();
return ret;
}
}

File diff suppressed because it is too large Load diff

View file

@ -51,5 +51,5 @@ using System.Windows;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.2.0")]
[assembly: AssemblyFileVersion("3.0.2.0")]
[assembly: AssemblyVersion("3.0.1.0")]
[assembly: AssemblyFileVersion("3.0.1.0")]

View file

@ -162,7 +162,6 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
{
trimn.IsChecked = false;
trimn_Click(null, null);
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, true);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
gn.Text = reg.Replace(rom, string.Empty);

View file

@ -180,7 +180,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames.InjectFrames.Configurations
}
if (!path.ToLower().Contains(".gcz") && !path.ToLower().Contains(".dol") && !path.ToLower().Contains(".wad"))
{
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, true);
string rom = mvm.getInternalWIIGCNName(mvm.RomPath, false);
Regex reg = new Regex("[*'\",_&#^@:;?!<>|µ~#°²³´`éⓇ©™]");
gn.Text = reg.Replace(rom, string.Empty);
mvm.GameConfiguration.GameName = reg.Replace(rom, string.Empty);

View file

@ -46,7 +46,7 @@
<Ellipse Fill="#FF2196F3" HorizontalAlignment="Left" Height="21" Margin="12,7,0,0" VerticalAlignment="Top" Width="17"/>
<Ellipse Fill="#FF2196F3" HorizontalAlignment="Left" Height="21" Margin="12,7,0,0" VerticalAlignment="Top" Width="17"/>
<Border BorderBrush="#FF2196F3" BorderThickness="1" HorizontalAlignment="Left" Height="33" Margin="12,6,0,0" VerticalAlignment="Top" Width="1108" CornerRadius="5" Background="#FF2196F3"/>
<Label Content="v3.0.2" HorizontalAlignment="Left" Margin="1075,10,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF" Width="81" Height="24"/>
<Label Content="v3.0.1" HorizontalAlignment="Left" Margin="1075,10,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF" Width="81" Height="24"/>
<Button HorizontalAlignment="Left" Margin="32,522,0,0" VerticalAlignment="Top" Width="74" Click="Button_Click_13" IsTabStop="False" Height="58" ToolTip="Support UWUVCI on Ko-Fi">
<Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />
</Button>

View file

@ -56,7 +56,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_3(object sender, RoutedEventArgs e)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
mvm.UpdateBaseAsync();
mvm.UpdateBases();
}
private void Button_Click_4(object sender, RoutedEventArgs e)
@ -86,13 +86,13 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_6(object sender, RoutedEventArgs e)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
mvm.UpdateAsync(true);
mvm.Update(true);
}
private async void Button_Click_7(object sender, RoutedEventArgs e)
private void Button_Click_7(object sender, RoutedEventArgs e)
{
MainViewModel mvm = FindResource("mvm") as MainViewModel;
await mvm.UpdateToolsAsync();
mvm.UpdateTools();
}
private void Button_Click_8(object sender, RoutedEventArgs e)

View file

@ -9,7 +9,7 @@
Title="SettingsFrame" >
<Grid>
<TextBlock x:Name="tb" Margin="10,172,10,192" TextWrapping="Wrap" Text="Welcome to UWUVCI AIO v3.0.2. To start Injecting select a Console to your left." FontSize="20" Height="116" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="1110" />
<TextBlock x:Name="tb" Margin="10,172,10,192" TextWrapping="Wrap" Text="Welcome to UWUVCI AIO v3.0.1. To start Injecting select a Console to your left." FontSize="20" Height="116" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="1110" />
<Button HorizontalAlignment="Right" Margin="15,525,15,0" VerticalAlignment="Top" Width="74" Click="Button_Click" IsTabStop="False" Height="58" ToolTip="Support UWUVCI on Ko-Fi">
<Image HorizontalAlignment="Left" Height="46" VerticalAlignment="Top" Width="46" Source="/UI/Images/61e111774d3a2f67c827cd25_Frame 5.png" />
</Button>

View file

@ -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>

View file

@ -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" />