Fix typo and throw error if both -os and -all-platforms are specified

pull/24/head
Sunner 8 years ago
parent adf9da417b
commit 39412bd4b3

@ -97,6 +97,12 @@ namespace DepotDownloader
bool forceDepot = HasParameter( args, "-force-depot" ); bool forceDepot = HasParameter( args, "-force-depot" );
string os = GetParameter<string>( args, "-os", null ); string os = GetParameter<string>( args, "-os", null );
if ( ContentDownloader.Config.DownloadAllPlatforms && !String.IsNullOrEmpty( os ) )
{
Console.WriteLine( "Error: Cannot specify -os when -all-platforms is specified." );
return;
}
ContentDownloader.Config.MaxServers = Math.Max( ContentDownloader.Config.MaxServers, ContentDownloader.Config.MaxDownloads ); ContentDownloader.Config.MaxServers = Math.Max( ContentDownloader.Config.MaxServers, ContentDownloader.Config.MaxDownloads );
if ( username != null && password == null && ( !ContentDownloader.Config.RememberPassword || !ConfigStore.TheConfig.LoginKeys.ContainsKey( username ) ) ) if ( username != null && password == null && ( !ContentDownloader.Config.RememberPassword || !ConfigStore.TheConfig.LoginKeys.ContainsKey( username ) ) )
@ -167,7 +173,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-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-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-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-os <os>\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-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-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-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." ); Console.WriteLine( "\t-manifest-only\t\t\t- downloads a human readable manifest for any depots that would be downloaded." );

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

Loading…
Cancel
Save