From 8d2cc1e7757f71bb0cca249e071b1ada72acd47e Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Wed, 13 Nov 2024 00:33:30 -0800 Subject: [PATCH 1/7] Working macOS build - Force min OS version to macOS 11 via project/plist attributes. Force 8.0.204 SDK to ensure it isn't targeted for macOS 15. - Adjust file paths for resources. User-modifiable resources are stored in ~/.endlessclient and copied there if they do not exist. - Multitargeting for macOS - arm64 and x64 - The above need some adjustments and cleanup --- .vscode/launch.json | 8 +-- .vscode/tasks.json | 9 ++-- EOLib.Config/ConfigFileLoadActions.cs | 2 + EOLib.Config/ConfigStrings.cs | 20 ++++++- EOLib.Graphics/PEFileCollection.cs | 6 +++ EOLib.IO/Services/MapFileLoadService.cs | 19 ++++++- EOLib.IO/Services/MapFileSaveService.cs | 18 ++++++- EOLib.Localization/DataFileLoadActions.cs | 19 +++++-- EOLib/Net/FileTransfer/FileRequestActions.cs | 25 ++++++--- EOLib/misc.cs | 52 ++++++++++++++----- EndlessClient/EndlessClient.csproj | 30 +++-------- EndlessClient/GameExecution/EndlessGame.cs | 2 - EndlessClient/Info.plist | 2 + .../Initialization/ConfigInitializer.cs | 40 +++++++++++++- global.json | 9 ++-- 15 files changed, 197 insertions(+), 64 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3e3efafc5..2ef6dd032 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -38,13 +38,13 @@ "stopAtEntry": false }, { - "name": "EndlessClient - Mac", + "name": "EndlessClient - Mac (arm64)", "type": "coreclr", "request": "launch", - "preLaunchTask": "build-client-mac", - "program": "${workspaceFolder}/bin/Debug/client/net6.0-macos/osx-x64/EndlessClient.app/Contents/MacOS/EndlessClient", + "preLaunchTask": "build-client-mac-arm", + "program": "${workspaceFolder}/bin/Debug/client/net8.0-macos/osx-arm64/EndlessClient.app/Contents/MacOS/EndlessClient", "args": [], - "cwd": "${workspaceFolder}/bin/Debug/client/net6.0-macos/osx-x64/EndlessClient.app", + "cwd": "${workspaceFolder}/bin/Debug/client/net8.0-macos/osx-arm64/EndlessClient.app", "console": "internalConsole", "stopAtEntry": false }, diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 14e0cf923..dd09c9033 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -38,14 +38,17 @@ "problemMatcher": "$msCompile" }, { - "label": "build-client-mac", + "label": "build-client-mac-arm", "command": "dotnet", "type": "process", "args": [ "build", + "/p:PublishReadyToRun=false", + "/p:TieredCompilation=false", + "--self-contained", "${workspaceFolder}/EndlessClient/EndlessClient.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "-r", + "osx-arm64" ], "problemMatcher": "$msCompile" }, diff --git a/EOLib.Config/ConfigFileLoadActions.cs b/EOLib.Config/ConfigFileLoadActions.cs index 6643f4911..16b10d969 100644 --- a/EOLib.Config/ConfigFileLoadActions.cs +++ b/EOLib.Config/ConfigFileLoadActions.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Runtime.InteropServices; using AutomaticTypeMapper; namespace EOLib.Config diff --git a/EOLib.Config/ConfigStrings.cs b/EOLib.Config/ConfigStrings.cs index 94b82bcb4..67fbd691c 100644 --- a/EOLib.Config/ConfigStrings.cs +++ b/EOLib.Config/ConfigStrings.cs @@ -1,11 +1,14 @@ -using System.Diagnostics.CodeAnalysis; +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.InteropServices; namespace EOLib.Config { [ExcludeFromCodeCoverage] public static class ConfigStrings { - public const string Default_Config_File = "config/settings.ini"; + public static string Default_Config_File { get; } = GetPath("config/settings.ini"); public const string Connection = "CONNECTION"; public const string Host = "Host"; @@ -38,5 +41,18 @@ public static class ConfigStrings public const string HearWhisper = "HearWhisper"; public const string Interaction = "Interaction"; public const string LogChat = "LogChat"; + + private static string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + return Path.Combine(home, ".endlessclient", inputPath); + } + else + { + return inputPath; + } + } } } diff --git a/EOLib.Graphics/PEFileCollection.cs b/EOLib.Graphics/PEFileCollection.cs index e6a52387c..daba8463f 100644 --- a/EOLib.Graphics/PEFileCollection.cs +++ b/EOLib.Graphics/PEFileCollection.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Runtime.InteropServices; using AutomaticTypeMapper; using PELoaderLib; @@ -19,7 +20,12 @@ public void PopulateCollectionWithStandardGFX() private IPEFile CreateGFXFile(GFXTypes file) { var number = ((int)file).ToString("D3"); + +#if OSX + var fName = Path.Combine("Contents", "Resources", "gfx", "gfx" + number + ".egf"); +#else var fName = Path.Combine("gfx", "gfx" + number + ".egf"); +#endif #if LINUX || OSX return new PEFile(fName); diff --git a/EOLib.IO/Services/MapFileLoadService.cs b/EOLib.IO/Services/MapFileLoadService.cs index ac859dcf9..1407d1145 100644 --- a/EOLib.IO/Services/MapFileLoadService.cs +++ b/EOLib.IO/Services/MapFileLoadService.cs @@ -1,4 +1,6 @@ -using System.IO; +using System; +using System.IO; +using System.Runtime.InteropServices; using AutomaticTypeMapper; using EOLib.IO.Map; using EOLib.IO.Services.Serializers; @@ -17,7 +19,7 @@ public MapFileLoadService(IMapDeserializer mapFileSerializer) public IMapFile LoadMapByID(int mapID) { - var mapFileBytes = File.ReadAllBytes(string.Format(MapFile.MapFileFormatString, mapID)); + var mapFileBytes = File.ReadAllBytes(GetPath(string.Format(MapFile.MapFileFormatString, mapID))); var mapFile = _mapFileSerializer .DeserializeFromByteArray(mapFileBytes) @@ -37,5 +39,18 @@ public IMapFile LoadMapByPath(string pathToMapFile) return mapFile; } + + private string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + return Path.Combine(home, ".endlessclient", inputPath); + } + else + { + return inputPath; + } + } } } diff --git a/EOLib.IO/Services/MapFileSaveService.cs b/EOLib.IO/Services/MapFileSaveService.cs index fc894ddd0..a1a592f4c 100644 --- a/EOLib.IO/Services/MapFileSaveService.cs +++ b/EOLib.IO/Services/MapFileSaveService.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Runtime.InteropServices; using AutomaticTypeMapper; using EOLib.IO.Map; using EOLib.IO.Services.Serializers; @@ -18,11 +19,11 @@ public MapFileSaveService(IMapFileSerializer mapFileSerializer) public void SaveFileToDefaultDirectory(IMapFile mapFile, bool rewriteChecksum = true) { - var directoryName = Path.GetDirectoryName(string.Format(MapFile.MapFileFormatString, 1)) ?? ""; + var directoryName = GetPath(Path.GetDirectoryName(string.Format(MapFile.MapFileFormatString, 1)) ?? ""); if (!Directory.Exists(directoryName)) Directory.CreateDirectory(directoryName); - File.WriteAllBytes(string.Format(MapFile.MapFileFormatString, mapFile.Properties.MapID), + File.WriteAllBytes(GetPath(string.Format(MapFile.MapFileFormatString, mapFile.Properties.MapID)), _mapFileSerializer.SerializeToByteArray(mapFile, rewriteChecksum)); } @@ -33,5 +34,18 @@ public void SaveFile(string path, IMapFile mapFile, bool rewriteChecksum = true) File.WriteAllBytes(path, _mapFileSerializer.SerializeToByteArray(mapFile, rewriteChecksum)); } + + private string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + return Path.Combine(home, ".endlessclient", inputPath); + } + else + { + return inputPath; + } + } } } diff --git a/EOLib.Localization/DataFileLoadActions.cs b/EOLib.Localization/DataFileLoadActions.cs index 72ce8f619..4d95d912e 100644 --- a/EOLib.Localization/DataFileLoadActions.cs +++ b/EOLib.Localization/DataFileLoadActions.cs @@ -1,5 +1,6 @@ using System.IO; using System.Linq; +using System.Runtime.InteropServices; using AutomaticTypeMapper; namespace EOLib.Localization @@ -19,10 +20,10 @@ public DataFileLoadActions(IDataFileRepository dataFileRepository, public void LoadDataFiles() { - if (!Directory.Exists(DataFileConstants.DataFilePath)) + if (!Directory.Exists(GetPath(DataFileConstants.DataFilePath))) throw new DataFileLoadException(); - var files = Directory.GetFiles(DataFileConstants.DataFilePath, "*.edf") + var files = Directory.GetFiles(GetPath(DataFileConstants.DataFilePath), "*.edf") .OrderBy(x => x) .ToArray(); if (files.Length != DataFileConstants.ExpectedNumberOfDataFiles) @@ -41,9 +42,21 @@ public void LoadDataFiles() private bool DataFileNameIsValid(int fileNumber, string fileName) { - var expectedFormat = $"data/dat0{fileNumber:00}.edf"; + var expectedFormat = GetPath($"data/dat0{fileNumber:00}.edf"); return expectedFormat == fileName; } + + private string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return Path.Combine("Contents", "Resources", inputPath); + } + else + { + return inputPath; + } + } } public interface IDataFileLoadActions diff --git a/EOLib/Net/FileTransfer/FileRequestActions.cs b/EOLib/Net/FileTransfer/FileRequestActions.cs index 562c15257..e3186f5e4 100644 --- a/EOLib/Net/FileTransfer/FileRequestActions.cs +++ b/EOLib/Net/FileTransfer/FileRequestActions.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Threading.Tasks; using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; -using EOLib.Domain.Protocol; using EOLib.IO; using EOLib.IO.Extensions; using EOLib.IO.Pub; @@ -87,7 +87,7 @@ public async Task GetItemFileFromServer(int sessionID) var itemFiles = await _fileRequestService.RequestFile(FileType.Eif, sessionID); foreach (var file in itemFiles) - _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.EIFFormat, file.ID), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.EIFFormat, file.ID)), file, rewriteChecksum: false); _pubFileRepository.EIFFiles = itemFiles; _pubFileRepository.EIFFile = PubFileExtensions.Merge(itemFiles); @@ -99,7 +99,7 @@ public async Task GetNPCFileFromServer(int sessionID) var npcFiles = await _fileRequestService.RequestFile(FileType.Enf, sessionID); foreach (var file in npcFiles) - _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ENFFormat, file.ID), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ENFFormat, file.ID)), file, rewriteChecksum: false); _pubFileRepository.ENFFiles = npcFiles; _pubFileRepository.ENFFile = PubFileExtensions.Merge(npcFiles); } @@ -110,7 +110,7 @@ public async Task GetSpellFileFromServer(int sessionID) var spellFiles = await _fileRequestService.RequestFile(FileType.Esf, sessionID); foreach (var file in spellFiles) - _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ESFFormat, file.ID), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ESFFormat, file.ID)), file, rewriteChecksum: false); _pubFileRepository.ESFFiles = spellFiles; _pubFileRepository.ESFFile = PubFileExtensions.Merge(spellFiles); } @@ -121,7 +121,7 @@ public async Task GetClassFileFromServer(int sessionID) var classFiles = await _fileRequestService.RequestFile(FileType.Ecf, sessionID); foreach (var file in classFiles) - _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ECFFormat, file.ID), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ECFFormat, file.ID)), file, rewriteChecksum: false); _pubFileRepository.ECFFiles = classFiles; _pubFileRepository.ECFFile = PubFileExtensions.Merge(classFiles); } @@ -166,11 +166,24 @@ private static void DeleteExisting(string filter) { try { - foreach (var file in Directory.GetFiles("pub", filter)) + foreach (var file in Directory.GetFiles(GetPath(PubFileNameConstants.PubDirectory), filter)) File.Delete(file); } catch (IOException) { } } + + private static string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + return Path.Combine(home, ".endlessclient", inputPath); + } + else + { + return inputPath; + } + } } public interface IFileRequestActions diff --git a/EOLib/misc.cs b/EOLib/misc.cs index f72a59ea1..ecf154d5f 100644 --- a/EOLib/misc.cs +++ b/EOLib/misc.cs @@ -1,4 +1,8 @@ -namespace EOLib +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace EOLib { public static class Constants { @@ -17,20 +21,17 @@ public static class Constants public const int GhostTime = 5; - public const string LogFilePath = "log/debug.log"; - public const string LogFileFmt = "log/{0}-debug.log"; - - public const string SfxDirectory = "sfx"; - public const string MfxDirectory = "mfx"; - public const string JboxDirectory = "jbox"; + public static string SfxDirectory { get; } = GetPath("sfx"); + public static string MfxDirectory { get; } = GetPath("mfx"); + public static string JboxDirectory { get; } = GetPath("jbox"); - public const string FriendListFile = "config/friends.ini"; - public const string IgnoreListFile = "config/ignore.ini"; + public static string FriendListFile { get; } = GetModifiablePath("config/friends.ini"); + public static string IgnoreListFile { get; } = GetModifiablePath("config/ignore.ini"); - public const string InventoryFile = "config/inventory.ini"; - public const string SpellsFile = "config/spells.ini"; - public const string PanelLayoutFile = "config/layout.ini"; - public const string ChatLogFile = "chatlog.txt"; + public static string InventoryFile { get; } = GetModifiablePath("config/inventory.ini"); + public static string SpellsFile { get; } = GetModifiablePath("config/spells.ini"); + public static string PanelLayoutFile { get; } = GetModifiablePath("config/layout.ini"); + public static string ChatLogFile { get; } = GetModifiablePath("chatlog.txt"); //Should be easily customizable between different clients (based on graphics) //not a config option because this shouldn't be exposed at the user level @@ -67,5 +68,30 @@ Copyright Vult-R -- CoderDanUK"; public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}"; + + private static string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return Path.Combine("Contents", "Resources", inputPath); + } + else + { + return inputPath; + } + } + + private static string GetModifiablePath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + return Path.Combine(home, ".endlessclient", inputPath); + } + else + { + return inputPath; + } + } } } diff --git a/EndlessClient/EndlessClient.csproj b/EndlessClient/EndlessClient.csproj index 0c23e55f8..6ae43d22e 100644 --- a/EndlessClient/EndlessClient.csproj +++ b/EndlessClient/EndlessClient.csproj @@ -22,6 +22,9 @@ $(DefineConstants);OSX MacOSX io.moffat.endlessclient + true + 11.0 + osx-x64;osx-arm64 <_ResolveReferenceDependencies>true @@ -29,23 +32,15 @@ false ..\bin\$(Configuration)\client en + 1.4.0.2 Resources\Game.ico - - - - - - - - - @@ -60,17 +55,8 @@ - - - - - - - - - - - + <_client Include="$(MSBuildThisFileDirectory)\..\packages\endlessclient.binaries\$(EndlessClientBinariesPackageVersion)\build\net462\client\**\*.*" /> + @@ -80,7 +66,7 @@ - + @@ -88,6 +74,6 @@ - + diff --git a/EndlessClient/GameExecution/EndlessGame.cs b/EndlessClient/GameExecution/EndlessGame.cs index 4ec317fba..9856d3cce 100644 --- a/EndlessClient/GameExecution/EndlessGame.cs +++ b/EndlessClient/GameExecution/EndlessGame.cs @@ -95,8 +95,6 @@ public EndlessGame(IClientWindowSizeRepository windowSizeRepository, PreferredBackBufferWidth = ClientWindowSizeRepository.DEFAULT_BACKBUFFER_WIDTH, PreferredBackBufferHeight = ClientWindowSizeRepository.DEFAULT_BACKBUFFER_HEIGHT }; - - Content.RootDirectory = "Content"; } protected override void Initialize() diff --git a/EndlessClient/Info.plist b/EndlessClient/Info.plist index 2731c1699..df0dc7c47 100644 --- a/EndlessClient/Info.plist +++ b/EndlessClient/Info.plist @@ -4,5 +4,7 @@ CFBundleIconFile Game.icns + LSMinimumSystemVersion + 11.0 \ No newline at end of file diff --git a/EndlessClient/Initialization/ConfigInitializer.cs b/EndlessClient/Initialization/ConfigInitializer.cs index 83defdf85..b0aa5bd1c 100644 --- a/EndlessClient/Initialization/ConfigInitializer.cs +++ b/EndlessClient/Initialization/ConfigInitializer.cs @@ -1,4 +1,8 @@ -using AutomaticTypeMapper; +using System.IO; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using AutomaticTypeMapper; +using EOLib; using EOLib.Config; namespace EndlessClient.Initialization @@ -15,7 +19,41 @@ public ConfigInitializer(IConfigFileLoadActions configFileLoadActions) public void Initialize() { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + CopyDefaultConfigFiles(); + } _configFileLoadActions.LoadConfigFile(); } + + [SupportedOSPlatform("OSX")] + private void CopyDefaultConfigFiles() + { + if (!Directory.Exists(Path.GetDirectoryName(ConfigStrings.Default_Config_File))) + { + Directory.CreateDirectory(ConfigStrings.Default_Config_File); + } + + var files = new[] { + ConfigStrings.Default_Config_File, + Constants.InventoryFile, + Constants.SpellsFile, + Constants.FriendListFile, + Constants.IgnoreListFile, + Constants.PanelLayoutFile + }; + foreach (var file in files) + { + if (!File.Exists(file)) + { + var index = file.IndexOf(".endlessclient") + 15; + var source = Path.Combine("Contents", "Resources", file[index..]); + if (File.Exists(source)) + { + File.Copy(source, file); + } + } + } + } } } diff --git a/global.json b/global.json index 47cd9439e..294c878c5 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { - "sdk" : { - "version": "8.0.0", - "rollForward": "latestFeature" + "sdk": { + // todo: need to see if there's a way to only set 8.0.204 on macOS + "version": "8.0.204", + "rollForward": "disable" } -} \ No newline at end of file +} From 0326ab637c4310124fa9bdf9431bbddfc258e972 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Thu, 14 Nov 2024 23:20:39 -0800 Subject: [PATCH 2/7] Unify path resolution in single type PathResolver. Move Constants/PathResolver to shared assembly for all projects. --- EOBot/BotBase.cs | 3 +- .../BuiltInIdentifierConfigurator.cs | 2 +- .../ConfigFileLoadActionsTest.cs | 3 +- EOLib.Config/ConfigFileLoadActions.cs | 3 +- EOLib.Config/ConfigLoadException.cs | 3 +- EOLib.Config/ConfigStrings.cs | 20 +--- EOLib.Config/EOLib.Config.csproj | 3 + EOLib.Graphics/EOLib.Graphics.csproj | 1 + EOLib.Graphics/PEFileCollection.cs | 12 +-- EOLib.IO/Actions/MapFileLoadActions.cs | 2 +- EOLib.IO/EOLib.IO.csproj | 3 + EOLib.IO/Map/MapFile.cs | 2 - EOLib.IO/NumericConstants.cs | 15 --- EOLib.IO/PubFileNameConstants.cs | 19 ---- EOLib.IO/Services/BasePubLoadService.cs | 3 +- EOLib.IO/Services/ClassFileLoadService.cs | 3 +- EOLib.IO/Services/ItemFileLoadService.cs | 3 +- EOLib.IO/Services/MapFileLoadService.cs | 16 +-- EOLib.IO/Services/MapFileSaveService.cs | 19 +--- EOLib.IO/Services/NPCFileLoadService.cs | 3 +- EOLib.IO/Services/SpellFileLoadService.cs | 3 +- .../DataFileLoadActionsTest.cs | 15 +-- EOLib.Localization/DataFileConstants.cs | 8 -- EOLib.Localization/DataFileLoadActions.cs | 23 ++--- EOLib.Localization/DataFileRepository.cs | 3 +- EOLib.Logger/Constants.cs | 14 --- EOLib.Shared/Constants.cs | 88 +++++++++++++++++ EOLib.Shared/EOLib.Shared.csproj | 17 ++++ EOLib.Shared/PathResolver.cs | 35 +++++++ .../Domain/Character/WalkValidationActions.cs | 1 + EOLib/Domain/Chat/ChatLoggerProvider.cs | 1 + EOLib/Domain/Item/ItemPickupValidator.cs | 1 + .../Spells/SpellCastValidationActions.cs | 1 + EOLib/EOLib.csproj | 1 + .../Communication/INetworkClientFactory.cs | 2 +- .../Net/Communication/IWaitablePacketQueue.cs | 2 +- .../Net/Communication/NetworkClientFactory.cs | 3 +- EOLib/Net/Communication/PacketQueue.cs | 2 +- EOLib/Net/Communication/TimeoutConstants.cs | 8 ++ EOLib/Net/FileTransfer/FileRequestActions.cs | 34 ++----- EOLib/Net/Handlers/OutOfBandPacketHandler.cs | 1 + EOLib/misc.cs | 97 ------------------- EndlessClient.sln | 7 ++ EndlessClient/Audio/MfxPlayer.cs | 2 +- EndlessClient/Content/ContentProvider.cs | 2 +- .../ControlSets/CreateAccountControlSet.cs | 3 +- .../ControlSets/InitialControlSet.cs | 2 +- .../ControlSets/LoginPromptControlSet.cs | 4 +- .../ControlSets/ViewCreditsControlSet.cs | 2 +- .../Controllers/InventoryController.cs | 3 +- EndlessClient/Controllers/LoginController.cs | 2 +- .../Controllers/MainButtonController.cs | 2 +- EndlessClient/Dialogs/BankAccountDialog.cs | 2 +- EndlessClient/Dialogs/BoardDialog.cs | 2 +- EndlessClient/Dialogs/BookDialog.cs | 2 +- EndlessClient/Dialogs/ChangePasswordDialog.cs | 2 +- .../Dialogs/CreateCharacterDialog.cs | 2 +- EndlessClient/Dialogs/EOMessageBox.cs | 2 +- .../FriendIgnoreListDialogFactory.cs | 3 +- .../Dialogs/Factories/HelpDialogFactory.cs | 2 +- EndlessClient/Dialogs/GameLoadingDialog.cs | 2 +- EndlessClient/Dialogs/GuildDialog.cs | 2 +- EndlessClient/Dialogs/InnkeeperDialog.cs | 2 +- EndlessClient/Dialogs/ItemTransferDialog.cs | 2 +- EndlessClient/Dialogs/LawDialog.cs | 2 +- EndlessClient/Dialogs/ListDialogItem.cs | 2 +- EndlessClient/Dialogs/PlayerInfoDialog.cs | 3 +- EndlessClient/Dialogs/ProgressDialog.cs | 2 +- EndlessClient/Dialogs/QuestDialog.cs | 2 +- .../Dialogs/QuestStatusListDialogItem.cs | 4 +- EndlessClient/Dialogs/ScrollingListDialog.cs | 2 +- .../Dialogs/ScrollingMessageDialog.cs | 2 +- EndlessClient/Dialogs/SessionExpDialog.cs | 2 +- EndlessClient/Dialogs/SkillmasterDialog.cs | 2 +- EndlessClient/Dialogs/TextInputDialog.cs | 2 +- EndlessClient/Dialogs/TextMultiInputDialog.cs | 3 +- EndlessClient/Dialogs/TradeDialog.cs | 2 +- EndlessClient/GameExecution/EndlessGame.cs | 1 + .../GameExecution/GameStateActions.cs | 3 +- .../HUD/Chat/ChatNotificationActions.cs | 3 +- EndlessClient/HUD/Chat/ChatPanelTab.cs | 3 +- .../HUD/Controls/HudControlsFactory.cs | 1 + .../HUD/Inventory/InventoryPanelItem.cs | 2 +- EndlessClient/HUD/Panels/ActiveSpellsPanel.cs | 3 +- EndlessClient/HUD/Panels/HudPanelFactory.cs | 2 +- EndlessClient/HUD/Panels/InventoryPanel.cs | 2 +- EndlessClient/HUD/Panels/OnlineListPanel.cs | 2 +- EndlessClient/HUD/Panels/PartyPanel.cs | 2 +- EndlessClient/HUD/Panels/SettingsPanel.cs | 2 +- EndlessClient/HUD/Panels/StatsPanel.cs | 2 +- EndlessClient/HUD/Party/PartyPanelMember.cs | 2 +- EndlessClient/HUD/StatusBars/StatusBarBase.cs | 2 +- .../Initialization/ConfigInitializer.cs | 8 +- .../Character/CharacterAnimationActions.cs | 4 +- .../Rendering/Character/CharacterRenderer.cs | 2 +- EndlessClient/Rendering/Chat/ChatBubble.cs | 2 +- .../Rendering/Chat/ChatRenderableGenerator.cs | 3 +- .../Rendering/ContextMenuRenderer.cs | 2 +- EndlessClient/Rendering/Map/MapRenderer.cs | 1 + .../Rendering/MouseCursorRenderer.cs | 4 +- EndlessClient/Rendering/NPC/NPCRenderer.cs | 3 +- .../OtherCharacterEventSubscriber.cs | 2 +- .../UIControls/CharacterInfoPanel.cs | 2 +- EndlessClient/UIControls/ChatTextBox.cs | 2 +- EndlessClient/UIControls/StatusBarLabel.cs | 4 +- EndlessClient/UIControls/TimeLabel.cs | 2 +- global.json | 9 +- 107 files changed, 297 insertions(+), 367 deletions(-) delete mode 100644 EOLib.IO/NumericConstants.cs delete mode 100644 EOLib.IO/PubFileNameConstants.cs delete mode 100644 EOLib.Localization/DataFileConstants.cs delete mode 100644 EOLib.Logger/Constants.cs create mode 100644 EOLib.Shared/Constants.cs create mode 100644 EOLib.Shared/EOLib.Shared.csproj create mode 100644 EOLib.Shared/PathResolver.cs create mode 100644 EOLib/Net/Communication/TimeoutConstants.cs delete mode 100644 EOLib/misc.cs diff --git a/EOBot/BotBase.cs b/EOBot/BotBase.cs index 0ec336dd2..d9cd8176a 100644 --- a/EOBot/BotBase.cs +++ b/EOBot/BotBase.cs @@ -1,12 +1,11 @@ using System; using System.Threading; using System.Threading.Tasks; -using EOLib; using EOLib.Config; -using EOLib.Domain.Protocol; using EOLib.Net.Communication; using EOLib.Net.Connection; using EOLib.Net.PacketProcessing; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs index f28a3e674..25d7d98a6 100644 --- a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs +++ b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using EOBot.Interpreter.States; using EOBot.Interpreter.Variables; -using EOLib; using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Chat; @@ -17,6 +16,7 @@ using EOLib.Net.Communication; using EOLib.Net.Connection; using EOLib.Net.PacketProcessing; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs index 7452e0923..a03aa2ee6 100644 --- a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs +++ b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; using System.IO; +using EOLib.Shared; using NUnit.Framework; namespace EOLib.Config.Test @@ -130,7 +131,7 @@ private static void CreateTestConfigurationInDirectory(string contents) if (!Directory.Exists(ConfigDirectory)) Directory.CreateDirectory(ConfigDirectory); - File.WriteAllText(ConfigStrings.Default_Config_File, contents); + File.WriteAllText(Constants.Default_Config_File, contents); } } } diff --git a/EOLib.Config/ConfigFileLoadActions.cs b/EOLib.Config/ConfigFileLoadActions.cs index 16b10d969..78573b184 100644 --- a/EOLib.Config/ConfigFileLoadActions.cs +++ b/EOLib.Config/ConfigFileLoadActions.cs @@ -2,6 +2,7 @@ using System.IO; using System.Runtime.InteropServices; using AutomaticTypeMapper; +using EOLib.Shared; namespace EOLib.Config { @@ -17,7 +18,7 @@ public ConfigFileLoadActions(IConfigurationRepository configRepository) public void LoadConfigFile() { - var configFile = new IniReader(ConfigStrings.Default_Config_File); + var configFile = new IniReader(Constants.Default_Config_File); if (!configFile.Load()) throw new ConfigLoadException(); diff --git a/EOLib.Config/ConfigLoadException.cs b/EOLib.Config/ConfigLoadException.cs index 3c114ef24..baaf600d1 100644 --- a/EOLib.Config/ConfigLoadException.cs +++ b/EOLib.Config/ConfigLoadException.cs @@ -1,10 +1,11 @@ using System; +using EOLib.Shared; namespace EOLib.Config { public class ConfigLoadException : Exception { public ConfigLoadException() - : base("Unable to load the configuration file! Make sure there is a file in " + ConfigStrings.Default_Config_File) { } + : base("Unable to load the configuration file! Make sure there is a file in " + Constants.Default_Config_File) { } } } diff --git a/EOLib.Config/ConfigStrings.cs b/EOLib.Config/ConfigStrings.cs index 67fbd691c..259b99285 100644 --- a/EOLib.Config/ConfigStrings.cs +++ b/EOLib.Config/ConfigStrings.cs @@ -1,15 +1,10 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; namespace EOLib.Config { [ExcludeFromCodeCoverage] public static class ConfigStrings { - public static string Default_Config_File { get; } = GetPath("config/settings.ini"); - public const string Connection = "CONNECTION"; public const string Host = "Host"; public const string Port = "Port"; @@ -41,18 +36,5 @@ public static class ConfigStrings public const string HearWhisper = "HearWhisper"; public const string Interaction = "Interaction"; public const string LogChat = "LogChat"; - - private static string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - var home = Environment.GetEnvironmentVariable("HOME"); - return Path.Combine(home, ".endlessclient", inputPath); - } - else - { - return inputPath; - } - } } } diff --git a/EOLib.Config/EOLib.Config.csproj b/EOLib.Config/EOLib.Config.csproj index 5554d71fa..5e50a9114 100644 --- a/EOLib.Config/EOLib.Config.csproj +++ b/EOLib.Config/EOLib.Config.csproj @@ -15,4 +15,7 @@ + + + \ No newline at end of file diff --git a/EOLib.Graphics/EOLib.Graphics.csproj b/EOLib.Graphics/EOLib.Graphics.csproj index 1721ccf7f..d9a617009 100644 --- a/EOLib.Graphics/EOLib.Graphics.csproj +++ b/EOLib.Graphics/EOLib.Graphics.csproj @@ -24,5 +24,6 @@ + diff --git a/EOLib.Graphics/PEFileCollection.cs b/EOLib.Graphics/PEFileCollection.cs index daba8463f..3f8a17f92 100644 --- a/EOLib.Graphics/PEFileCollection.cs +++ b/EOLib.Graphics/PEFileCollection.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; using AutomaticTypeMapper; +using EOLib.Shared; using PELoaderLib; namespace EOLib.Graphics @@ -19,14 +18,7 @@ public void PopulateCollectionWithStandardGFX() private IPEFile CreateGFXFile(GFXTypes file) { - var number = ((int)file).ToString("D3"); - -#if OSX - var fName = Path.Combine("Contents", "Resources", "gfx", "gfx" + number + ".egf"); -#else - var fName = Path.Combine("gfx", "gfx" + number + ".egf"); -#endif - + var fName = string.Format(Constants.GFXFormat, (int)file); #if LINUX || OSX return new PEFile(fName); #else diff --git a/EOLib.IO/Actions/MapFileLoadActions.cs b/EOLib.IO/Actions/MapFileLoadActions.cs index 718b81bea..4184c3892 100644 --- a/EOLib.IO/Actions/MapFileLoadActions.cs +++ b/EOLib.IO/Actions/MapFileLoadActions.cs @@ -12,7 +12,7 @@ public class MapFileLoadActions : IMapFileLoadActions private readonly IMapFileLoadService _mapFileLoadService; public MapFileLoadActions(IMapFileRepository mapFileRepository, - IMapFileLoadService mapFileLoadService) + IMapFileLoadService mapFileLoadService) { _mapFileRepository = mapFileRepository; _mapFileLoadService = mapFileLoadService; diff --git a/EOLib.IO/EOLib.IO.csproj b/EOLib.IO/EOLib.IO.csproj index 4c29c00b9..d9d6e1662 100644 --- a/EOLib.IO/EOLib.IO.csproj +++ b/EOLib.IO/EOLib.IO.csproj @@ -17,4 +17,7 @@ + + + \ No newline at end of file diff --git a/EOLib.IO/Map/MapFile.cs b/EOLib.IO/Map/MapFile.cs index 8730cc3bc..3ec35bd0b 100644 --- a/EOLib.IO/Map/MapFile.cs +++ b/EOLib.IO/Map/MapFile.cs @@ -6,8 +6,6 @@ namespace EOLib.IO.Map { public class MapFile : IMapFile { - public const string MapFileFormatString = "maps/{0,5:D5}.emf"; - public IMapFileProperties Properties { get; private set; } public IReadOnlyMatrix Tiles => _mutableTiles; diff --git a/EOLib.IO/NumericConstants.cs b/EOLib.IO/NumericConstants.cs deleted file mode 100644 index c2746da31..000000000 --- a/EOLib.IO/NumericConstants.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Diagnostics.CodeAnalysis; - -namespace EOLib.IO -{ - [ExcludeFromCodeCoverage] - public static class NumericConstants - { - public const uint ONE_BYTE_MAX = 253; - public const uint TWO_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX; - public const uint THREE_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX; - public const uint FOUR_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX; - - public static readonly uint[] NUMERIC_MAXIMUM = { ONE_BYTE_MAX, TWO_BYTE_MAX, THREE_BYTE_MAX, FOUR_BYTE_MAX }; - } -} diff --git a/EOLib.IO/PubFileNameConstants.cs b/EOLib.IO/PubFileNameConstants.cs deleted file mode 100644 index 28708da13..000000000 --- a/EOLib.IO/PubFileNameConstants.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace EOLib.IO -{ - public static class PubFileNameConstants - { - public const string PubDirectory = "pub"; - - public const string EIFFormat = "pub/dat{0,3:D3}.eif"; - public const string EIFFilter = "dat*.eif"; - - public const string ENFFormat = "pub/dtn{0,3:D3}.enf"; - public const string ENFFilter = "dtn*.enf"; - - public const string ESFFormat = "pub/dsl{0,3:D3}.esf"; - public const string ESFFilter = "dsl*.esf"; - - public const string ECFFormat = "pub/dat{0,3:D3}.ecf"; - public const string ECFFilter = "dat*.ecf"; - } -} diff --git a/EOLib.IO/Services/BasePubLoadService.cs b/EOLib.IO/Services/BasePubLoadService.cs index 16d5ec649..174762e99 100644 --- a/EOLib.IO/Services/BasePubLoadService.cs +++ b/EOLib.IO/Services/BasePubLoadService.cs @@ -3,6 +3,7 @@ using System.IO; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { @@ -20,7 +21,7 @@ protected BasePubLoadService(IPubFileDeserializer pubFileDeserializer) public IEnumerable> LoadPubFromDefaultFile() { - return LoadPubFromExplicitFile(PubFileNameConstants.PubDirectory, FileFilter); + return LoadPubFromExplicitFile(Constants.PubDirectory, FileFilter); } public IEnumerable> LoadPubFromExplicitFile(string directory, string searchPattern) diff --git a/EOLib.IO/Services/ClassFileLoadService.cs b/EOLib.IO/Services/ClassFileLoadService.cs index 3b1478861..bce0392f7 100644 --- a/EOLib.IO/Services/ClassFileLoadService.cs +++ b/EOLib.IO/Services/ClassFileLoadService.cs @@ -1,13 +1,14 @@ using AutomaticTypeMapper; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { [AutoMappedType] public class ClassFileLoadService : BasePubLoadService { - protected override string FileFilter => PubFileNameConstants.ECFFilter; + protected override string FileFilter => Constants.ECFFilter; public ClassFileLoadService(IPubFileDeserializer pubFileDeserializer) : base(pubFileDeserializer) diff --git a/EOLib.IO/Services/ItemFileLoadService.cs b/EOLib.IO/Services/ItemFileLoadService.cs index 432bc3e9e..675ddbac7 100644 --- a/EOLib.IO/Services/ItemFileLoadService.cs +++ b/EOLib.IO/Services/ItemFileLoadService.cs @@ -1,13 +1,14 @@ using AutomaticTypeMapper; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { [AutoMappedType] public class ItemFileLoadService : BasePubLoadService { - protected override string FileFilter => PubFileNameConstants.EIFFilter; + protected override string FileFilter => Constants.EIFFilter; public ItemFileLoadService(IPubFileDeserializer pubFileDeserializer) : base(pubFileDeserializer) diff --git a/EOLib.IO/Services/MapFileLoadService.cs b/EOLib.IO/Services/MapFileLoadService.cs index 1407d1145..ec2cca22c 100644 --- a/EOLib.IO/Services/MapFileLoadService.cs +++ b/EOLib.IO/Services/MapFileLoadService.cs @@ -4,6 +4,7 @@ using AutomaticTypeMapper; using EOLib.IO.Map; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { @@ -19,7 +20,7 @@ public MapFileLoadService(IMapDeserializer mapFileSerializer) public IMapFile LoadMapByID(int mapID) { - var mapFileBytes = File.ReadAllBytes(GetPath(string.Format(MapFile.MapFileFormatString, mapID))); + var mapFileBytes = File.ReadAllBytes(string.Format(Constants.MapFileFormatString, mapID)); var mapFile = _mapFileSerializer .DeserializeFromByteArray(mapFileBytes) @@ -39,18 +40,5 @@ public IMapFile LoadMapByPath(string pathToMapFile) return mapFile; } - - private string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - var home = Environment.GetEnvironmentVariable("HOME"); - return Path.Combine(home, ".endlessclient", inputPath); - } - else - { - return inputPath; - } - } } } diff --git a/EOLib.IO/Services/MapFileSaveService.cs b/EOLib.IO/Services/MapFileSaveService.cs index a1a592f4c..21baae552 100644 --- a/EOLib.IO/Services/MapFileSaveService.cs +++ b/EOLib.IO/Services/MapFileSaveService.cs @@ -1,9 +1,9 @@ using System; using System.IO; -using System.Runtime.InteropServices; using AutomaticTypeMapper; using EOLib.IO.Map; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { @@ -19,11 +19,11 @@ public MapFileSaveService(IMapFileSerializer mapFileSerializer) public void SaveFileToDefaultDirectory(IMapFile mapFile, bool rewriteChecksum = true) { - var directoryName = GetPath(Path.GetDirectoryName(string.Format(MapFile.MapFileFormatString, 1)) ?? ""); + var directoryName = Constants.MapDirectory; if (!Directory.Exists(directoryName)) Directory.CreateDirectory(directoryName); - File.WriteAllBytes(GetPath(string.Format(MapFile.MapFileFormatString, mapFile.Properties.MapID)), + File.WriteAllBytes(string.Format(Constants.MapFileFormatString, mapFile.Properties.MapID), _mapFileSerializer.SerializeToByteArray(mapFile, rewriteChecksum)); } @@ -34,18 +34,5 @@ public void SaveFile(string path, IMapFile mapFile, bool rewriteChecksum = true) File.WriteAllBytes(path, _mapFileSerializer.SerializeToByteArray(mapFile, rewriteChecksum)); } - - private string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - var home = Environment.GetEnvironmentVariable("HOME"); - return Path.Combine(home, ".endlessclient", inputPath); - } - else - { - return inputPath; - } - } } } diff --git a/EOLib.IO/Services/NPCFileLoadService.cs b/EOLib.IO/Services/NPCFileLoadService.cs index 6ca58027c..be018ed15 100644 --- a/EOLib.IO/Services/NPCFileLoadService.cs +++ b/EOLib.IO/Services/NPCFileLoadService.cs @@ -1,13 +1,14 @@ using AutomaticTypeMapper; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { [AutoMappedType] public class NPCFileLoadService : BasePubLoadService { - protected override string FileFilter => PubFileNameConstants.ENFFilter; + protected override string FileFilter => Constants.ENFFilter; public NPCFileLoadService(IPubFileDeserializer pubFileDeserializer) : base(pubFileDeserializer) diff --git a/EOLib.IO/Services/SpellFileLoadService.cs b/EOLib.IO/Services/SpellFileLoadService.cs index 0eb60642f..e8bd29c67 100644 --- a/EOLib.IO/Services/SpellFileLoadService.cs +++ b/EOLib.IO/Services/SpellFileLoadService.cs @@ -1,13 +1,14 @@ using AutomaticTypeMapper; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; +using EOLib.Shared; namespace EOLib.IO.Services { [AutoMappedType] public class SpellFileLoadService : BasePubLoadService { - protected override string FileFilter => PubFileNameConstants.ESFFilter; + protected override string FileFilter => Constants.ESFFilter; public SpellFileLoadService(IPubFileDeserializer pubFileDeserializer) : base(pubFileDeserializer) diff --git a/EOLib.Localization.Test/DataFileLoadActionsTest.cs b/EOLib.Localization.Test/DataFileLoadActionsTest.cs index 9735c14c0..b9a2e0c08 100644 --- a/EOLib.Localization.Test/DataFileLoadActionsTest.cs +++ b/EOLib.Localization.Test/DataFileLoadActionsTest.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.IO; +using EOLib.Shared; using NUnit.Framework; namespace EOLib.Localization.Test @@ -22,8 +23,8 @@ public void SetUp() [TearDown] public void TearDown() { - if (Directory.Exists(DataFileConstants.DataFilePath)) - Directory.Delete(DataFileConstants.DataFilePath, true); + if (Directory.Exists(Constants.DataFilePath)) + Directory.Delete(Constants.DataFilePath, true); } [Test] @@ -59,20 +60,20 @@ public void WhenLoadDataFiles_RepositoryHasExpectedNumberOfFiles() _actions.LoadDataFiles(); - Assert.That(_dataFileRepository.DataFiles.Count, Is.EqualTo(DataFileConstants.ExpectedNumberOfDataFiles)); + Assert.That(_dataFileRepository.DataFiles.Count, Is.EqualTo(Constants.ExpectedNumberOfDataFiles)); } private void CreateRequiredDirectory() { - if (!Directory.Exists(DataFileConstants.DataFilePath)) - Directory.CreateDirectory(DataFileConstants.DataFilePath); + if (!Directory.Exists(Constants.DataFilePath)) + Directory.CreateDirectory(Constants.DataFilePath); } - private void GivenEDFFilesInRequiredDirectory(int numberOfFiles = DataFileConstants.ExpectedNumberOfDataFiles, + private void GivenEDFFilesInRequiredDirectory(int numberOfFiles = Constants.ExpectedNumberOfDataFiles, string nameFormat = "dat0{0:00}.edf") { for (int i = 1; i <= numberOfFiles; ++i) - File.Create(string.Format(Path.Combine(DataFileConstants.DataFilePath, nameFormat), i)).Close(); + File.Create(string.Format(Path.Combine(Constants.DataFilePath, nameFormat), i)).Close(); } } } diff --git a/EOLib.Localization/DataFileConstants.cs b/EOLib.Localization/DataFileConstants.cs deleted file mode 100644 index d65a64d24..000000000 --- a/EOLib.Localization/DataFileConstants.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOLib.Localization -{ - public static class DataFileConstants - { - public const string DataFilePath = "data/"; - public const int ExpectedNumberOfDataFiles = 12; - } -} diff --git a/EOLib.Localization/DataFileLoadActions.cs b/EOLib.Localization/DataFileLoadActions.cs index 4d95d912e..d05ad3aae 100644 --- a/EOLib.Localization/DataFileLoadActions.cs +++ b/EOLib.Localization/DataFileLoadActions.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Runtime.InteropServices; using AutomaticTypeMapper; +using EOLib.Shared; namespace EOLib.Localization { @@ -20,17 +21,17 @@ public DataFileLoadActions(IDataFileRepository dataFileRepository, public void LoadDataFiles() { - if (!Directory.Exists(GetPath(DataFileConstants.DataFilePath))) + if (!Directory.Exists(Constants.DataFilePath)) throw new DataFileLoadException(); - var files = Directory.GetFiles(GetPath(DataFileConstants.DataFilePath), "*.edf") + var files = Directory.GetFiles(Constants.DataFilePath, "*.edf") .OrderBy(x => x) .ToArray(); - if (files.Length != DataFileConstants.ExpectedNumberOfDataFiles) + if (files.Length != Constants.ExpectedNumberOfDataFiles) throw new DataFileLoadException(); _dataFileRepository.DataFiles.Clear(); - for (int i = 1; i <= DataFileConstants.ExpectedNumberOfDataFiles; ++i) + for (int i = 1; i <= Constants.ExpectedNumberOfDataFiles; ++i) { if (!DataFileNameIsValid(i, files[i - 1])) throw new DataFileLoadException(); @@ -42,21 +43,9 @@ public void LoadDataFiles() private bool DataFileNameIsValid(int fileNumber, string fileName) { - var expectedFormat = GetPath($"data/dat0{fileNumber:00}.edf"); + var expectedFormat = string.Format(Constants.DataFileFormat, fileNumber).Replace('/', Path.DirectorySeparatorChar); return expectedFormat == fileName; } - - private string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - return Path.Combine("Contents", "Resources", inputPath); - } - else - { - return inputPath; - } - } } public interface IDataFileLoadActions diff --git a/EOLib.Localization/DataFileRepository.cs b/EOLib.Localization/DataFileRepository.cs index c3b3347db..71518d90a 100644 --- a/EOLib.Localization/DataFileRepository.cs +++ b/EOLib.Localization/DataFileRepository.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using AutomaticTypeMapper; +using EOLib.Shared; namespace EOLib.Localization { @@ -14,7 +15,7 @@ public class DataFileRepository : IDataFileRepository, IDataFileProvider public DataFileRepository() { - _dataFiles = new Dictionary(DataFileConstants.ExpectedNumberOfDataFiles); + _dataFiles = new Dictionary(Constants.ExpectedNumberOfDataFiles); } } diff --git a/EOLib.Logger/Constants.cs b/EOLib.Logger/Constants.cs deleted file mode 100644 index 3df2bbe1b..000000000 --- a/EOLib.Logger/Constants.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOLib.Logger -{ - internal static class Constants - { - internal const int FLUSH_TIME_MS = 30000; - internal const int FLUSH_LINES_WRITTEN = 50; - internal const int SPLIT_FILE_BYTE_LENGTH = 100000; - - internal const string LOG_DIRECTORY = "log"; - - internal const string LOG_FILE_PATH = LOG_DIRECTORY + "/debug.log"; - internal const string LOG_FILE_FMT = LOG_DIRECTORY + "/{0}-debug.log"; - } -} diff --git a/EOLib.Shared/Constants.cs b/EOLib.Shared/Constants.cs new file mode 100644 index 000000000..d422ffc89 --- /dev/null +++ b/EOLib.Shared/Constants.cs @@ -0,0 +1,88 @@ +namespace EOLib.Shared +{ + public static class Constants + { + public const int MaxChallenge = 11_092_110; + + public const byte ViewLength = 16; + + public const int LockerMaxSingleItemAmount = 200; + public const int MaxLockerUpgrades = 7; + public const int PartyRequestTimeoutSeconds = 15; + public const int TradeRequestTimeoutSeconds = 15; + public const int MuteDefaultTimeMinutes = 5; + + public const int GhostTime = 5; + + public const int ExpectedNumberOfDataFiles = 12; + + public static string Default_Config_File { get; } = PathResolver.GetModifiablePath("config/settings.ini"); + + public static string DataFilePath { get; } = PathResolver.GetPath("data"); + public static string DataFileFormat { get; } = PathResolver.GetPath("data/dat{0,3:D3}.edf"); + + public static string MapDirectory { get; } = PathResolver.GetModifiablePath("maps"); + public static string MapFileFormatString { get; } = $"{MapDirectory}/{{0,5:D5}}.emf"; + + public static string PubDirectory = "pub"; + public static string EIFFormat { get; } = PathResolver.GetModifiablePath("pub/dat{0,3:D3}.eif"); + public static string ENFFormat { get; } = PathResolver.GetModifiablePath("pub/dtn{0,3:D3}.enf"); + public static string ESFFormat { get; } = PathResolver.GetModifiablePath("pub/dsl{0,3:D3}.esf"); + public static string ECFFormat { get; } = PathResolver.GetModifiablePath("pub/dat{0,3:D3}.ecf"); + + public const string EIFFilter = "dat*.eif"; + public const string ENFFilter = "dtn*.enf"; + public const string ESFFilter = "dsl*.esf"; + public const string ECFFilter = "dat*.ecf"; + + public static string GFXFormat { get; } = PathResolver.GetPath("gfx/gfx{0,3:D3}.egf"); + + public static string SfxDirectory { get; } = PathResolver.GetPath("sfx"); + public static string MfxDirectory { get; } = PathResolver.GetPath("mfx"); + public static string JboxDirectory { get; } = PathResolver.GetPath("jbox"); + + public static string FriendListFile { get; } = PathResolver.GetModifiablePath("config/friends.ini"); + public static string IgnoreListFile { get; } = PathResolver.GetModifiablePath("config/ignore.ini"); + + public static string InventoryFile { get; } = PathResolver.GetModifiablePath("config/inventory.ini"); + public static string SpellsFile { get; } = PathResolver.GetModifiablePath("config/spells.ini"); + public static string PanelLayoutFile { get; } = PathResolver.GetModifiablePath("config/layout.ini"); + public static string ChatLogFile { get; } = PathResolver.GetModifiablePath("chatlog.txt"); + + //Should be easily customizable between different clients (based on graphics) + //not a config option because this shouldn't be exposed at the user level + public static readonly int[] TrapSpikeGFXObjectIDs = { 449, 450, 451, 452 }; + + //not a config option because this shouldn't be exposed at the user level + public const int NPCDropProtectSeconds = 30; + public const int PlayerDropProtectSeconds = 5; + + // Weapon graphics of instruments (there is no pub flag for this) + public static readonly int[] Instruments = { 49, 50 }; + public const string FontSize07 = @"BitmapFonts/sans_09px"; + public const string FontSize08 = @"BitmapFonts/sans_11px"; + public const string FontSize08pt5 = @"BitmapFonts/sans_11px_103pct"; + public const string FontSize09 = @"BitmapFonts/sans_12px"; + public const string FontSize10 = @"BitmapFonts/sans_13px"; + + public const int OutOfBand_Packets_Handled_Per_Update = 10; + + public const string CreditsText = @"Endless Online - C# Client +Developed by Ethan Moffat +Based on Endless Online -- +Copyright Vult-R + +Thanks to : +--Sausage for eoserv + C# EO libs +--eoserv.net community +--Hotdog for Eodev client + +Contributors : +-- Sorokya +-- Septharoth +-- miou-gh +-- CoderDanUK"; + + public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}"; + } +} diff --git a/EOLib.Shared/EOLib.Shared.csproj b/EOLib.Shared/EOLib.Shared.csproj new file mode 100644 index 000000000..566c7b721 --- /dev/null +++ b/EOLib.Shared/EOLib.Shared.csproj @@ -0,0 +1,17 @@ + + + + netstandard2.0 + 8.0 + Library + ..\bin\$(Configuration)\lib\ + enable + Base library for Endless Online development + + + $(DefineConstants);LINUX + + + true + + diff --git a/EOLib.Shared/PathResolver.cs b/EOLib.Shared/PathResolver.cs new file mode 100644 index 000000000..48865957d --- /dev/null +++ b/EOLib.Shared/PathResolver.cs @@ -0,0 +1,35 @@ +using System.IO; +using System.Runtime.InteropServices; +using System; + +namespace EOLib.Shared +{ + public static class PathResolver + { + public static string GetPath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return Path.Combine("Contents", "Resources", inputPath); + } + else + { + return inputPath; + } + } + + public static string GetModifiablePath(string inputPath) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + var home = Environment.GetEnvironmentVariable("HOME"); + if (home != null) + { + return Path.Combine(home, ".endlessclient", inputPath); + } + } + + return inputPath; + } + } +} diff --git a/EOLib/Domain/Character/WalkValidationActions.cs b/EOLib/Domain/Character/WalkValidationActions.cs index f4eba99e9..87facea41 100644 --- a/EOLib/Domain/Character/WalkValidationActions.cs +++ b/EOLib/Domain/Character/WalkValidationActions.cs @@ -4,6 +4,7 @@ using EOLib.Domain.Extensions; using EOLib.Domain.Map; using EOLib.IO.Map; +using EOLib.Shared; using Optional; namespace EOLib.Domain.Character diff --git a/EOLib/Domain/Chat/ChatLoggerProvider.cs b/EOLib/Domain/Chat/ChatLoggerProvider.cs index 29f8bbb49..b36a80445 100644 --- a/EOLib/Domain/Chat/ChatLoggerProvider.cs +++ b/EOLib/Domain/Chat/ChatLoggerProvider.cs @@ -2,6 +2,7 @@ using AutomaticTypeMapper; using EOLib.Config; using EOLib.Logger; +using EOLib.Shared; namespace EOLib.Domain.Chat { diff --git a/EOLib/Domain/Item/ItemPickupValidator.cs b/EOLib/Domain/Item/ItemPickupValidator.cs index edb6143f5..6e0dfa71a 100644 --- a/EOLib/Domain/Item/ItemPickupValidator.cs +++ b/EOLib/Domain/Item/ItemPickupValidator.cs @@ -4,6 +4,7 @@ using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.IO.Repositories; +using EOLib.Shared; using Optional; namespace EOLib.Domain.Item diff --git a/EOLib/Domain/Spells/SpellCastValidationActions.cs b/EOLib/Domain/Spells/SpellCastValidationActions.cs index e6f805fbf..ecf9d272b 100644 --- a/EOLib/Domain/Spells/SpellCastValidationActions.cs +++ b/EOLib/Domain/Spells/SpellCastValidationActions.cs @@ -7,6 +7,7 @@ using EOLib.Domain.Party; using EOLib.IO; using EOLib.IO.Repositories; +using EOLib.Shared; namespace EOLib.Domain.Spells { diff --git a/EOLib/EOLib.csproj b/EOLib/EOLib.csproj index 3c354ebdd..f2d082e1a 100644 --- a/EOLib/EOLib.csproj +++ b/EOLib/EOLib.csproj @@ -18,6 +18,7 @@ + diff --git a/EOLib/Net/Communication/INetworkClientFactory.cs b/EOLib/Net/Communication/INetworkClientFactory.cs index ea701ed98..9aef6d64c 100644 --- a/EOLib/Net/Communication/INetworkClientFactory.cs +++ b/EOLib/Net/Communication/INetworkClientFactory.cs @@ -2,6 +2,6 @@ { public interface INetworkClientFactory { - INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeout); + INetworkClient CreateNetworkClient(int timeout = TimeoutConstants.ResponseTimeout); } } diff --git a/EOLib/Net/Communication/IWaitablePacketQueue.cs b/EOLib/Net/Communication/IWaitablePacketQueue.cs index c6168018d..c00bad0f7 100644 --- a/EOLib/Net/Communication/IWaitablePacketQueue.cs +++ b/EOLib/Net/Communication/IWaitablePacketQueue.cs @@ -7,6 +7,6 @@ public interface IWaitablePacketQueue : IPacketQueue { void EnqueuePacketAndSignalConsumer(IPacket packet); - Task WaitForPacketAndDequeue(int timeOut = Constants.ResponseTimeout); + Task WaitForPacketAndDequeue(int timeOut = TimeoutConstants.ResponseTimeout); } } diff --git a/EOLib/Net/Communication/NetworkClientFactory.cs b/EOLib/Net/Communication/NetworkClientFactory.cs index 1e48b80f0..8d1e3901c 100644 --- a/EOLib/Net/Communication/NetworkClientFactory.cs +++ b/EOLib/Net/Communication/NetworkClientFactory.cs @@ -1,7 +1,6 @@ using System; using AutomaticTypeMapper; using EOLib.IO.Services; -using EOLib.Logger; using EOLib.Net.Handlers; using EOLib.Net.PacketProcessing; @@ -23,7 +22,7 @@ public NetworkClientFactory(IPacketProcessActions packetProcessActions, _numberEncoderService = numberEncoderService; } - public INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeout) + public INetworkClient CreateNetworkClient(int timeout = TimeoutConstants.ResponseTimeout) { return new NetworkClient(_packetProcessActions, _packetHandlingActions, _numberEncoderService, TimeSpan.FromMilliseconds(timeout)); } diff --git a/EOLib/Net/Communication/PacketQueue.cs b/EOLib/Net/Communication/PacketQueue.cs index 8dd5763fb..5b908d648 100644 --- a/EOLib/Net/Communication/PacketQueue.cs +++ b/EOLib/Net/Communication/PacketQueue.cs @@ -51,7 +51,7 @@ public IPacket DequeueFirstPacket() return _internalQueue.Dequeue(); } - public async Task WaitForPacketAndDequeue(int timeOut = Constants.ResponseTimeout) + public async Task WaitForPacketAndDequeue(int timeOut = TimeoutConstants.ResponseTimeout) { if (QueuedPacketCount > 0) return DequeueFirstPacket(); diff --git a/EOLib/Net/Communication/TimeoutConstants.cs b/EOLib/Net/Communication/TimeoutConstants.cs new file mode 100644 index 000000000..f7d9d2a51 --- /dev/null +++ b/EOLib/Net/Communication/TimeoutConstants.cs @@ -0,0 +1,8 @@ +namespace EOLib.Net.Communication +{ + internal class TimeoutConstants + { + public const int ResponseTimeout = 5000; + public const int ResponseFileTimeout = 10000; + } +} diff --git a/EOLib/Net/FileTransfer/FileRequestActions.cs b/EOLib/Net/FileTransfer/FileRequestActions.cs index e3186f5e4..8f18c9a2a 100644 --- a/EOLib/Net/FileTransfer/FileRequestActions.cs +++ b/EOLib/Net/FileTransfer/FileRequestActions.cs @@ -2,16 +2,15 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Threading.Tasks; using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; -using EOLib.IO; using EOLib.IO.Extensions; using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.IO.Services; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Optional; @@ -83,11 +82,11 @@ public async Task GetMapFromServer(int mapID, int sessionID) public async Task GetItemFileFromServer(int sessionID) { - DeleteExisting(PubFileNameConstants.EIFFilter); + DeleteExisting(Constants.EIFFilter); var itemFiles = await _fileRequestService.RequestFile(FileType.Eif, sessionID); foreach (var file in itemFiles) - _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.EIFFormat, file.ID)), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(string.Format(Constants.EIFFormat, file.ID), file, rewriteChecksum: false); _pubFileRepository.EIFFiles = itemFiles; _pubFileRepository.EIFFile = PubFileExtensions.Merge(itemFiles); @@ -95,33 +94,33 @@ public async Task GetItemFileFromServer(int sessionID) public async Task GetNPCFileFromServer(int sessionID) { - DeleteExisting(PubFileNameConstants.ENFFilter); + DeleteExisting(Constants.ENFFilter); var npcFiles = await _fileRequestService.RequestFile(FileType.Enf, sessionID); foreach (var file in npcFiles) - _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ENFFormat, file.ID)), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(string.Format(Constants.ENFFormat, file.ID), file, rewriteChecksum: false); _pubFileRepository.ENFFiles = npcFiles; _pubFileRepository.ENFFile = PubFileExtensions.Merge(npcFiles); } public async Task GetSpellFileFromServer(int sessionID) { - DeleteExisting(PubFileNameConstants.ESFFilter); + DeleteExisting(Constants.ESFFilter); var spellFiles = await _fileRequestService.RequestFile(FileType.Esf, sessionID); foreach (var file in spellFiles) - _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ESFFormat, file.ID)), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(string.Format(Constants.ESFFormat, file.ID), file, rewriteChecksum: false); _pubFileRepository.ESFFiles = spellFiles; _pubFileRepository.ESFFile = PubFileExtensions.Merge(spellFiles); } public async Task GetClassFileFromServer(int sessionID) { - DeleteExisting(PubFileNameConstants.ECFFilter); + DeleteExisting(Constants.ECFFilter); var classFiles = await _fileRequestService.RequestFile(FileType.Ecf, sessionID); foreach (var file in classFiles) - _pubFileSaveService.SaveFile(GetPath(string.Format(PubFileNameConstants.ECFFormat, file.ID)), file, rewriteChecksum: false); + _pubFileSaveService.SaveFile(string.Format(Constants.ECFFormat, file.ID), file, rewriteChecksum: false); _pubFileRepository.ECFFiles = classFiles; _pubFileRepository.ECFFile = PubFileExtensions.Merge(classFiles); } @@ -166,24 +165,11 @@ private static void DeleteExisting(string filter) { try { - foreach (var file in Directory.GetFiles(GetPath(PubFileNameConstants.PubDirectory), filter)) + foreach (var file in Directory.GetFiles(Constants.PubDirectory, filter)) File.Delete(file); } catch (IOException) { } } - - private static string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - var home = Environment.GetEnvironmentVariable("HOME"); - return Path.Combine(home, ".endlessclient", inputPath); - } - else - { - return inputPath; - } - } } public interface IFileRequestActions diff --git a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs index ce5abab16..7fc92a908 100644 --- a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs +++ b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs @@ -1,5 +1,6 @@ using AutomaticTypeMapper; using EOLib.Net.Communication; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Handlers diff --git a/EOLib/misc.cs b/EOLib/misc.cs deleted file mode 100644 index ecf154d5f..000000000 --- a/EOLib/misc.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace EOLib -{ - public static class Constants - { - public const int MaxChallenge = 11_092_110; - - public const int ResponseTimeout = 5000; - public const int ResponseFileTimeout = 10000; - - public const byte ViewLength = 16; - - public const int LockerMaxSingleItemAmount = 200; - public const int MaxLockerUpgrades = 7; - public const int PartyRequestTimeoutSeconds = 15; - public const int TradeRequestTimeoutSeconds = 15; - public const int MuteDefaultTimeMinutes = 5; - - public const int GhostTime = 5; - - public static string SfxDirectory { get; } = GetPath("sfx"); - public static string MfxDirectory { get; } = GetPath("mfx"); - public static string JboxDirectory { get; } = GetPath("jbox"); - - public static string FriendListFile { get; } = GetModifiablePath("config/friends.ini"); - public static string IgnoreListFile { get; } = GetModifiablePath("config/ignore.ini"); - - public static string InventoryFile { get; } = GetModifiablePath("config/inventory.ini"); - public static string SpellsFile { get; } = GetModifiablePath("config/spells.ini"); - public static string PanelLayoutFile { get; } = GetModifiablePath("config/layout.ini"); - public static string ChatLogFile { get; } = GetModifiablePath("chatlog.txt"); - - //Should be easily customizable between different clients (based on graphics) - //not a config option because this shouldn't be exposed at the user level - public static readonly int[] TrapSpikeGFXObjectIDs = { 449, 450, 451, 452 }; - - //not a config option because this shouldn't be exposed at the user level - public const int NPCDropProtectSeconds = 30; - public const int PlayerDropProtectSeconds = 5; - - // Weapon graphics of instruments (there is no pub flag for this) - public static readonly int[] Instruments = { 49, 50 }; - public const string FontSize07 = @"BitmapFonts/sans_09px"; - public const string FontSize08 = @"BitmapFonts/sans_11px"; - public const string FontSize08pt5 = @"BitmapFonts/sans_11px_103pct"; - public const string FontSize09 = @"BitmapFonts/sans_12px"; - public const string FontSize10 = @"BitmapFonts/sans_13px"; - - public const int OutOfBand_Packets_Handled_Per_Update = 10; - - public const string CreditsText = @"Endless Online - C# Client -Developed by Ethan Moffat -Based on Endless Online -- -Copyright Vult-R - -Thanks to : ---Sausage for eoserv + C# EO libs ---eoserv.net community ---Hotdog for Eodev client - -Contributors : --- Sorokya --- Septharoth --- miou-gh --- CoderDanUK"; - - public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}"; - - private static string GetPath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - return Path.Combine("Contents", "Resources", inputPath); - } - else - { - return inputPath; - } - } - - private static string GetModifiablePath(string inputPath) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - var home = Environment.GetEnvironmentVariable("HOME"); - return Path.Combine(home, ".endlessclient", inputPath); - } - else - { - return inputPath; - } - } - } -} diff --git a/EndlessClient.sln b/EndlessClient.sln index 500dfbe22..dadd85b5c 100644 --- a/EndlessClient.sln +++ b/EndlessClient.sln @@ -37,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOBot", "EOBot\EOBot.csproj EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndlessClient", "EndlessClient\EndlessClient.csproj", "{0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOLib.Shared", "EOLib.Shared\EOLib.Shared.csproj", "{A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -99,6 +101,10 @@ Global {0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Release|Any CPU.Build.0 = Release|Any CPU + {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -117,6 +123,7 @@ Global {A55498F8-78C2-4760-AA2C-429D39F35BB8} = {7AD5F989-D76C-472E-90C7-66CCC2B8533C} {09B4B9F7-64AF-4E6A-AAE1-52C41201179A} = {795A3BFF-4306-456D-86AB-6A680A2B7C0B} {1061D316-7F0B-4BD5-9821-A8FF7DE32F6E} = {795A3BFF-4306-456D-86AB-6A680A2B7C0B} + {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA} = {9C490FC1-F83A-43E0-9FFE-2F2588669195} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CED36352-F489-4071-A4F8-51FC08795DC7} diff --git a/EndlessClient/Audio/MfxPlayer.cs b/EndlessClient/Audio/MfxPlayer.cs index e99156ead..215016587 100644 --- a/EndlessClient/Audio/MfxPlayer.cs +++ b/EndlessClient/Audio/MfxPlayer.cs @@ -3,9 +3,9 @@ using System.Linq; using AutomaticTypeMapper; using Commons.Music.Midi; -using EOLib; using EOLib.Config; using EOLib.IO.Map; +using EOLib.Shared; namespace EndlessClient.Audio { diff --git a/EndlessClient/Content/ContentProvider.cs b/EndlessClient/Content/ContentProvider.cs index 499cdc7f0..87e41adc4 100644 --- a/EndlessClient/Content/ContentProvider.cs +++ b/EndlessClient/Content/ContentProvider.cs @@ -3,7 +3,7 @@ using System.Linq; using AutomaticTypeMapper; using EndlessClient.Audio; -using EOLib; +using EOLib.Shared; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; diff --git a/EndlessClient/ControlSets/CreateAccountControlSet.cs b/EndlessClient/ControlSets/CreateAccountControlSet.cs index e6ed30993..a6f6eee51 100644 --- a/EndlessClient/ControlSets/CreateAccountControlSet.cs +++ b/EndlessClient/ControlSets/CreateAccountControlSet.cs @@ -4,12 +4,11 @@ using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; -using EndlessClient.Input; using EndlessClient.Rendering; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Account; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/ControlSets/InitialControlSet.cs b/EndlessClient/ControlSets/InitialControlSet.cs index c04a99ad1..6f35726b2 100644 --- a/EndlessClient/ControlSets/InitialControlSet.cs +++ b/EndlessClient/ControlSets/InitialControlSet.cs @@ -3,9 +3,9 @@ using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; -using EOLib; using EOLib.Config; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/ControlSets/LoginPromptControlSet.cs b/EndlessClient/ControlSets/LoginPromptControlSet.cs index f9c5cb6f1..f82a060f2 100644 --- a/EndlessClient/ControlSets/LoginPromptControlSet.cs +++ b/EndlessClient/ControlSets/LoginPromptControlSet.cs @@ -1,15 +1,13 @@ using System; -using System.Linq; using System.Threading.Tasks; using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; -using EndlessClient.Input; using EndlessClient.UIControls; -using EOLib; using EOLib.Config; using EOLib.Domain.Login; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/ControlSets/ViewCreditsControlSet.cs b/EndlessClient/ControlSets/ViewCreditsControlSet.cs index ff814bce3..96633894e 100644 --- a/EndlessClient/ControlSets/ViewCreditsControlSet.cs +++ b/EndlessClient/ControlSets/ViewCreditsControlSet.cs @@ -1,7 +1,7 @@ using EndlessClient.Controllers; using EndlessClient.GameExecution; -using EOLib; using EOLib.Config; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/Controllers/InventoryController.cs b/EndlessClient/Controllers/InventoryController.cs index b02aff060..6dd036765 100644 --- a/EndlessClient/Controllers/InventoryController.cs +++ b/EndlessClient/Controllers/InventoryController.cs @@ -10,19 +10,18 @@ using EndlessClient.HUD.Controls; using EndlessClient.Rendering.Character; using EndlessClient.Rendering.Map; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Chat; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Bank; using EOLib.Domain.Item; -using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Trade; using EOLib.IO; using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using XNAControls; namespace EndlessClient.Controllers diff --git a/EndlessClient/Controllers/LoginController.cs b/EndlessClient/Controllers/LoginController.cs index 485df7276..81a99c249 100644 --- a/EndlessClient/Controllers/LoginController.cs +++ b/EndlessClient/Controllers/LoginController.cs @@ -11,7 +11,6 @@ using EndlessClient.Input; using EndlessClient.Rendering; using EndlessClient.Rendering.Map; -using EOLib; using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Chat; @@ -22,6 +21,7 @@ using EOLib.Net; using EOLib.Net.Communication; using EOLib.Net.FileTransfer; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EndlessClient/Controllers/MainButtonController.cs b/EndlessClient/Controllers/MainButtonController.cs index 84e8401a9..5065e21bf 100644 --- a/EndlessClient/Controllers/MainButtonController.cs +++ b/EndlessClient/Controllers/MainButtonController.cs @@ -5,11 +5,11 @@ using EndlessClient.Dialogs.Actions; using EndlessClient.GameExecution; using EndlessClient.Rendering; -using EOLib; using EOLib.Domain; using EOLib.Net.Communication; using EOLib.Net.Connection; using EOLib.Net.PacketProcessing; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EndlessClient/Dialogs/BankAccountDialog.cs b/EndlessClient/Dialogs/BankAccountDialog.cs index 296ea09ad..3eb6a5673 100644 --- a/EndlessClient/Dialogs/BankAccountDialog.cs +++ b/EndlessClient/Dialogs/BankAccountDialog.cs @@ -5,12 +5,12 @@ using EndlessClient.HUD; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Interact.Bank; using EOLib.Graphics; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional; using Optional.Collections; diff --git a/EndlessClient/Dialogs/BoardDialog.cs b/EndlessClient/Dialogs/BoardDialog.cs index 3e0f28e75..5a5ce5a89 100644 --- a/EndlessClient/Dialogs/BoardDialog.cs +++ b/EndlessClient/Dialogs/BoardDialog.cs @@ -7,12 +7,12 @@ using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Controls; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Interact.Board; using EOLib.Domain.Login; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using MonoGame.Extended.Input.InputListeners; using Optional; diff --git a/EndlessClient/Dialogs/BookDialog.cs b/EndlessClient/Dialogs/BookDialog.cs index e17bd9c19..fd85c5832 100644 --- a/EndlessClient/Dialogs/BookDialog.cs +++ b/EndlessClient/Dialogs/BookDialog.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using EndlessClient.Dialogs.Services; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; using EOLib.IO.Repositories; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; using static EndlessClient.Dialogs.QuestStatusListDialogItem; diff --git a/EndlessClient/Dialogs/ChangePasswordDialog.cs b/EndlessClient/Dialogs/ChangePasswordDialog.cs index 485efc79e..f1a594112 100644 --- a/EndlessClient/Dialogs/ChangePasswordDialog.cs +++ b/EndlessClient/Dialogs/ChangePasswordDialog.cs @@ -5,11 +5,11 @@ using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Account; using EOLib.Domain.Login; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional; using XNAControls; diff --git a/EndlessClient/Dialogs/CreateCharacterDialog.cs b/EndlessClient/Dialogs/CreateCharacterDialog.cs index afe916867..9d2903e1e 100644 --- a/EndlessClient/Dialogs/CreateCharacterDialog.cs +++ b/EndlessClient/Dialogs/CreateCharacterDialog.cs @@ -5,10 +5,10 @@ using EndlessClient.GameExecution; using EndlessClient.Rendering.Factories; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; diff --git a/EndlessClient/Dialogs/EOMessageBox.cs b/EndlessClient/Dialogs/EOMessageBox.cs index e3f75986b..816522227 100644 --- a/EndlessClient/Dialogs/EOMessageBox.cs +++ b/EndlessClient/Dialogs/EOMessageBox.cs @@ -1,8 +1,8 @@ using System; using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs index def6f28cd..7d391181b 100644 --- a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs @@ -3,15 +3,14 @@ using AutomaticTypeMapper; using EndlessClient.ControlSets; using EndlessClient.Dialogs.Services; -using EndlessClient.GameExecution; using EndlessClient.HUD.Controls; using EndlessClient.Services; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Online; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using XNAControls; namespace EndlessClient.Dialogs.Factories diff --git a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs index 8699aa04e..8d4046a03 100644 --- a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs @@ -4,9 +4,9 @@ using EndlessClient.Content; using EndlessClient.Dialogs.Actions; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; namespace EndlessClient.Dialogs.Factories { diff --git a/EndlessClient/Dialogs/GameLoadingDialog.cs b/EndlessClient/Dialogs/GameLoadingDialog.cs index 79b3f6f1b..399d3d827 100644 --- a/EndlessClient/Dialogs/GameLoadingDialog.cs +++ b/EndlessClient/Dialogs/GameLoadingDialog.cs @@ -1,9 +1,9 @@ using System; using EndlessClient.GameExecution; using EndlessClient.Rendering; -using EOLib; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/Dialogs/GuildDialog.cs b/EndlessClient/Dialogs/GuildDialog.cs index e4d51843a..657b6cc39 100644 --- a/EndlessClient/Dialogs/GuildDialog.cs +++ b/EndlessClient/Dialogs/GuildDialog.cs @@ -5,13 +5,13 @@ using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Interact.Guild; using EOLib.Extensions; using EOLib.Graphics; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using MonoGame.Extended.Input.InputListeners; diff --git a/EndlessClient/Dialogs/InnkeeperDialog.cs b/EndlessClient/Dialogs/InnkeeperDialog.cs index db3e6cf10..c718cc35d 100644 --- a/EndlessClient/Dialogs/InnkeeperDialog.cs +++ b/EndlessClient/Dialogs/InnkeeperDialog.cs @@ -3,12 +3,12 @@ using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Interact.Citizen; using EOLib.Graphics; using EOLib.IO; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional.Collections; using XNAControls; diff --git a/EndlessClient/Dialogs/ItemTransferDialog.cs b/EndlessClient/Dialogs/ItemTransferDialog.cs index dc6048fdb..364fa37f7 100644 --- a/EndlessClient/Dialogs/ItemTransferDialog.cs +++ b/EndlessClient/Dialogs/ItemTransferDialog.cs @@ -3,9 +3,9 @@ using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Chat; using EndlessClient.UIControls; -using EOLib; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input.InputListeners; diff --git a/EndlessClient/Dialogs/LawDialog.cs b/EndlessClient/Dialogs/LawDialog.cs index 7c5d8e4ab..768f7a038 100644 --- a/EndlessClient/Dialogs/LawDialog.cs +++ b/EndlessClient/Dialogs/LawDialog.cs @@ -4,13 +4,13 @@ using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Interact.Law; using EOLib.Domain.Map; using EOLib.Graphics; using EOLib.IO; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Optional.Collections; using XNAControls; diff --git a/EndlessClient/Dialogs/ListDialogItem.cs b/EndlessClient/Dialogs/ListDialogItem.cs index 8e8841dc3..9f8d4dc2d 100644 --- a/EndlessClient/Dialogs/ListDialogItem.cs +++ b/EndlessClient/Dialogs/ListDialogItem.cs @@ -1,6 +1,6 @@ using System; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input; diff --git a/EndlessClient/Dialogs/PlayerInfoDialog.cs b/EndlessClient/Dialogs/PlayerInfoDialog.cs index 4af40afe1..1e04703fb 100644 --- a/EndlessClient/Dialogs/PlayerInfoDialog.cs +++ b/EndlessClient/Dialogs/PlayerInfoDialog.cs @@ -1,10 +1,9 @@ using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Character; -using EOLib.Domain.Online; using EOLib.Extensions; using EOLib.Graphics; using EOLib.IO.Repositories; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EndlessClient/Dialogs/ProgressDialog.cs b/EndlessClient/Dialogs/ProgressDialog.cs index 0186bb28d..a626d2ab7 100644 --- a/EndlessClient/Dialogs/ProgressDialog.cs +++ b/EndlessClient/Dialogs/ProgressDialog.cs @@ -2,9 +2,9 @@ using System.Threading; using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; -using EOLib; using EOLib.Config; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/Dialogs/QuestDialog.cs b/EndlessClient/Dialogs/QuestDialog.cs index c9f394972..f191ac037 100644 --- a/EndlessClient/Dialogs/QuestDialog.cs +++ b/EndlessClient/Dialogs/QuestDialog.cs @@ -2,11 +2,11 @@ using System.Linq; using EndlessClient.Content; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Interact.Quest; using EOLib.Graphics; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Optional; diff --git a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs index e3cf57e09..c344c6339 100644 --- a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs +++ b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs @@ -1,5 +1,5 @@ -using EOLib; -using EOLib.Graphics; +using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Moffat.EndlessOnline.SDK.Protocol.Net; diff --git a/EndlessClient/Dialogs/ScrollingListDialog.cs b/EndlessClient/Dialogs/ScrollingListDialog.cs index 0543be735..b4d5312eb 100644 --- a/EndlessClient/Dialogs/ScrollingListDialog.cs +++ b/EndlessClient/Dialogs/ScrollingListDialog.cs @@ -3,8 +3,8 @@ using System.Linq; using EndlessClient.Dialogs.Services; using EndlessClient.UIControls; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.BitmapFonts; diff --git a/EndlessClient/Dialogs/ScrollingMessageDialog.cs b/EndlessClient/Dialogs/ScrollingMessageDialog.cs index fc9369cc9..0c7eca4fb 100644 --- a/EndlessClient/Dialogs/ScrollingMessageDialog.cs +++ b/EndlessClient/Dialogs/ScrollingMessageDialog.cs @@ -4,8 +4,8 @@ using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; using EndlessClient.UIControls; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using MonoGame.Extended.BitmapFonts; using XNAControls; diff --git a/EndlessClient/Dialogs/SessionExpDialog.cs b/EndlessClient/Dialogs/SessionExpDialog.cs index 989a7ce13..9cc20d3b3 100644 --- a/EndlessClient/Dialogs/SessionExpDialog.cs +++ b/EndlessClient/Dialogs/SessionExpDialog.cs @@ -1,9 +1,9 @@ using System; using EndlessClient.Dialogs.Services; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/Dialogs/SkillmasterDialog.cs b/EndlessClient/Dialogs/SkillmasterDialog.cs index 7a96c10bc..f631d6ce7 100644 --- a/EndlessClient/Dialogs/SkillmasterDialog.cs +++ b/EndlessClient/Dialogs/SkillmasterDialog.cs @@ -6,12 +6,12 @@ using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Interact.Skill; using EOLib.Graphics; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional.Collections; using XNAControls; diff --git a/EndlessClient/Dialogs/TextInputDialog.cs b/EndlessClient/Dialogs/TextInputDialog.cs index 7a757eba7..d85b717c0 100644 --- a/EndlessClient/Dialogs/TextInputDialog.cs +++ b/EndlessClient/Dialogs/TextInputDialog.cs @@ -2,8 +2,8 @@ using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Chat; using EndlessClient.UIControls; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/Dialogs/TextMultiInputDialog.cs b/EndlessClient/Dialogs/TextMultiInputDialog.cs index c0fa1b850..a291d7887 100644 --- a/EndlessClient/Dialogs/TextMultiInputDialog.cs +++ b/EndlessClient/Dialogs/TextMultiInputDialog.cs @@ -5,12 +5,11 @@ using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Chat; using EndlessClient.UIControls; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; -using static System.Net.Mime.MediaTypeNames; namespace EndlessClient.Dialogs { diff --git a/EndlessClient/Dialogs/TradeDialog.cs b/EndlessClient/Dialogs/TradeDialog.cs index 5523d280d..b5a9e3bc3 100644 --- a/EndlessClient/Dialogs/TradeDialog.cs +++ b/EndlessClient/Dialogs/TradeDialog.cs @@ -9,13 +9,13 @@ using EndlessClient.HUD.Inventory; using EndlessClient.Rendering.Map; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Trade; using EOLib.Graphics; using EOLib.IO; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional.Collections; using XNAControls; diff --git a/EndlessClient/GameExecution/EndlessGame.cs b/EndlessClient/GameExecution/EndlessGame.cs index 9856d3cce..73372f802 100644 --- a/EndlessClient/GameExecution/EndlessGame.cs +++ b/EndlessClient/GameExecution/EndlessGame.cs @@ -15,6 +15,7 @@ using EOLib.Config; using EOLib.Graphics; using EOLib.IO.Actions; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; diff --git a/EndlessClient/GameExecution/GameStateActions.cs b/EndlessClient/GameExecution/GameStateActions.cs index 6a237cbd9..ee65a34db 100644 --- a/EndlessClient/GameExecution/GameStateActions.cs +++ b/EndlessClient/GameExecution/GameStateActions.cs @@ -7,10 +7,9 @@ using EndlessClient.HUD.Panels; using EndlessClient.Network; using EndlessClient.Rendering; -using EOLib; using EOLib.Config; -using EOLib.Domain.Character; using EOLib.Domain.Login; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls.Input; diff --git a/EndlessClient/HUD/Chat/ChatNotificationActions.cs b/EndlessClient/HUD/Chat/ChatNotificationActions.cs index 7a85b5838..d3494a6c3 100644 --- a/EndlessClient/HUD/Chat/ChatNotificationActions.cs +++ b/EndlessClient/HUD/Chat/ChatNotificationActions.cs @@ -1,16 +1,15 @@ using System; using System.Globalization; -using System.Windows; using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Chat; using EOLib.Domain.Notifiers; using EOLib.Localization; +using EOLib.Shared; using Optional; namespace EndlessClient.HUD.Chat diff --git a/EndlessClient/HUD/Chat/ChatPanelTab.cs b/EndlessClient/HUD/Chat/ChatPanelTab.cs index af38f876b..2b98c8f52 100644 --- a/EndlessClient/HUD/Chat/ChatPanelTab.cs +++ b/EndlessClient/HUD/Chat/ChatPanelTab.cs @@ -7,11 +7,10 @@ using EndlessClient.Rendering.Chat; using EndlessClient.Rendering.Sprites; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Chat; +using EOLib.Shared; using Microsoft.Xna.Framework; using MonoGame.Extended.BitmapFonts; -using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using XNAControls; diff --git a/EndlessClient/HUD/Controls/HudControlsFactory.cs b/EndlessClient/HUD/Controls/HudControlsFactory.cs index cefa34434..e5ef086fd 100644 --- a/EndlessClient/HUD/Controls/HudControlsFactory.cs +++ b/EndlessClient/HUD/Controls/HudControlsFactory.cs @@ -28,6 +28,7 @@ using EOLib.Domain.Map; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs index e4c2e7701..d3c256416 100644 --- a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs +++ b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs @@ -3,11 +3,11 @@ using EndlessClient.Dialogs; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; using EOLib.IO.Extensions; using EOLib.IO.Pub; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input; diff --git a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs index 228cea981..2ad08252a 100644 --- a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs +++ b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs @@ -13,7 +13,6 @@ using EndlessClient.HUD.Spells; using EndlessClient.Rendering; using EndlessClient.UIControls; -using EOLib; using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Login; @@ -21,6 +20,7 @@ using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Win32; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -29,7 +29,6 @@ using Optional; using Optional.Collections; using XNAControls; -using static EndlessClient.HUD.Spells.SpellPanelItem; namespace EndlessClient.HUD.Panels { diff --git a/EndlessClient/HUD/Panels/HudPanelFactory.cs b/EndlessClient/HUD/Panels/HudPanelFactory.cs index 1cb054195..f18dd5ae5 100644 --- a/EndlessClient/HUD/Panels/HudPanelFactory.cs +++ b/EndlessClient/HUD/Panels/HudPanelFactory.cs @@ -10,7 +10,6 @@ using EndlessClient.Rendering; using EndlessClient.Rendering.Chat; using EndlessClient.Services; -using EOLib; using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Chat; @@ -21,6 +20,7 @@ using EOLib.Graphics; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; namespace EndlessClient.HUD.Panels { diff --git a/EndlessClient/HUD/Panels/InventoryPanel.cs b/EndlessClient/HUD/Panels/InventoryPanel.cs index 0e58742fa..e03d4ad99 100644 --- a/EndlessClient/HUD/Panels/InventoryPanel.cs +++ b/EndlessClient/HUD/Panels/InventoryPanel.cs @@ -12,7 +12,6 @@ using EndlessClient.HUD.Inventory; using EndlessClient.Rendering; using EndlessClient.Rendering.Map; -using EOLib; using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Item; @@ -25,6 +24,7 @@ using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Win32; using Microsoft.Xna.Framework; using MonoGame.Extended.Input; diff --git a/EndlessClient/HUD/Panels/OnlineListPanel.cs b/EndlessClient/HUD/Panels/OnlineListPanel.cs index 9f20a87d3..c23ed7988 100644 --- a/EndlessClient/HUD/Panels/OnlineListPanel.cs +++ b/EndlessClient/HUD/Panels/OnlineListPanel.cs @@ -7,11 +7,11 @@ using EndlessClient.Rendering; using EndlessClient.Services; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Online; using EOLib.Domain.Party; using EOLib.Extensions; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; diff --git a/EndlessClient/HUD/Panels/PartyPanel.cs b/EndlessClient/HUD/Panels/PartyPanel.cs index b07834a54..aa5c1314b 100644 --- a/EndlessClient/HUD/Panels/PartyPanel.cs +++ b/EndlessClient/HUD/Panels/PartyPanel.cs @@ -4,10 +4,10 @@ using EndlessClient.HUD.Party; using EndlessClient.Rendering; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Party; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Optional.Collections; using XNAControls; diff --git a/EndlessClient/HUD/Panels/SettingsPanel.cs b/EndlessClient/HUD/Panels/SettingsPanel.cs index ce52bade7..b5c80c770 100644 --- a/EndlessClient/HUD/Panels/SettingsPanel.cs +++ b/EndlessClient/HUD/Panels/SettingsPanel.cs @@ -5,11 +5,11 @@ using EndlessClient.Dialogs; using EndlessClient.Dialogs.Factories; using EndlessClient.Rendering; -using EOLib; using EOLib.Config; using EOLib.Domain.Chat; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/HUD/Panels/StatsPanel.cs b/EndlessClient/HUD/Panels/StatsPanel.cs index 0c63316ca..8217604f9 100644 --- a/EndlessClient/HUD/Panels/StatsPanel.cs +++ b/EndlessClient/HUD/Panels/StatsPanel.cs @@ -4,10 +4,10 @@ using EndlessClient.Dialogs; using EndlessClient.Dialogs.Factories; using EndlessClient.Rendering; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/EndlessClient/HUD/Party/PartyPanelMember.cs b/EndlessClient/HUD/Party/PartyPanelMember.cs index 1b8534288..23b961f7f 100644 --- a/EndlessClient/HUD/Party/PartyPanelMember.cs +++ b/EndlessClient/HUD/Party/PartyPanelMember.cs @@ -1,10 +1,10 @@ using System; using EndlessClient.Content; -using EOLib; using EOLib.Domain.Chat; using EOLib.Domain.Party; using EOLib.Extensions; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; diff --git a/EndlessClient/HUD/StatusBars/StatusBarBase.cs b/EndlessClient/HUD/StatusBars/StatusBarBase.cs index 6555143c4..9d1707939 100644 --- a/EndlessClient/HUD/StatusBars/StatusBarBase.cs +++ b/EndlessClient/HUD/StatusBars/StatusBarBase.cs @@ -1,8 +1,8 @@ using System; using EndlessClient.Rendering; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input.InputListeners; diff --git a/EndlessClient/Initialization/ConfigInitializer.cs b/EndlessClient/Initialization/ConfigInitializer.cs index b0aa5bd1c..e0ce15068 100644 --- a/EndlessClient/Initialization/ConfigInitializer.cs +++ b/EndlessClient/Initialization/ConfigInitializer.cs @@ -2,8 +2,8 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; using AutomaticTypeMapper; -using EOLib; using EOLib.Config; +using EOLib.Shared; namespace EndlessClient.Initialization { @@ -29,13 +29,13 @@ public void Initialize() [SupportedOSPlatform("OSX")] private void CopyDefaultConfigFiles() { - if (!Directory.Exists(Path.GetDirectoryName(ConfigStrings.Default_Config_File))) + if (!Directory.Exists(Path.GetDirectoryName(Constants.Default_Config_File))) { - Directory.CreateDirectory(ConfigStrings.Default_Config_File); + Directory.CreateDirectory(Constants.Default_Config_File); } var files = new[] { - ConfigStrings.Default_Config_File, + Constants.Default_Config_File, Constants.InventoryFile, Constants.SpellsFile, Constants.FriendListFile, diff --git a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs index 163cfe5ba..f0bce8588 100644 --- a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs +++ b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs @@ -11,19 +11,17 @@ using EndlessClient.Rendering.Metadata; using EndlessClient.Rendering.Metadata.Models; using EOLib; -using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Domain.Spells; -using EOLib.IO; using EOLib.IO.Map; using EOLib.IO.Repositories; using EOLib.Localization; +using EOLib.Shared; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using Optional.Collections; namespace EndlessClient.Rendering.Character { diff --git a/EndlessClient/Rendering/Character/CharacterRenderer.cs b/EndlessClient/Rendering/Character/CharacterRenderer.cs index d4d4c07f5..eab3c32e2 100644 --- a/EndlessClient/Rendering/Character/CharacterRenderer.cs +++ b/EndlessClient/Rendering/Character/CharacterRenderer.cs @@ -9,12 +9,12 @@ using EndlessClient.Rendering.Metadata; using EndlessClient.Rendering.Metadata.Models; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Map; using EOLib.Domain.Spells; using EOLib.IO.Map; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; diff --git a/EndlessClient/Rendering/Chat/ChatBubble.cs b/EndlessClient/Rendering/Chat/ChatBubble.cs index 2b2c5c39a..0ed767e32 100644 --- a/EndlessClient/Rendering/Chat/ChatBubble.cs +++ b/EndlessClient/Rendering/Chat/ChatBubble.cs @@ -1,8 +1,8 @@ using System; using System.Diagnostics; using EndlessClient.GameExecution; -using EOLib; using EOLib.Config; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; diff --git a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs index 4d95789a7..5d8674ec4 100644 --- a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs +++ b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Linq; using EndlessClient.Services; -using EOLib; using EOLib.Domain.Chat; using EOLib.Graphics; -using Microsoft.Xna.Framework.Graphics; +using EOLib.Shared; using MonoGame.Extended.BitmapFonts; using XNAControls; diff --git a/EndlessClient/Rendering/ContextMenuRenderer.cs b/EndlessClient/Rendering/ContextMenuRenderer.cs index 6a6051f2f..11c6993d8 100644 --- a/EndlessClient/Rendering/ContextMenuRenderer.cs +++ b/EndlessClient/Rendering/ContextMenuRenderer.cs @@ -10,13 +10,13 @@ using EndlessClient.Rendering.Character; using EndlessClient.Services; using EndlessClient.UIControls; -using EOLib; using EOLib.Domain.Interact; using EOLib.Domain.Map; using EOLib.Domain.Party; using EOLib.Domain.Trade; using EOLib.Graphics; using EOLib.Localization; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Moffat.EndlessOnline.SDK.Protocol.Net; diff --git a/EndlessClient/Rendering/Map/MapRenderer.cs b/EndlessClient/Rendering/Map/MapRenderer.cs index 1b5096538..7a43738ea 100644 --- a/EndlessClient/Rendering/Map/MapRenderer.cs +++ b/EndlessClient/Rendering/Map/MapRenderer.cs @@ -12,6 +12,7 @@ using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Map; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; diff --git a/EndlessClient/Rendering/MouseCursorRenderer.cs b/EndlessClient/Rendering/MouseCursorRenderer.cs index 0018d0ee7..d6af8c0c2 100644 --- a/EndlessClient/Rendering/MouseCursorRenderer.cs +++ b/EndlessClient/Rendering/MouseCursorRenderer.cs @@ -1,19 +1,17 @@ using System; using System.Diagnostics; using System.Linq; -using EndlessClient.Controllers; using EndlessClient.Dialogs; using EndlessClient.HUD; using EndlessClient.Input; -using EOLib; using EOLib.Domain.Item; using EOLib.Domain.Map; using EOLib.Graphics; using EOLib.IO.Map; using EOLib.IO.Repositories; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Input; using Optional; using XNAControls; diff --git a/EndlessClient/Rendering/NPC/NPCRenderer.cs b/EndlessClient/Rendering/NPC/NPCRenderer.cs index a104739bb..7574a1a88 100644 --- a/EndlessClient/Rendering/NPC/NPCRenderer.cs +++ b/EndlessClient/Rendering/NPC/NPCRenderer.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using EndlessClient.GameExecution; using EndlessClient.Input; using EndlessClient.Rendering.Chat; @@ -13,6 +11,7 @@ using EOLib.Domain.Spells; using EOLib.Graphics; using EOLib.IO.Repositories; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; diff --git a/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs b/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs index f1fe5e07f..45efeb1e9 100644 --- a/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs +++ b/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs @@ -4,10 +4,10 @@ using EndlessClient.HUD.Chat; using EndlessClient.Rendering.Character; using EndlessClient.Services; -using EOLib; using EOLib.Config; using EOLib.Domain.Chat; using EOLib.Domain.Notifiers; +using EOLib.Shared; namespace EndlessClient.Subscribers { diff --git a/EndlessClient/UIControls/CharacterInfoPanel.cs b/EndlessClient/UIControls/CharacterInfoPanel.cs index e18bfc981..2db14152d 100644 --- a/EndlessClient/UIControls/CharacterInfoPanel.cs +++ b/EndlessClient/UIControls/CharacterInfoPanel.cs @@ -8,9 +8,9 @@ using EndlessClient.Rendering; using EndlessClient.Rendering.Factories; using EndlessClient.Rendering.Sprites; -using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; diff --git a/EndlessClient/UIControls/ChatTextBox.cs b/EndlessClient/UIControls/ChatTextBox.cs index db1252349..65425ad97 100644 --- a/EndlessClient/UIControls/ChatTextBox.cs +++ b/EndlessClient/UIControls/ChatTextBox.cs @@ -1,8 +1,8 @@ using System; using EndlessClient.Content; using EndlessClient.Rendering; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; diff --git a/EndlessClient/UIControls/StatusBarLabel.cs b/EndlessClient/UIControls/StatusBarLabel.cs index 95500fe3b..200fa56ba 100644 --- a/EndlessClient/UIControls/StatusBarLabel.cs +++ b/EndlessClient/UIControls/StatusBarLabel.cs @@ -1,8 +1,8 @@ using System; using EndlessClient.HUD; using EndlessClient.Rendering; -using EOLib; using EOLib.Graphics; +using EOLib.Shared; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using XNAControls; @@ -26,7 +26,7 @@ public class StatusBarLabel : XNALabel public StatusBarLabel(INativeGraphicsManager nativeGraphicsManager, IClientWindowSizeProvider clientWindowSizeProvider, IStatusLabelTextProvider statusLabelTextProvider) - : base(Constants.FontSize07) + : base(spriteFontName: Constants.FontSize07) { _nativeGraphicsManager = nativeGraphicsManager; _clientWindowSizeProvider = clientWindowSizeProvider; diff --git a/EndlessClient/UIControls/TimeLabel.cs b/EndlessClient/UIControls/TimeLabel.cs index 3436133a1..0e077ff6b 100644 --- a/EndlessClient/UIControls/TimeLabel.cs +++ b/EndlessClient/UIControls/TimeLabel.cs @@ -1,6 +1,6 @@ using System; using EndlessClient.Rendering; -using EOLib; +using EOLib.Shared; using Microsoft.Xna.Framework; using XNAControls; diff --git a/global.json b/global.json index 294c878c5..3fea262b1 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,6 @@ { - "sdk": { - // todo: need to see if there's a way to only set 8.0.204 on macOS - "version": "8.0.204", - "rollForward": "disable" - } + "sdk": { + "version": "8.0.0", + "rollForward": "latestFeature" + } } From f23e1c3ad7a4d4f6a7e8eec1688d9ecc85941874 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Thu, 14 Nov 2024 23:59:18 -0800 Subject: [PATCH 3/7] Add macOS support to the build pipeline, update README --- README.md | 42 +++++++++------------- azure-pipelines.yml | 87 +++++++++++++++++++++++++++++++++++++++------ global.json | 2 +- 3 files changed, 93 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index bd75faf96..73f18a617 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ As of 2020-05-09, this project is relicensed under the MIT license. Older versio - [Contributing](contributing.md) - [Getting started](#GettingStarted) - [Todo list](#ToDo) - - [New features (also todo)](#NewFeatures) - [Changes from the Original Client](#Changes) - [Included Utility Projects](#Utility) - [EOBot](#EOBot) @@ -23,17 +22,23 @@ As of 2020-05-09, this project is relicensed under the MIT license. Older versio ### Dependencies -Source builds require Visual Studio, the .Net 6.0 SDK, and the .Net 3.1 runtime (for building content with the MonoGame content builder pipeline tool). Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time! +Source builds require Visual Studio and the .Net 8.0 SDK. Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time, and as of the .Net 8.0 upgrade, it no longer requires the .Net 3.1 runtime! -.Net 6.0 runtime is required to run the pre-built binary. +.Net 8.0 runtime is required to run the pre-built binary. ### Pre-built binary -See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Linux and Windows binaries. .Net 6.0 runtime must be installed. +See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Windows/Linux binaries and macOS app (compiled for both Intel and Apple CPU architectures). .Net 8.0 runtime must be installed. ### How to play -Download the appropriate [release](https://github.com/ethanmoffat/EndlessClient/releases) for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon (any platform) or running `./EndlessClient` (Linux). +**Windows/Linux** + +Download the appropriate [release](https://github.com/ethanmoffat/EndlessClient/releases) for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon. + +**macOS** + +Unzip EndlessClient.app to your hard drive and double-click the app icon. You will need to enable apps from any source to run in your system security settings. ### Building from source @@ -41,7 +46,7 @@ After installing, clone (or fork+clone) this repository locally and open the sol > ⚠️ If you have previously built EndlessClient, you mean need to clear your dotnet tool cache and nuget package cache > -> Run the following commands: +> Run the following commands (Windows): > - `dotnet nuget locals all --clear` > - Windows: `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache` > - Linux: `rm -rf ~/.dotnet/toolResolverCache` @@ -54,13 +59,10 @@ After installing, clone (or fork+clone) this repository locally and open the sol ### Building on Mac -1. Download and install the [.NET 6.0 SDK (x64)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.403-macos-x64-installer). -2. Link the binary to so it's in path `sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/dotnet` -3. Install XCode from the [AppStore](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12) -4. Run `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient` -5. The build will fail due to a using alias already being declared -6. Run `echo '' > EndlessClient/obj/Debug/net6.0-macos/osx-x64/EndlessClient.GlobalUsings.g.*.generated.cs` -7. Run the build again `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient` +1. Download and install the [.NET 8.0 SDK (x64)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.204-macos-x64-installer) or [Apple Silicon (e.g. M1)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.204-macos-arm64-installer). + ⚠️ The latest .NET 8.0 SDK forces the minimum version of the compiled app to macOS 15 (sequoia). If this is not desired, use a prior version. 8.0.204 is a known working version. +2. Install XCode from the [AppStore](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12) +3. Run `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient` #### Mac errors @@ -72,18 +74,6 @@ Solution: run the command `sudo dotnet workload restore EndlessClient/EndlessCli See the Github issues for planned features. Anything marked with the 'in progress' label is actively being worked on. -New features (also todo) ------------------- - -Here's a working list of things I want to add that would be additional features on top of the original client specs: - - Use built-in patching system prior to log-in to transfer files - - More than 3 characters per account - - Trading items between characters on the same account - - Better display scaling, ~~resizable display~~ (done) - - Timed map weather systems - - Passive skills - - Better inventory - Changes From Original Client ------------------------------------- @@ -132,7 +122,7 @@ Activating background music on linux takes a bit of extra work, due to the fact For troubleshooting purposes, follow the guide here: http://www.tedfelix.com/linux/linux-midi.html -#### Resizable Game Display (experimental) +#### Resizable Game Display The in-game experience can be modified for larger displays by setting the following configuration options in `config/settings.ini`: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b8cc47301..31a02786c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,15 +19,24 @@ schedules: strategy: matrix: linux: - imageName: "ubuntu-latest" - solutionName: "EndlessClient.sln" + imageName: "ubuntu-22.04" friendlyPlatform: "Linux" dropDir: net8.0 + buildArgs: "" + dotnetVersion: 8.0.x windows: - imageName: "windows-latest" - solutionName: "EndlessClient.sln" + imageName: "windows-2022" friendlyPlatform: "Windows" dropDir: net8.0-windows + buildArgs: "" + dotnetVersion: 8.0.x + macos: + imageName: "macos-15-arm64" + friendlyPlatform: "macOS" + dropDir: net8.0-macos + buildArgs: "" + #buildArgs: "/p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained" + dotnetVersion: "8.0.204" pool: vmImage: $(imageName) @@ -41,7 +50,26 @@ steps: - task: UseDotNet@2 displayName: 'Install .Net 8 runtime/sdk' inputs: - version: 8.0.x + version: $(dotnetVersion) +- script: | + echo Mac OS version: + sw_vers -productVersion + echo + echo Installed Xcode versions: + ls /Applications | grep 'Xcode' + echo + echo currently selected xcode: + xcrun xcode-select --print-path + echo + echo selecting latest xcode... + sudo xcode-select -s /Applications/Xcode_16.1_Release_Candidate.app + xcrun xcode-select --print-path + xcodebuild -version + displayName: Select Xcode Version + condition: eq(variables.friendlyPlatform, 'macOS') + +############################################# +# Assembly info and nuget properties - task: Assembly-Info-NetCore@3 displayName: 'Set assembly version and copyright info' inputs: @@ -52,7 +80,7 @@ steps: WriteBOM: false GenerateDocumentationFile: 'false' Authors: 'Ethan Moffat' - Copyright: 'Copyright © 2014-2024 Ethan Moffat' + Copyright: 'Copyright © 2014-2025 Ethan Moffat' VersionNumber: '$(Build.BuildNumber)' FileVersionNumber: '$(Build.BuildNumber)' InformationalVersion: '$(Build.BuildNumber)' @@ -80,28 +108,50 @@ steps: LogLevel: 'verbose' FailOnWarning: false DisableTelemetry: false +############################################# + +############################################# +# Restore/Build/Test +- task: DotNetCoreCLI@2 + displayName: 'dotnet workload restore' + condition: eq(variables.friendlyPlatform, 'macOS') + inputs: + command: 'custom' + custom: 'workload' + arguments: 'restore $(Build.SourcesDirectory)/EndlessClient/EndlessClient.csproj' - task: DotNetCoreCLI@2 displayName: 'dotnet restore' inputs: command: 'restore' verbosityRestore: 'minimal' - projects: '$(Build.SourcesDirectory)/$(solutionName)' + projects: '$(Build.SourcesDirectory)/EndlessClient.sln' - task: DotNetCoreCLI@2 displayName: 'dotnet build' inputs: command: 'build' - projects: '$(Build.SourcesDirectory)/$(solutionName)' - arguments: '--configuration $(buildConfiguration)' + projects: '$(Build.SourcesDirectory)/EndlessClient.sln' + arguments: '--configuration $(buildConfiguration) $(buildArgs)' +- task: DotNetCoreCLI@2 + displayName: 'dotnet build - osx-arm64' + condition: eq(variables.friendlyPlatform, 'macOS') + inputs: + command: 'build' + projects: '$(Build.SourcesDirectory)/EndlessClient/EndlessClient.csproj' + arguments: '--configuration $(buildConfiguration) -r osx-arm64' - task: DotNetCoreCLI@2 displayName: 'dotnet test - skipping EOLib.Graphics.Test (not supported on VSTS agent)' inputs: command: 'test' - projects: '$(Build.SourcesDirectory)/$(solutionName)' - arguments: '--filter "TestCategory!=GraphicsDevice" --configuration $(buildConfiguration)' + projects: '$(Build.SourcesDirectory)/EndlessClient.sln' + arguments: '--no-build --filter "TestCategory!=GraphicsDevice" --configuration $(buildConfiguration)' testRunTitle: $(friendlyPlatform) +############################################# +############################################# +# EndlessClient + EOBot archive - task: ArchiveFiles@2 displayName: 'ZIP EndlessClient' + condition: and(succeeded(), not(eq(variables.friendlyPlatform, 'macOS'))) inputs: rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/ archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).zip @@ -110,11 +160,26 @@ steps: inputs: rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/utils/EOBot/net8.0/ archiveFile: $(Build.ArtifactStagingDirectory)/zip/EOBot.$(friendlyPlatform).zip +# EndlessClient archive (macOS multi-target) +- task: ArchiveFiles@2 + displayName: 'ZIP EndlessClient (arm64)' + condition: and(succeeded(), eq(variables.friendlyPlatform, 'macOS')) + inputs: + rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/osx-arm64/EndlessClient.app + archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).arm64.zip +- task: ArchiveFiles@2 + displayName: 'ZIP EndlessClient (x64)' + condition: and(succeeded(), eq(variables.friendlyPlatform, 'macOS')) + inputs: + rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/osx-x64/EndlessClient.app + archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).x64.zip +# Publish zip artifacts - task: PublishBuildArtifacts@1 displayName: 'Publish Artifacts' inputs: PathtoPublish: $(Build.ArtifactStagingDirectory)/zip ArtifactName: EndlessClient +############################################# - task: CopyFiles@2 displayName: 'Copy nuget packages' diff --git a/global.json b/global.json index 3fea262b1..0650fccd4 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.0", + "version": "8.0.204", "rollForward": "latestFeature" } } From c6b22cd0c54fc02ac1d3708313aa340f2c5b94de Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 15 Nov 2024 09:24:42 -0800 Subject: [PATCH 4/7] Fix failing tests on macOS --- .../ConfigFileLoadActionsTest.cs | 10 +++++----- EOLib.Graphics.Test/PEFileCollectionTest.cs | 20 ++++++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs index a03aa2ee6..709816fa9 100644 --- a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs +++ b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs @@ -9,7 +9,7 @@ namespace EOLib.Config.Test [TestFixture, ExcludeFromCodeCoverage] public class ConfigFileLoadActionsTest { - private const string ConfigDirectory = "config"; + private static readonly string _configDirectory = PathResolver.GetModifiablePath("config"); private IConfigFileLoadActions _configFileLoadActions; private IConfigurationRepository _configurationRepository; @@ -24,8 +24,8 @@ public void SetUp() [TearDown] public static void TearDown() { - if (Directory.Exists(ConfigDirectory)) - Directory.Delete(ConfigDirectory, true); + if (Directory.Exists(_configDirectory)) + Directory.Delete(_configDirectory, true); } [Test] @@ -128,8 +128,8 @@ public void ValidConfigFile_LoadsSpecifiedSettings() private static void CreateTestConfigurationInDirectory(string contents) { - if (!Directory.Exists(ConfigDirectory)) - Directory.CreateDirectory(ConfigDirectory); + if (!Directory.Exists(_configDirectory)) + Directory.CreateDirectory(_configDirectory); File.WriteAllText(Constants.Default_Config_File, contents); } diff --git a/EOLib.Graphics.Test/PEFileCollectionTest.cs b/EOLib.Graphics.Test/PEFileCollectionTest.cs index 4793133f8..2ed604266 100644 --- a/EOLib.Graphics.Test/PEFileCollectionTest.cs +++ b/EOLib.Graphics.Test/PEFileCollectionTest.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Linq; +using EOLib.Shared; using Moq; using NUnit.Framework; using PELoaderLib; @@ -11,7 +11,8 @@ namespace EOLib.Graphics.Test [TestFixture, ExcludeFromCodeCoverage] public class PEFileCollectionTest { - private const string ExpectedDirectory = "gfx"; + private static readonly string _expectedDirectory = PathResolver.GetPath("gfx"); + private static readonly string _expectedDirectoryRoot = _expectedDirectory.Split(Path.DirectorySeparatorChar)[0]; private IPEFileCollection _collection; @@ -26,8 +27,8 @@ public void TearDown() { _collection.Dispose(); - if (Directory.Exists(ExpectedDirectory)) - Directory.Delete(ExpectedDirectory, true); + if (Directory.Exists(_expectedDirectoryRoot)) + Directory.Delete(_expectedDirectoryRoot, recursive: true); } [Test] @@ -67,11 +68,16 @@ public void Dispose_DisposesAllFiles() Mock.Get(file).Verify(x => x.Dispose(), Times.Once); } - private void CreateExpectedDirectoryWithFiles(int numFiles = 0, string fileNameFormat = "gfx{0:D3}.egf") + private static void CreateExpectedDirectoryWithFiles(int numFiles = 0, string fileNameFormat = "gfx{0:D3}.egf") { - Directory.CreateDirectory(ExpectedDirectory); + var components = _expectedDirectory.Split(Path.DirectorySeparatorChar); + foreach (var component in components) + Directory.CreateDirectory(_expectedDirectory); + for (int i = 1; i <= numFiles; ++i) - File.WriteAllText(string.Format(Path.Combine(ExpectedDirectory, fileNameFormat), i), "test contents"); + { + File.WriteAllText(string.Format(Path.Combine(_expectedDirectory, fileNameFormat), i), "test contents"); + } } } } From ed0a10e693b348680d95a6d6f8f44f85fc083271 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 15 Nov 2024 10:04:41 -0800 Subject: [PATCH 5/7] Centralize config file path strings into PathResolver --- EOLib.Shared/PathResolver.cs | 7 +++++-- .../Initialization/ConfigInitializer.cs | 21 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/EOLib.Shared/PathResolver.cs b/EOLib.Shared/PathResolver.cs index 48865957d..21f79421f 100644 --- a/EOLib.Shared/PathResolver.cs +++ b/EOLib.Shared/PathResolver.cs @@ -6,11 +6,14 @@ namespace EOLib.Shared { public static class PathResolver { + public const string LocalFilesRoot = ".endlessclient"; + public static string ResourcesRoot { get; } = Path.Combine("Contents", "Resources"); + public static string GetPath(string inputPath) { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { - return Path.Combine("Contents", "Resources", inputPath); + return Path.Combine(ResourcesRoot, inputPath); } else { @@ -25,7 +28,7 @@ public static string GetModifiablePath(string inputPath) var home = Environment.GetEnvironmentVariable("HOME"); if (home != null) { - return Path.Combine(home, ".endlessclient", inputPath); + return Path.Combine(home, LocalFilesRoot, inputPath); } } diff --git a/EndlessClient/Initialization/ConfigInitializer.cs b/EndlessClient/Initialization/ConfigInitializer.cs index e0ce15068..a8eef0b1c 100644 --- a/EndlessClient/Initialization/ConfigInitializer.cs +++ b/EndlessClient/Initialization/ConfigInitializer.cs @@ -20,18 +20,21 @@ public ConfigInitializer(IConfigFileLoadActions configFileLoadActions) public void Initialize() { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - CopyDefaultConfigFiles(); - } + InitializeDefaultConfigFiles(); + _configFileLoadActions.LoadConfigFile(); } + /// + /// Copy default configuration files out of the macOS app bundle into ~/.endlessclient/config. This is done only if the files do not already exist. + /// [SupportedOSPlatform("OSX")] - private void CopyDefaultConfigFiles() + private static void InitializeDefaultConfigFiles() { - if (!Directory.Exists(Path.GetDirectoryName(Constants.Default_Config_File))) + var configDirectory = Path.GetDirectoryName(Constants.Default_Config_File); + if (!Directory.Exists(configDirectory)) { - Directory.CreateDirectory(Constants.Default_Config_File); + Directory.CreateDirectory(configDirectory); } var files = new[] { @@ -44,10 +47,10 @@ private void CopyDefaultConfigFiles() }; foreach (var file in files) { - if (!File.Exists(file)) + if (!File.Exists(file) && file.Contains(PathResolver.LocalFilesRoot)) { - var index = file.IndexOf(".endlessclient") + 15; - var source = Path.Combine("Contents", "Resources", file[index..]); + var index = file.IndexOf(PathResolver.LocalFilesRoot) + PathResolver.LocalFilesRoot.Length + 1; + var source = Path.Combine(PathResolver.ResourcesRoot, file[index..]); if (File.Exists(source)) { File.Copy(source, file); From 80ab51fc2fdb50238512c729efdcf9109dd7ee14 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 15 Nov 2024 12:25:54 -0800 Subject: [PATCH 6/7] Update EndlessClient to always build self-contained on mac. Fixes build output file not launching. --- .vscode/tasks.json | 3 --- EndlessClient/EndlessClient.csproj | 1 + azure-pipelines.yml | 8 ++------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index dd09c9033..b0578cfb2 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -43,9 +43,6 @@ "type": "process", "args": [ "build", - "/p:PublishReadyToRun=false", - "/p:TieredCompilation=false", - "--self-contained", "${workspaceFolder}/EndlessClient/EndlessClient.csproj", "-r", "osx-arm64" diff --git a/EndlessClient/EndlessClient.csproj b/EndlessClient/EndlessClient.csproj index 6ae43d22e..0ac4188c6 100644 --- a/EndlessClient/EndlessClient.csproj +++ b/EndlessClient/EndlessClient.csproj @@ -25,6 +25,7 @@ true 11.0 osx-x64;osx-arm64 + true <_ResolveReferenceDependencies>true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 31a02786c..edd4628cf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,20 +22,16 @@ strategy: imageName: "ubuntu-22.04" friendlyPlatform: "Linux" dropDir: net8.0 - buildArgs: "" dotnetVersion: 8.0.x windows: imageName: "windows-2022" friendlyPlatform: "Windows" dropDir: net8.0-windows - buildArgs: "" dotnetVersion: 8.0.x macos: - imageName: "macos-15-arm64" + imageName: "macos-15" friendlyPlatform: "macOS" dropDir: net8.0-macos - buildArgs: "" - #buildArgs: "/p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained" dotnetVersion: "8.0.204" pool: @@ -130,7 +126,7 @@ steps: inputs: command: 'build' projects: '$(Build.SourcesDirectory)/EndlessClient.sln' - arguments: '--configuration $(buildConfiguration) $(buildArgs)' + arguments: '--configuration $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: 'dotnet build - osx-arm64' condition: eq(variables.friendlyPlatform, 'macOS') From 45f496936c667c5f372e6997bb565561ef098a76 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 15 Nov 2024 13:17:34 -0800 Subject: [PATCH 7/7] Update readme with macOS usage instructions --- README.md | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 73f18a617..6ccaac9f0 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Source builds require Visual Studio and the .Net 8.0 SDK. Other dependencies are ### Pre-built binary -See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Windows/Linux binaries and macOS app (compiled for both Intel and Apple CPU architectures). .Net 8.0 runtime must be installed. +See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Windows/Linux binaries and macOS app (compiled for both Intel and Apple CPU architectures). ### How to play @@ -40,34 +40,30 @@ Download the appropriate [release](https://github.com/ethanmoffat/EndlessClient/ Unzip EndlessClient.app to your hard drive and double-click the app icon. You will need to enable apps from any source to run in your system security settings. +> ⚠️ If the app fails to run with an error "EndlessClient.app is damaged and can't be opened", open a terminal, run the following command: `xattr -dr com.apple.quarantine /path/to/EndlessClient.app`, and relaunch. + +Assets for alternate servers may be copied to the app package under `Contents/Resources`. To view package contents, right-click the `EndlessClient.app` file and select "View Package Contents". + +Note that the configuration file for the app is stored under `~/.endlessclient/config/settings.ini`. This file will need to be modified to select the new server host and version number. + ### Building from source -After installing, clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform. +Clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform. VSCode is supported on all OS flavors. Visual Studio 2022 is supported on Windows. -> ⚠️ If you have previously built EndlessClient, you mean need to clear your dotnet tool cache and nuget package cache +The .Net 8.0 SDK is required. Install the correct version for your platform/architecture. On macOS, XCode 16.0 or later is required (install from the App Store). + +> ⚠️ macOS requires a specific version of the .Net SDK: 8.0.204, due to the .Net team forcing minos version of macOS 15 in later SDKs. If you only want to build for macOS 15 and up, you can use the latest SDK. + +> ⚠️ If you have previously built EndlessClient, you may need to clear your dotnet tool cache and nuget package cache > -> Run the following commands (Windows): +> Run the following commands: > - `dotnet nuget locals all --clear` -> - Windows: `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache` -> - Linux: `rm -rf ~/.dotnet/toolResolverCache` +> - Windows (powershell): `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache` +> - Linux/macOS: `rm -rf ~/.dotnet/toolResolverCache` > ⚠️ If you get build errors due to formatting > -> Run the following commands: -> - Windows: `dotnet format EndlessClient.sln` -> - Linux: `dotnet format EndlessClient.Linux.sln` - -### Building on Mac - -1. Download and install the [.NET 8.0 SDK (x64)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.204-macos-x64-installer) or [Apple Silicon (e.g. M1)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.204-macos-arm64-installer). - ⚠️ The latest .NET 8.0 SDK forces the minimum version of the compiled app to macOS 15 (sequoia). If this is not desired, use a prior version. 8.0.204 is a known working version. -2. Install XCode from the [AppStore](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12) -3. Run `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient` - -#### Mac errors - -Problem: `error NETSDK1139: The target platform identifier macos was not recognized.` -Solution: run the command `sudo dotnet workload restore EndlessClient/EndlessClient.csproj` which will install the macos workload for you. +> Run: `dotnet format EndlessClient.sln` Todo list ---------------------