diff --git a/Facepunch.Steamworks.Test/Client/AchievementsTest.cs b/Facepunch.Steamworks.Test/Client/AchievementsTest.cs index dc9db85..5cbbbe8 100644 --- a/Facepunch.Steamworks.Test/Client/AchievementsTest.cs +++ b/Facepunch.Steamworks.Test/Client/AchievementsTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/AppTest.cs b/Facepunch.Steamworks.Test/Client/AppTest.cs index 984e2fb..f24f6a4 100644 --- a/Facepunch.Steamworks.Test/Client/AppTest.cs +++ b/Facepunch.Steamworks.Test/Client/AppTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/ClientTest.cs b/Facepunch.Steamworks.Test/Client/ClientTest.cs index f08fbc4..0835a0d 100644 --- a/Facepunch.Steamworks.Test/Client/ClientTest.cs +++ b/Facepunch.Steamworks.Test/Client/ClientTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/FriendsTest.cs b/Facepunch.Steamworks.Test/Client/FriendsTest.cs index e039980..d8fc65a 100644 --- a/Facepunch.Steamworks.Test/Client/FriendsTest.cs +++ b/Facepunch.Steamworks.Test/Client/FriendsTest.cs @@ -6,7 +6,6 @@ namespace Facepunch.Steamworks.Test { [DeploymentItem( "steam_api.dll" )] [DeploymentItem( "steam_api64.dll" )] - [DeploymentItem( "steam_appid.txt" )] [TestClass] public class Friends { diff --git a/Facepunch.Steamworks.Test/Client/InventoryTest.cs b/Facepunch.Steamworks.Test/Client/InventoryTest.cs index 73e47da..d4adef4 100644 --- a/Facepunch.Steamworks.Test/Client/InventoryTest.cs +++ b/Facepunch.Steamworks.Test/Client/InventoryTest.cs @@ -7,7 +7,6 @@ namespace Facepunch.Steamworks.Test { [DeploymentItem( "steam_api.dll" )] [DeploymentItem( "steam_api64.dll" )] - [DeploymentItem( "steam_appid.txt" )] [TestClass] public class Inventory { diff --git a/Facepunch.Steamworks.Test/Client/LeaderboardTest.cs b/Facepunch.Steamworks.Test/Client/LeaderboardTest.cs index 5563c26..561b079 100644 --- a/Facepunch.Steamworks.Test/Client/LeaderboardTest.cs +++ b/Facepunch.Steamworks.Test/Client/LeaderboardTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/LobbyTest.cs b/Facepunch.Steamworks.Test/Client/LobbyTest.cs index d7dd31e..156f795 100644 --- a/Facepunch.Steamworks.Test/Client/LobbyTest.cs +++ b/Facepunch.Steamworks.Test/Client/LobbyTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/NetworkingTest.cs b/Facepunch.Steamworks.Test/Client/NetworkingTest.cs index 1200b81..34c7fbd 100644 --- a/Facepunch.Steamworks.Test/Client/NetworkingTest.cs +++ b/Facepunch.Steamworks.Test/Client/NetworkingTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/RemoteStorageTest.cs b/Facepunch.Steamworks.Test/Client/RemoteStorageTest.cs index 08f7f8b..15c31c3 100644 --- a/Facepunch.Steamworks.Test/Client/RemoteStorageTest.cs +++ b/Facepunch.Steamworks.Test/Client/RemoteStorageTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs b/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs index 8e5cf81..b261979 100644 --- a/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs +++ b/Facepunch.Steamworks.Test/Client/RichPresenceTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/Server/ServerTest.cs b/Facepunch.Steamworks.Test/Client/Server/ServerTest.cs index 3fcd49e..09dc2e0 100644 --- a/Facepunch.Steamworks.Test/Client/Server/ServerTest.cs +++ b/Facepunch.Steamworks.Test/Client/Server/ServerTest.cs @@ -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" )] diff --git a/Facepunch.Steamworks.Test/Client/ServerlistTest.cs b/Facepunch.Steamworks.Test/Client/ServerlistTest.cs index 2f13b33..bba5e01 100644 --- a/Facepunch.Steamworks.Test/Client/ServerlistTest.cs +++ b/Facepunch.Steamworks.Test/Client/ServerlistTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/StatsTest.cs b/Facepunch.Steamworks.Test/Client/StatsTest.cs index 7a62d1d..1a40967 100644 --- a/Facepunch.Steamworks.Test/Client/StatsTest.cs +++ b/Facepunch.Steamworks.Test/Client/StatsTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/Client/VoiceTest.cs b/Facepunch.Steamworks.Test/Client/VoiceTest.cs index a894179..9deb023 100644 --- a/Facepunch.Steamworks.Test/Client/VoiceTest.cs +++ b/Facepunch.Steamworks.Test/Client/VoiceTest.cs @@ -7,7 +7,6 @@ namespace Facepunch.Steamworks.Test { [DeploymentItem( "steam_api.dll" )] [DeploymentItem( "steam_api64.dll" )] - [DeploymentItem( "steam_appid.txt" )] [TestClass] public class Voice { diff --git a/Facepunch.Steamworks.Test/Client/WorkshopTest.cs b/Facepunch.Steamworks.Test/Client/WorkshopTest.cs index 7794a20..a96b01f 100644 --- a/Facepunch.Steamworks.Test/Client/WorkshopTest.cs +++ b/Facepunch.Steamworks.Test/Client/WorkshopTest.cs @@ -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] diff --git a/Facepunch.Steamworks.Test/bin/Debug/steam_appid.txt b/Facepunch.Steamworks.Test/bin/Debug/steam_appid.txt deleted file mode 100644 index 4968ca2..0000000 --- a/Facepunch.Steamworks.Test/bin/Debug/steam_appid.txt +++ /dev/null @@ -1 +0,0 @@ -252490 \ No newline at end of file diff --git a/Facepunch.Steamworks.Test/bin/Release/steam_appid.txt b/Facepunch.Steamworks.Test/bin/Release/steam_appid.txt deleted file mode 100644 index 4968ca2..0000000 --- a/Facepunch.Steamworks.Test/bin/Release/steam_appid.txt +++ /dev/null @@ -1 +0,0 @@ -252490 \ No newline at end of file diff --git a/Facepunch.Steamworks/BaseSteamworks.cs b/Facepunch.Steamworks/BaseSteamworks.cs index 8bb71d7..9b6db62 100644 --- a/Facepunch.Steamworks/BaseSteamworks.cs +++ b/Facepunch.Steamworks/BaseSteamworks.cs @@ -26,6 +26,18 @@ public class BaseSteamworks : IDisposable private List CallbackHandles = new List(); + + 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() diff --git a/Facepunch.Steamworks/Client.cs b/Facepunch.Steamworks/Client.cs index 0a4bbb6..af65c20 100644 --- a/Facepunch.Steamworks/Client.cs +++ b/Facepunch.Steamworks/Client.cs @@ -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 ) { diff --git a/Facepunch.Steamworks/Server.cs b/Facepunch.Steamworks/Server.cs index 01c21d4..900a983 100644 --- a/Facepunch.Steamworks/Server.cs +++ b/Facepunch.Steamworks/Server.cs @@ -24,7 +24,7 @@ public partial class Server : BaseSteamworks /// /// Initialize a Steam Server instance /// - public Server( uint appId, ServerInit init ) + public Server( uint appId, ServerInit init) : base( appId ) { if ( Instance != null ) {