Beispiel #1
0
 private static void Deploy()
 {
     try
     {
         string WindowsSteamAPIFile = $@"{GetFolderPath(SpecialFolder.Windows) ?? @"C:\Windows"}\System32\steam_api64.dll";
         if (FileExists("steam_api64.dll"))
         {
             Delete("steam_api64.dll");
         }
         if (FileExists(WindowsSteamAPIFile))
         {
             Delete(WindowsSteamAPIFile);
         }
         using (Stream ResourceStream = GetResourceStream(new Uri("pack://application:,,,/Resources/steam_api64.dll.ta")).Stream)
             using (FileStream Writer = Create(SteamAPIFile))
                 DecompressSingleFile(ResourceStream, Writer);
         WriteAllText(AppIDFile, "480");
         SteamAPI?.Load();
         Delete(AppIDFile);
     }
     catch { }
 }