Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Check for the DLL and ASI in the directory
Browse files Browse the repository at this point in the history
...and print a warning if they do not exist.

Hopefully this should decrease the amount of people asking why the program is not working after not extracting the whole zip.
  • Loading branch information
mosamadeeb committed Sep 16, 2021
1 parent 277800e commit 730b3e9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
32 changes: 27 additions & 5 deletions RyuModManagerCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace RyuCLI
{
public static class Program
{
private const string VERSION = "v1.5";
private const string VERSION = "v1.6";
private const string AUTHOR = "SutandoTsukai181";
private const string REPO = "RyuModManager";

Expand Down Expand Up @@ -166,16 +166,38 @@ public static async Task Main(string[] args)

// TODO: Maybe move this to a separate "Game patches" file
// Virtua Fighter eSports crashes when used with dinput8.dll as the ASI loader
if (GamePath.GetGame() == Game.eve && File.Exists("dinput8.dll"))
if (GamePath.GetGame() == Game.eve && File.Exists(DINPUT8DLL))
{
Console.Write("Game specific patch: Renaming dinput8.dll to version.dll...");
if (File.Exists(VERSIONDLL))
{
Console.Write($"Game specific patch: Deleting {DINPUT8DLL} because {VERSIONDLL} exists...");

// Remove dinput8.dll
File.Delete(DINPUT8DLL);
}
else
{
Console.Write($"Game specific patch: Renaming {DINPUT8DLL} to {VERSIONDLL}...");

// Rename dinput8.dll to version.dll to prevent the game from crashing
File.Move("dinput8.dll", "version.dll");
// Rename dinput8.dll to version.dll to prevent the game from crashing
File.Move(DINPUT8DLL, VERSIONDLL);
}

Console.WriteLine(" DONE!\n");
}

// Check if the ASI loader is not in the directory (possibly due to incorrect zip extraction)
if (!(File.Exists(DINPUT8DLL) || File.Exists(VERSIONDLL)))
{
Console.WriteLine($"Warning: \"{DINPUT8DLL}\" is missing from this directory. RyuModManager will NOT function properly without this file\n");
}

// Check if the ASI is not in the directory
if (!File.Exists(ASI))
{
Console.WriteLine($"Warning: \"{ASI}\" is missing from this directory. RyuModManager will NOT function properly without this file\n");
}

if (checkForUpdates)
{
Console.WriteLine("Checking for updates...");
Expand Down
3 changes: 3 additions & 0 deletions Utils/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public static class Constants
public const string INI = "YakuzaParless.ini";
public const string TXT = "ModLoadOrder.txt";
public const string MLO = "YakuzaParless.mlo";
public const string ASI = "YakuzaParless.asi";
public const string DINPUT8DLL = "dinput8.dll";
public const string VERSIONDLL = "version.dll";
public const string PARLESS_NAME = ".parless paths";

public static readonly List<string> IncompatiblePars = new List<string> {
Expand Down

0 comments on commit 730b3e9

Please sign in to comment.