Added operating system switch

pull/24/head
Sunner 8 years ago
parent 8daaf0daa2
commit adf9da417b

@ -369,7 +369,7 @@ namespace DepotDownloader
steam3.Disconnect();
}
public static void DownloadApp( uint appId, uint depotId, string branch, bool forceDepot = false )
public static void DownloadApp( uint appId, uint depotId, string branch, string os = null, bool forceDepot = false )
{
if ( steam3 != null )
steam3.RequestAppInfo( appId );
@ -420,7 +420,7 @@ namespace DepotDownloader
if ( depotConfig != KeyValue.Invalid && depotConfig[ "oslist" ] != KeyValue.Invalid && !string.IsNullOrWhiteSpace( depotConfig[ "oslist" ].Value ) )
{
var oslist = depotConfig[ "oslist" ].Value.Split( ',' );
if ( Array.IndexOf( oslist, Util.GetSteamOS() ) == -1 )
if ( Array.IndexOf( oslist, os ?? Util.GetSteamOS() ) == -1 )
continue;
}
}

@ -94,7 +94,8 @@ namespace DepotDownloader
ContentDownloader.Config.MaxServers = GetParameter<int>( args, "-max-servers", 20 );
ContentDownloader.Config.MaxDownloads = GetParameter<int>( args, "-max-downloads", 4 );
string branch = GetParameter<string>( args, "-branch" ) ?? GetParameter<string>( args, "-beta" ) ?? "Public";
var forceDepot = HasParameter( args, "-force-depot" );
bool forceDepot = HasParameter( args, "-force-depot" );
string os = GetParameter<string>( args, "-os", null );
ContentDownloader.Config.MaxServers = Math.Max( ContentDownloader.Config.MaxServers, ContentDownloader.Config.MaxDownloads );
@ -114,7 +115,7 @@ namespace DepotDownloader
if ( ContentDownloader.InitializeSteam3( username, password ) )
{
ContentDownloader.DownloadApp( appId, depotId, branch, forceDepot );
ContentDownloader.DownloadApp( appId, depotId, branch, os, forceDepot );
ContentDownloader.ShutdownSteam3();
}
}
@ -166,6 +167,7 @@ namespace DepotDownloader
Console.WriteLine( "\t-password <pass>\t\t\t- the password of the account to login to for restricted content." );
Console.WriteLine( "\t-remember-password\t\t\t- if set, remember the password for subsequent logins of this user." );
Console.WriteLine( "\t-dir <installdir>\t\t\t- the directory in which to place downloaded files." );
Console.WriteLine( "\t-os <os>\t\t\t- the operating system for which to download the game (windows, macos or linux, default: OS the programm is currently running on)" );
Console.WriteLine( "\t-filelist <filename.txt>\t\t- a list of files to download (from the manifest). Can optionally use regex to download only certain files." );
Console.WriteLine( "\t-all-platforms\t\t\t- downloads all platform-specific depots when -app is used." );
Console.WriteLine( "\t-manifest-only\t\t\t- downloads a human readable manifest for any depots that would be downloaded." );

@ -16,6 +16,7 @@ Optional Parameters:
-password <pass> - the password of the account to login to for restricted content.
-remember-password - if set, remember the password for subsequent logins of this user.
-dir <installdir> - the directory in which to place downloaded files.
-os <os> - the operating system for which to download the game (windows, macos or linux, default: OS the programm is currently running on)
-filelist <file.txt> - a list of files to download (from the manifest).
Can optionally use regex to download only certain files.
-all-platforms - downloads all platform-specific depots when -app is used.

Loading…
Cancel
Save