Skip to content

Commit

Permalink
64位程序支持
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed May 27, 2021
1 parent 80fb6fc commit f420414
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
8 changes: 4 additions & 4 deletions SteamToolsV2+.sln
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,15 @@ Global
{5A539932-2EB9-40F6-A4C1-94E5ECAB3B34}.Release|x64.Build.0 = Release|Any CPU
{5A539932-2EB9-40F6-A4C1-94E5ECAB3B34}.Release|x86.ActiveCfg = Release|Any CPU
{5A539932-2EB9-40F6-A4C1-94E5ECAB3B34}.Release|x86.Build.0 = Release|Any CPU
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|Any CPU.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|Any CPU.Build.0 = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|ARM.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|ARM64.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|iPhone.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|x64.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|x86.ActiveCfg = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|x86.Build.0 = Debug|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|x86.ActiveCfg = Debug|Any CPU
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Debug|x86.Build.0 = Debug|Any CPU
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Release|Any CPU.ActiveCfg = Release|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Release|Any CPU.Build.0 = Release|x86
{6DD9644F-F005-4C19-8ADF-70C303EC5BB8}.Release|ARM.ActiveCfg = Release|x86
Expand Down
2 changes: 1 addition & 1 deletion references/SteamAchievementManager
19 changes: 17 additions & 2 deletions source/SteamTool.Steam4NET.Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public static int Main()

Console.WriteLine("\nSteam3 tests:");

ISteamClient012 steamclient = Steamworks.CreateInterface<ISteamClient012>();
ISteamClient009 steamclient9 = Steamworks.CreateInterface<ISteamClient009>();
ISteamClient017 steamclient = Steamworks.CreateInterface<ISteamClient017>();
//ISteamClient009 steamclient9 = Steamworks.CreateInterface<ISteamClient009>();
if (steamclient == null)
{
Console.WriteLine("steamclient is null !");
Expand Down Expand Up @@ -161,6 +161,21 @@ public static int Main()
Console.WriteLine("clientuser is null !");
return -1;
}

ISteamApps001 clientapps = steamclient.GetISteamApps<ISteamApps001>(user, pipe);
if (clientapps == null)
{
Console.WriteLine("clientapps is null !");
return -1;
}

ISteamApps006 clientapps6 = steamclient.GetISteamApps<ISteamApps006>(user, pipe);
if (clientapps6 == null)
{
Console.WriteLine("clientapps6 is null !");
return -1;
}

IClientFriends clientfriends = clientengine.GetIClientFriends<IClientFriends>(user, pipe);
if (clientfriends == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
<!--<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>-->
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<Platforms>AnyCPU;x86;x64</Platforms>
<PlatformTarget>AnyCPU</PlatformTarget>
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<!--<UseWindowsForms>false</UseWindowsForms>-->
<!--<UseWPF>false</UseWPF>-->
</PropertyGroup>
Expand Down Expand Up @@ -62,6 +62,10 @@
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>

<!--<ItemGroup>
<TrimmerRootAssembly Include="CefNet" />
<TrimmerRootAssembly Include="CefNet.Avalonia" />
Expand Down
3 changes: 2 additions & 1 deletion src/ST.Client.Desktop.Windows/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public static IServiceCollection AddDesktopPlatformService(this IServiceCollecti
if (DI.Platform == Platform.Windows)
{
services.AddSingleton<IDesktopPlatformService, WindowsDesktopPlatformServiceImpl>();
if (hasSteam && RuntimeInformation.ProcessArchitecture == Architecture.X86)
//if (hasSteam && RuntimeInformation.ProcessArchitecture == Architecture.X86)
if (hasSteam)
{
services.AddSingleton<ISteamworksLocalApiService, SteamworksLocalApiServiceImpl>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public SteamworksLocalApiServiceImpl()
SteamClient = new Client();
}

public bool IsSupported => RuntimeInformation.ProcessArchitecture == Architecture.X86;
public bool IsSupported => RuntimeInformation.ProcessArchitecture == (Architecture.X86 | Architecture.X64);

public void DisposeSteamClient()
{
Expand Down

0 comments on commit f420414

Please sign in to comment.