mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-22 19:13:11 +00:00
gc
This commit is contained in:
parent
0784b7ab0f
commit
6607a82299
3 changed files with 25 additions and 35 deletions
|
@ -830,7 +830,7 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
if (mvm.donttrim)
|
||||
{
|
||||
if (mvm.gc2rom.Contains("nkit.iso"))
|
||||
if (mvm.gc2rom.Contains("nkit"))
|
||||
{
|
||||
using (Process wit = new Process())
|
||||
{
|
||||
|
@ -843,42 +843,20 @@ namespace UWUVCI_AIO_WPF
|
|||
wit.StartInfo.Arguments = $"\"{mvm.gc2rom}\"";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out.iso")))
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out(Disc 1).iso")))
|
||||
{
|
||||
throw new Exception("nkit");
|
||||
}
|
||||
File.Move(Path.Combine(toolsPath, "out.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
File.Move(Path.Combine(toolsPath, "out(Disc 1).iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (romPath.ToLower().Contains("gcz"))
|
||||
{
|
||||
//Convert to nkit.iso
|
||||
using (Process wit = new Process())
|
||||
{
|
||||
if (!mvm.debug)
|
||||
{
|
||||
|
||||
wit.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||
}
|
||||
wit.StartInfo.FileName = Path.Combine(toolsPath, "ConvertToIso.exe");
|
||||
wit.StartInfo.Arguments = $"\"{romPath}\"";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out.iso")))
|
||||
{
|
||||
throw new Exception("nkit");
|
||||
}
|
||||
File.Move(Path.Combine(toolsPath, "out.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
File.Copy(mvm.gc2rom, Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -897,11 +875,11 @@ namespace UWUVCI_AIO_WPF
|
|||
wit.StartInfo.Arguments = $"\"{mvm.gc2rom}\"";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out.nkit.iso")))
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out(Disc 1).nkit.iso")))
|
||||
{
|
||||
throw new Exception("nkit");
|
||||
}
|
||||
File.Move(Path.Combine(toolsPath, "out.nkit.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
File.Move(Path.Combine(toolsPath, "out(Disc 1).nkit.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -921,11 +899,11 @@ namespace UWUVCI_AIO_WPF
|
|||
wit.StartInfo.Arguments = $"\"{romPath}\"";
|
||||
wit.Start();
|
||||
wit.WaitForExit();
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out.nkit.iso")))
|
||||
if (!File.Exists(Path.Combine(toolsPath, "out(Disc 1).nkit.iso")))
|
||||
{
|
||||
throw new Exception("nkit");
|
||||
}
|
||||
File.Move(Path.Combine(toolsPath, "out.nkit.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
File.Move(Path.Combine(toolsPath, "out(Disc 1).nkit.iso"), Path.Combine(tempPath, "TempBase", "files", "disc2.iso"));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1293,7 +1293,7 @@ namespace UWUVCI_AIO_WPF
|
|||
|
||||
break;
|
||||
case GameConsoles.GCN:
|
||||
dialog.Filter = "GCN ROM (*.iso; *.gcm; *.nkit.iso; *.nkit.gcz) | *.iso; *.gcm; *.nkit.iso; *.nkit.gcz";
|
||||
dialog.Filter = "GC ROM (*.iso; *.gcm; *.nkit.iso; *.nkit.gcz) | *.iso; *.gcm; *.nkit.iso; *.nkit.gcz";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,12 +113,24 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
}
|
||||
private void wind_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
(FindResource("mvm") as MainViewModel).mw.Topmost = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void wind_Closed(object sender, EventArgs e)
|
||||
{
|
||||
(FindResource("mvm") as MainViewModel).mw.Topmost = false;
|
||||
try
|
||||
{
|
||||
if ((FindResource("mvm") as MainViewModel).mw != null)
|
||||
{
|
||||
(FindResource("mvm") as MainViewModel).mw.Topmost = false;
|
||||
}
|
||||
}
|
||||
catch (Exception s)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue