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

@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DepotDownloader</RootNamespace> <RootNamespace>DepotDownloader</RootNamespace>
<AssemblyName>DepotDownloader</AssemblyName> <AssemblyName>DepotDownloader</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -100,6 +101,9 @@
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. 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[]> AppTickets { get; private set; }
public Dictionary<uint, byte[]> DepotKeys { 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 Dictionary<uint, bool> AppInfoOverridesCDR { get; private set; }
public SteamClient steamClient; public SteamClient steamClient;
@ -57,7 +57,7 @@ namespace DepotDownloader
this.AppTickets = new Dictionary<uint, byte[]>(); this.AppTickets = new Dictionary<uint, byte[]>();
this.DepotKeys = 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.AppInfoOverridesCDR = new Dictionary<uint, bool>();
this.steamClient = new SteamClient(); this.steamClient = new SteamClient();
@ -86,7 +86,7 @@ namespace DepotDownloader
if (bAborted || AppInfo.ContainsKey(appId)) if (bAborted || AppInfo.ContainsKey(appId))
return; return;
steamApps.GetAppInfo(appId); steamApps.GetAppInfo( new uint[] { appId } );
do do
{ {
@ -159,7 +159,7 @@ namespace DepotDownloader
if ( callback == null ) if ( callback == null )
break; break;
if ( callback.IsType<SteamClient.ConnectCallback>() ) if ( callback.IsType<SteamClient.ConnectedCallback>() )
{ {
Console.WriteLine( " Done!" ); Console.WriteLine( " Done!" );
bConnected = true; bConnected = true;
@ -167,9 +167,9 @@ namespace DepotDownloader
Console.Write( "Logging '{0}' into Steam3...", logonDetails.Username ); 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 ) if ( msg.Result == EResult.AccountLogonDenied )
{ {
@ -247,11 +247,11 @@ namespace DepotDownloader
AppInfo.Add(app.AppID, app); AppInfo.Add(app.AppID, app);
KeyValue depots; 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