From fb23f94e4e54fdf252f86748d15cfc995051df55 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 13 Jan 2024 21:42:48 +0100 Subject: [PATCH] Install GSI --- OpenCS2hock/Installer.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenCS2hock/Installer.cs b/OpenCS2hock/Installer.cs index d52925d..a91a622 100644 --- a/OpenCS2hock/Installer.cs +++ b/OpenCS2hock/Installer.cs @@ -4,7 +4,13 @@ namespace OpenCS2hock; public static class Installer { - public static string? GetInstallDirectory(int appId = 730) + public static void InstallGsi() + { + string installLocation = Path.Combine(GetInstallDirectory(), "game\\csgo\\cfg\\gamestate_integration_opencs2hock.cfg"); + File.WriteAllText(installLocation, Resources.GSI_CFG_Content); + } + + public static string GetInstallDirectory(int appId = 730) { string steamInstallation = #pragma warning disable CA1416 //Registry only available on Windows @@ -29,4 +35,5 @@ public static class Installer return installationPath; } + } \ No newline at end of file