mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-26 13:00:18 +00:00
Swapped to use cnuspacker nuget instead of process
This commit is contained in:
parent
3d4a339212
commit
d2e218d467
3 changed files with 13 additions and 17 deletions
|
@ -1655,6 +1655,12 @@ namespace UWUVCI_AIO_WPF
|
||||||
Directory.Delete(Environment.GetEnvironmentVariable("LocalAppData") + @"\temp\.net\CNUSPACKER", true);
|
Directory.Delete(Environment.GetEnvironmentVariable("LocalAppData") + @"\temp\.net\CNUSPACKER", true);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
CNUSPACKER.Program.Main(new string[] { "-in", baseRomPath, "-out", outputPath, "-encryptKeyWidth", Settings.Default.Ckey });
|
||||||
|
else
|
||||||
|
{
|
||||||
using (Process cnuspacker = new Process())
|
using (Process cnuspacker = new Process())
|
||||||
{
|
{
|
||||||
if (!mvm.debug)
|
if (!mvm.debug)
|
||||||
|
@ -1662,19 +1668,12 @@ namespace UWUVCI_AIO_WPF
|
||||||
cnuspacker.StartInfo.UseShellExecute = false;
|
cnuspacker.StartInfo.UseShellExecute = false;
|
||||||
cnuspacker.StartInfo.CreateNoWindow = true;
|
cnuspacker.StartInfo.CreateNoWindow = true;
|
||||||
}
|
}
|
||||||
if (Environment.Is64BitOperatingSystem)
|
|
||||||
{
|
|
||||||
cnuspacker.StartInfo.FileName = Path.Combine(toolsPath, "CNUSPACKER.exe");
|
|
||||||
cnuspacker.StartInfo.Arguments = $"-in \"{baseRomPath}\" -out \"{outputPath}\" -encryptKeyWith {Properties.Settings.Default.Ckey}";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cnuspacker.StartInfo.FileName = "java";
|
cnuspacker.StartInfo.FileName = "java";
|
||||||
cnuspacker.StartInfo.Arguments = $"-jar \"{Path.Combine(toolsPath, "NUSPacker.jar")}\" -in \"{baseRomPath}\" -out \"{outputPath}\" -encryptKeyWith {Properties.Settings.Default.Ckey}";
|
cnuspacker.StartInfo.Arguments = $"-jar \"{Path.Combine(toolsPath, "NUSPacker.jar")}\" -in \"{baseRomPath}\" -out \"{outputPath}\" -encryptKeyWith {Properties.Settings.Default.Ckey}";
|
||||||
}
|
|
||||||
cnuspacker.Start();
|
cnuspacker.Start();
|
||||||
cnuspacker.WaitForExit();
|
cnuspacker.WaitForExit();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mvm.Progress = 90;
|
mvm.Progress = 90;
|
||||||
mvm.msg = "Cleaning...";
|
mvm.msg = "Cleaning...";
|
||||||
Clean();
|
Clean();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
@ -16,7 +15,6 @@ namespace UWUVCI_AIO_WPF.Classes
|
||||||
public static string backupulr = @"https://github.com/Hotbrawl20/UWUVCI-Tools/raw/master/";
|
public static string backupulr = @"https://github.com/Hotbrawl20/UWUVCI-Tools/raw/master/";
|
||||||
public static string[] ToolNames =
|
public static string[] ToolNames =
|
||||||
{
|
{
|
||||||
"CNUSPACKER.exe",
|
|
||||||
"N64Converter.exe",
|
"N64Converter.exe",
|
||||||
"png2tga.exe",
|
"png2tga.exe",
|
||||||
"psb.exe",
|
"psb.exe",
|
||||||
|
|
|
@ -533,7 +533,6 @@ namespace UWUVCI_AIO_WPF
|
||||||
if (!Environment.Is64BitOperatingSystem)
|
if (!Environment.Is64BitOperatingSystem)
|
||||||
{
|
{
|
||||||
List<string> Tools = ToolCheck.ToolNames.ToList();
|
List<string> Tools = ToolCheck.ToolNames.ToList();
|
||||||
Tools.Remove("CNUSPACKER.exe");
|
|
||||||
Tools.Add("NUSPacker.jar");
|
Tools.Add("NUSPacker.jar");
|
||||||
ToolCheck.ToolNames = Tools.ToArray();
|
ToolCheck.ToolNames = Tools.ToArray();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue