mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2025-02-16 18:48:24 +00:00
Merge pull request #65 from CasuallyCalm/master
Add console name to folder and space after brackets
This commit is contained in:
commit
a7f0b8154e
2 changed files with 19 additions and 12 deletions
|
@ -1624,19 +1624,19 @@ namespace UWUVCI_AIO_WPF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Loadiine(string gameName)
|
public static void Loadiine(string gameName, string gameConsole)
|
||||||
{
|
{
|
||||||
if (gameName == null || gameName == string.Empty) gameName = "NoName";
|
if (gameName == null || gameName == string.Empty) gameName = "NoName";
|
||||||
gameName = gameName.Replace("|", " ");
|
gameName = gameName.Replace("|", " ");
|
||||||
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
|
Regex reg = new Regex("[^a-zA-Z0-9 é -]");
|
||||||
//string outputPath = Path.Combine(Properties.Settings.Default.InjectionPath, gameName);
|
//string outputPath = Path.Combine(Properties.Settings.Default.InjectionPath, gameName);
|
||||||
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName,"")} [{mvvm.prodcode}]");
|
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE][{gameConsole}] {reg.Replace(gameName,"")} [{mvvm.prodcode}]");
|
||||||
mvvm.foldername = $"[LOADIINE]{reg.Replace(gameName, "")} [{mvvm.prodcode}]";
|
mvvm.foldername = $"[LOADIINE][{gameConsole}] {reg.Replace(gameName, "")} [{mvvm.prodcode}]";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (Directory.Exists(outputPath))
|
while (Directory.Exists(outputPath))
|
||||||
{
|
{
|
||||||
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE]{reg.Replace(gameName, "")} [{mvvm.prodcode}]_{i}");
|
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[LOADIINE][{gameConsole}] {reg.Replace(gameName, "")} [{mvvm.prodcode}]_{i}");
|
||||||
mvvm.foldername = $"[LOADIINE]{reg.Replace(gameName, "")} [{mvvm.prodcode}]_{i}";
|
mvvm.foldername = $"[LOADIINE][{gameConsole}] {reg.Replace(gameName, "")} [{mvvm.prodcode}]_{i}";
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1654,7 +1654,7 @@ namespace UWUVCI_AIO_WPF
|
||||||
Clean();
|
Clean();
|
||||||
}
|
}
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Packing(string gameName, MainViewModel mvm)
|
public static void Packing(string gameName, string gameConsole, MainViewModel mvm)
|
||||||
{
|
{
|
||||||
mvm.msg = "Checking Tools...";
|
mvm.msg = "Checking Tools...";
|
||||||
mvm.InjcttoolCheck();
|
mvm.InjcttoolCheck();
|
||||||
|
@ -1664,14 +1664,14 @@ namespace UWUVCI_AIO_WPF
|
||||||
if (gameName == null || gameName == string.Empty) gameName = "NoName";
|
if (gameName == null || gameName == string.Empty) gameName = "NoName";
|
||||||
|
|
||||||
//string outputPath = Path.Combine(Properties.Settings.Default.InjectionPath, gameName);
|
//string outputPath = Path.Combine(Properties.Settings.Default.InjectionPath, gameName);
|
||||||
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[WUP]{reg.Replace(gameName,"").Replace("|", " ")}");
|
string outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[WUP][{gameConsole}] {reg.Replace(gameName,"").Replace("|", " ")}");
|
||||||
outputPath = outputPath.Replace("|", " ");
|
outputPath = outputPath.Replace("|", " ");
|
||||||
mvvm.foldername = $"[WUP]{reg.Replace(gameName, "").Replace("|"," ")}";
|
mvvm.foldername = $"[WUP][{gameConsole}] {reg.Replace(gameName, "").Replace("|"," ")}";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (Directory.Exists(outputPath))
|
while (Directory.Exists(outputPath))
|
||||||
{
|
{
|
||||||
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[WUP]{reg.Replace(gameName,"").Replace("|", " ")}_{i}");
|
outputPath = Path.Combine(Properties.Settings.Default.OutPath, $"[WUP][{gameConsole}] {reg.Replace(gameName,"").Replace("|", " ")}_{i}");
|
||||||
mvvm.foldername = $"[WUP]{reg.Replace(gameName, "").Replace("|", " ")}_{i}";
|
mvvm.foldername = $"[WUP][{gameConsole}] {reg.Replace(gameName, "").Replace("|", " ")}_{i}";
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
var oldpath = Directory.GetCurrentDirectory();
|
var oldpath = Directory.GetCurrentDirectory();
|
||||||
|
|
|
@ -1006,10 +1006,17 @@ namespace UWUVCI_AIO_WPF
|
||||||
}
|
}
|
||||||
public void Pack(bool loadiine)
|
public void Pack(bool loadiine)
|
||||||
{
|
{
|
||||||
|
string consoleName = GameConfiguration.Console.ToString();
|
||||||
|
|
||||||
|
if (GC)
|
||||||
|
{
|
||||||
|
consoleName = GameConsoles.GCN.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
ValidatePathsStillExist();
|
ValidatePathsStillExist();
|
||||||
if (loadiine)
|
if (loadiine)
|
||||||
{
|
{
|
||||||
Injection.Loadiine(GameConfiguration.GameName);
|
Injection.Loadiine(GameConfiguration.GameName, consoleName);
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1021,7 +1028,7 @@ namespace UWUVCI_AIO_WPF
|
||||||
gameConfiguration.GameName = reg.Replace(gameConfiguration.GameName, "");
|
gameConfiguration.GameName = reg.Replace(gameConfiguration.GameName, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(() => { Injection.Packing(GameConfiguration.GameName, this); });
|
Task.Run(() => { Injection.Packing(GameConfiguration.GameName, consoleName, this); });
|
||||||
|
|
||||||
DownloadWait dw = new DownloadWait("Packing Inject - Please Wait", "", this);
|
DownloadWait dw = new DownloadWait("Packing Inject - Please Wait", "", this);
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue