<commit_before>﻿using Microsoft.Extensions.Logging;
using System;
using System.Globalization;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.IO;

namespace Tgstation.Server.Host.Components.Byond
{
	/// <summary>
	/// <see cref="IByondInstaller"/> for windows systems
	/// </summary>
	sealed class WindowsByondInstaller : IByondInstaller, IDisposable
	{
		/// <summary>
		/// The URL format string for getting BYOND windows version {0}.{1} zipfile
		/// </summary>
		const string ByondRevisionsURL = "https://secure.byond.com/download/build/{0}/{0}.{1}_byond.zip";
		/// <summary>
		/// Directory to byond installation configuration
		/// </summary>
		const string ByondConfigDir = "byond/config";
		/// <summary>
		/// BYOND's DreamDaemon config file
		/// </summary>
		const string ByondDDConfig = "daemon.txt";
		/// <summary>
		/// Setting to add to <see cref="ByondDDConfig"/> to suppress an invisible user prompt for running a trusted mode .dmb
		/// </summary>
		const string ByondNoPromptTrustedMode = "trusted-check 0";
		/// <summary>
		/// The directory that contains the BYOND directx redistributable
		/// </summary>
		const string ByondDXDir = "byond/directx";

		/// <inheritdoc />
		public string DreamDaemonName => "dreamdaemon.exe";

		/// <inheritdoc />
		public string DreamMakerName => "dm.exe";

		/// <summary>
		/// The <see cref="IIOManager"/> for the <see cref="WindowsByondInstaller"/>
		/// </summary>
		readonly IIOManager ioManager;

		/// <summary>
		/// The <see cref="IProcessExecutor"/> for the <see cref="WindowsByondInstaller"/><commit_msg>Fix trusted mode prompt still showing on Windows<commit_after>﻿using Microsoft.Extensions.Logging;
using System;
using System.Globalization;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.IO;

namespace Tgstation.Server.Host.Components.Byond
{
	/// <summary>
	/// <see cref="IByondInstaller"/> for windows systems
	/// </summary>
	sealed class WindowsByondInstaller : IByondInstaller, IDisposable
	{
		/// <summary>
		/// The URL format string for getting BYOND windows version {0}.{1} zipfile
		/// </summary>
		const string ByondRevisionsURL = "https://secure.byond.com/download/build/{0}/{0}.{1}_byond.zip";
		/// <summary>
		/// Directory to byond installation configuration
		/// </summary>
		const string ByondConfigDir = "byond/cfg";
		/// <summary>
		/// BYOND's DreamDaemon config file
		/// </summary>
		const string ByondDDConfig = "daemon.txt";
		/// <summary>
		/// Setting to add to <see cref="ByondDDConfig"/> to suppress an invisible user prompt for running a trusted mode .dmb
		/// </summary>
		const string ByondNoPromptTrustedMode = "trusted-check 0";
		/// <summary>
		/// The directory that contains the BYOND directx redistributable
		/// </summary>
		const string ByondDXDir = "byond/directx";

		/// <inheritdoc />
		public string DreamDaemonName => "dreamdaemon.exe";

		/// <inheritdoc />
		public string DreamMakerName => "dm.exe";

		/// <summary>
		/// The <see cref="IIOManager"/> for the <see cref="WindowsByondInstaller"/>
		/// </summary>
		readonly IIOManager ioManager;

		/// <summary>
		/// The <see cref="IProcessExecutor"/> for the <see cref="WindowsByondInstaller"/>
{'fraction_non_alphanumeric': 0.14770696843359143, 'fraction_numerical': 0.00357355568790947, 'mean_word_length': 3.514784946236559, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 53, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1890776', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1025, 'n_words': 280}