<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Xml;
using System.ComponentModel;

namespace RelhaxModpack
{
    /// <summary>
    /// Handles all generic constants and statics used throughout the application
    /// </summary>
    public static class Settings
    {
        #region Application Files and Folders
        /// <summary>
        /// The Startup root path of the application. Does not include the application name
        /// </summary>
        public static readonly string ApplicationStartupPath = AppDomain.CurrentDomain.BaseDirectory;

        /// <summary>
        /// The name of the application settings file
        /// </summary>
        public const string ModpackSettingsFileName = "RelhaxSettingsV2.xml";

        /// <summary>
        /// The name of the settings color file
        /// </summary>
        /// <remarks>Stores all settings</remarks>
        public const string UISettingsColorFile = "UISettings.xml";

        /// <summary>
        /// The name of the legacy application settings file
        /// </summary>
        public const string OldModpackSettingsFilename = "RelHaxSettings.xml";

        /// <summary>
        /// The name of the application color settings file
        /// </summary>
        public const string UISettingsFileName = "UISettings.xml";

        /// <summary>
        /// The name of the modpack editor tool settings file
        /// </summary>
        public const string EditorSettingsFilename = "EditorSettings.xml";

        /// <summary>
        /// The name of the modpack patch designer tool settings file
        /// </summary>
        public const string PatcherSettingsFilename = "PatchSettings.xml";

        /// <summary>
        /// The name of the selection file when used in the setting "save last installed selection"
        /// </summary>
        public const string LastSavedConfigFilename = "lastInstalledConfig.xml";

        /// <summary>
        /// The file in the application root directory used to unlock the "launch editor" button
        /// </summary>
        public const string EditorLaunchFromMainWindowFilename = "EditorUnlock.txt";

        /// <summary>
        /// The default end address of the location of mod packages (start + zip + end)
        /// </summary>
        public const string DefaultEndAddress = @"";

        /// <summary>
        /// The filename of the V2 root database document. All category names and filenames, and version info is in this document
        /// </summary>
        public const string BetaDatabaseV2RootFilename = "database.xml";

        /// <summary>
        /// The filename to download the latest stable or beta application zip file as
        /// </summary>
        public const string ApplicationUpdateFileName = "RelhaxModpack_update.zip";

        /// <summary>
        /// The filename to save the self updater script as
        /// </summary>
        public const string RelicBatchUpdateScript = "relic_self_updater.bat";

        /// <summary>
        /// The filename of the self updater script inside the manager zip file
        /// </summary>
        public const string RelicBatchUpdateScriptServer = "relic_self_updater.txt";

        /// <summary>
        /// The old V1 filename to save the self updater script as
        /// </summary>
        [Obsolete("Database format V1 is deprecated, please use V2 instead.")]
        public const string RelicBatchUpdateScriptOld = "RelicCopyUpdate.bat";

        /// <summary>
        /// The root filename of the list of selection files
        /// </summary>
        public const string SelectionsXml = "selections.xml";

        /// <summary>
        /// The absolute path of the application zip file and zip database file folder
        /// </summary>
        public static readonly string RelhaxDownloadsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxDownloads");

        /// <summary>
        /// The old absolute path of the application zip file and zip database file folder
        /// </summary>
        /// [Obsolete]
        public static readonly string RelhaxDownloadsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxDownloads");

        /// <summary>
        /// The absolute path of the application mod backup folder
        /// </summary>
        public static readonly string RelhaxModBackupFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxModBackup");

        /// <summary>
        /// The old absolute path of the application mod backup folder
        /// </summary>
        /// [Obsolete]
        public static readonly string RelhaxModBackupFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxModBackup");

        /// <summary>
        /// The absolute path of the application user selections folder. Default location 
        /// </summary>
        public static readonly string RelhaxUserSelectionsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxUserSelections");

        /// <summary>
        /// The old absolute path of the application user selections folder. Old Default location
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxUserSelectionsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxUserConfigs");

        /// <summary>
        /// The absolute path of the application folder where users can place custom mod zip files
        /// </summary>
        public static readonly string RelhaxUserModsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxUserMods");

        /// <summary>
        /// The old absolute path of the application folder where users can place custom mod zip files
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxUserModsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxUserMods");

        /// <summary>
        /// The absolute path of the application temporary folder
        /// </summary>
        public static readonly string RelhaxTempFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxTemp");

        /// <summary>
        /// The old absolute path of the application temporary folder
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxTempFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxTemp");

        /// <summary>
        /// The absolute path of the application 3rd party dll references folder. Currently used to hold atlas file libraries
        /// </summary>
        public static readonly string RelhaxLibrariesFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxLibraries");

        /// <summary>
        /// The old absolute path of the application 3rd party dll references folder. Currently used to hold atlas file libraries
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxLibrariesFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxLibraries");

        public static readonly string WoT64bitFolder = "win64";

        public static readonly string WoT32bitFolder = "win32";

        public static readonly string WoT64bitFolderWithSlash = "\\win64";

        public static readonly string WoT32bitFolderWithSlash = "\\win32";

        /// <summary>
        /// The name of the installer folder to hold all patch xml files in
        /// </summary>
        public const string PatchFolderName = "_patch";

        /// <summary><commit_msg>make them constants<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Xml;
using System.ComponentModel;

namespace RelhaxModpack
{
    /// <summary>
    /// Handles all generic constants and statics used throughout the application
    /// </summary>
    public static class Settings
    {
        #region Application Files and Folders
        /// <summary>
        /// The Startup root path of the application. Does not include the application name
        /// </summary>
        public static readonly string ApplicationStartupPath = AppDomain.CurrentDomain.BaseDirectory;

        /// <summary>
        /// The name of the application settings file
        /// </summary>
        public const string ModpackSettingsFileName = "RelhaxSettingsV2.xml";

        /// <summary>
        /// The name of the settings color file
        /// </summary>
        /// <remarks>Stores all settings</remarks>
        public const string UISettingsColorFile = "UISettings.xml";

        /// <summary>
        /// The name of the legacy application settings file
        /// </summary>
        public const string OldModpackSettingsFilename = "RelHaxSettings.xml";

        /// <summary>
        /// The name of the application color settings file
        /// </summary>
        public const string UISettingsFileName = "UISettings.xml";

        /// <summary>
        /// The name of the modpack editor tool settings file
        /// </summary>
        public const string EditorSettingsFilename = "EditorSettings.xml";

        /// <summary>
        /// The name of the modpack patch designer tool settings file
        /// </summary>
        public const string PatcherSettingsFilename = "PatchSettings.xml";

        /// <summary>
        /// The name of the selection file when used in the setting "save last installed selection"
        /// </summary>
        public const string LastSavedConfigFilename = "lastInstalledConfig.xml";

        /// <summary>
        /// The file in the application root directory used to unlock the "launch editor" button
        /// </summary>
        public const string EditorLaunchFromMainWindowFilename = "EditorUnlock.txt";

        /// <summary>
        /// The default end address of the location of mod packages (start + zip + end)
        /// </summary>
        public const string DefaultEndAddress = @"";

        /// <summary>
        /// The filename of the V2 root database document. All category names and filenames, and version info is in this document
        /// </summary>
        public const string BetaDatabaseV2RootFilename = "database.xml";

        /// <summary>
        /// The filename to download the latest stable or beta application zip file as
        /// </summary>
        public const string ApplicationUpdateFileName = "RelhaxModpack_update.zip";

        /// <summary>
        /// The filename to save the self updater script as
        /// </summary>
        public const string RelicBatchUpdateScript = "relic_self_updater.bat";

        /// <summary>
        /// The filename of the self updater script inside the manager zip file
        /// </summary>
        public const string RelicBatchUpdateScriptServer = "relic_self_updater.txt";

        /// <summary>
        /// The old V1 filename to save the self updater script as
        /// </summary>
        [Obsolete("Database format V1 is deprecated, please use V2 instead.")]
        public const string RelicBatchUpdateScriptOld = "RelicCopyUpdate.bat";

        /// <summary>
        /// The root filename of the list of selection files
        /// </summary>
        public const string SelectionsXml = "selections.xml";

        /// <summary>
        /// The absolute path of the application zip file and zip database file folder
        /// </summary>
        public static readonly string RelhaxDownloadsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxDownloads");

        /// <summary>
        /// The old absolute path of the application zip file and zip database file folder
        /// </summary>
        /// [Obsolete]
        public static readonly string RelhaxDownloadsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxDownloads");

        /// <summary>
        /// The absolute path of the application mod backup folder
        /// </summary>
        public static readonly string RelhaxModBackupFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxModBackup");

        /// <summary>
        /// The old absolute path of the application mod backup folder
        /// </summary>
        /// [Obsolete]
        public static readonly string RelhaxModBackupFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxModBackup");

        /// <summary>
        /// The absolute path of the application user selections folder. Default location 
        /// </summary>
        public static readonly string RelhaxUserSelectionsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxUserSelections");

        /// <summary>
        /// The old absolute path of the application user selections folder. Old Default location
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxUserSelectionsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxUserConfigs");

        /// <summary>
        /// The absolute path of the application folder where users can place custom mod zip files
        /// </summary>
        public static readonly string RelhaxUserModsFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxUserMods");

        /// <summary>
        /// The old absolute path of the application folder where users can place custom mod zip files
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxUserModsFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxUserMods");

        /// <summary>
        /// The absolute path of the application temporary folder
        /// </summary>
        public static readonly string RelhaxTempFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxTemp");

        /// <summary>
        /// The old absolute path of the application temporary folder
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxTempFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxTemp");

        /// <summary>
        /// The absolute path of the application 3rd party dll references folder. Currently used to hold atlas file libraries
        /// </summary>
        public static readonly string RelhaxLibrariesFolderPath = Path.Combine(ApplicationStartupPath, "RelhaxLibraries");

        /// <summary>
        /// The old absolute path of the application 3rd party dll references folder. Currently used to hold atlas file libraries
        /// </summary>
        [Obsolete]
        public static readonly string RelhaxLibrariesFolderPathOld = Path.Combine(ApplicationStartupPath, "RelHaxLibraries");

        public const string WoT64bitFolder = "win64";

        public const string WoT32bitFolder = "win32";

        public const string WoT64bitFolderWithSlash = "\\win64";

        public const string WoT32bitFolderWithSlash = "\\win32";

        /// <summary>
        /// The name of the installer folder to hold all patch xml files in
        /// </summary>
        public const string PatchFolderName = "_patch";

        /// <summary>
{'fraction_non_alphanumeric': 0.09324973319103522, 'fraction_numerical': 0.0032017075773745998, 'mean_word_length': 2.3399420806415683, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2394912', 'n_tokens_mistral': 3634, 'n_tokens_neox': 3543, 'n_words': 1311}