Added -osarch parameter

pull/95/head
NicknineTheEagle 5 years ago committed by Ryan Kistner
parent 96e975aad9
commit feb0f19e0d

@ -386,7 +386,7 @@ namespace DepotDownloader
if ( details.hcontent_file > 0 )
{
await DownloadAppAsync( details.consumer_appid, details.consumer_appid, details.hcontent_file, DEFAULT_BRANCH, null, null, false, true );
await DownloadAppAsync( details.consumer_appid, details.consumer_appid, details.hcontent_file, DEFAULT_BRANCH, null, null, null, false, true );
}
else
{
@ -394,7 +394,7 @@ namespace DepotDownloader
}
}
public static async Task DownloadAppAsync( uint appId, uint depotId, ulong manifestId, string branch, string os, string language, bool lv, bool isUgc )
public static async Task DownloadAppAsync( uint appId, uint depotId, ulong manifestId, string branch, string os, string arch, string language, bool lv, bool isUgc )
{
// Load our configuration data containing the depots currently installed
string configPath = ContentDownloader.Config.InstallDirectory;
@ -465,6 +465,14 @@ namespace DepotDownloader
continue;
}
if ( depotConfig["osarch"] != KeyValue.Invalid &&
!string.IsNullOrWhiteSpace( depotConfig["osarch"].Value ) )
{
var depotArch = depotConfig["osarch"].Value;
if ( depotArch != ( arch ?? Util.GetSteamArch() ) )
continue;
}
if ( !Config.DownloadAllLanguages &&
depotConfig["language"] != KeyValue.Invalid &&
!string.IsNullOrWhiteSpace( depotConfig["language"].Value ) )

@ -165,6 +165,9 @@ namespace DepotDownloader
Console.WriteLine("Error: Cannot specify -os when -all-platforms is specified.");
return 1;
}
string arch = GetParameter<string>( args, "-osarch", null );
ContentDownloader.Config.DownloadAllLanguages = HasParameter( args, "-all-languages" );
string language = GetParameter<string>( args, "-language", null );
@ -207,7 +210,7 @@ namespace DepotDownloader
{
try
{
await ContentDownloader.DownloadAppAsync( appId, depotId, manifestId, branch, os, language, lv, isUGC ).ConfigureAwait( false );
await ContentDownloader.DownloadAppAsync( appId, depotId, manifestId, branch, os, arch, language, lv, isUGC ).ConfigureAwait( false );
}
catch ( Exception ex ) when (
ex is ContentDownloaderException

@ -28,6 +28,11 @@ namespace DepotDownloader
return "unknown";
}
public static string GetSteamArch()
{
return Environment.Is64BitOperatingSystem ? "64" : "32";
}
public static string ReadPassword()
{
ConsoleKeyInfo keyInfo;

Loading…
Cancel
Save