auto detect exe in same dir

This commit is contained in:
flash 2023-10-08 02:25:08 +02:00
parent dd516c6042
commit 09243441bc
2 changed files with 5 additions and 0 deletions

View file

@ -2,5 +2,6 @@
public static class Constants {
public const string SOFII_DOMAIN = "_sofii.flashii.net.";
public const string INFO_URL = "https://fii.moe/sofii";
public const string MP_EXE = "SoF2MP.exe";
}
}

View file

@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
@ -23,6 +24,9 @@ namespace SoFii {
} else if(version > lastVersion)
Settings.LastVersion = version;
if(!File.Exists(Settings.GamePath) && File.Exists(Constants.MP_EXE))
Settings.GamePath = Path.GetFullPath(Constants.MP_EXE);
Application.Run(new MainWindow());
}