diff --git a/Intersect (Core)/Updater/Updater.cs b/Intersect (Core)/Updater/Updater.cs index c9b15812ad..b9ff18f0a2 100644 --- a/Intersect (Core)/Updater/Updater.cs +++ b/Intersect (Core)/Updater/Updater.cs @@ -38,6 +38,7 @@ public partial class Updater private string mConfigUrl; private string mBaseUrl; + public Updater(string updateUrl, string currentVersionPath, bool isClient, int maxDownloadThreads = 10) { if (string.IsNullOrWhiteSpace(updateUrl)) @@ -76,6 +77,38 @@ public Updater(string updateUrl, string currentVersionPath, bool isClient, int m private async void RunUpdates() { + // Usunięcie folderu game.westerre.pl:5401 przed aktualizacją + string intersectFolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), ".intersect"); + string westerreFolderPath = Path.Combine(intersectFolderPath, "Westerre"); + string gameFolderPath = Path.Combine(westerreFolderPath, "game.westerre.pl.5401"); + + if (Directory.Exists(gameFolderPath)) + { + try + { + // Usunięcie wszystkich plików i podfolderów w folderze game.westerre.pl:5401 + foreach (string filePath in Directory.EnumerateFiles(gameFolderPath)) + { + File.Delete(filePath); + } + foreach (string directoryPath in Directory.EnumerateDirectories(gameFolderPath)) + { + Directory.Delete(directoryPath, true); + } + + Console.WriteLine($"Deleted contents of {gameFolderPath} before update."); + } + catch (Exception ex) + { + Console.WriteLine($"Failed to delete contents of {gameFolderPath}: {ex.Message}"); + // Obsłużenie błędu, jeśli nie można usunąć zawartości folderu + // Możesz zdecydować, czy chcesz przerwać aktualizację lub kontynuować + } + } + else + { + Console.WriteLine($"Folder {gameFolderPath} does not exist."); + } DeleteOldFiles(); //Download Update Config diff --git a/Intersect.Client/Icon.bmp b/Intersect.Client/Icon.bmp index bbcf356dd9..190426c2b9 100644 Binary files a/Intersect.Client/Icon.bmp and b/Intersect.Client/Icon.bmp differ diff --git a/Intersect.Client/Intersect.Client.csproj b/Intersect.Client/Intersect.Client.csproj index f3ad896af8..138bed1b01 100644 --- a/Intersect.Client/Intersect.Client.csproj +++ b/Intersect.Client/Intersect.Client.csproj @@ -1,4 +1,4 @@ - + true @@ -12,14 +12,17 @@ - AscensionGameDev.Intersect.Client - Game Client - Part of the Intersect 2D Game Creation Suite + Westerre + Klient Gry Westerre LICENSE.md Intersect.Client - Intersect Client + Westerre Properties app.manifest 512 + Westerre + Westerre + Copyright © Westerre 2023 diff --git a/assets/intersect-logo-qu.bmp b/assets/intersect-logo-qu.bmp index 3e6f1bdb15..190426c2b9 100644 Binary files a/assets/intersect-logo-qu.bmp and b/assets/intersect-logo-qu.bmp differ diff --git a/assets/intersect-logo-qu.ico b/assets/intersect-logo-qu.ico index 5b4e27060f..218dc1b23b 100644 Binary files a/assets/intersect-logo-qu.ico and b/assets/intersect-logo-qu.ico differ diff --git a/assets/intersect-logo-qu.png b/assets/intersect-logo-qu.png index 903bcd9fb7..a3b6748b8a 100644 Binary files a/assets/intersect-logo-qu.png and b/assets/intersect-logo-qu.png differ