Added -listdepots.

Reworked -manifest to be an optional parameter that dumps manifests when -game, -app, or -depot is supplied.
Closes #18.
pull/8/head
Ryan Stecker 14 years ago
parent 5bc21f183a
commit 7e02724c05

@ -324,7 +324,7 @@ namespace DepotDownloader
};
}
public static void DownloadApp(int appId)
public static void DownloadApp(int appId, bool bListOnly=false)
{
if(steam3 != null)
steam3.RequestAppInfo((uint)appId);
@ -367,6 +367,19 @@ namespace DepotDownloader
return;
}
if ( bListOnly )
{
Console.WriteLine( "\n {0} Depots:", appId );
foreach ( var depot in depotIDs )
{
var depotName = CDRManager.GetDepotName( depot );
Console.WriteLine( "{0} - {1}", depot, depotName );
}
return;
}
foreach (var depot in depotIDs)
{
// Steam2 dependency

@ -42,9 +42,10 @@ namespace DepotDownloader
return;
}
bool bManifest = false;
bool bGameserver = true;
bool bApp = false;
bool bListDepots = HasParameter(args, "-listdepots");
bool bDumpManifest = HasParameter( args, "-manifest" );
int appId = -1;
int depotId = -1;
@ -57,27 +58,18 @@ namespace DepotDownloader
depotId = GetIntParameter( args, "-depot" );
if (depotId == -1)
{
depotId = GetIntParameter(args, "-manifest");
if ( depotId == -1 && appId == -1 )
{
Console.WriteLine("Error: -game, -app, -depot or -manifest not specified!");
Console.WriteLine( "Error: -game, -app, or -depot not specified!" );
return;
}
else if (depotId >= 0)
{
bManifest = true;
}
else if ( appId >= 0 )
{
bApp = true;
}
}
}
ContentDownloader.Config.DownloadManifestOnly = bManifest;
ContentDownloader.Config.DownloadManifestOnly = bDumpManifest;
int cellId = GetIntParameter(args, "-cellid");
@ -183,7 +175,7 @@ namespace DepotDownloader
if (bApp)
{
ContentDownloader.DownloadApp(appId);
ContentDownloader.DownloadApp(appId, bListDepots);
}
else if ( !bGameserver )
{
@ -198,6 +190,25 @@ namespace DepotDownloader
List<int> depotIDs = CDRManager.GetDepotIDsForGameserver( gameName, ContentDownloader.Config.DownloadAllPlatforms );
if ( depotIDs.Count == 0 )
{
Console.WriteLine( "Error: No depots for specified game '{0}'", gameName );
return;
}
if ( bListDepots )
{
Console.WriteLine( "\n '{0}' Depots:", gameName );
foreach ( var depot in depotIDs )
{
var depotName = CDRManager.GetDepotName( depot );
Console.WriteLine( "{0} - {1}", depot, depotName );
}
return;
}
foreach ( int currentDepotId in depotIDs )
{
depotVersion = CDRManager.GetLatestDepotVersion(currentDepotId, ContentDownloader.Config.PreferBetaVersions);
@ -279,6 +290,7 @@ namespace DepotDownloader
Console.WriteLine( "\t-no-exclude\t\t\t- don't exclude any files when downloading depots with the -game parameter." );
Console.WriteLine( "\t-all-platforms\t\t\t- downloads all platform-specific depots when -game or -app is used." );
Console.WriteLine( "\t-beta\t\t\t\t- download beta version of depots if available." );
Console.WriteLine( "\t-listdepots\t\t\t- When used with -app or -game, only list relevant depotIDs and quit." );
}
}
}

Loading…
Cancel
Save