From e8ca69dede2b738ef4c733cc71a3972b4d328046 Mon Sep 17 00:00:00 2001 From: EvilFactory Date: Mon, 6 Mar 2023 12:59:55 -0300 Subject: [PATCH] Added debug symbols to the installer script --- .../ClientSource/LuaCs/LuaCsInstaller.cs | 10 +++---- .../ServerSource/LuaCs/LuaCsInstaller.cs | 27 ++++++++++--------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs b/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs index 30f3fc7d2..91828a21b 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/LuaCs/LuaCsInstaller.cs @@ -23,7 +23,7 @@ namespace Barotrauma string[] filesToRemove = new string[] { - "Barotrauma.dll", "Barotrauma.deps.json", + "Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb", "System.Reflection.Metadata.dll", "System.Collections.Immutable.dll", "System.Runtime.CompilerServices.Unsafe.dll" }; @@ -69,16 +69,14 @@ namespace Barotrauma if (clientVersion == workshopVersion) { return; } - string additional = LuaCsSetup.GetPackage(LuaCsSetup.CsForBarotraumaId, false, true) == null ? "" : "Cs"; - - var msg = new GUIMessageBox($"Lua{additional} Update", $"Your Lua{additional} client version is different from the version found in the Lua{additional}ForBarotrauma workshop files. Do you want to update?\n\n Client Version: {clientVersion}\n Workshop Version: {workshopVersion}", + var msg = new GUIMessageBox($"LuaCs Update", $"Your LuaCs client version is different from the version found in the LuaCsForBarotrauma workshop files. Do you want to update?\n\n Client Version: {clientVersion}\n Workshop Version: {workshopVersion}", new LocalizedString[2] { TextManager.Get("Yes"), TextManager.Get("Cancel") }); msg.Buttons[0].OnClicked = (GUIButton button, object obj) => { string[] filesToUpdate = new string[] { - "Barotrauma.dll", "Barotrauma.deps.json", + "Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb", "0harmony.dll", "Mono.Cecil.dll", "Sigil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", @@ -123,7 +121,7 @@ namespace Barotrauma return true; } - new GUIMessageBox("Restart", $"Lua{additional} updated! Restart your game to apply the changes."); + new GUIMessageBox("Restart", $"LuaCs updated! Restart your game to apply the changes."); msg.Close(); return true; diff --git a/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs b/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs index 454f6d6c5..85c9ff9c0 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/LuaCs/LuaCsInstaller.cs @@ -13,7 +13,7 @@ namespace Barotrauma if (luaPackage == null) { - GameMain.Server.SendChatMessage("Couldn't find the Lua For Barotrauma package.", ChatMessageType.ServerMessageBox); + GameMain.Server.SendChatMessage("Couldn't find the LuaCs For Barotrauma package.", ChatMessageType.ServerMessageBox); return; } @@ -23,18 +23,18 @@ namespace Barotrauma string[] filesToCopy = new string[] { - "Barotrauma.dll", "Barotrauma.deps.json", - "0harmony.dll", "Mono.Cecil.dll", - "Sigil.dll", - "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", - "Mono.Cecil.Rocks.dll", "MonoMod.Common.dll", - "MoonSharp.Interpreter.dll", + "Barotrauma.dll", "Barotrauma.deps.json", "Barotrauma.pdb", + "0harmony.dll", "Mono.Cecil.dll", + "Sigil.dll", + "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", + "Mono.Cecil.Rocks.dll", "MonoMod.Common.dll", + "MoonSharp.Interpreter.dll", - "Microsoft.CodeAnalysis.dll", "Microsoft.CodeAnalysis.CSharp.dll", - "Microsoft.CodeAnalysis.CSharp.Scripting.dll", "Microsoft.CodeAnalysis.Scripting.dll", + "Microsoft.CodeAnalysis.dll", "Microsoft.CodeAnalysis.CSharp.dll", + "Microsoft.CodeAnalysis.CSharp.Scripting.dll", "Microsoft.CodeAnalysis.Scripting.dll", - "System.Reflection.Metadata.dll", "System.Collections.Immutable.dll", - "System.Runtime.CompilerServices.Unsafe.dll" + "System.Reflection.Metadata.dll", "System.Collections.Immutable.dll", + "System.Runtime.CompilerServices.Unsafe.dll" }; filesToCopy = filesToCopy.Concat(Directory.EnumerateFiles(path, "*.dll", SearchOption.AllDirectories) .Where(s => s.Contains("mscordaccore_amd64_amd64")).Select(s => Path.GetFileName(s))).ToArray(); @@ -43,6 +43,7 @@ namespace Barotrauma File.Move("Barotrauma.dll", "Temp/Original/Barotrauma.dll", true); File.Move("Barotrauma.deps.json", "Temp/Original/Barotrauma.deps.json", true); + File.Move("Barotrauma.pdb", "Temp/Original/Barotrauma.pdb", true); File.Move("System.Reflection.Metadata.dll", "Temp/Original/System.Reflection.Metadata.dll", true); File.Move("System.Collections.Immutable.dll", "Temp/Original/System.Collections.Immutable.dll", true); @@ -62,7 +63,7 @@ namespace Barotrauma } catch (UnauthorizedAccessException e) { - LuaCsLogger.LogError("You seem to already have Client Side Lua installed, if you are trying to reinstall, make sure uninstall it first (mainmenu button located top left).", LuaCsMessageOrigin.LuaCs); + LuaCsLogger.LogError("You seem to already have Client Side LuaCs installed, if you are trying to reinstall, make sure uninstall it first (mainmenu button located top left).", LuaCsMessageOrigin.LuaCs); return; } @@ -73,7 +74,7 @@ namespace Barotrauma return; } - GameMain.Server.SendChatMessage("Client-Side Lua installed, restart your game to apply changes.", ChatMessageType.ServerMessageBox); + GameMain.Server.SendChatMessage("Client-Side LuaCs installed, restart your game to apply changes.", ChatMessageType.ServerMessageBox); } } }