Updated DepotDownloader to .NET 4.0 and fixed compilation.

Fixed IPAddress byte order issue.
pull/8/head
Ryan Stecker 14 years ago
parent 8c227bcfa0
commit eb483d207f

@ -180,14 +180,14 @@ namespace DepotDownloader
return null;
}
SteamApps.AppInfoCallback.AppInfo app;
SteamApps.AppInfoCallback.App app;
if (!steam3.AppInfo.TryGetValue((uint)appId, out app))
{
return null;
}
KeyValue section_kv;
if (!app.Sections.TryGetValue((int)section, out section_kv))
if (!app.Sections.TryGetValue(section, out section_kv))
{
return null;
}
@ -224,7 +224,7 @@ namespace DepotDownloader
return 0;
}
SteamApps.AppInfoCallback.AppInfo app;
SteamApps.AppInfoCallback.App app;
if (!steam3.AppInfo.TryGetValue((uint)appId, out app))
{
return 0;
@ -288,6 +288,7 @@ namespace DepotDownloader
Username = username,
Password = password,
RequestSteam2Ticket = true,
}
);

@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DepotDownloader</RootNamespace>
<AssemblyName>DepotDownloader</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -100,6 +101,9 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

@ -26,7 +26,7 @@ namespace DepotDownloader
public Dictionary<uint, byte[]> AppTickets { get; private set; }
public Dictionary<uint, byte[]> DepotKeys { get; private set; }
public Dictionary<uint, SteamApps.AppInfoCallback.AppInfo> AppInfo { get; private set; }
public Dictionary<uint, SteamApps.AppInfoCallback.App> AppInfo { get; private set; }
public Dictionary<uint, bool> AppInfoOverridesCDR { get; private set; }
public SteamClient steamClient;
@ -57,7 +57,7 @@ namespace DepotDownloader
this.AppTickets = new Dictionary<uint, byte[]>();
this.DepotKeys = new Dictionary<uint, byte[]>();
this.AppInfo = new Dictionary<uint, SteamApps.AppInfoCallback.AppInfo>();
this.AppInfo = new Dictionary<uint, SteamApps.AppInfoCallback.App>();
this.AppInfoOverridesCDR = new Dictionary<uint, bool>();
this.steamClient = new SteamClient();
@ -86,7 +86,7 @@ namespace DepotDownloader
if (bAborted || AppInfo.ContainsKey(appId))
return;
steamApps.GetAppInfo(appId);
steamApps.GetAppInfo( new uint[] { appId } );
do
{
@ -159,7 +159,7 @@ namespace DepotDownloader
if ( callback == null )
break;
if ( callback.IsType<SteamClient.ConnectCallback>() )
if ( callback.IsType<SteamClient.ConnectedCallback>() )
{
Console.WriteLine( " Done!" );
bConnected = true;
@ -167,9 +167,9 @@ namespace DepotDownloader
Console.Write( "Logging '{0}' into Steam3...", logonDetails.Username );
}
else if ( callback.IsType<SteamUser.LogOnCallback>() )
else if ( callback.IsType<SteamUser.LoggedOnCallback>() )
{
var msg = callback as SteamUser.LogOnCallback;
var msg = callback as SteamUser.LoggedOnCallback;
if ( msg.Result == EResult.AccountLogonDenied )
{
@ -247,11 +247,11 @@ namespace DepotDownloader
AppInfo.Add(app.AppID, app);
KeyValue depots;
if (app.Sections.TryGetValue((int)EAppInfoSection.Depots, out depots))
if ( app.Sections.TryGetValue( EAppInfoSection.Depots, out depots ) )
{
if (depots[app.AppID.ToString()]["OverridesCDDB"].AsBoolean(false))
if ( depots[ app.AppID.ToString() ][ "OverridesCDDB" ].AsBoolean( false ) )
{
AppInfoOverridesCDR[app.AppID] = true;
AppInfoOverridesCDR[ app.AppID ] = true;
}
}
}

@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Loading…
Cancel
Save