diff --git a/ProjectSrc/Bootstrapper/History/StudioDeployLogs.cs b/ProjectSrc/Bootstrapper/History/StudioDeployLogs.cs index 6593900..6f08da8 100644 --- a/ProjectSrc/Bootstrapper/History/StudioDeployLogs.cs +++ b/ProjectSrc/Bootstrapper/History/StudioDeployLogs.cs @@ -57,7 +57,9 @@ private static void MakeDistinct(HashSet targetSet) private void UpdateLogs(string deployHistory, int maxVersion) { - MatchCollection matches = Regex.Matches(deployHistory, LogPattern); + var now = DateTime.Now; + var matches = Regex.Matches(deployHistory, LogPattern); + CurrentLogs_x86.Clear(); CurrentLogs_x64.Clear(); @@ -86,6 +88,15 @@ private void UpdateLogs(string deployHistory, int maxVersion) if (deployLog.Changelist < EarliestChangelist || deployLog.Version > maxVersion) continue; + // olive71 (Ganesh) said we should expect builds older than ~3 months to be deleted. + // Although in practice this isn't consistently done, it's better to be safe than sorry. + // https://devforum.roblox.com/t/previous-roblox-builds-missing-from-deployment-server/469698/3 + + var timespan = now - deployLog.TimeStamp; + + if (timespan.TotalDays > 90) + continue; + HashSet targetList; if (deployLog.Is64Bit) diff --git a/ProjectSrc/Bootstrapper/StudioBootstrapper.cs b/ProjectSrc/Bootstrapper/StudioBootstrapper.cs index 4dd87a0..95b6d0d 100644 --- a/ProjectSrc/Bootstrapper/StudioBootstrapper.cs +++ b/ProjectSrc/Bootstrapper/StudioBootstrapper.cs @@ -806,7 +806,7 @@ private async Task shutdownStudioProcesses() return !cancelled; } - public async Task Bootstrap() + public async Task Bootstrap(string targetVersion = "") { setStatus("Checking for updates"); echo("Checking build installation..."); @@ -825,12 +825,21 @@ public async Task Bootstrap() var getFastVersion = GetFastVersionGuid(currentBranch); string fastVersion = await getFastVersion.ConfigureAwait(true); - if (shouldInstall || fastVersion != currentVersion) + if (!shouldInstall) + shouldInstall = (fastVersion != currentVersion); + + if (!shouldInstall && !string.IsNullOrEmpty(targetVersion)) + { + string versionOverload = versionRegistry.GetString("VersionOverload"); + shouldInstall = (targetVersion != versionOverload); + } + + if (shouldInstall) { if (currentBranch != "roblox") echo("Possible update detected, verifying..."); - var getVersionInfo = GetCurrentVersionInfo(Branch, versionRegistry, fastVersion); + var getVersionInfo = GetCurrentVersionInfo(Branch, versionRegistry, fastVersion, targetVersion); versionInfo = await getVersionInfo.ConfigureAwait(true); buildVersion = versionInfo.Guid; @@ -921,6 +930,7 @@ await Task versionRegistry.SetValue("Version", versionId); versionRegistry.SetValue("VersionGuid", buildVersion); + versionRegistry.SetValue("VersionOverload", targetVersion); } else { diff --git a/ProjectSrc/Forms/BootstrapperForm.cs b/ProjectSrc/Forms/BootstrapperForm.cs index 9e4571e..fb32f5b 100644 --- a/ProjectSrc/Forms/BootstrapperForm.cs +++ b/ProjectSrc/Forms/BootstrapperForm.cs @@ -30,7 +30,9 @@ public BootstrapperForm(StudioBootstrapper bootstrapper, bool exitWhenClosed = f public async Task Bootstrap() { - var bootstrap = Bootstrapper.Bootstrap(); + string targetVersion = Program.GetString("TargetVersion"); + var bootstrap = Bootstrapper.Bootstrap(targetVersion); + await bootstrap.ConfigureAwait(true); } @@ -159,7 +161,8 @@ private void BootstrapperForm_FormClosing(object sender, FormClosingEventArgs e) this, "The installation has not finished yet!\n" + - "Are you sure you want to close this window?", + "Closing this window will exit the mod manager.\n" + + "Are you sure you want to continue?", "Warning", @@ -168,8 +171,11 @@ private void BootstrapperForm_FormClosing(object sender, FormClosingEventArgs e) ); if (result != DialogResult.No) + { + Environment.Exit(0); return; - + } + e.Cancel = true; } } diff --git a/ProjectSrc/RobloxStudioModManager.csproj b/ProjectSrc/RobloxStudioModManager.csproj index 34f3f76..78ea234 100644 --- a/ProjectSrc/RobloxStudioModManager.csproj +++ b/ProjectSrc/RobloxStudioModManager.csproj @@ -201,6 +201,12 @@ echo Copying release build. copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\$(TargetFileName)" echo Done! :end + + + if not $(ConfigurationName) == Release goto :end +echo Clearing instances of $(TargetFileName) +taskkill /f /im $(TargetFileName) /fi "memusage gt 2" +:end diff --git a/RobloxStudioModManager.exe b/RobloxStudioModManager.exe index e4eae7b..a310e43 100644 Binary files a/RobloxStudioModManager.exe and b/RobloxStudioModManager.exe differ