Removed 7za dependency

This commit is contained in:
ZestyTS 2022-08-04 15:54:52 -07:00
parent 9a9c5bfdff
commit d756a2b592
3 changed files with 23 additions and 50 deletions

View file

@ -454,22 +454,14 @@ namespace UWUVCI_AIO_WPF
} }
private static void WiiForwarder(string romPath, MainViewModel mvm) private static void WiiForwarder(string romPath, MainViewModel mvm)
{ {
string savedir = Directory.GetCurrentDirectory();
mvvm.msg = "Extracting Forwarder Base..."; mvvm.msg = "Extracting Forwarder Base...";
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
using (Process zip = new Process())
{
if (!mvm.debug)
{
zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
} Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
zip.Start();
zip.WaitForExit(); ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
}
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 20; mvvm.Progress = 20;
@ -575,22 +567,13 @@ namespace UWUVCI_AIO_WPF
private static void WiiHomebrew(string romPath, MainViewModel mvm) private static void WiiHomebrew(string romPath, MainViewModel mvm)
{ {
string savedir = Directory.GetCurrentDirectory();
mvvm.msg = "Extracting Homebrew Base..."; mvvm.msg = "Extracting Homebrew Base...";
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true); if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase")); Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
using (Process zip = new Process())
{
if (!mvm.debug)
{
zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
}
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
zip.Start();
zip.WaitForExit();
}
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 20; mvvm.Progress = 20;
@ -678,7 +661,6 @@ namespace UWUVCI_AIO_WPF
private static void WII(string romPath, MainViewModel mvm) private static void WII(string romPath, MainViewModel mvm)
{ {
string savedir = Directory.GetCurrentDirectory();
if (mvm.NKITFLAG || romPath.Contains("nkit")) if (mvm.NKITFLAG || romPath.Contains("nkit"))
{ {
using (Process toiso = new Process()) using (Process toiso = new Process())
@ -1036,22 +1018,13 @@ namespace UWUVCI_AIO_WPF
} }
private static void GC(string romPath, MainViewModel mvm, bool force) private static void GC(string romPath, MainViewModel mvm, bool force)
{ {
string savedir = Directory.GetCurrentDirectory();
mvvm.msg = "Extracting Nintendont Base..."; mvvm.msg = "Extracting Nintendont Base...";
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true); if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase")); Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
using (Process zip = new Process())
{
if (!mvm.debug)
{
zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
}
zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\"";
zip.Start();
zip.WaitForExit();
}
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 20; mvvm.Progress = 20;
@ -1483,12 +1456,13 @@ namespace UWUVCI_AIO_WPF
else else
{ {
mvvm.msg = "Extracting Nintendont Base..."; mvvm.msg = "Extracting Nintendont Base...";
if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) Directory.Delete(Path.Combine(tempPath, "TempBase"), true); if (Directory.Exists(Path.Combine(tempPath, "TempBase")))
Directory.Delete(Path.Combine(tempPath, "TempBase"), true);
Directory.CreateDirectory(Path.Combine(tempPath, "TempBase")); Directory.CreateDirectory(Path.Combine(tempPath, "TempBase"));
tik.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe");
tik.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath));
tik.Start();
tik.WaitForExit();
DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true);
mvvm.Progress = 30; mvvm.Progress = 30;
mvvm.msg = "Applying Nintendont"; mvvm.msg = "Applying Nintendont";

View file

@ -26,7 +26,6 @@ namespace UWUVCI_AIO_WPF.Classes
"WiiUDownloader.exe", "WiiUDownloader.exe",
"wiiurpxtool.exe", "wiiurpxtool.exe",
"INICreator.exe", "INICreator.exe",
"7za.exe",
"blank.ini", "blank.ini",
"FreeImage.dll", "FreeImage.dll",
"BuildPcePkg.exe", "BuildPcePkg.exe",

View file

@ -71,7 +71,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames
private void Button_Click_5(object sender, RoutedEventArgs e) private void Button_Click_5(object sender, RoutedEventArgs e)
{ {
Custom_Message cm = new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, ZestyTS\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\n7za - Igor Pavlov\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns, ZestyTS\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nIcon/TV Bootimages - Flump, ZestyTS\nNKit - Nanook\nImage Creation Base - Phacox\nWiiGameLanguage Patcher - ReturnerS\nChangeAspectRatio - andot\nvWii Title Forwarder - Fix94"); Custom_Message cm = new Custom_Message("Credits", "UWUVCI AIO - NicoAICP, Morilli, ZestyTS\nBeta Testers/Contributors - wowjinxy, Danis, Adolfobenjaminv\n\nBuildPcePkg & BuildTurboCDPcePkg - JohnnyGo\nCdecrypt - crediar\nCNUSPACKER - NicoAICP, Morilli\nINICreator - NicoAICP\nN64Converter - Morilli\npng2tga - Easy2Convert\ninject_gba_c (psb) - Morilli\nRetroInject_C - Morilli\ntga_verify - Morilli\nWiiUDownloader - Morilli\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns, ZestyTS\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94 and many more\nWii-VMC - wanikoko\nIcon/TV Bootimages - Flump, ZestyTS\nNKit - Nanook\nImage Creation Base - Phacox\nWiiGameLanguage Patcher - ReturnerS\nChangeAspectRatio - andot\nvWii Title Forwarder - Fix94");
try try
{ {
cm.Owner = (FindResource("mvm") as MainViewModel).mw; cm.Owner = (FindResource("mvm") as MainViewModel).mw;