2019-07-21 04:40:54 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-07-23 04:27:26 +00:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Runtime.InteropServices;
|
2019-12-12 13:41:06 +00:00
|
|
|
|
using Alphaleonis.Win32.Filesystem;
|
2019-12-26 16:47:10 +00:00
|
|
|
|
using Wabbajack.Common.IO;
|
2019-07-21 04:40:54 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Common
|
|
|
|
|
{
|
|
|
|
|
public static class Consts
|
|
|
|
|
{
|
2019-10-03 03:23:11 +00:00
|
|
|
|
public static bool TestMode { get; set; } = false;
|
|
|
|
|
|
2019-07-21 04:40:54 +00:00
|
|
|
|
public static string GameFolderFilesDir = "Game Folder Files";
|
2019-12-07 16:35:57 +00:00
|
|
|
|
public static string ManualGameFilesDir = "Manual Game Files";
|
2019-08-24 23:59:22 +00:00
|
|
|
|
public static string LOOTFolderFilesDir = "LOOT Config Files";
|
2019-07-26 20:59:14 +00:00
|
|
|
|
public static string BSACreationDir = "TEMP_BSA_FILES";
|
2019-10-20 11:26:42 +00:00
|
|
|
|
|
|
|
|
|
public static string ModListDownloadFolder = "downloaded_mod_lists";
|
|
|
|
|
|
2019-09-26 04:14:15 +00:00
|
|
|
|
public static string MegaPrefix = "https://mega.nz/#!";
|
2019-07-23 04:27:26 +00:00
|
|
|
|
|
2019-12-17 17:18:28 +00:00
|
|
|
|
public static HashSet<string> SupportedArchives = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {".zip", ".rar", ".7z", ".7zip", ".fomod", ".omod", ".exe", ".dat"};
|
2019-12-15 11:27:16 +00:00
|
|
|
|
|
|
|
|
|
// HashSet with archive extensions that need to be tested before extraction
|
2019-12-17 17:15:26 +00:00
|
|
|
|
public static HashSet<string> TestArchivesBeforeExtraction = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {".dat"};
|
2019-09-24 15:51:47 +00:00
|
|
|
|
|
2019-12-17 17:15:26 +00:00
|
|
|
|
public static HashSet<string> SupportedBSAs = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {".bsa", ".ba2"};
|
2019-07-24 04:31:08 +00:00
|
|
|
|
|
2019-12-17 17:15:26 +00:00
|
|
|
|
public static HashSet<string> ConfigFileExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {".json", ".ini", ".yml"};
|
|
|
|
|
public static HashSet<string> ESPFileExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".esp", ".esm", ".esl"};
|
|
|
|
|
public static HashSet<string> AssetFileExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {".dds", ".tga", ".nif", ".psc", ".pex"};
|
2019-09-02 22:36:57 +00:00
|
|
|
|
|
2019-08-24 20:23:16 +00:00
|
|
|
|
public static string NexusCacheDirectory = "nexus_link_cache";
|
|
|
|
|
|
2019-08-11 22:57:32 +00:00
|
|
|
|
public static string WABBAJACK_INCLUDE = "WABBAJACK_INCLUDE";
|
2019-09-04 20:49:13 +00:00
|
|
|
|
public static string WABBAJACK_ALWAYS_ENABLE = "WABBAJACK_ALWAYS_ENABLE";
|
2019-09-20 22:49:32 +00:00
|
|
|
|
public static string WABBAJACK_NOMATCH_INCLUDE = "WABBAJACK_NOMATCH_INCLUDE";
|
2019-12-04 12:36:56 +00:00
|
|
|
|
public static string WABBAJACK_VORTEX_MANUAL = "WABBAJACK_VORTEX_MANUAL";
|
2019-08-11 22:57:32 +00:00
|
|
|
|
|
2019-08-24 23:20:54 +00:00
|
|
|
|
public static string GAME_PATH_MAGIC_BACK = "{--||GAME_PATH_MAGIC_BACK||--}";
|
|
|
|
|
public static string GAME_PATH_MAGIC_DOUBLE_BACK = "{--||GAME_PATH_MAGIC_DOUBLE_BACK||--}";
|
|
|
|
|
public static string GAME_PATH_MAGIC_FORWARD = "{--||GAME_PATH_MAGIC_FORWARD||--}";
|
|
|
|
|
|
|
|
|
|
public static string MO2_PATH_MAGIC_BACK = "{--||MO2_PATH_MAGIC_BACK||--}";
|
|
|
|
|
public static string MO2_PATH_MAGIC_DOUBLE_BACK = "{--||MO2_PATH_MAGIC_DOUBLE_BACK||--}";
|
|
|
|
|
public static string MO2_PATH_MAGIC_FORWARD = "{--||MO2_PATH_MAGIC_FORWARD||--}";
|
|
|
|
|
|
2019-09-03 22:12:39 +00:00
|
|
|
|
public static string DOWNLOAD_PATH_MAGIC_BACK = "{--||DOWNLOAD_PATH_MAGIC_BACK||--}";
|
|
|
|
|
public static string DOWNLOAD_PATH_MAGIC_DOUBLE_BACK = "{--||DOWNLOAD_PATH_MAGIC_DOUBLE_BACK||--}";
|
|
|
|
|
public static string DOWNLOAD_PATH_MAGIC_FORWARD = "{--||DOWNLOAD_PATH_MAGIC_FORWARD||--}";
|
|
|
|
|
|
2019-08-24 23:20:54 +00:00
|
|
|
|
|
2019-09-14 04:35:42 +00:00
|
|
|
|
public static string AppName = "Wabbajack";
|
2019-08-25 03:46:32 +00:00
|
|
|
|
|
2019-11-04 18:12:53 +00:00
|
|
|
|
public static HashSet<string> GameESMs = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
2019-10-19 10:59:43 +00:00
|
|
|
|
{
|
|
|
|
|
// Skyrim LE/SE
|
|
|
|
|
"Skyrim.esm",
|
|
|
|
|
"Update.esm",
|
|
|
|
|
"Dawnguard.esm",
|
|
|
|
|
"HearthFires.esm",
|
|
|
|
|
"Dragonborn.esm",
|
|
|
|
|
|
|
|
|
|
// Fallout 4
|
|
|
|
|
"DLCRobot.esm",
|
|
|
|
|
"DLCworkshop01.esm",
|
|
|
|
|
"DLCCoast.esm",
|
2019-11-04 17:57:19 +00:00
|
|
|
|
"DLCworkshop02.esm",
|
|
|
|
|
"DLCworkshop03.esm",
|
2019-10-19 10:59:43 +00:00
|
|
|
|
"DLCNukaWorld.esm",
|
|
|
|
|
"DLCUltraHighResolution.esm"
|
|
|
|
|
|
|
|
|
|
};
|
2019-09-14 04:35:42 +00:00
|
|
|
|
|
2019-09-29 22:21:18 +00:00
|
|
|
|
public static string ModPermissionsURL = "https://raw.githubusercontent.com/wabbajack-tools/opt-out-lists/master/NexusModPermissions.yml";
|
|
|
|
|
public static string ServerWhitelistURL = "https://raw.githubusercontent.com/wabbajack-tools/opt-out-lists/master/ServerWhitelist.yml";
|
2019-10-20 19:30:39 +00:00
|
|
|
|
public static string ModlistMetadataURL = "https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/modlists.json";
|
2019-12-15 21:52:12 +00:00
|
|
|
|
public static string ModlistSummaryURL = "http://build.wabbajack.org/lists/status.json";
|
2019-09-14 04:35:42 +00:00
|
|
|
|
public static string UserAgent
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var platformType = Environment.Is64BitOperatingSystem ? "x64" : "x86";
|
|
|
|
|
var headerString =
|
2019-10-12 21:37:16 +00:00
|
|
|
|
$"{AppName}/{Assembly.GetEntryAssembly()?.GetName()?.Version ?? new Version(0, 1)} ({Environment.OSVersion.VersionString}; {platformType}) {RuntimeInformation.FrameworkDescription}";
|
2019-09-14 04:35:42 +00:00
|
|
|
|
return headerString;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-10-14 21:04:12 +00:00
|
|
|
|
|
2019-11-20 00:15:46 +00:00
|
|
|
|
public static string HashFileExtension => ".xxHash";
|
2019-12-12 13:41:06 +00:00
|
|
|
|
public static string LocalAppDataPath => Path.Combine(KnownFolders.LocalAppData.Path, "Wabbajack");
|
2020-01-04 02:49:08 +00:00
|
|
|
|
public static string MetricsKeyHeader => "x-metrics-key";
|
2019-11-20 00:15:46 +00:00
|
|
|
|
|
2019-11-05 05:08:47 +00:00
|
|
|
|
public static string WabbajackCacheLocation = "http://build.wabbajack.org/nexus_api_cache/";
|
2020-01-02 00:11:13 +00:00
|
|
|
|
|
2020-01-01 16:19:06 +00:00
|
|
|
|
public static string WabbajackCacheHostname = "build.wabbajack.org";
|
2020-01-02 00:11:13 +00:00
|
|
|
|
public static int WabbajackCachePort = 80;
|
2020-01-03 23:02:48 +00:00
|
|
|
|
public static int MaxHTTPRetries = 4;
|
2019-07-21 04:40:54 +00:00
|
|
|
|
}
|
2019-11-04 17:57:19 +00:00
|
|
|
|
}
|