From 242dd03184ca0cf643edcf1fd63ef476fd782d3e Mon Sep 17 00:00:00 2001 From: ZestyTS Date: Fri, 19 Aug 2022 23:28:12 -0700 Subject: [PATCH] Removed run time errors --- UWUVCI AIO WPF/Classes/Injection.cs | 23 ++++--------------- .../UI/Frames/SettingsFrame.xaml.cs | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/UWUVCI AIO WPF/Classes/Injection.cs b/UWUVCI AIO WPF/Classes/Injection.cs index 878f493..2ec032a 100644 --- a/UWUVCI AIO WPF/Classes/Injection.cs +++ b/UWUVCI AIO WPF/Classes/Injection.cs @@ -536,9 +536,7 @@ namespace UWUVCI_AIO_WPF } string gamePath = Path.Combine(baseRomPath, "content", "game.iso"); - string nfsPath = Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"); File.Move(Path.Combine(tempPath, "game.iso"), gamePath); - File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), nfsPath); string extra = ""; if (mvm.Index == 2) @@ -552,7 +550,6 @@ namespace UWUVCI_AIO_WPF nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", "-homebrew", extra, "-iso", gamePath }); - File.Delete(nfsPath); File.Delete(gamePath); mvm.Progress = 80; @@ -626,9 +623,7 @@ namespace UWUVCI_AIO_WPF File.Delete(sFile); } string gamePath = Path.Combine(baseRomPath, "content", "game.iso"); - string nfsPath = Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"); File.Move(Path.Combine(tempPath, "game.iso"), gamePath); - File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), nfsPath); string pass = "-passthrough "; if (mvm.passtrough != true) @@ -636,12 +631,9 @@ namespace UWUVCI_AIO_WPF pass = ""; } nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", "-homebrew", pass, "-iso", gamePath }); - File.Delete(gamePath); - File.Delete(nfsPath); mvm.Progress = 80; - } private static void WII(string romPath, MainViewModel mvm) @@ -972,9 +964,7 @@ namespace UWUVCI_AIO_WPF File.Delete(sFile); } string gamePath = Path.Combine(baseRomPath, "content", "game.iso"); - string nfsPath = Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"); File.Move(Path.Combine(tempPath, "game.iso"), gamePath); - File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), nfsPath); string extra = ""; if (mvm.Index == 2) @@ -987,8 +977,6 @@ namespace UWUVCI_AIO_WPF if (mvm.LR) { extra += "-lrpatch "; } nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", "-homebrew", extra, "-iso", gamePath }); - - File.Delete(nfsPath); File.Delete(gamePath); mvm.Progress = 80; @@ -1290,13 +1278,9 @@ namespace UWUVCI_AIO_WPF File.Delete(sFile); } string gamePath = Path.Combine(baseRomPath, "content", "game.iso"); - string nfsPath = Path.Combine(baseRomPath, "content", "nfs2iso2nfs.exe"); File.Move(Path.Combine(tempPath, "game.iso"), gamePath); - File.Copy(Path.Combine(toolsPath, "nfs2iso2nfs.exe"), nfsPath); nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", "-homebrew", "-passthrough", "-iso", gamePath }); - - File.Delete(nfsPath); File.Delete(gamePath); mvm.Progress = 80; @@ -1490,7 +1474,7 @@ namespace UWUVCI_AIO_WPF mvvm.msg = "Injecting ROM..."; Console.WriteLine("Converting Game to NFS format..."); string olddir = Directory.GetCurrentDirectory(); - tik.StartInfo.FileName = Path.Combine(toolsPath, "nfs2iso2nfs.exe"); + if (!mvm.GC) { string extra = ""; @@ -1504,11 +1488,12 @@ namespace UWUVCI_AIO_WPF if (mvm.LR) { extra += "-lrpatch "; } Console.WriteLine(extra); Console.ReadLine(); - tik.StartInfo.Arguments = $"-enc {extra}-iso \"{romPath}\""; + + nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", extra, "-iso", romPath}); } else { - tik.StartInfo.Arguments = $"-enc -homebrew -passthrough -iso \"{romPath}\""; + nfs2iso2nfs.Depreciated.Main(new string[] { "-enc", "-homebrew", "-passthrough", "-iso", romPath}); } tik.Start(); tik.WaitForExit(); diff --git a/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs b/UWUVCI AIO WPF/UI/Frames/SettingsFrame.xaml.cs index 09138ef..b969f26 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\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, ZestyTS\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, ZestyTS\nwiiurpxtool - 0CHB0\nGoomba - FluBBa\nDarkFilter Removal N64 - MelonSpeedruns, ZestyTS\nNintendont SD Card Menu - TeconMoon\nwit - Wiimm\nGetExtTypePatcher - Fix94\nnfs2iso2nfs - sabykos, piratesephiroth, Fix94, ZestyTS, 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;