Ejemplo n.º 1
0
        /// <summary>
        /// Installs application using specified installation options.
        /// </summary>
        /// <param name="application">SteamApplication object.</param>
        /// <param name="installOptions">InstallOptions object.</param>
        /// <param name="filesSize">Size of files for installation. Method calculate this size if parameter equals to -1.</param>
        /// <param name="worker">BackgroundWorker object.</param>
        /// <returns>Size of installed files.</returns>
        private Int64 InstallApplication(SteamApplication application, InstallOptions installOptions, Int64 filesSize, BackgroundWorker worker)
        {
            Int64 copiedFilesSize = 0L;

            if (installOptions.FilesType != SteamDepotFileTypes.None)
            {
                SteamDepotFile[] files = application.GetFiles(installOptions);

                if (files != null)
                {
                    DirectoryInfo destDirectory = new DirectoryInfo(installOptions.InstallPath);

                    if (filesSize == -1L)
                        filesSize = application.GetFilesSize(application, installOptions);

                    foreach (SteamDepotFile file in files)
                    {
                        if (worker.CancellationPending)
                            break;

                        copiedFilesSize += SgiUtils.CopyFile(file, Path.Combine(destDirectory.FullName, file.RelativeName),
                            filesSize, copiedFilesSize, worker);
                    }
                }
            }

            if (filesSize == 0L)
                worker.ReportProgress(100);

            return copiedFilesSize;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns size of application files in bytes for specified installation options.
        /// </summary>
        /// <param name="application">SteamApplication object.</param>
        /// <param name="installOptions">Installation options.</param>
        /// <returns>Size of application files in bytes for specified installation options.</returns>
        private Int64 GetFilesSize(SteamApplication application, InstallOptions installOptions)
        {
            Int64 size = 0L;

            if (installOptions.FilesType != SteamDepotFileTypes.None)
            {
                SteamDepotFile[] files = application.GetFiles(installOptions);

                if (files != null)
                {
                    foreach (SteamDepotFile file in files)
                        size += new FileInfo(file.FullName).Length;
                }
            }

            return size;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Checks depots.
        /// </summary>
        /// <param name="application">SteamApplication object.</param>
        private static void CheckDepots(SteamApplication application)
        {
            if (application.CheckState == CheckState.NotChecked)
            {
                Boolean isNonInvariantDepotExists = false;
                Boolean isRequiredDepotNotExists = false;

                for (Int32 i = 0; i < application.DepotsCount; i++)
                {
                    SteamDepot depot = application.GetDepot(i);

                    if (depot.CheckState == CheckState.NotChecked)
                    {
                        if (depot.GetDirectoriesCount(SteamDepotFileTypes.Common) > 0 && depot.IsSharedFilesExists)
                            depot.CheckState = CheckState.Installable;
                        else
                        {
                            depot.CheckState = CheckState.NotInstallable;

                            if (depot.SharedFilesCount > 0)
                            {
                                SteamDepotSharedFile[] sharedFiles = depot.GetSharedFiles();

                                foreach (SteamDepotSharedFile sharedFile in sharedFiles)
                                {
                                    if (sharedFile.SourceDepot == depot)
                                    {
                                        SteamDepot[] clientDepots = sharedFile.GetClientDepots();

                                        foreach (SteamDepot clientDepot in clientDepots)
                                            clientDepot.CheckState = CheckState.NotInstallable;
                                    }
                                }
                            }
                        }

                        if (depot.CheckState == CheckState.Installable)
                        {
                            if (!depot.IsInvariant)
                                isNonInvariantDepotExists = true;
                        }
                        else
                        {
                            if (!depot.IsOptional)
                                isRequiredDepotNotExists = true;
                        }
                    }
                }

                if (isRequiredDepotNotExists || !isNonInvariantDepotExists)
                    application.CheckState = CheckState.NotInstallable;
                else
                    application.CheckState = CheckState.Installable;
            }
        }
Ejemplo n.º 4
0
        private VdfAstNode ast; // abstract syntax tree

        public ValveDataFile(SteamApplication app, String fileName, DirectoryInfo installDirectory, String language, BackgroundWorker worker)
        {
            this.application = app;
            this.valveDataFile = new FileInfo(fileName);
            this.installDir = installDirectory;
            this.gameLanguage = language;
            this.worker = worker;

            cst = new List<VdfCstNode>();
            ast = null;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Populates applications list with information about Steam applications and their depots.
        /// Also finds depots for added applications.
        /// </summary>
        private void PopulateApplicationsList()
        {
            #region DEFCON
            {
                SteamApplication app = new SteamApplication(1520, @"DEFCON", @"Defcon", null,
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(1521, @"Defcon Content", @"Defcon Content", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"),
                    CultureInfo.GetCultureInfo("it"), CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("es") }));

                apps.Add(app);
            }
            #endregion DEFCON

            #region X3: Terran Conflict
            {
                SteamApplication app = new SteamApplication(2820, @"X3: Terran Conflict", @"X3 Terran Conflict", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(2827, @"X3: A Sunny Place", @"x3tc DLC", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(2826, @"X3 Soundtrack", @"X3 Soundtrack", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(2821, @"X3: Terran Conflict content", @"X3 Terran Conflict content", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(2822, @"X3: Terran Conflict German", @"X3 Terran Conflict German", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(2823, @"X3: Terran Conflict French", @"X3 Terran Conflict French", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(2824, @"X3: Terran Conflict Italian", @"X3 Terran Conflict Italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(2825, @"X3: Terran Conflict English", @"X3 Terran Conflict English", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(2828, @"X3: Terran Conflict Russian", @"X3TC Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));

                apps.Add(app);
            }
            #endregion X3: Terran Conflict

            #region RAGE
            {
                SteamApplication app = new SteamApplication(9200, @"RAGE", @"RAGE", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);
                SteamDepot mainDepot, english, french, russian, czech, polish;

                app.AddDepot(mainDepot = new SteamDepot(9201, @"RAGEDepot", @"RAGEDepot", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(9240, @"Rage Authority Pack DLC", @"Rage Authority Pack DLC", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(9241, @"Rage Sewers DLC", @"Rage Sewers DLC", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(9239, @"RAGE_EXEDepot", @"RAGE_EXEDepot", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(9238, @"RagePatch1Depot", @"RagePatch1Depot", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(english = new SteamDepot(9202, @"RAGE english", @"RAGE english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(french = new SteamDepot(9203, @"RAGE french", @"RAGE french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(9204, @"RAGE spanish", @"RAGE spanish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(new SteamDepot(9205, @"RAGE italian", @"RAGE italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(9206, @"RAGE german", @"RAGE german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(9207, @"RAGE Japanese", @"RAGE Japanese", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));
                app.AddDepot(russian = new SteamDepot(9208, @"RAGE Russian", @"RAGE Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(czech = new SteamDepot(9209, @"RAGE Czech", @"RAGE Czech", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("cs") }));
                app.AddDepot(polish = new SteamDepot(9210, @"RAGE Polish", @"RAGE Polish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));

                // "RAGE french" depot use "common\rage\base\video\loadvideo_french.bik" and "common\rage\mp\base\video\loadvideo_french.bik"
                // files from "RAGEDepot" depot. "RAGE Russian", "RAGE Czech" and "RAGE Polish" depots use "common\rage\base\english.streamed"
                // and "common\rage\mp\base\english.streamed" files from "RAGE english" depot.
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\rage\base\video\loadvideo_french.bik", mainDepot,
                    new SteamDepot[] { french }));
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\rage\mp\base\video\loadvideo_french.bik", mainDepot,
                    new SteamDepot[] { french }));
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\rage\base\english.streamed", english,
                    new SteamDepot[] { russian, czech, polish }));
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\rage\mp\base\english.streamed", english,
                    new SteamDepot[] { russian, czech, polish }));

                apps.Add(app);
            }
            #endregion RAGE

            #region Supreme Commander 2
            {
                SteamApplication app = new SteamApplication(40100, @"Supreme Commander 2", @"Supreme Commander 2", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);
                SteamDepot german, english, spanish, french, italian, russian, polish, japanese;

                app.AddDepot(new SteamDepot(40135, @"Supreme Commander 2 - Infinite War Battle Pack One", @"Supreme Commander 2 - Infinite War Battle Pack One", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                //app.AddDepot(new SteamDepot(40125, @"Supreme Commander 2 - Infinite War Battle Pack 1 Mac", @"Supreme Commander 2 - Infinite War Battle Pack 1 Mac", true,
                //    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40136, @"Supreme Commander 2 - Infinite War Tournament Maps", @"Supreme Commander 2 - Infinite War Tournament Maps", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40102, @"supreme commander 2 content", @"supreme commander 2 content", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40105, @"supreme commander 2 bin", @"supreme commander 2 bin", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                //app.AddDepot(new SteamDepot(40118, @"Supreme Commander 2 Mac Base", @"Supreme Commander 2 Mac Base", false,
                //    new CultureInfo[] { CultureInfo.InvariantCulture }));
                //app.AddDepot(new SteamDepot(40229, @"Supreme Commander 2 Mac Binaries", @"Supreme Commander 2 Mac Binaries", false,
                //    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(german = new SteamDepot(40103, @"Supreme Commander 2 German", @"Supreme Commander 2 German", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(english = new SteamDepot(40104, @"Supreme Commander 2 English", @"Supreme Commander 2 English", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(spanish = new SteamDepot(40106, @"Supreme Commander 2 Spanish", @"Supreme Commander 2 Spanish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(french = new SteamDepot(40107, @"Supreme Commander 2 French", @"Supreme Commander 2 French", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(italian = new SteamDepot(40108, @"Supreme Commander 2 Italian", @"Supreme Commander 2 Italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(russian = new SteamDepot(40109, @"Supreme Commander 2 Russian", @"Supreme Commander 2 Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(polish = new SteamDepot(40110, @"Supreme Commander 2 Polish", @"Supreme Commander 2 Polish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));
                app.AddDepot(japanese = new SteamDepot(40111, @"Supreme Commander 2 Japanese", @"Supreme Commander 2 Japanese", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));
                //app.AddDepot(new SteamDepot(40119, @"Supreme Commander 2 English Mac", @"Supreme Commander 2 English Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                //app.AddDepot(new SteamDepot(40122, @"supreme commander 2 mac app", @"supreme commander 2 mac app", true,
                //    new CultureInfo[] { CultureInfo.InvariantCulture }));
                //app.AddDepot(new SteamDepot(40223, @"Supreme Commander 2 French Mac", @"Supreme Commander 2 French Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                //app.AddDepot(new SteamDepot(40224, @"Supreme Commander 2 German Mac", @"Supreme Commander 2 German Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                //app.AddDepot(new SteamDepot(40225, @"Supreme Commander 2 Polish Mac", @"Supreme Commander 2 Polish Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));
                //app.AddDepot(new SteamDepot(40226, @"Supreme Commander 2 Italian Mac", @"Supreme Commander 2 Italian Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                //app.AddDepot(new SteamDepot(40227, @"Supreme Commander 2 Spanish Mac", @"Supreme Commander 2 Spanish Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                //app.AddDepot(new SteamDepot(40228, @"Supreme Commander 2 Russian Mac", @"Supreme Commander 2 Russian Mac", true,
                //    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));

                // "Supreme Commander 2 German", "Supreme Commander 2 Spanish", "Supreme Commander 2 French", "Supreme Commander 2 Italian",
                // "Supreme Commander 2 Russian", "Supreme Commander 2 Polish" and (not sure) "Supreme Commander 2 Japanese" depots use
                // "common\Supreme Commander 2\sounds\win\fmod\SC2_VO.fsb" file from "Supreme Commander 2 English" depot.
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\Supreme Commander 2\sounds\win\fmod\SC2_VO.fsb", english,
                    new SteamDepot[] { german, spanish, french, italian, russian, polish, japanese }));

                apps.Add(app);
            }
            #endregion Supreme Commander 2

            #region Risen 2
            {
                SteamApplication app = new SteamApplication(40390, @"Risen 2", @"Risen 2", "40390_install.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(40391, @"Risen 2 - Pirate's Clothes", @"risen2dlc1", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40392, @"Risen 2 - Treasure Isle", @"risen2dlc2", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40393, @"Risen 2 - Air Temple", @"risen2dlc3", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40394, @"risen2main", @"risen2main", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(203233, @"Risen2Binaries", @"Risen2Binaries", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(40395, @"Risen 2 german", @"Risen 2 german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(40396, @"Risen 2 english", @"Risen 2 english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(40397, @"Risen 2 french", @"Risen 2 french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(40398, @"Risen 2 italian", @"Risen 2 italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(40399, @"Risen 2 spanish", @"Risen 2 spanish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(new SteamDepot(203230, @"Risen 2 Russian", @"Risen 2 Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(new SteamDepot(203231, @"Risen 2 Czech", @"Risen 2 Czech", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("cs") }));
                app.AddDepot(new SteamDepot(203232, @"Risen 2 Polish", @"Risen 2 Polish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));

                apps.Add(app);
            }
            #endregion Risen 2

            #region The Elder Scrolls V: Skyrim
            {
                SteamApplication app = new SteamApplication(72850, @"The Elder Scrolls V: Skyrim", @"Skyrim", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);
                SteamDepot english, czech, polish;

                app.AddDepot(new SteamDepot(72851, @"Skyrim Content", @"Skyrim Content", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(72852, @"Skyrim exe", @"Skyrim exe", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(202485, @"Skyrim High Resolution Texture Pack", @"Skyrim High Resolution Texture Pack", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(211720, @"The Elder Scrolls V: Skyrim Dawnguard DLC", @"The Elder Scrolls V Skyrim Test", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"), CultureInfo.GetCultureInfo("it"),
                    CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(english = new SteamDepot(72853, @"The Elder Scrolls V: Skyrim english", @"Skyrim english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(72854, @"The Elder Scrolls V: Skyrim french", @"Skyrim french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(72855, @"The Elder Scrolls V: Skyrim italian", @"Skyrim italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(72856, @"The Elder Scrolls V: Skyrim german", @"Skyrim german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(72857, @"The Elder Scrolls V: Skyrim spanish", @"Skyrim spanish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(polish = new SteamDepot(72858, @"The Elder Scrolls V: Skyrim Polish", @"Skyrim Polish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));
                app.AddDepot(czech = new SteamDepot(72859, @"The Elder Scrolls V: Skyrim Czech", @"Skyrim Czech", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("cs") }));
                app.AddDepot(new SteamDepot(72860, @"The Elder Scrolls V: Skyrim Russian", @"Skyrim Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(new SteamDepot(72861, @"The Elder Scrolls V: Skyrim Japanese", @"The Elder Scrolls V Skyrim Japanese", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));

                #region The Elder Scrolls V: Skyrim Dawnguard DLC
                app.AddDepot(new SteamDepot(211721, @"The Elder Scrolls V: Skyrim french Test", @"The Elder Scrolls V Skyrim french Test", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(211722, @"The Elder Scrolls V: Skyrim italian Test", @"The Elder Scrolls V Skyrim italian Test", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(211723, @"The Elder Scrolls V: Skyrim german Test", @"The Elder Scrolls V Skyrim German Test", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(211724, @"The Elder Scrolls V: Skyrim spanish Test", @"The Elder Scrolls V Skyrim Spanish Test", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                #endregion The Elder Scrolls V: Skyrim Dawnguard DLC

                // "Skyrim Czech" and "Skyrim Polish" depots use "common\Skyrim\Data\Skyrim - Voices.bsa" and "common\Skyrim\Data\Skyrim - VoicesExtra.bsa"
                // files from "Skyrim english" depot.
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\Skyrim\Data\Skyrim - Voices.bsa", english,
                    new SteamDepot[] { polish, czech }));
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\Skyrim\Data\Skyrim - VoicesExtra.bsa", english,
                    new SteamDepot[] { polish, czech }));

                apps.Add(app);
            }
            #endregion The Elder Scrolls V: Skyrim

            #region Supreme Ruler: Cold War
            {
                SteamApplication app = new SteamApplication(73220, @"Supreme Ruler: Cold War", @"Supreme Ruler Cold War", null,
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(73221, @"Supreme Ruler Cold War content", @"Supreme Ruler Cold War content", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"),
                    CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("es") }));

                apps.Add(app);
            }
            #endregion Supreme Ruler: Cold War

            #region Dead Island
            {
                SteamApplication app = new SteamApplication(91310, @"Dead Island", @"Dead Island", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(91318, @"Dead Island Binaries", @"Dead Island Binaries", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91311, @"Dead Island GameContent", @"Dead Island GameContent", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91342, @"Dead Island: Ripper_2.0", @"Ripper_2.0", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91345, @"Dead Island: Bloodbath", @"Dead Island Bloodbath", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91346, @"Dead Island: Ryder White DLC", @"Dead Island Ryder", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91347, @"Dead Island SpeechRu", @"Dead Island SpeechRu", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture })); // maybe should be CultureInfo.GetCultureInfo("ru")
                app.AddDepot(new SteamDepot(200931, @"DeadIslSndContent", @"DeadIslSndContent", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(201741, @"Dead Island Bloodbath VoiceOver Content", @"BloodbathEN", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(201751, @"Dead Island: Ryder White DLC", @"RyderEN", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(91312, @"Dead Island english", @"Dead Island english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(91313, @"Dead Island french", @"Dead Island french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(91314, @"Dead Island italian", @"Dead Island italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(new SteamDepot(91315, @"Dead Island german", @"Dead Island german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(91316, @"Dead Island spanish", @"Dead Island spanish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(new SteamDepot(91317, @"Dead Island Polish", @"Dead Island Polish", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("pl") }));
                app.AddDepot(new SteamDepot(91341, @"Dead Island Czech", @"Dead Island Czech", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("cs") }));
                app.AddDepot(new SteamDepot(91343, @"Dead Island Russian", @"Dead Island Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(new SteamDepot(91348, @"Dead Island Japanese", @"Dead Island Japanese", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));
                app.AddDepot(new SteamDepot(201742, @"Dead Island Russian Bloodbath DLC", @"BloodbathRU", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(new SteamDepot(201743, @"Dead Island Japanese Bloodbath DLC", @"BloodbathJP", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));
                app.AddDepot(new SteamDepot(201752, @"Dead Island Russian Ryder White DLC", @"RyderRU", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));
                app.AddDepot(new SteamDepot(201753, @"Dead Island Japanese Ryder White DLC", @"Dead Island Japanese Ryder White DLC", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ja") }));

                apps.Add(app);
            }
            #endregion Dead Island

            #region E.Y.E
            {
                SteamApplication app = new SteamApplication(91700, @"E.Y.E", @"EYE", null,
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(91701, @"E.Y.E content", @"E.Y.E content", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr") }));

                apps.Add(app);
            }
            #endregion E.Y.E

            #region Kingdoms of Amalur: Reckoning
            {
                SteamApplication app = new SteamApplication(102500, @"Kingdoms of Amalur: Reckoning", @"KOAReckoning", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(102501, @"ReckoningDepot", @"ReckoningDepot", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(204600, @"Kingdoms of Amalur: Reckoning Weapon Packs", @"KOAR_WeaponPacks", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(102502, @"KOAReckoning english", @"KOAReckoning english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(102503, @"KOAReckoning german", @"KOAReckoning german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(102504, @"KOAReckoning french", @"KOAReckoning french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));

                apps.Add(app);
            }
            #endregion Kingdoms of Amalur: Reckoning

            #region Terraria
            {
                SteamApplication app = new SteamApplication(105600, @"Terraria", @"Terraria", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(105601, @"TerrariaRelease", @"TerrariaRelease", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"),
                    CultureInfo.GetCultureInfo("it"), CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("es") }));

                apps.Add(app);
            }
            #endregion Terraria

            #region L.A.Noire
            {
                SteamApplication app = new SteamApplication(110800, @"L.A.Noire", @"L.A.Noire", "installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(110801, @"LANMainContent", @"LANMainContent", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"),
                    CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("it"),
                    CultureInfo.GetCultureInfo("ru"), CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(new SteamDepot(110810, @"LA Noire Complete Edition", @"LANDLC", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(110802, @"LANExecutables", @"LANExecutables", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));

                apps.Add(app);
            }
            #endregion L.A.Noire

            #region X3: Albion Prelude
            {
                SteamApplication app = new SteamApplication(201310, @"X3: Albion Prelude", @"x3 terran conflict", "installscript-x3ap.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);
                SteamDepot english, russian;

                app.AddDepot(new SteamDepot(201311, @"X3: Albion Prelude content", @"x3ap content", false,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(english = new SteamDepot(201312, @"X3: Albion Prelude english", @"X3AP english", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));
                app.AddDepot(new SteamDepot(201313, @"X3: Albion Prelude german", @"X3AP german", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("de") }));
                app.AddDepot(new SteamDepot(201314, @"X3: Albion Prelude french", @"X3AP french", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("fr") }));
                app.AddDepot(new SteamDepot(201315, @"X3: Albion Prelude italian", @"X3AP italian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("it") }));
                app.AddDepot(russian = new SteamDepot(201316, @"X3: Albion Prelude Russian", @"X3AP Russian", true,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("ru") }));

                // "X3AP Russian" depot use "common\x3 terran conflict\addon\mov\00144.dat" and "common\x3 terran conflict\addon\mov\00244.dat"
                // files from "X3AP english" depot.
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\x3 terran conflict\addon\mov\00144.dat", english,
                    new SteamDepot[] { russian }));
                SteamApplication.AddSharedFile(new SteamDepotSharedFile(@"common\x3 terran conflict\addon\mov\00244.dat", english,
                    new SteamDepot[] { russian }));

                apps.Add(app);
            }
            #endregion X3: Albion Prelude

            #region The Elder Scrolls V: Skyrim Creation Kit
            {
                SteamApplication app = new SteamApplication(202480, @"The Elder Scrolls V: Skyrim Creation Kit", @"skyrim", null,
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(202481, @"CreationKit Main", @"CreationKit Main", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en") }));

                apps.Add(app);
            }
            #endregion The Elder Scrolls V: Skyrim Creation Kit

            #region Crusader Kings II
            {
                SteamApplication app = new SteamApplication(203770, @"Crusader Kings II", @"Crusader Kings II", "Installscript.vdf",
                    CheckDepots, GetFilesSize, InstallApplication);

                app.AddDepot(new SteamDepot(203771, @"CKIIMain", @"CKIIMain", false,
                    new CultureInfo[] { CultureInfo.GetCultureInfo("en"), CultureInfo.GetCultureInfo("fr"),
                    CultureInfo.GetCultureInfo("de"), CultureInfo.GetCultureInfo("es") }));
                app.AddDepot(new SteamDepot(203772, @"Dynasty CoA Pack 1", @"Dynasty CoA Pack 1", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(203773, @"Mongol Graphics Pack", @"Mongol Graphics Pack", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(203774, @"English Music Pack", @"English Music Pack", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));
                app.AddDepot(new SteamDepot(203775, @"Songs of Faith", @"Songs of Faith", true,
                    new CultureInfo[] { CultureInfo.InvariantCulture }));

                apps.Add(app);
            }
            #endregion Crusader Kings II

            // Find depots for all applications
            foreach (SteamApplication app in this.apps)
                app.FindDepots(depotsDirectory.GetDirectories());
        }
Ejemplo n.º 6
0
        public FilesMap(SteamApplication application)
        {
            if (application == null)
                throw new ArgumentNullException("application");

            app = application;
            files = new Dictionary<String, List<SteamDepotFile>>();

            // Add files of application
            for (Int32 i = 0; i < application.DepotsCount; i++)
            {
                SteamDepot depot = application.GetDepot(i);

                if (depot.CheckState == CheckState.Installable)
                {
                    AddFiles(depot, depot.GetLatestVersion(SteamDepotFileTypes.Common), SteamDepotFileTypes.Common);
                    AddFiles(depot, SteamDepotFileTypes.Fix);
                }
            }
        }