Ejemplo n.º 1
0
        private Dictionary <string, Dota> indexGames(string pLocation)
        {
            var games = new Dictionary <string, Dota>();
            var path  = Path.Combine(pLocation, "steamapps");

            if (Directory.Exists(path))
            {
                foreach (var file in Directory.GetFiles(path, "appmanifest*.acf"))
                {
                    var appId = file.Split("_").Last().Split(".").First();
                    if (AppIDs.AllAppIDs().Contains(appId))
                    {
                        games[appId] = getManifestDirectory(Path.Combine(path, $"appmanifest_{appId}.acf"), pLocation);
                    }
                }
            }

            return(games);
        }
Ejemplo n.º 2
0
        public int TrySDKInstalls(Steam pSteam)
        {
            string sdkLocation = null;

            foreach (var sdk in AppIDs.SourceSDK2013())
            {
                sdkLocation = pSteam.LocateGame(sdk);
                if (sdkLocation != null)
                {
                    try
                    {
                        return(VpkCompiler.Run(Path.Combine(sdkLocation, "bin")));
                    }
                    catch {}
                }
            }

            return(1);
        }