From ddda3924dcbcec493363abca83d5eac777adc6db Mon Sep 17 00:00:00 2001 From: Giacomo Preciado Date: Tue, 28 May 2024 23:56:04 -0500 Subject: [PATCH 1/2] new parameter -all-archs downloads all OS archs --- DepotDownloader/ContentDownloader.cs | 3 ++- DepotDownloader/DownloadConfig.cs | 1 + DepotDownloader/Program.cs | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index d9191610..83d902f8 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -472,7 +472,8 @@ namespace DepotDownloader continue; } - if (depotConfig["osarch"] != KeyValue.Invalid && + if (!Config.DownloadAllArchs && + depotConfig["osarch"] != KeyValue.Invalid && !string.IsNullOrWhiteSpace(depotConfig["osarch"].Value)) { var depotArch = depotConfig["osarch"].Value; diff --git a/DepotDownloader/DownloadConfig.cs b/DepotDownloader/DownloadConfig.cs index 1022aac4..25bf5e70 100644 --- a/DepotDownloader/DownloadConfig.cs +++ b/DepotDownloader/DownloadConfig.cs @@ -7,6 +7,7 @@ namespace DepotDownloader { public int CellID { get; set; } public bool DownloadAllPlatforms { get; set; } + public bool DownloadAllArchs { get; set; } public bool DownloadAllLanguages { get; set; } public bool DownloadManifestOnly { get; set; } public string InstallDirectory { get; set; } diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index 14f7f88d..714ca9ae 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -194,6 +194,7 @@ namespace DepotDownloader ContentDownloader.Config.BetaPassword = GetParameter(args, "-betapassword"); ContentDownloader.Config.DownloadAllPlatforms = HasParameter(args, "-all-platforms"); + var os = GetParameter(args, "-os"); if (ContentDownloader.Config.DownloadAllPlatforms && !string.IsNullOrEmpty(os)) @@ -202,8 +203,16 @@ namespace DepotDownloader return 1; } + ContentDownloader.Config.DownloadAllArchs = HasParameter(args, "-all-archs"); + var arch = GetParameter(args, "-osarch"); + if (ContentDownloader.Config.DownloadAllArchs && !string.IsNullOrEmpty(arch)) + { + Console.WriteLine("Error: Cannot specify -osarch when -all-archs is specified."); + return 1; + } + ContentDownloader.Config.DownloadAllLanguages = HasParameter(args, "-all-languages"); var language = GetParameter(args, "-language"); From b310d804f278defebb6d26bc9e8f9056654247e8 Mon Sep 17 00:00:00 2001 From: Giacomo Preciado Date: Mon, 16 Sep 2024 13:41:44 -0500 Subject: [PATCH 2/2] Updated README.md and help output --- DepotDownloader/Program.cs | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index 714ca9ae..8b5839f7 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -391,6 +391,7 @@ namespace DepotDownloader Console.WriteLine("\t-manifest \t\t\t- manifest id of content to download (requires -depot, default: current for branch)."); Console.WriteLine($"\t-beta \t\t\t- download from specified branch if available (default: {ContentDownloader.DEFAULT_BRANCH})."); Console.WriteLine("\t-betapassword \t\t- branch password if applicable."); + Console.WriteLine("\t-all-archs\t\t\t- download all architecture-specific depots when -app is used."); Console.WriteLine("\t-all-platforms\t\t\t- downloads all platform-specific depots when -app is used."); Console.WriteLine("\t-os \t\t\t\t- the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on)"); Console.WriteLine("\t-osarch \t\t\t\t- the architecture for which to download the game (32 or 64, default: the host's architecture)"); diff --git a/README.md b/README.md index 68fdaffd..02d75ed3 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Parameter | Description -all-platforms | downloads all platform-specific depots when -app is used. -os \ | the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on) -osarch \ | the architecture for which to download the game (32 or 64, default: the host's architecture) +-all-archs | download all architecture-specific depots when -app is used. -all-languages | download all language-specific depots when -app is used. -language \ | the language for which to download the game (default: english) -lowviolence | download low violence depots when -app is used.