auto detect exe in same dir
This commit is contained in:
parent
dd516c6042
commit
09243441bc
2 changed files with 5 additions and 0 deletions
|
@ -2,5 +2,6 @@
|
||||||
public static class Constants {
|
public static class Constants {
|
||||||
public const string SOFII_DOMAIN = "_sofii.flashii.net.";
|
public const string SOFII_DOMAIN = "_sofii.flashii.net.";
|
||||||
public const string INFO_URL = "https://fii.moe/sofii";
|
public const string INFO_URL = "https://fii.moe/sofii";
|
||||||
|
public const string MP_EXE = "SoF2MP.exe";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
@ -23,6 +24,9 @@ namespace SoFii {
|
||||||
} else if(version > lastVersion)
|
} else if(version > lastVersion)
|
||||||
Settings.LastVersion = version;
|
Settings.LastVersion = version;
|
||||||
|
|
||||||
|
if(!File.Exists(Settings.GamePath) && File.Exists(Constants.MP_EXE))
|
||||||
|
Settings.GamePath = Path.GetFullPath(Constants.MP_EXE);
|
||||||
|
|
||||||
Application.Run(new MainWindow());
|
Application.Run(new MainWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue