mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-20 01:46:17 +00:00
Added operating system switch (#24)
* Added operating system switch * Fix typo and throw error if both -os and -all-platforms are specified
This commit is contained in:
1 parent
8daaf0daa2
commit
42b832e465
3 files changed
+13
-4
No files matched your search
@@ -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,14 @@ 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 );
|
||||
|
||||
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 );
|
||||
|
||||
@@ -114,7 +121,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 +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-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 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-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 program 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.
|
||||
|
||||
Reference in new issue
Block a user