mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-27 21:40:25 +00:00
69150f56c5
If not, the programm will show an error message and terminate itself. TODO: Implement Downloading of Bases Fix Injection Logic Fix Broken Image Bug (I'mma jsut call it that) Check Packing Logic for errors Add Custom Base support ("LOADIINE") Add Custom Base support (NUS) Implement Configs feature Add AutoUpdater.NET Go live in Beta?
72 lines
1.7 KiB
C#
72 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace UWUVCI_AIO_WPF.Classes
|
|
{
|
|
class ToolCheck
|
|
{
|
|
static string FolderName = "Tools";
|
|
static string[] ToolNames =
|
|
{
|
|
"CDecrypt.exe",
|
|
"CNUSPACKER.exe",
|
|
"N64Converter.exe",
|
|
"png2tga.exe",
|
|
"psb.exe",
|
|
"RetroInject.exe",
|
|
"tga_verify.exe",
|
|
"WiiUDownloader.exe",
|
|
"wiiurpxtool.exe"
|
|
//"7za.exe" will re-add later
|
|
};
|
|
|
|
public static bool DoesToolsFolderExist()
|
|
{
|
|
if (Directory.Exists(FolderName))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static List<MissingTool> CheckForMissingTools()
|
|
{
|
|
List<MissingTool> ret = new List<MissingTool>();
|
|
foreach(string s in ToolNames)
|
|
{
|
|
string path = $@"{FolderName}\{s}";
|
|
if (!DoesToolExist(path))
|
|
{
|
|
ret.Add(new MissingTool(s, path));
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
private static bool DoesToolExist(string path)
|
|
{
|
|
if (File.Exists(path))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
class MissingTool
|
|
{
|
|
public string Name { get; set; }
|
|
public string Path { get; set; }
|
|
|
|
public MissingTool(string n, string p)
|
|
{
|
|
this.Name = n;
|
|
FileInfo f = new FileInfo(p);
|
|
this.Path = f.FullName;
|
|
}
|
|
}
|
|
}
|