Skip to content

Commit

Permalink
Merge pull request #501 from giacomopc/master
Browse files Browse the repository at this point in the history
-all-archs: Allow to download all archs
  • Loading branch information
xPaw authored Oct 18, 2024
2 parents a5bdf23 + 39e43a1 commit 247f832
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DepotDownloader/ContentDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ public static async Task DownloadAppAsync(uint appId, List<(uint depotId, ulong
continue;
}

if (depotConfig["osarch"] != KeyValue.Invalid &&
if (!Config.DownloadAllArchs &&
depotConfig["osarch"] != KeyValue.Invalid &&
!string.IsNullOrWhiteSpace(depotConfig["osarch"].Value))
{
var depotArch = depotConfig["osarch"].Value;
Expand Down
1 change: 1 addition & 0 deletions DepotDownloader/DownloadConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DownloadConfig
{
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; }
Expand Down
10 changes: 10 additions & 0 deletions DepotDownloader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ ex is ContentDownloaderException
ContentDownloader.Config.BetaPassword = GetParameter<string>(args, "-betapassword");

ContentDownloader.Config.DownloadAllPlatforms = HasParameter(args, "-all-platforms");

var os = GetParameter<string>(args, "-os");

if (ContentDownloader.Config.DownloadAllPlatforms && !string.IsNullOrEmpty(os))
Expand All @@ -219,8 +220,16 @@ ex is ContentDownloaderException
return 1;
}

ContentDownloader.Config.DownloadAllArchs = HasParameter(args, "-all-archs");

var arch = GetParameter<string>(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<string>(args, "-language");

Expand Down Expand Up @@ -401,6 +410,7 @@ static void PrintUsage()
Console.WriteLine($" -beta <branchname> - download from specified branch if available (default: {ContentDownloader.DEFAULT_BRANCH}).");
Console.WriteLine(" -betapassword <pass> - branch password if applicable.");
Console.WriteLine(" -all-platforms - downloads all platform-specific depots when -app is used.");
Console.WriteLine(" -all-archs - download all architecture-specific depots when -app is used.");
Console.WriteLine(" -os <os> - the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on)");
Console.WriteLine(" -osarch <arch> - the architecture for which to download the game (32 or 64, default: the host's architecture)");
Console.WriteLine(" -all-languages - download all language-specific depots when -app is used.");
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Parameter | Description
`-all-platforms` | downloads all platform-specific depots when `-app` is used.
`-os <os>` | the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on)
`-osarch <arch>` | 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 <lang>` | the language for which to download the game (default: english)
`-lowviolence` | download low violence depots when `-app` is used.
Expand Down

0 comments on commit 247f832

Please sign in to comment.