diff --git a/UWUVCI AIO WPF/Classes/Injection.cs b/UWUVCI AIO WPF/Classes/Injection.cs index d9a0938..20e1de5 100644 --- a/UWUVCI AIO WPF/Classes/Injection.cs +++ b/UWUVCI AIO WPF/Classes/Injection.cs @@ -454,23 +454,15 @@ namespace UWUVCI_AIO_WPF } private static void WiiForwarder(string romPath, MainViewModel mvm) { - string savedir = Directory.GetCurrentDirectory(); mvvm.msg = "Extracting Forwarder 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")); - using (Process zip = new Process()) - { - if (!mvm.debug) - { - - zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; - } - zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); - zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; - zip.Start(); - zip.WaitForExit(); - } + ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath)); + DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); mvvm.Progress = 20; mvvm.msg = "Setting up Forwarder..."; @@ -575,22 +567,13 @@ namespace UWUVCI_AIO_WPF private static void WiiHomebrew(string romPath, MainViewModel mvm) { - string savedir = Directory.GetCurrentDirectory(); mvvm.msg = "Extracting Homebrew 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) - { + if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) + Directory.Delete(Path.Combine(tempPath, "TempBase"), true); - zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; - } - zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); - zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; - zip.Start(); - zip.WaitForExit(); - } + Directory.CreateDirectory(Path.Combine(tempPath, "TempBase")); + + ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath)); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); mvvm.Progress = 20; @@ -678,7 +661,6 @@ namespace UWUVCI_AIO_WPF private static void WII(string romPath, MainViewModel mvm) { - string savedir = Directory.GetCurrentDirectory(); if (mvm.NKITFLAG || romPath.Contains("nkit")) { using (Process toiso = new Process()) @@ -1036,22 +1018,13 @@ namespace UWUVCI_AIO_WPF } private static void GC(string romPath, MainViewModel mvm, bool force) { - string savedir = Directory.GetCurrentDirectory(); mvvm.msg = "Extracting Nintendont 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) - { + if (Directory.Exists(Path.Combine(tempPath, "TempBase"))) + Directory.Delete(Path.Combine(tempPath, "TempBase"), true); - zip.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; - } - zip.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); - zip.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; - zip.Start(); - zip.WaitForExit(); - } + Directory.CreateDirectory(Path.Combine(tempPath, "TempBase")); + + ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath)); DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); mvvm.Progress = 20; @@ -1483,12 +1456,13 @@ namespace UWUVCI_AIO_WPF else { 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")); - tik.StartInfo.FileName = Path.Combine(toolsPath, "7za.exe"); - tik.StartInfo.Arguments = $"x \"{Path.Combine(toolsPath, "BASE.zip")}\" -o\"{Path.Combine(tempPath)}\""; - tik.Start(); - tik.WaitForExit(); + + ZipFile.ExtractToDirectory(Path.Combine(toolsPath, "BASE.zip"), Path.Combine(tempPath)); + DirectoryCopy(Path.Combine(tempPath, "BASE"), Path.Combine(tempPath, "TempBase"), true); mvvm.Progress = 30; mvvm.msg = "Applying Nintendont"; diff --git a/UWUVCI AIO WPF/Classes/ToolCheck.cs b/UWUVCI AIO WPF/Classes/ToolCheck.cs index 8e9acc4..265b6e2 100644 --- a/UWUVCI AIO WPF/Classes/ToolCheck.cs +++ b/UWUVCI AIO WPF/Classes/ToolCheck.cs @@ -26,7 +26,6 @@ namespace UWUVCI_AIO_WPF.Classes "WiiUDownloader.exe", "wiiurpxtool.exe", "INICreator.exe", - "7za.exe", "blank.ini", "FreeImage.dll", "BuildPcePkg.exe", diff --git a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs index a76f74e..772d1b5 100644 --- a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs +++ b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs @@ -71,7 +71,7 @@ namespace UWUVCI_AIO_WPF.UI.Frames 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 { cm.Owner = (FindResource("mvm") as MainViewModel).mw;