From 1381e1f5204048d160cd5a81db191c5a63dbc728 Mon Sep 17 00:00:00 2001 From: kaczy93 Date: Sun, 26 Nov 2023 11:52:36 +0100 Subject: [PATCH] Make CentrED run on linux and macos (#20) * Load zlib.dll only for windows * include imgui libs for linux and osx --- CentrED/CentrED.csproj | 2 ++ CentrED/CentrEDGame.cs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CentrED/CentrED.csproj b/CentrED/CentrED.csproj index 7de998f..ea24b7a 100644 --- a/CentrED/CentrED.csproj +++ b/CentrED/CentrED.csproj @@ -30,6 +30,8 @@ + + diff --git a/CentrED/CentrEDGame.cs b/CentrED/CentrEDGame.cs index 19a7c99..260432b 100644 --- a/CentrED/CentrEDGame.cs +++ b/CentrED/CentrEDGame.cs @@ -42,7 +42,10 @@ protected override void Initialize() _gdm.ApplyChanges(); - NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, "x64", "zlib.dll")); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + NativeLibrary.Load(Path.Combine(AppContext.BaseDirectory, "x64", "zlib.dll")); + } Log.Start(LogTypes.All); MapManager = new MapManager(_gdm.GraphicsDevice); UIManager = new UIManager(_gdm.GraphicsDevice);