Removed steam_appid.txt requirement

This commit is contained in:
Garry Newman 2018-01-22 17:19:48 +00:00
parent 1ccea72a13
commit d2331e68e2
20 changed files with 17 additions and 19 deletions

View File

@ -8,7 +8,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class Achievements
{
[TestMethod]

View File

@ -8,7 +8,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class App
{
[TestMethod]

View File

@ -9,7 +9,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public partial class Client
{
[TestMethod]

View File

@ -6,7 +6,6 @@ namespace Facepunch.Steamworks.Test
{
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
[TestClass]
public class Friends
{

View File

@ -7,7 +7,6 @@ namespace Facepunch.Steamworks.Test
{
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
[TestClass]
public class Inventory
{

View File

@ -9,7 +9,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class Leaderboard
{
[TestMethod]

View File

@ -10,7 +10,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem("steam_api.dll")]
[DeploymentItem("steam_api64.dll")]
[DeploymentItem("steam_appid.txt")]
public class Lobby
{
[TestMethod]

View File

@ -9,7 +9,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public partial class Networking
{
[TestMethod]

View File

@ -6,7 +6,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class RemoteStorage
{
[TestMethod]

View File

@ -9,7 +9,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class RichPresence
{
[TestMethod]

View File

@ -5,7 +5,6 @@ namespace Facepunch.Steamworks.Test
{
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
[DeploymentItem( "tier0_s.dll" )]
[DeploymentItem( "vstdlib_s.dll" )]
[DeploymentItem( "steamclient.dll" )]

View File

@ -10,7 +10,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public partial class ServerList
{
[TestMethod]

View File

@ -8,7 +8,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class Stats
{
[TestMethod]

View File

@ -7,7 +7,6 @@ namespace Facepunch.Steamworks.Test
{
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
[TestClass]
public class Voice
{

View File

@ -9,7 +9,6 @@ namespace Facepunch.Steamworks.Test
[TestClass]
[DeploymentItem( "steam_api.dll" )]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_appid.txt" )]
public class WorkshopTest
{
[TestMethod]

View File

@ -1 +0,0 @@
252490

View File

@ -26,6 +26,18 @@ public class BaseSteamworks : IDisposable
private List<SteamNative.CallbackHandle> CallbackHandles = new List<SteamNative.CallbackHandle>();
protected BaseSteamworks( uint appId )
{
AppId = appId;
//
// No need for the "steam_appid.txt" file any more
//
System.Environment.SetEnvironmentVariable("SteamAppId", AppId.ToString());
System.Environment.SetEnvironmentVariable("SteamGameId", AppId.ToString());
}
public virtual void Dispose()
{
foreach ( var h in CallbackHandles )
@ -57,6 +69,9 @@ public virtual void Dispose()
native.Dispose();
native = null;
}
System.Environment.SetEnvironmentVariable("SteamAppId", null );
System.Environment.SetEnvironmentVariable("SteamGameId", null );
}
protected void SetupCommonInterfaces()

View File

@ -63,7 +63,7 @@ public partial class Client : BaseSteamworks
public User User { get; private set; }
public RemoteStorage RemoteStorage { get; private set; }
public Client( uint appId )
public Client( uint appId ) : base( appId )
{
if ( Instance != null )
{

View File

@ -24,7 +24,7 @@ public partial class Server : BaseSteamworks
/// <summary>
/// Initialize a Steam Server instance
/// </summary>
public Server( uint appId, ServerInit init )
public Server( uint appId, ServerInit init) : base( appId )
{
if ( Instance != null )
{