From 07aca75cdcbbf31cc52b614212568346bf7bec91 Mon Sep 17 00:00:00 2001 From: Bitl Date: Fri, 12 Aug 2022 10:00:08 -0700 Subject: [PATCH] attempt to fix the issue where some clients stay open after closing --- .../StorageAndFunctions/SecurityFuncs.cs | 18 +++++++++++++----- README-AND-CREDITS.TXT | 9 +++++---- changelog.txt | 5 +++++ scripts/launcher/info.ini | 6 +++--- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs index 3466dd6..5f98f2d 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/SecurityFuncs.cs @@ -243,18 +243,26 @@ public class SecurityFuncs worker.RunWorkerAsync(); } } + + private static void WorkerKill(Process exe, ScriptType type, int time, BackgroundWorker worker, string clientname, string mapname) + { + worker.DoWork -= (obj, e) => WorkerDoWork(exe, type, time, worker, clientname, mapname); + worker.CancelAsync(); + worker.Dispose(); + } private static void WorkerDoWork(Process exe, ScriptType type, int time, BackgroundWorker worker, string clientname, string mapname) { + DateTime StartTimeAfterMinute = exe.StartTime.AddMinutes(1); + if (exe.IsRunning()) { while (exe.IsRunning()) { - if (!exe.IsRunning()) - { - worker.DoWork -= (obj, e) => WorkerDoWork(exe, type, time, worker, clientname, mapname); - worker.CancelAsync(); - worker.Dispose(); + if (exe.MainWindowHandle == null && DateTime.Now > StartTimeAfterMinute) + { + exe.Kill(); + WorkerKill(exe, type, time, worker, clientname, mapname); break; } diff --git a/README-AND-CREDITS.TXT b/README-AND-CREDITS.TXT index e62575e..2057cc5 100644 --- a/README-AND-CREDITS.TXT +++ b/README-AND-CREDITS.TXT @@ -11,10 +11,10 @@ INFORMATION ------------------------------- [What is Novetus?] -​Novetus is a free, multi-version ROBLOX client launcher +​Novetus is a free and open source multi-version ROBLOX client launcher built to allow the user to run LAN and Internet servers. -Novetus was made to improve on my previous project, RBXLegacy, +Novetus was made as a successor to my old RBXLegacy project, with the addition of new features that enhance the launcher for mod development, player customization, and overall usability. @@ -40,13 +40,14 @@ Enhancements from RBXLegacy The Final Update 1.16.2 & 1.18.1: - Largely reworked codebase - Custom player icons - A command-line utility for hosting servers. -- Addon support. +- Addon support (Mod Packages and support for addon LUA scripts with a built in scripting API) - 2006 Color presets! - More character colors. - Graphical Options menu with Automatic and Custom options. - ReShade integration. - Online clothing support with customizable clothing providers. -- 2 styles; an Extended style for easy access to options, and a Compact style. +- 3 styles; an Extended style for easy access to options, a Compact style resembling the original RBXLegacy, and a default Stylish style built for +accessibility and nostalgic style. - Lite version. - Much more stable. diff --git a/changelog.txt b/changelog.txt index 4ad110a..64d09fe 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +1.3 Snapshot v22.8259.17635.1 +Fixes: +- Made it so Novetus closes any open client process after 1 minute of not showing a window + - This should fix issues with older clients staying open in the background after closing. +---------------------------------------------------------------------------- 1.3 v8.2022.1 Changes from 1.3 v2.2022.1: Notes: diff --git a/scripts/launcher/info.ini b/scripts/launcher/info.ini index cb7a6a1..bac0fd2 100644 --- a/scripts/launcher/info.ini +++ b/scripts/launcher/info.ini @@ -5,9 +5,9 @@ DefaultMap=Dev - Baseplate2048.rbxl UserAgentRegisterClient1=2007M UserAgentRegisterClient2=2010L ExtendedVersionNumber=True -ExtendedVersionEditChangelog=False -ExtendedVersionTemplate=%version% v8.2022.%extended-revision%%lite% -//ExtendedVersionTemplate=%version% Snapshot v22.%build%.%revision%.%extended-revision% +ExtendedVersionEditChangelog=True +//ExtendedVersionTemplate=%version% v8.2022.%extended-revision%%lite% +ExtendedVersionTemplate=%version% Snapshot v22.%build%.%revision%.%extended-revision% ExtendedVersionRevision=1 IsLite=False InitialBootup=False