示例#1
0
 public static string GetExecutableDirectory(GameTarget target)
 {
     if (target.Game == MEGame.LELauncher)
     {
         return(target.TargetPath);                                  // LELauncher
     }
     return(MEDirectories.GetExecutableFolderPath(target.Game, target.TargetPath));
 }
示例#2
0
        public static string GetInteropAsiWritePath(MEGame game)
        {
            string exeDirPath = MEDirectories.GetExecutableFolderPath(game);
            string asiDir     = Path.Combine(exeDirPath, "ASI");

            Directory.CreateDirectory(asiDir);
            string interopASIWritePath = Path.Combine(asiDir, GameController.InteropAsiName(game));

            return(interopASIWritePath);
        }
示例#3
0
        public static bool IsASILoaderInstalled(MEGame game)
        {
            if (!IsGameInstalled(game))
            {
                return(false);
            }
            string       dllDir        = MEDirectories.GetExecutableFolderPath(game);
            string       binkw23Path   = Path.Combine(dllDir, "binkw23.dll");
            string       binkw32Path   = Path.Combine(dllDir, "binkw32.dll");
            const string me3binkw23MD5 = "128b560ef70e8085c507368da6f26fe6";
            const string me3binkw32MD5 = "1acccbdae34e29ca7a50951999ed80d5";
            const string me2binkw23MD5 = "56a99d682e752702604533b2d5055a5e";
            const string me2binkw32MD5 = "a5318e756893f6232284202c1196da13";
            const string me1binkw23MD5 = "d9e2a3b9303ca80560218af9f6eebaae";
            const string me1binkw32MD5 = "30660f25ab7f7435b9f3e1a08422411a";

            return(File.Exists(binkw23Path) && File.Exists(binkw32Path) &&
                   game switch {
                MEGame.ME1 => me1binkw23MD5,
                MEGame.ME2 => me2binkw23MD5,
                MEGame.ME3 => me3binkw23MD5,
                _ => throw new ArgumentOutOfRangeException(nameof(game), game, null)
            } == CalculateMD5(binkw23Path) &&
示例#4
0
 public static string GetExecutableDirectory(GameTarget target) => MEDirectories.GetExecutableFolderPath(target.Game, target.TargetPath);