From 74bd0e13e48288bdc74bf959e6b6158f7b258485 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 23 Aug 2026 18:33:26 +1000
Subject: [PATCH 001/134] Add support for folders in exclusion list - Uses
globbing for wildcard support - Also fix bug where a full fileneame would be
*included* not excluded from the exclusions - whoops
---
CompactGUI.Core/CompactGUI.Core.csproj | 1 +
CompactGUI.Core/Compactor.cs | 14 +++--
CompactGUI.Core/SkipListMatcher.cs | 61 +++++++++++++++++++
.../Settings/Settings_skiplistflyout.xaml.vb | 2 +-
.../CompressableFolders/CompressableFolder.vb | 6 +-
5 files changed, 75 insertions(+), 9 deletions(-)
create mode 100644 CompactGUI.Core/SkipListMatcher.cs
diff --git a/CompactGUI.Core/CompactGUI.Core.csproj b/CompactGUI.Core/CompactGUI.Core.csproj
index a60df545..b28d8054 100644
--- a/CompactGUI.Core/CompactGUI.Core.csproj
+++ b/CompactGUI.Core/CompactGUI.Core.csproj
@@ -14,6 +14,7 @@
+ allruntime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 0c6071f9..7b43e3d1 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -15,7 +15,7 @@ public sealed class Compactor : ICompressor, IDisposable
{
private readonly string workingDirectory;
- private readonly HashSet excludedFileExtensions;
+ private readonly HashSet exclusionList;
private readonly WOFCompressionAlgorithm wofCompressionAlgorithm;
@@ -33,7 +33,7 @@ public sealed class Compactor : ICompressor, IDisposable
public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, string[] excludedFileTypes, Analyser analyser, ILogger? logger = null)
{
workingDirectory = folderPath;
- excludedFileExtensions = new HashSet(excludedFileTypes);
+ exclusionList = new HashSet(excludedFileTypes, StringComparer.OrdinalIgnoreCase);
wofCompressionAlgorithm = compressionLevel;
_logger = logger ?? NullLogger.Instance;
_analyser = analyser;
@@ -128,16 +128,18 @@ public async Task> BuildWorkingFilesList()
var analysedFiles = await _analyser.GetAnalysedFilesAsync(cancellationTokenSource.Token);
- var filesList = analysedFiles?
+ if (analysedFiles is null) return Enumerable.Empty();
+
+ var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(f => f.FileName), exclusionList);
+
+ return analysedFiles
.Where(fl =>
fl.CompressionMode != wofCompressionAlgorithm
&& fl.UncompressedSize > clusterSize
- && ((fl.FileInfo != null && !excludedFileExtensions.Contains(fl.FileInfo.Extension)) || excludedFileExtensions.Contains(fl.FileName))
+ && !excludedFiles.Contains(fl.FileName)
)
.Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize))
.ToList();
-
- return filesList;
}
diff --git a/CompactGUI.Core/SkipListMatcher.cs b/CompactGUI.Core/SkipListMatcher.cs
new file mode 100644
index 00000000..79a52ef0
--- /dev/null
+++ b/CompactGUI.Core/SkipListMatcher.cs
@@ -0,0 +1,61 @@
+using Microsoft.Extensions.FileSystemGlobbing;
+
+namespace CompactGUI.Core;
+
+public static class SkipListMatcher
+{
+ public static HashSet GetExcludedFiles(string rootDirectory, IEnumerable allFiles, IEnumerable patterns)
+ {
+ var excluded = new HashSet(StringComparer.OrdinalIgnoreCase);
+ if (!patterns.Any()) return excluded;
+
+ var matcher = new Matcher(StringComparison.OrdinalIgnoreCase);
+ foreach (string glob in NormalisePatterns(patterns))
+ {
+ matcher.AddInclude(glob);
+ }
+
+ var relativeFiles = allFiles.Select(f => Path.GetRelativePath(rootDirectory, f).Replace('\\', '/'));
+
+ foreach (FilePatternMatch match in matcher.Match(relativeFiles).Files)
+ {
+ excluded.Add(Path.GetFullPath(Path.Combine(rootDirectory, match.Path)));
+ }
+
+ return excluded;
+ }
+
+ private static IEnumerable NormalisePatterns(IEnumerable entries)
+ {
+ foreach (string entry in entries)
+ {
+ string pattern = entry.Trim().Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ if (pattern.Length == 0) continue;
+
+ bool hasWildcard = pattern.Contains('*') || pattern.Contains('?');
+ bool hasSeparator = pattern.Contains(Path.DirectorySeparatorChar) || pattern.Contains(Path.AltDirectorySeparatorChar);
+
+ if (!hasSeparator && IsExtensionPattern(pattern))
+ {
+ // Extension patterns (".mp4", "*.mp4") match any file with that extension at any depth to keep existnig skips working.
+ yield return "**/*" + (pattern.StartsWith('.') ? pattern : pattern[1..]);
+ }
+ else if (!hasWildcard && !hasSeparator)
+ {
+ // Legacy exact file names ("Thumbs.db"), matched at any depth.
+ yield return "**/" + pattern;
+ }
+ else
+ {
+ yield return NormalisePath(pattern);
+ }
+ }
+ }
+
+ private static bool IsExtensionPattern(string pattern)
+ {
+ return pattern.StartsWith('.') || pattern.StartsWith("*.");
+ }
+
+ private static string NormalisePath(string path) => path.Replace(Path.DirectorySeparatorChar, '/').Replace(Path.AltDirectorySeparatorChar, '/');
+}
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
index 749ec77a..47bb2e1a 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
@@ -36,7 +36,7 @@ Public Class Settings_skiplistflyout
Return cl.Content.ToString
End Function).ToList
- _settingsService.AppSettings.NonCompressableList = allObj.Where(Function(c) c.StartsWith("."c) AndAlso c.Length > 1).Distinct().ToList
+ _settingsService.AppSettings.NonCompressableList = allObj.Select(Function(c) c.Trim()).Where(Function(c) c.Length > 0).Distinct().ToList
_settingsService.SaveSettings()
PopulateTokens()
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 815050f0..1c25870c 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -60,8 +60,10 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Public ReadOnly Property GlobalPoorlyCompressedFileCount
Get
- If AnalysisResults Is Nothing OrElse Application.GetService(Of ISettingsService).AppSettings.NonCompressableList.Count = 0 Then Return 0
- Return AnalysisResults.Where(Function(fl) Application.GetService(Of ISettingsService).AppSettings.NonCompressableList.Contains(New IO.FileInfo(fl.FileName).Extension)).Count
+ Dim skipList = Application.GetService(Of ISettingsService).AppSettings.NonCompressableList
+ If AnalysisResults Is Nothing OrElse skipList.Count = 0 Then Return 0
+ Dim excluded = SkipListMatcher.GetExcludedFiles(FolderName, AnalysisResults.Select(Function(fl) fl.FileName), skipList)
+ Return AnalysisResults.Where(Function(fl) excluded.Contains(fl.FileName)).Count
End Get
End Property
From 86e32c4658dbd9ecc6e526229af3c01ffb41c987 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 23 Aug 2026 18:37:27 +1000
Subject: [PATCH 002/134] Switch skiplist tokeniser to use semicolon and comma
instead of space to allow spaces in folder names to work
---
CompactGUI/Components/Custom/TokenizedTextBox.vb | 4 +++-
.../Components/Settings/Settings_skiplistflyout.xaml.vb | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CompactGUI/Components/Custom/TokenizedTextBox.vb b/CompactGUI/Components/Custom/TokenizedTextBox.vb
index 68a26f00..ad4123d8 100644
--- a/CompactGUI/Components/Custom/TokenizedTextBox.vb
+++ b/CompactGUI/Components/Custom/TokenizedTextBox.vb
@@ -14,6 +14,8 @@ Public Class TokenizedTextBox : Inherits RichTextBox
Public Property TokenMatcher As Func(Of String, Object)
+ Public Property TokenDelimiter As String = ";"
+
Public Sub New()
AddHandler TextChanged, AddressOf OnTokenTextChanged
@@ -32,7 +34,7 @@ Public Class TokenizedTextBox : Inherits RichTextBox
End Sub
Public Sub InsertText(text As String)
- text &= " "
+ text &= TokenDelimiter
AppendText(text)
If TokenMatcher Is Nothing Then Return
Dim token = TokenMatcher(text)
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
index 47bb2e1a..611a907d 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
@@ -8,7 +8,7 @@ Public Class Settings_skiplistflyout
InitializeComponent()
_settingsService = Application.GetService(Of ISettingsService)()
- UiTokenizedText.TokenMatcher = Function(text) If(text.EndsWith(" "c) OrElse text.EndsWith(";"c) OrElse text.EndsWith(","c), text.Substring(0, text.Length - 1).Trim(), Nothing)
+ UiTokenizedText.TokenMatcher = Function(text) If(text.EndsWith(";"c) OrElse text.EndsWith(","c), text.Substring(0, text.Length - 1).Trim(), Nothing)
PopulateTokens()
End Sub
From 45827007355a37b4313558fb274d6ac51b70b592 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 23 Aug 2026 19:12:30 +1000
Subject: [PATCH 003/134] Updated skiplist editor to remove laggy tokenized box
---
.../Components/Custom/TokenizedTextBox.vb | 86 -----------
.../Settings/Settings_skiplistflyout.xaml | 134 ++++++++++++------
.../Settings/Settings_skiplistflyout.xaml.vb | 98 +++++++++++--
CompactGUI/Themes/Generic.xaml | 17 +--
4 files changed, 175 insertions(+), 160 deletions(-)
delete mode 100644 CompactGUI/Components/Custom/TokenizedTextBox.vb
diff --git a/CompactGUI/Components/Custom/TokenizedTextBox.vb b/CompactGUI/Components/Custom/TokenizedTextBox.vb
deleted file mode 100644
index ad4123d8..00000000
--- a/CompactGUI/Components/Custom/TokenizedTextBox.vb
+++ /dev/null
@@ -1,86 +0,0 @@
-'Credit: https://blog.pixelingene.com/2010/10/tokenizing-control-convert-text-to-tokens
-
-Public Class TokenizedTextBox : Inherits RichTextBox
-
- Public Shared ReadOnly TokenTemplateProperty As DependencyProperty = DependencyProperty.Register("TokenTemplate", GetType(DataTemplate), GetType(TokenizedTextBox))
- Public Property TokenTemplate As DataTemplate
- Get
- Return GetValue(TokenTemplateProperty)
- End Get
- Set(value As DataTemplate)
- SetValue(TokenTemplateProperty, value)
- End Set
- End Property
-
- Public Property TokenMatcher As Func(Of String, Object)
-
- Public Property TokenDelimiter As String = ";"
-
- Public Sub New()
-
- AddHandler TextChanged, AddressOf OnTokenTextChanged
-
- End Sub
-
- Private Sub OnTokenTextChanged(sender As Object, e As TextChangedEventArgs)
- Dim text = CaretPosition.GetTextInRun(LogicalDirection.Backward)
- If TokenMatcher Is Nothing Then Return
-
- Dim token = TokenMatcher(text)
- If token IsNot Nothing Then
- ReplaceTextWithToken(text, token)
- End If
-
- End Sub
-
- Public Sub InsertText(text As String)
- text &= TokenDelimiter
- AppendText(text)
- If TokenMatcher Is Nothing Then Return
- Dim token = TokenMatcher(text)
- If token IsNot Nothing Then
- ReplaceTextWithToken(text, token)
- End If
- End Sub
-
- Private Sub ReplaceTextWithToken(inputText As String, token As Object)
-
- RemoveHandler TextChanged, AddressOf OnTokenTextChanged
-
- Dim para = CaretPosition.Paragraph
-
- Dim matchedRun As Run = para.Inlines.FirstOrDefault(Function(inline)
- Dim run = TryCast(inline, Run)
- Return (run IsNot Nothing AndAlso run.Text.EndsWith(inputText))
- End Function)
-
- If matchedRun IsNot Nothing Then
-
- Dim tokenContainer = CreateTokenContainer(inputText, token)
- para.Inlines.InsertBefore(matchedRun, tokenContainer)
-
- If matchedRun.Text = inputText Then
- para.Inlines.Remove(matchedRun)
- Else
- Dim index = matchedRun.Text.IndexOf(inputText) + inputText.Length
- Dim tailEnd = New Run(matchedRun.Text.Substring(index))
- para.Inlines.InsertAfter(matchedRun, tailEnd)
- para.Inlines.Remove(matchedRun)
- End If
-
- End If
-
- AddHandler TextChanged, AddressOf OnTokenTextChanged
-
- End Sub
-
- Private Function CreateTokenContainer(inputText As String, token As Object) As InlineUIContainer
- Dim presenter = New ContentPresenter() With {
- .Content = token,
- .ContentTemplate = TokenTemplate
- }
-
- Return New InlineUIContainer(presenter) With {.BaselineAlignment = BaselineAlignment.Bottom}
-
- End Function
-End Class
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
index cca0717c..7e09c35a 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
@@ -5,14 +5,18 @@
xmlns:local="clr-namespace:CompactGUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
- Width="620" Height="400"
- d:DesignHeight="400" d:DesignWidth="500"
- Background="{DynamicResource ApplicationBackgroundBrush}"
+ Width="620"
+ Height="400"
+ d:DesignHeight="400"
+ d:DesignWidth="500"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
+ Background="{DynamicResource ApplicationBackgroundBrush}"
ExtendsContentIntoTitleBar="True"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
- RenderOptions.BitmapScalingMode="HighQuality" RenderOptions.ClearTypeHint="Enabled"
- WindowBackdropType="Mica" WindowStartupLocation="CenterScreen"
+ RenderOptions.BitmapScalingMode="HighQuality"
+ RenderOptions.ClearTypeHint="Enabled"
+ WindowBackdropType="Mica"
+ WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
@@ -25,17 +29,51 @@
-
-
-
+ Height="28" MinWidth="70"
+ Margin="5 8 5 0" Padding="10 0"
+ Background="#7AB3C6D8" BorderThickness="0" CornerRadius="5" Cursor="Hand">
+
+
+
+
+
+
+
+
+
+
+
@@ -43,39 +81,47 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Width="100" Grid.Row="2"
+ Margin="0 0 130 20" HorizontalAlignment="Right" VerticalAlignment="Bottom"
+ d:Content="Save" Click="UISave_Click"
+ Content="{local:Localize UniSave}" />
+ Width="100" Grid.Row="2"
+ Margin="0 0 10 20" HorizontalAlignment="Right" VerticalAlignment="Bottom"
+ d:Content="Reset" Click="UIReset_Click"
+ Content="{local:Localize UniReset}" />
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
index 611a907d..df44af3e 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
@@ -1,22 +1,98 @@
-Imports CompactGUI.Core.Settings
+Imports System.Collections.ObjectModel
+
+Imports CompactGUI.Core.Settings
Public Class Settings_skiplistflyout
Private _settingsService As ISettingsService
+ Private _tokens As New ObservableCollection(Of String)
+ Private _editingToken As String = Nothing
+ Private _suppressTextChanged As Boolean = False
Sub New()
InitializeComponent()
_settingsService = Application.GetService(Of ISettingsService)()
- UiTokenizedText.TokenMatcher = Function(text) If(text.EndsWith(";"c) OrElse text.EndsWith(","c), text.Substring(0, text.Length - 1).Trim(), Nothing)
+ UiTokenList.ItemsSource = _tokens
+ AddHandler UiTokenInput.TextChanged, AddressOf UiTokenInput_TextChanged
+ AddHandler UiTokenInput.KeyDown, AddressOf UiTokenInput_KeyDown
+ AddHandler UiTokenInput.LostFocus, AddressOf UiTokenInput_LostFocus
PopulateTokens()
End Sub
Private Sub PopulateTokens()
- UiTokenizedText.Document.Blocks.Clear()
+ _tokens.Clear()
For Each i In _settingsService.AppSettings.NonCompressableList
- UiTokenizedText.InsertText(i)
+ _tokens.Add(i)
Next
+ UiTokenInput.Clear()
+ _editingToken = Nothing
+ End Sub
+
+ Private Sub ChipDelete_Click(sender As Object, e As RoutedEventArgs)
+ Dim chip = TryCast(TryCast(sender, FrameworkElement)?.DataContext, String)
+ If chip IsNot Nothing Then _tokens.Remove(chip)
+ End Sub
+
+ Private Sub Chip_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
+ Dim chip = TryCast(sender, TextBlock)
+ If chip Is Nothing Then Return
+
+ CommitInputText()
+
+ _editingToken = chip.Text
+ _suppressTextChanged = True
+ UiTokenInput.Text = chip.Text
+ UiTokenInput.CaretIndex = UiTokenInput.Text.Length
+ _suppressTextChanged = False
+ End Sub
+
+ Private Sub UiTokenInput_TextChanged(sender As Object, e As TextChangedEventArgs)
+ If _suppressTextChanged Then Return
+
+ If UiTokenInput.Text.IndexOfAny(New Char() {";"c, ","c}) >= 0 Then
+ CommitInputText()
+ End If
+ End Sub
+
+ Private Sub UiTokenInput_KeyDown(sender As Object, e As KeyEventArgs)
+ If e.Key = Key.Enter Then
+ CommitInputText()
+ e.Handled = True
+ End If
+ End Sub
+
+ Private Sub UiTokenInput_LostFocus(sender As Object, e As RoutedEventArgs)
+ If _editingToken IsNot Nothing Then
+ CommitInputText()
+ End If
+ End Sub
+
+ Private Sub CommitInputText()
+ Dim parts = UiTokenInput.Text.Split(New Char() {";"c, ","c}, StringSplitOptions.RemoveEmptyEntries).
+ Select(Function(p) p.Trim()).
+ Where(Function(t) t.Length > 0).ToList()
+
+ If _editingToken IsNot Nothing Then
+ Dim original = _editingToken
+ _editingToken = Nothing
+
+ If parts.Count = 0 OrElse (parts.Count = 1 AndAlso parts(0) = original) Then
+ UiTokenInput.Clear()
+ Return
+ End If
+
+ _tokens.Remove(original)
+ For Each p In parts
+ _tokens.Add(p)
+ Next
+ UiTokenInput.Clear()
+ ElseIf parts.Count > 0 Then
+ For Each p In parts
+ _tokens.Add(p)
+ Next
+ UiTokenInput.Clear()
+ End If
End Sub
Private Sub UIReset_Click(sender As Object, e As RoutedEventArgs)
@@ -26,20 +102,14 @@ Public Class Settings_skiplistflyout
End Sub
Private Sub UISave_Click(sender As Object, e As RoutedEventArgs)
- Dim items = UiTokenizedText.Document.Blocks
+ Dim finalList As New List(Of String)(_tokens)
- Dim inlineI As Paragraph = items(0)
- Dim allObj = inlineI.Inlines _
- .Where(Function(c) c.GetType = GetType(InlineUIContainer)) _
- .Select(Function(f As InlineUIContainer)
- Dim cl As ContentPresenter = f.Child
- Return cl.Content.ToString
- End Function).ToList
+ Dim pending = UiTokenInput.Text.Trim()
+ If pending.Length > 0 Then finalList.Add(pending)
- _settingsService.AppSettings.NonCompressableList = allObj.Select(Function(c) c.Trim()).Where(Function(c) c.Length > 0).Distinct().ToList
+ _settingsService.AppSettings.NonCompressableList = finalList.Distinct().ToList
_settingsService.SaveSettings()
PopulateTokens()
-
End Sub
End Class
diff --git a/CompactGUI/Themes/Generic.xaml b/CompactGUI/Themes/Generic.xaml
index 235948aa..341abbba 100644
--- a/CompactGUI/Themes/Generic.xaml
+++ b/CompactGUI/Themes/Generic.xaml
@@ -1,19 +1,4 @@
-
-
-
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
From 950032d52bc41957d02f575e9f3b25da5ac5f910 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 23 Aug 2026 19:51:40 +1000
Subject: [PATCH 004/134] UI polish on skiplist editor
---
.../Settings/Settings_skiplistflyout.xaml | 2 +-
.../Settings/Settings_skiplistflyout.xaml.vb | 67 +++++++++++++++++--
2 files changed, 62 insertions(+), 7 deletions(-)
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
index 7e09c35a..a3736ee8 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
@@ -108,7 +108,7 @@
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
index df44af3e..8d4584c1 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml.vb
@@ -7,6 +7,8 @@ Public Class Settings_skiplistflyout
Private _settingsService As ISettingsService
Private _tokens As New ObservableCollection(Of String)
Private _editingToken As String = Nothing
+ Private _editingChipBorder As Border = Nothing
+ Private _originalChipBackground As Brush = Nothing
Private _suppressTextChanged As Boolean = False
Sub New()
@@ -27,11 +29,20 @@ Public Class Settings_skiplistflyout
Next
UiTokenInput.Clear()
_editingToken = Nothing
+ _editingChipBorder = Nothing
+ _originalChipBackground = Nothing
End Sub
Private Sub ChipDelete_Click(sender As Object, e As RoutedEventArgs)
Dim chip = TryCast(TryCast(sender, FrameworkElement)?.DataContext, String)
- If chip IsNot Nothing Then _tokens.Remove(chip)
+ If chip Is Nothing Then Return
+
+ If _editingToken IsNot Nothing AndAlso String.Equals(chip, _editingToken, StringComparison.OrdinalIgnoreCase) Then
+ EndEditChip()
+ UiTokenInput.Clear()
+ End If
+
+ _tokens.Remove(chip)
End Sub
Private Sub Chip_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
@@ -41,10 +52,18 @@ Public Class Settings_skiplistflyout
CommitInputText()
_editingToken = chip.Text
+ Dim chipGrid = TryCast(chip.Parent, Grid)
+ _editingChipBorder = If(chipGrid IsNot Nothing, TryCast(chipGrid.Parent, Border), Nothing)
+ If _editingChipBorder IsNot Nothing Then
+ _originalChipBackground = _editingChipBorder.Background
+ _editingChipBorder.Background = New SolidColorBrush(Color.FromRgb(122, 179, 216))
+ End If
+
_suppressTextChanged = True
UiTokenInput.Text = chip.Text
UiTokenInput.CaretIndex = UiTokenInput.Text.Length
_suppressTextChanged = False
+ UiTokenInput.Focus()
End Sub
Private Sub UiTokenInput_TextChanged(sender As Object, e As TextChangedEventArgs)
@@ -56,6 +75,23 @@ Public Class Settings_skiplistflyout
End Sub
Private Sub UiTokenInput_KeyDown(sender As Object, e As KeyEventArgs)
+ If e.Key = Key.Escape Then
+ If _editingToken IsNot Nothing Then EndEditChip()
+ UiTokenInput.Clear()
+ e.Handled = True
+ Return
+ End If
+
+ If e.Key = Key.Back AndAlso UiTokenInput.Text.Length = 0 Then
+ If _editingToken IsNot Nothing Then
+ EndEditChip()
+ ElseIf _tokens.Count > 0 Then
+ _tokens.RemoveAt(_tokens.Count - 1)
+ End If
+ e.Handled = True
+ Return
+ End If
+
If e.Key = Key.Enter Then
CommitInputText()
e.Handled = True
@@ -75,26 +111,42 @@ Public Class Settings_skiplistflyout
If _editingToken IsNot Nothing Then
Dim original = _editingToken
- _editingToken = Nothing
+ EndEditChip()
- If parts.Count = 0 OrElse (parts.Count = 1 AndAlso parts(0) = original) Then
+ If parts.Count = 0 OrElse (parts.Count = 1 AndAlso String.Equals(parts(0), original, StringComparison.OrdinalIgnoreCase)) Then
UiTokenInput.Clear()
Return
End If
_tokens.Remove(original)
For Each p In parts
- _tokens.Add(p)
+ AddToken(p)
Next
UiTokenInput.Clear()
ElseIf parts.Count > 0 Then
For Each p In parts
- _tokens.Add(p)
+ AddToken(p)
Next
UiTokenInput.Clear()
End If
End Sub
+ Private Sub EndEditChip()
+ If _editingChipBorder IsNot Nothing Then
+ _editingChipBorder.Background = _originalChipBackground
+ End If
+ _editingChipBorder = Nothing
+ _originalChipBackground = Nothing
+ _editingToken = Nothing
+ End Sub
+
+ Private Sub AddToken(value As String)
+ If value.Length = 0 Then Return
+ If _tokens.Any(Function(t) String.Equals(t, value, StringComparison.OrdinalIgnoreCase)) Then Return
+ _tokens.Add(value)
+ UiTokenScroller.ScrollToBottom()
+ End Sub
+
Private Sub UIReset_Click(sender As Object, e As RoutedEventArgs)
_settingsService.AppSettings.NonCompressableList = New Settings().NonCompressableList
_settingsService.SaveSettings()
@@ -107,9 +159,12 @@ Public Class Settings_skiplistflyout
Dim pending = UiTokenInput.Text.Trim()
If pending.Length > 0 Then finalList.Add(pending)
- _settingsService.AppSettings.NonCompressableList = finalList.Distinct().ToList
+ _settingsService.AppSettings.NonCompressableList = finalList.Distinct(StringComparer.OrdinalIgnoreCase).ToList
_settingsService.SaveSettings()
PopulateTokens()
+
+ Close()
+
End Sub
End Class
From 0c379eefac73368efe79422c0302476d181e7e8c Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 23 Aug 2026 22:14:49 +1000
Subject: [PATCH 005/134] Implement per-folder skiplist - watcher now also
respects skiplist
---
CompactGUI.Watcher/BackgroundCompactor.vb | 9 +-
CompactGUI.Watcher/WatchedFolder.vb | 1 +
CompactGUI.Watcher/Watcher.vb | 1 +
.../Settings/Settings_skiplistflyout.xaml | 114 +++++++++---
.../Settings/Settings_skiplistflyout.xaml.vb | 176 +++++++++++++++++-
.../Models/NewModels/CompressionOptions.vb | 5 +-
.../Services/CompressableFolderService.vb | 5 +
CompactGUI/ViewModels/FolderViewModel.vb | 3 +
CompactGUI/ViewModels/HomeViewModel.vb | 10 +
.../Views/Pages/PendingCompression.xaml | 17 +-
.../Views/Pages/PendingCompression.xaml.vb | 9 +
CompactGUI/i18n/i18n.es-ES.resx | 12 ++
CompactGUI/i18n/i18n.resx | 12 ++
CompactGUI/i18n/i18n.ru-RU.resx | 12 ++
CompactGUI/i18n/i18n.zh-CN.resx | 12 ++
15 files changed, 350 insertions(+), 48 deletions(-)
diff --git a/CompactGUI.Watcher/BackgroundCompactor.vb b/CompactGUI.Watcher/BackgroundCompactor.vb
index 2b23b322..8bd72baf 100644
--- a/CompactGUI.Watcher/BackgroundCompactor.vb
+++ b/CompactGUI.Watcher/BackgroundCompactor.vb
@@ -42,11 +42,13 @@ Public Class BackgroundCompactor
End Sub
- Public Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm) As Task(Of Boolean)
+ Public Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm, Optional excludedFileTypes As String() = Nothing) As Task(Of Boolean)
If compressionLevel = Core.WOFCompressionAlgorithm.NO_COMPRESSION Then Return Task.FromResult(False)
- _compactor = New Core.Compactor(folder, compressionLevel, _excludedFileTypes, New Core.Analyser(folder, NullLogger(Of Core.Analyser).Instance))
+ Dim effectiveExclusions = If(excludedFileTypes Is Nothing, _excludedFileTypes, excludedFileTypes)
+
+ _compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, New Core.Analyser(folder, NullLogger(Of Core.Analyser).Instance))
Return _compactor.RunAsync(Nothing)
@@ -67,7 +69,8 @@ Public Class BackgroundCompactor
folder.IsWorking = True
WatcherLog.CompactingFolder(_logger, folder.DisplayName)
- Dim compactingTask = BeginCompacting(folder.Folder, folder.CompressionLevel)
+ Dim folderSkipList = If(folder.SkipList Is Nothing, Array.Empty(Of String), folder.SkipList.ToArray())
+ Dim compactingTask = BeginCompacting(folder.Folder, folder.CompressionLevel, folderSkipList)
If cancellationTokenSource.IsCancellationRequested Then
diff --git a/CompactGUI.Watcher/WatchedFolder.vb b/CompactGUI.Watcher/WatchedFolder.vb
index 23d55821..3bbdb3dc 100644
--- a/CompactGUI.Watcher/WatchedFolder.vb
+++ b/CompactGUI.Watcher/WatchedFolder.vb
@@ -20,6 +20,7 @@ Public Class WatchedFolder
Private _LastCheckedDate As DateTime
Private _LastCheckedSize As Long
Private _CompressionLevel As Core.WOFCompressionAlgorithm
+ Private _SkipList As List(Of String)
Private _IsWorking As Boolean
diff --git a/CompactGUI.Watcher/Watcher.vb b/CompactGUI.Watcher/Watcher.vb
index cadaf4d6..d8ebe3f8 100644
--- a/CompactGUI.Watcher/Watcher.vb
+++ b/CompactGUI.Watcher/Watcher.vb
@@ -273,6 +273,7 @@ Partial Public Class Watcher : Inherits ObservableRecipient : Implements IRecipi
.LastCheckedSize = newItem.LastCheckedSize
.LastSystemModifiedDate = DateTime.Now
.CompressionLevel = If(newItem.CompressionLevel <> WOFCompressionAlgorithm.NO_COMPRESSION, newItem.CompressionLevel, existingItem.CompressionLevel)
+ .SkipList = newItem.SkipList
End With
existingItem.HasTargetChanged = False
End Sub
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
index a3736ee8..77df4da7 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
@@ -34,7 +34,7 @@
Background="#7AB3C6D8" BorderThickness="0" CornerRadius="5" Cursor="Hand">
-
+
-
diff --git a/CompactGUI/Views/Pages/PendingCompression.xaml.vb b/CompactGUI/Views/Pages/PendingCompression.xaml.vb
index 0810ff33..043b2a5b 100644
--- a/CompactGUI/Views/Pages/PendingCompression.xaml.vb
+++ b/CompactGUI/Views/Pages/PendingCompression.xaml.vb
@@ -19,29 +19,6 @@ Public Class PendingCompression
End Sub
- Private Sub UiChkSkipPoorlyCompressed_Checked(sender As Object, e As RoutedEventArgs)
- _settingsService.AppSettings.SkipNonCompressable = True
- _settingsService.SaveSettings()
-
- End Sub
-
- Private Sub UiChkSkipPoorlyCompressed_Unchecked(sender As Object, e As RoutedEventArgs)
- If Not IsVisible Then Return ' Prevents issues when the page is not fully loaded
- _settingsService.AppSettings.SkipNonCompressable = False
- _settingsService.SaveSettings()
- End Sub
-
- Private Sub UiChkSkipUserPoorlyCompressed_Checked(sender As Object, e As RoutedEventArgs)
- _settingsService.AppSettings.SkipUserNonCompressable = True
- _settingsService.SaveSettings()
- End Sub
-
- Private Sub UiChkSkipUserPoorlyCompressed_Unchecked(sender As Object, e As RoutedEventArgs)
- If Not IsVisible Then Return
- _settingsService.AppSettings.SkipUserNonCompressable = False
- _settingsService.SaveSettings()
- End Sub
-
Private Sub uiChkWatchFolderForChanges_Checked(sender As Object, e As RoutedEventArgs)
_settingsService.AppSettings.WatchFolderForChanges = True
_settingsService.SaveSettings()
@@ -60,5 +37,21 @@ Public Class PendingCompression
Dim flyout As New Settings_skiplistflyout(folderViewModel.Folder)
flyout.Owner = Window.GetWindow(Me)
flyout.ShowDialog()
+
+ folderViewModel.Folder.NotifyPropertyChanged(NameOf(CompressableFolder.SkippedFileCount))
+ End Sub
+
+ Private Sub UiChkSkipListEnabled_Checked(sender As Object, e As RoutedEventArgs)
+ NotifySkippedFileCount()
+ End Sub
+
+ Private Sub UiChkSkipListEnabled_Unchecked(sender As Object, e As RoutedEventArgs)
+ NotifySkippedFileCount()
+ End Sub
+
+ Private Sub NotifySkippedFileCount()
+ Dim folderViewModel = TryCast(DataContext, FolderViewModel)
+ If folderViewModel Is Nothing Then Return
+ folderViewModel.Folder.NotifyPropertyChanged(NameOf(CompressableFolder.SkippedFileCount))
End Sub
End Class
diff --git a/CompactGUI/i18n/i18n.Designer.vb b/CompactGUI/i18n/i18n.Designer.vb
index 23f04037..286ab173 100644
--- a/CompactGUI/i18n/i18n.Designer.vb
+++ b/CompactGUI/i18n/i18n.Designer.vb
@@ -91,6 +91,15 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Edit skip list for this folder.
+ '''
+ Public Shared ReadOnly Property CompressionConfiguration_EditSkipList() As String
+ Get
+ Return ResourceManager.GetString("CompressionConfiguration_EditSkipList", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to files will be skipped.
'''
@@ -131,6 +140,15 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Use skip list.
+ '''
+ Public Shared ReadOnly Property CompressionConfiguration_SkipListEnabled() As String
+ Get
+ Return ResourceManager.GetString("CompressionConfiguration_SkipListEnabled", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Watch folder for changes.
'''
@@ -801,6 +819,78 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Extensions in this folder.
+ '''
+ Public Shared ReadOnly Property SkipListFlyout_ExtensionsInFolder() As String
+ Get
+ Return ResourceManager.GetString("SkipListFlyout_ExtensionsInFolder", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Include global skipped file types.
+ '''
+ Public Shared ReadOnly Property SkipListFlyout_IncludeGlobal() As String
+ Get
+ Return ResourceManager.GetString("SkipListFlyout_IncludeGlobal", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Include wiki/estimator skipped file types.
+ '''
+ Public Shared ReadOnly Property SkipListFlyout_IncludeWiki() As String
+ Get
+ Return ResourceManager.GetString("SkipListFlyout_IncludeWiki", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Custom list — {0} entries.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_Custom() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_Custom", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Global + DB — {0} files.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_GlobalAndWiki() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_GlobalAndWiki", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Global — {0} files.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_GlobalOnly() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_GlobalOnly", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to Off.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_Off() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_Off", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to DB — {0} files.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_WikiOnly() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_WikiOnly", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Applied to all folders.
'''
diff --git a/CompactGUI/i18n/i18n.es-ES.resx b/CompactGUI/i18n/i18n.es-ES.resx
index 544983d0..c76528c1 100644
--- a/CompactGUI/i18n/i18n.es-ES.resx
+++ b/CompactGUI/i18n/i18n.es-ES.resx
@@ -280,6 +280,9 @@ omite archivos basado en estimación de compresión
Editar lista de exclusión de esta carpeta
+
+ Usar lista de exclusión
+
Aplicar a todo
@@ -368,7 +371,34 @@ omite archivos basado en estimación de compresión
Incluir tipos de archivo omitidos globales
- Incluir tipos de archivo con compresión deficiente (wiki/estimador)
+ Incluir tipos de archivo inteligentes omitidos
+
+
+ Desactivado
+
+
+ Global — {0} archivos
+
+
+ Wiki — {0} archivos
+
+
+ Global + Wiki — {0} archivos
+
+
+ Lista personalizada — {0} entradas
+
+
+ no configurado
+
+
+ Global: {0} omitidos
+
+
+ Inteligente: {0} omitidos
+
+
+ Personalizada: {0} entradasAhorrar
diff --git a/CompactGUI/i18n/i18n.resx b/CompactGUI/i18n/i18n.resx
index 84feddbc..14cb463a 100644
--- a/CompactGUI/i18n/i18n.resx
+++ b/CompactGUI/i18n/i18n.resx
@@ -301,6 +301,9 @@ skips files based on compression estimate
Edit skip list for this folder
+
+ Use skip list
+
Apply to all
@@ -389,7 +392,34 @@ skips files based on compression estimate
Include global skipped file types
- Include wiki/estimator skipped file types
+ Include smart skipped file types
+
+
+ Off
+
+
+ Global — {0} files
+
+
+ DB — {0} files
+
+
+ Global + DB — {0} files
+
+
+ Custom list — {0} entries
+
+
+ not configured
+
+
+ Global: {0} skipped
+
+
+ Smart: {0} skipped
+
+
+ Custom: {0} entriesSave
diff --git a/CompactGUI/i18n/i18n.ru-RU.resx b/CompactGUI/i18n/i18n.ru-RU.resx
index b8e541ea..d077f139 100644
--- a/CompactGUI/i18n/i18n.ru-RU.resx
+++ b/CompactGUI/i18n/i18n.ru-RU.resx
@@ -300,6 +300,9 @@
Изменить список исключений для этой папки
+
+ Использовать список исключений
+
Применить ко всем
@@ -388,7 +391,34 @@
Включить глобальный список пропускаемых типов
- Включить плохо сжимаемые типы из вики/оценщика
+ Включить умные пропускаемые типы файлов
+
+
+ Выкл
+
+
+ Глобальный — {0} файлов
+
+
+ Вики — {0} файлов
+
+
+ Глобальный + Вики — {0} файлов
+
+
+ Свой список — {0} записей
+
+
+ не настроено
+
+
+ Глобальный: {0} пропущено
+
+
+ Умный: {0} пропущено
+
+
+ Свой: {0} записейСохранить
diff --git a/CompactGUI/i18n/i18n.zh-CN.resx b/CompactGUI/i18n/i18n.zh-CN.resx
index b8033c20..3f514337 100644
--- a/CompactGUI/i18n/i18n.zh-CN.resx
+++ b/CompactGUI/i18n/i18n.zh-CN.resx
@@ -282,6 +282,9 @@
编辑此文件夹的跳过列表
+
+ 使用跳过列表
+
应用到所有
@@ -370,7 +373,34 @@
包含全局跳过的文件类型
- 包含 wiki/估算器中的压缩效果差的文件类型
+ 包含智能跳过的文件类型
+
+
+ 关闭
+
+
+ 全局 — {0} 个文件
+
+
+ Wiki — {0} 个文件
+
+
+ 全局 + Wiki — {0} 个文件
+
+
+ 自定义列表 — {0} 条
+
+
+ 未配置
+
+
+ 全局: 已跳过 {0}
+
+
+ 智能: 已跳过 {0}
+
+
+ 自定义: {0} 条保存
From 61ad7a2129d9253c8e0adbfc9b6fb3cc082d6e27 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 19:36:04 +1000
Subject: [PATCH 007/134] Add tooltip. Naming still feels awkward though
---
CompactGUI/Components/Settings/Settings_skiplistflyout.xaml | 2 +-
CompactGUI/i18n/i18n.es-ES.resx | 3 +++
CompactGUI/i18n/i18n.resx | 3 +++
CompactGUI/i18n/i18n.ru-RU.resx | 3 +++
CompactGUI/i18n/i18n.zh-CN.resx | 3 +++
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
index 77df4da7..5e3eb144 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
@@ -153,7 +153,7 @@
VerticalAlignment="Center"
d:Content="Include wiki/estimator skipped file types" Checked="UiChkIncludeWiki_Checked"
Content="{local:Localize SkipListFlyout_IncludeWiki}"
- Unchecked="UiChkIncludeWiki_Unchecked" />
+ ToolTip="{local:Localize SkipListFlyout_IncludeWikiTip}" Unchecked="UiChkIncludeWiki_Unchecked" />
Incluir tipos de archivo inteligentes omitidos
+
+ Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente.
+
Desactivado
diff --git a/CompactGUI/i18n/i18n.resx b/CompactGUI/i18n/i18n.resx
index 14cb463a..71f9eee2 100644
--- a/CompactGUI/i18n/i18n.resx
+++ b/CompactGUI/i18n/i18n.resx
@@ -394,6 +394,9 @@ skips files based on compression estimate
Include smart skipped file types
+
+ For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser.
+
Off
diff --git a/CompactGUI/i18n/i18n.ru-RU.resx b/CompactGUI/i18n/i18n.ru-RU.resx
index d077f139..2d09fb6c 100644
--- a/CompactGUI/i18n/i18n.ru-RU.resx
+++ b/CompactGUI/i18n/i18n.ru-RU.resx
@@ -393,6 +393,9 @@
Включить умные пропускаемые типы файлов
+
+ Для игр Steam используется база данных для определения пропускаемых типов. Для папок не из Steam это основано на умном анализаторе.
+
Выкл
diff --git a/CompactGUI/i18n/i18n.zh-CN.resx b/CompactGUI/i18n/i18n.zh-CN.resx
index 3f514337..8b9bae2c 100644
--- a/CompactGUI/i18n/i18n.zh-CN.resx
+++ b/CompactGUI/i18n/i18n.zh-CN.resx
@@ -375,6 +375,9 @@
包含智能跳过的文件类型
+
+ 对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。
+
关闭
From a5d312437ba8bea7406eb80c6f61b5a3d800d2c0 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 19:53:42 +1000
Subject: [PATCH 008/134] Fix overlapped (?) text on Settings page for long
languages. Closes #615
---
CompactGUI/Views/SettingsPage.xaml | 32 ++++++++++++++++--------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/CompactGUI/Views/SettingsPage.xaml b/CompactGUI/Views/SettingsPage.xaml
index 9a466397..6e2515c0 100644
--- a/CompactGUI/Views/SettingsPage.xaml
+++ b/CompactGUI/Views/SettingsPage.xaml
@@ -150,7 +150,9 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
Date: Tue, 25 Aug 2026 19:54:36 +1000
Subject: [PATCH 009/134] Fix spelling error
---
CompactGUI/i18n/i18n.Designer.vb | 49 ++++++++++++++++++++++++++++++--
CompactGUI/i18n/i18n.resx | 2 +-
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/CompactGUI/i18n/i18n.Designer.vb b/CompactGUI/i18n/i18n.Designer.vb
index 286ab173..0bc39e1c 100644
--- a/CompactGUI/i18n/i18n.Designer.vb
+++ b/CompactGUI/i18n/i18n.Designer.vb
@@ -593,7 +593,7 @@ Namespace i18n
End Property
'''
- ''' Looks up a localized string similar to Agression of online skiplist.
+ ''' Looks up a localized string similar to Aggression of online skiplist.
'''
Public Shared ReadOnly Property SetFiletypeManagement_OnlineSkiplistAgression() As String
Get
@@ -838,7 +838,7 @@ Namespace i18n
End Property
'''
- ''' Looks up a localized string similar to Include wiki/estimator skipped file types.
+ ''' Looks up a localized string similar to Include smart skipped file types.
'''
Public Shared ReadOnly Property SkipListFlyout_IncludeWiki() As String
Get
@@ -846,6 +846,15 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser..
+ '''
+ Public Shared ReadOnly Property SkipListFlyout_IncludeWikiTip() As String
+ Get
+ Return ResourceManager.GetString("SkipListFlyout_IncludeWikiTip", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Custom list — {0} entries.
'''
@@ -855,6 +864,15 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Custom: {0} entries.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_CustomPill() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_CustomPill", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Global + DB — {0} files.
'''
@@ -873,6 +891,24 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Global: {0} skipped.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_GlobalPill() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_GlobalPill", resourceCulture)
+ End Get
+ End Property
+
+ '''
+ ''' Looks up a localized string similar to not configured.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_NotConfigured() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_NotConfigured", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to Off.
'''
@@ -882,6 +918,15 @@ Namespace i18n
End Get
End Property
+ '''
+ ''' Looks up a localized string similar to Smart: {0} skipped.
+ '''
+ Public Shared ReadOnly Property SkipListSummary_SmartPill() As String
+ Get
+ Return ResourceManager.GetString("SkipListSummary_SmartPill", resourceCulture)
+ End Get
+ End Property
+
'''
''' Looks up a localized string similar to DB — {0} files.
'''
diff --git a/CompactGUI/i18n/i18n.resx b/CompactGUI/i18n/i18n.resx
index 71f9eee2..ae5e84b8 100644
--- a/CompactGUI/i18n/i18n.resx
+++ b/CompactGUI/i18n/i18n.resx
@@ -199,7 +199,7 @@
edit
- Agression of online skiplist
+ Aggression of online skiplistFor Steam games only.
From 4032a202a54f78b6845c1fdfcd50352d281c4c08 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 20:03:44 +1000
Subject: [PATCH 010/134] Update to .NET 10.0 - Remove unnecessary projects
---
CompactGUI.Core/CompactGUI.Core.csproj | 2 +-
CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj | 2 +-
CompactGUI.Logging/CompactGUI.Logging.csproj | 2 +-
CompactGUI.Watcher/CompactGUI.Watcher.vbproj | 2 +-
CompactGUI.slnx | 7 +------
CompactGUI/CompactGUI.vbproj | 2 +-
6 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/CompactGUI.Core/CompactGUI.Core.csproj b/CompactGUI.Core/CompactGUI.Core.csproj
index b28d8054..74189814 100644
--- a/CompactGUI.Core/CompactGUI.Core.csproj
+++ b/CompactGUI.Core/CompactGUI.Core.csproj
@@ -1,7 +1,7 @@
- net9.0-windows
+ net10.0-windowsenableenable
diff --git a/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj b/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
index 27416f26..5371faab 100644
--- a/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
+++ b/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
@@ -2,7 +2,7 @@
CompactGUI.CoreVB
- net9.0-windows
+ net10.0-windows
diff --git a/CompactGUI.Logging/CompactGUI.Logging.csproj b/CompactGUI.Logging/CompactGUI.Logging.csproj
index 2dbdff00..cb304efb 100644
--- a/CompactGUI.Logging/CompactGUI.Logging.csproj
+++ b/CompactGUI.Logging/CompactGUI.Logging.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0enableenable
diff --git a/CompactGUI.Watcher/CompactGUI.Watcher.vbproj b/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
index ee9f0bd1..f55d1b27 100644
--- a/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
+++ b/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
@@ -2,7 +2,7 @@
CompactGUI.Watcher
- net9.0-windows
+ net10.0-windows
diff --git a/CompactGUI.slnx b/CompactGUI.slnx
index bc4e5586..036be4eb 100644
--- a/CompactGUI.slnx
+++ b/CompactGUI.slnx
@@ -10,12 +10,7 @@
-
-
-
-
-
-
+
diff --git a/CompactGUI/CompactGUI.vbproj b/CompactGUI/CompactGUI.vbproj
index 80fb0401..53f273ae 100644
--- a/CompactGUI/CompactGUI.vbproj
+++ b/CompactGUI/CompactGUI.vbproj
@@ -3,7 +3,7 @@
WinExe
- net9.0-windows
+ net10.0-windowsCompactGUItrueOff
From 146338e7105f9363b2ea421498b12c8a4dd2b5ce Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 20:20:25 +1000
Subject: [PATCH 011/134] Add DirectStorage warning badge on the folder view.
Close #641
---
.../CompressableFolders/CompressableFolder.vb | 11 ++
.../CompressableFolders/StandardFolder.vb | 1 +
.../Models/CompressableFolders/SteamFolder.vb | 3 +-
CompactGUI/Views/Pages/FolderView.xaml | 129 +++++++++++-------
4 files changed, 89 insertions(+), 55 deletions(-)
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 253a4415..4a3fcfef 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -44,6 +44,17 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _WikiPoorlyCompressedFiles As New List(Of String)
+ Private _IsDirectStorage As Boolean = False
+
+ Public Sub New()
+
+ If Not CompressableFolderService.IsHDD(Me) AndAlso Core.SharedMethods.IsDirectStorageGameFolder(FolderName) Then
+ Application.GetService(Of CustomSnackBarService).ShowDirectStorageWarning(DisplayName)
+ IsDirectStorage = True
+ End If
+
+ End Sub
+
Public ReadOnly Property BytesSaved As Long
Get
diff --git a/CompactGUI/Models/CompressableFolders/StandardFolder.vb b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
index fa7f7696..7e8c8141 100644
--- a/CompactGUI/Models/CompressableFolders/StandardFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
@@ -3,6 +3,7 @@
Public NotInheritable Class StandardFolder : Inherits CompressableFolder
Public Sub New(path As String)
+ MyBase.New()
FolderName = path
DisplayName = IO.Path.GetFileName(path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar))
diff --git a/CompactGUI/Models/CompressableFolders/SteamFolder.vb b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
index 447dc271..a1142abf 100644
--- a/CompactGUI/Models/CompressableFolders/SteamFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
@@ -19,12 +19,11 @@ Public Class SteamFolder : Inherits CompressableFolder
Public Sub New(folderName As String, displayName As String, steamappId As Integer)
+ MyBase.New()
Me.FolderName = folderName
Me.SteamAppID = steamappId
Me.DisplayName = displayName
- If Not CompressableFolderService.IsHDD(Me) AndAlso Core.SharedMethods.IsDirectStorageGameFolder(folderName) Then Application.GetService(Of CustomSnackBarService).ShowDirectStorageWarning(displayName)
-
End Sub
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 3960489b..778b0d90 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -6,7 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DataContext="{d:DesignInstance Type=local:FolderViewModel}"
- d:DesignHeight="580" d:DesignWidth="900" UseLayoutRounding="True"
+ d:DesignHeight="580"
+ d:DesignWidth="900"
+ UseLayoutRounding="True"
mc:Ignorable="d">
@@ -15,36 +17,36 @@
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
@@ -62,8 +64,7 @@
ResultsTemplate="{StaticResource ResultsTemplate}" />
-
+
@@ -74,7 +75,7 @@
-
+
@@ -82,45 +83,67 @@
-
-
-
+
+
+
-
+
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
+
@@ -170,14 +193,14 @@
+ Height="2"
+ Background="#30FFFFFF" BorderThickness="0" />
-
@@ -185,7 +208,7 @@
-
+
From 787b9247caf7d361eb1e829400b96f717e14380a Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 22:25:28 +1000
Subject: [PATCH 012/134] Implement a true portable mode (similar to PolyCut)
if CompactGUi is placed in a folder called "compactgui"
---
CompactGUI/Application.xaml.vb | 12 ++++++++++--
CompactGUI/Models/CompressableFolders/SteamFolder.vb | 4 ++--
CompactGUI/Services/SettingsService.vb | 10 ++++++++--
3 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/CompactGUI/Application.xaml.vb b/CompactGUI/Application.xaml.vb
index 4c17cc66..2faaac82 100644
--- a/CompactGUI/Application.xaml.vb
+++ b/CompactGUI/Application.xaml.vb
@@ -17,7 +17,7 @@ Imports Coravel.Scheduling.Schedule
Partial Public Class Application
- Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 7)
+ Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 8)
Public Shared ReadOnly Property AppVersionText As String
Get
@@ -30,7 +30,15 @@ Partial Public Class Application
Private Shared ReadOnly SettingsService As ISettingsService
Shared Sub New()
- SettingsService = New SettingsService()
+
+ Dim currentDir = AppContext.BaseDirectory
+ If New IO.DirectoryInfo(currentDir).Name.ToLower = "compactgui" Then
+ SettingsService = New SettingsService(True)
+ Else
+ SettingsService = New SettingsService(False)
+ End If
+
+
SettingsService.LoadSettings()
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf OnDomainUnhandledException
diff --git a/CompactGUI/Models/CompressableFolders/SteamFolder.vb b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
index a1142abf..b9c13c93 100644
--- a/CompactGUI/Models/CompressableFolders/SteamFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
@@ -78,8 +78,8 @@ Public Class SteamFolder : Inherits CompressableFolder
Dim tempImg As BitmapImage = Nothing
- Dim EnvironmentPath = Environment.GetEnvironmentVariable("IridiumIO", EnvironmentVariableTarget.User)
- Dim imageDir = Path.Combine(EnvironmentPath, "CompactGUI", "SteamCache")
+ Dim EnvironmentPath = Application.GetService(Of ISettingsService).DataFolder.FullName
+ Dim imageDir = Path.Combine(EnvironmentPath, "SteamCache")
Dim imagePath = Path.Combine(imageDir, $"{folder.SteamAppID}.jpg")
If Not Directory.Exists(imageDir) Then Directory.CreateDirectory(imageDir)
diff --git a/CompactGUI/Services/SettingsService.vb b/CompactGUI/Services/SettingsService.vb
index 8f3ecf52..996b1ab6 100644
--- a/CompactGUI/Services/SettingsService.vb
+++ b/CompactGUI/Services/SettingsService.vb
@@ -12,9 +12,15 @@ Public Class SettingsService : Implements ISettingsService
Public ReadOnly Property SettingsVersion As Decimal Implements ISettingsService.SettingsVersion
Public Property AppSettings As Settings Implements ISettingsService.AppSettings
- Public Sub New()
+ Public Sub New(truePortable As Boolean)
+
+ If truePortable Then
+ DataFolder = New IO.DirectoryInfo(IO.Path.Combine(IO.Path.GetDirectoryName(AppContext.BaseDirectory), ".CompactGUIData"))
+ Else
+ DataFolder = New IO.DirectoryInfo(IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "IridiumIO", "CompactGUI"))
+ End If
+
- DataFolder = New IO.DirectoryInfo(IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "IridiumIO", "CompactGUI"))
SettingsJSONFile = New IO.FileInfo(IO.Path.Combine(DataFolder.FullName, "settings.json"))
SettingsVersion = 1.2
From 516d8c34793c9ada07084391e286c760d78fa874 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 25 Aug 2026 23:04:19 +1000
Subject: [PATCH 013/134] Delete old VB Core
---
CompactGUI.CoreVB/Analyser.vb | 172 ---------------
CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj | 23 --
CompactGUI.CoreVB/Compactor.vb | 159 --------------
CompactGUI.CoreVB/Estimator.vb | 232 ---------------------
CompactGUI.CoreVB/FodyWeavers.xml | 4 -
CompactGUI.CoreVB/ICompressor.vb | 7 -
CompactGUI.CoreVB/NtfsInterop.vb | 42 ----
CompactGUI.CoreVB/SharedMethods.vb | 199 ------------------
CompactGUI.CoreVB/SharedObjects.vb | 54 -----
CompactGUI.CoreVB/Uncompactor.vb | 85 --------
CompactGUI.CoreVB/WOFHelper.vb | 83 --------
11 files changed, 1060 deletions(-)
delete mode 100644 CompactGUI.CoreVB/Analyser.vb
delete mode 100644 CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
delete mode 100644 CompactGUI.CoreVB/Compactor.vb
delete mode 100644 CompactGUI.CoreVB/Estimator.vb
delete mode 100644 CompactGUI.CoreVB/FodyWeavers.xml
delete mode 100644 CompactGUI.CoreVB/ICompressor.vb
delete mode 100644 CompactGUI.CoreVB/NtfsInterop.vb
delete mode 100644 CompactGUI.CoreVB/SharedMethods.vb
delete mode 100644 CompactGUI.CoreVB/SharedObjects.vb
delete mode 100644 CompactGUI.CoreVB/Uncompactor.vb
delete mode 100644 CompactGUI.CoreVB/WOFHelper.vb
diff --git a/CompactGUI.CoreVB/Analyser.vb b/CompactGUI.CoreVB/Analyser.vb
deleted file mode 100644
index e303a457..00000000
--- a/CompactGUI.CoreVB/Analyser.vb
+++ /dev/null
@@ -1,172 +0,0 @@
-Imports System.IO
-Imports System.Security.AccessControl
-Imports System.Security.Principal
-Imports System.Threading
-
-Public Class Analyser
-
- Public Property FolderName As String
- Public Property UncompressedBytes As Long
- Public Property CompressedBytes As Long
- Public Property ContainsCompressedFiles As Boolean
- Public Property FileCompressionDetailsList As List(Of AnalysedFileDetails)
-
- Public Sub New(folder As String)
- FolderName = folder
- End Sub
-
-
- Public Async Function AnalyseFolder(cancellationToken As CancellationToken) As Task(Of Boolean)
- Dim allFiles = Await Task.Run(Function() Directory.EnumerateFiles(FolderName, "*", New EnumerationOptions() With {.RecurseSubdirectories = True, .IgnoreInaccessible = True}).AsShortPathNames, cancellationToken).ConfigureAwait(False)
- Dim fileDetails As New List(Of AnalysedFileDetails)
- Dim compressedFilesCount As Integer = 0
-
- ' Use local variables to reduce contention
- Dim localCompressedBytes As Long = 0
- Dim localUncompressedBytes As Long = 0
-
- Try
- Parallel.ForEach(allFiles, New ParallelOptions With {.CancellationToken = cancellationToken},
- Sub(file)
- Dim details = AnalyseFile(file)
- If details IsNot Nothing Then
- SyncLock fileDetails
- fileDetails.Add(details)
- End SyncLock
- If details.CompressionMode <> WOFCompressionAlgorithm.NO_COMPRESSION Then
- Interlocked.Increment(compressedFilesCount)
- End If
- Interlocked.Add(localCompressedBytes, details.CompressedSize)
- Interlocked.Add(localUncompressedBytes, details.UncompressedSize)
- End If
- End Sub)
-
- ' Update the shared state after the parallel loop to minimize contention
- CompressedBytes = localCompressedBytes
- UncompressedBytes = localUncompressedBytes
- Catch ex As OperationCanceledException
- Debug.WriteLine(ex.Message)
- Return Nothing
- End Try
-
- ContainsCompressedFiles = compressedFilesCount > 0
- FileCompressionDetailsList = fileDetails
- Return ContainsCompressedFiles
- End Function
-
-
- Private Function AnalyseFile(file As String) As AnalysedFileDetails
- Try
- Dim fInfo As New FileInfo(file)
- Dim unCompSize = fInfo.Length
- Dim compSize = GetFileSizeOnDisk(file)
- If compSize < 0 Then
- compSize = unCompSize ' GetFileSizeOnDisk failed, fall back to unCompSize
- End If
- Dim cLevel As WOFCompressionAlgorithm = If(compSize = unCompSize, WOFCompressionAlgorithm.NO_COMPRESSION, DetectCompression(fInfo))
-
- Return New AnalysedFileDetails With {.FileName = file, .CompressedSize = compSize, .UncompressedSize = unCompSize, .CompressionMode = cLevel, .FileInfo = fInfo}
- Catch ex As IOException
- Debug.WriteLine($"Error analysing file {file}: {ex.Message}")
- Return Nothing
- End Try
- End Function
-
-
- Public Async Function GetPoorlyCompressedExtensions() As Task(Of List(Of ExtensionResult))
- Dim extClassResults As New List(Of ExtensionResult)
- Await Task.Run(
- Sub()
- Dim extRes As New Concurrent.ConcurrentDictionary(Of String, ExtensionResult)
- Parallel.ForEach(FileCompressionDetailsList,
- Sub(fl)
- Dim xt = New FileInfo(fl.FileName).Extension
- If fl.UncompressedSize = 0 Then Return
-
- extRes.AddOrUpdate(xt,
- Function(addKey) ' Add value factory
- Return New ExtensionResult With {
- .extension = xt,
- .totalFiles = 1,
- .uncompressedBytes = fl.UncompressedSize,
- .compressedBytes = fl.CompressedSize
- }
- End Function,
- Function(updateKey, oldValue) ' Update value factory
- Return New ExtensionResult With {
- .extension = xt,
- .totalFiles = oldValue.totalFiles + 1,
- .uncompressedBytes = oldValue.uncompressedBytes + fl.UncompressedSize,
- .compressedBytes = oldValue.compressedBytes + fl.CompressedSize
- }
- End Function)
- End Sub)
-
- ' Filter and convert to list after aggregation
- extClassResults = extRes.Values.Where(Function(f) f.cRatio > 0.95).ToList()
- End Sub)
-
- Return extClassResults
- End Function
-
-
- Private Function DetectCompression(fInfo As FileInfo) As WOFCompressionAlgorithm
-
- Dim isextFile As Integer
- Dim prov As ULong
- Dim info As WOF_FILE_COMPRESSION_INFO_V1
- Dim buf As UInt16 = 8
-
- Dim ret = WofIsExternalFile(fInfo.FullName, isextFile, prov, info, buf)
-
- Dim algorithm As WOFCompressionAlgorithm = info.Algorithm
-
- If isextFile = 0 Then algorithm = WOFCompressionAlgorithm.NO_COMPRESSION
- If (fInfo.Attributes And 2048) <> 0 Then algorithm = WOFCompressionAlgorithm.LZNT1
- Return algorithm
-
- End Function
-
-
- Public Shared Function HasDirectoryWritePermission(FolderName As String) As Boolean
- Try
- Dim directoryInfo = New DirectoryInfo(FolderName)
- Dim directorySecurity = directoryInfo.GetAccessControl()
-
- Dim user = WindowsIdentity.GetCurrent()
- Dim userSID = user.User
- Dim userGroupSIDs = user.Groups
-
- Dim accessRules = directorySecurity.GetAccessRules(True, True, GetType(SecurityIdentifier))
-
- Dim writeAllowed = False
- Dim writeDenied = False
-
- For Each rule As FileSystemAccessRule In accessRules
- Dim fileSystemRights = rule.FileSystemRights
- If (fileSystemRights And FileSystemRights.Write) > 0 Then
- Dim ruleSID = DirectCast(rule.IdentityReference, SecurityIdentifier)
-
- ' Check if the rule applies to the user or any of the user's groups
- If ruleSID.Equals(userSID) OrElse userGroupSIDs.Contains(ruleSID) Then
- If rule.AccessControlType = AccessControlType.Allow Then
- writeAllowed = True
- ElseIf rule.AccessControlType = AccessControlType.Deny Then
- writeDenied = True
- Exit For
- End If
- End If
- End If
- Next
-
- ' Write permission is considered available if it's explicitly allowed and not explicitly denied
- Return writeAllowed And Not writeDenied
- Catch ex As UnauthorizedAccessException
-
- Return False
- End Try
- End Function
-
-
-
-End Class
diff --git a/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj b/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
deleted file mode 100644
index 5371faab..00000000
--- a/CompactGUI.CoreVB/CompactGUI.CoreVB.vbproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- CompactGUI.CoreVB
- net10.0-windows
-
-
-
- none
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
diff --git a/CompactGUI.CoreVB/Compactor.vb b/CompactGUI.CoreVB/Compactor.vb
deleted file mode 100644
index c17435d7..00000000
--- a/CompactGUI.CoreVB/Compactor.vb
+++ /dev/null
@@ -1,159 +0,0 @@
-Imports System.IO
-Imports System.Runtime.InteropServices
-Imports System.Threading
-
-Imports Microsoft.Win32.SafeHandles
-
-
-Public Class Compactor : Implements IDisposable, ICompressor
-
- Private ReadOnly workingDirectory As String
- Private ReadOnly excludedFileExtensions() As String
- Private ReadOnly wofCompressionAlgorithm As WOFCompressionAlgorithm
-
- Private compressionInfoPtr As IntPtr
- Private compressionInfoSize As UInteger
-
- Private totalProcessedBytes As Long = 0
- Private ReadOnly pauseSemaphore As New SemaphoreSlim(1, 2)
- Private ReadOnly cancellationTokenSource As New CancellationTokenSource
-
-
- Public Sub New(folder As String, compressionLevel As WOFCompressionAlgorithm, excludedFilesTypes As String())
-
- workingDirectory = folder
- wofCompressionAlgorithm = compressionLevel
- excludedFileExtensions = excludedFilesTypes
-
- InitializeCompressionInfoPointer()
-
- End Sub
-
-
- Private Sub InitializeCompressionInfoPointer()
- Dim _EFInfo As New WOF_FILE_COMPRESSION_INFO_V1 With {.Algorithm = wofCompressionAlgorithm, .Flags = 0}
- compressionInfoPtr = Marshal.AllocHGlobal(Marshal.SizeOf(_EFInfo))
- compressionInfoSize = CUInt(Marshal.SizeOf(_EFInfo))
- Marshal.StructureToPtr(_EFInfo, compressionInfoPtr, True)
- End Sub
-
-
- Public Async Function RunAsync(filesList As List(Of String), Optional progressMonitor As IProgress(Of CompressionProgress) = Nothing, Optional MaxParallelism As Integer = 1) As Task(Of Boolean) Implements ICompressor.RunAsync
-
- If cancellationTokenSource.IsCancellationRequested Then Return False
-
- Dim workingFiles = Await BuildWorkingFilesList().ConfigureAwait(False)
- Dim totalFilesSize As Long = workingFiles.Sum(Function(f) f.UncompressedSize)
- totalProcessedBytes = 0
-
- If MaxParallelism <= 0 Then MaxParallelism = Environment.ProcessorCount
-
- Dim paraOptions As New ParallelOptions With {.MaxDegreeOfParallelism = MaxParallelism}
-
- Try
- Await Parallel.ForEachAsync(workingFiles, paraOptions,
- Function(file, _ctx) As ValueTask
- _ctx.ThrowIfCancellationRequested()
- Return New ValueTask(PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor))
- End Function).ConfigureAwait(False)
- Catch ex As OperationCanceledException
- ' Swallow cancellation, return false
- Return False
- End Try
-
- Return Not cancellationTokenSource.IsCancellationRequested
-
- End Function
-
- Private Async Function PauseAndProcessFile(details As FileDetails, totalFilesSize As Long, _ctx As CancellationToken, Optional progressMonitor As IProgress(Of CompressionProgress) = Nothing) As Task
-
- Try
- Await pauseSemaphore.WaitAsync(_ctx).ConfigureAwait(False)
- pauseSemaphore.Release()
- Catch ex As OperationCanceledException
- Throw
- Return
- End Try
-
- _ctx.ThrowIfCancellationRequested()
-
- Dim res = WOFCompressFile(details.FileName)
- Interlocked.Add(totalProcessedBytes, details.UncompressedSize)
- progressMonitor?.Report(New CompressionProgress(totalProcessedBytes / totalFilesSize * 100, details.FileName))
-
-
- End Function
-
-
-
- Public Sub Pause() Implements ICompressor.Pause
- pauseSemaphore.Wait()
- End Sub
-
-
- Public Sub [Resume]() Implements ICompressor.Resume
- If pauseSemaphore.CurrentCount = 0 Then pauseSemaphore.Release()
- End Sub
-
- Public Sub Cancel() Implements ICompressor.Cancel
- [Resume]()
- cancellationTokenSource.Cancel()
- End Sub
-
-
-
- Private Function WOFCompressFile(path As String) As Integer
-
- Try
- Using fs As SafeFileHandle = File.OpenHandle(path)
- Return WofSetFileDataLocation(fs, WOF_PROVIDER_FILE, compressionInfoPtr, compressionInfoSize)
- End Using
- Catch ex As Exception
- Debug.WriteLine(ex.Message)
- Return Nothing
- End Try
-
- End Function
-
- Private Async Function BuildWorkingFilesList() As Task(Of IEnumerable(Of FileDetails))
-
- Dim clusterSize As Integer = GetClusterSize(workingDirectory)
-
- Dim _filesList As New Concurrent.ConcurrentBag(Of FileDetails)
- 'TODO: if the user has already analysed within the last minute, then skip creating a new one and use the old one
- Dim ax As New Analyser(workingDirectory)
- Dim ret = Await ax.AnalyseFolder(Nothing)
-
- Parallel.ForEach(ax.FileCompressionDetailsList, Sub(fl)
- Dim ft = fl.FileInfo
- If Not (excludedFileExtensions.Contains(ft.Extension) OrElse excludedFileExtensions.Contains(fl.FileName)) AndAlso
- ft.Length > clusterSize AndAlso
- fl.CompressionMode <> wofCompressionAlgorithm Then
- _filesList.Add((New FileDetails With {.FileName = fl.FileName, .UncompressedSize = fl.UncompressedSize}))
- End If
- End Sub)
-
-
- Return _filesList.ToList
- End Function
-
-
- Public Sub Dispose() Implements IDisposable.Dispose
- cancellationTokenSource?.Dispose()
- pauseSemaphore?.Dispose()
- If Not compressionInfoPtr.Equals(IntPtr.Zero) Then
- Marshal.FreeHGlobal(compressionInfoPtr)
- compressionInfoPtr = IntPtr.Zero
- End If
- End Sub
-
-
-
- Private Structure FileDetails
- Public Property FileName As String
- Public Property UncompressedSize As Long
-
- End Structure
-
-
-End Class
diff --git a/CompactGUI.CoreVB/Estimator.vb b/CompactGUI.CoreVB/Estimator.vb
deleted file mode 100644
index 87e7903d..00000000
--- a/CompactGUI.CoreVB/Estimator.vb
+++ /dev/null
@@ -1,232 +0,0 @@
-Imports System.IO
-Imports System.IO.Compression
-Imports System.Runtime.InteropServices
-
-Imports K4os.Compression.LZ4
-
-Imports K4os.Compression.LZ4.Streams
-
-Imports Microsoft.Win32.SafeHandles
-
-
-'https://unix.stackexchange.com/questions/155901/estimate-compressibility-of-file
-
-Public Class Estimator
- Private Const BlockSize As Integer = 8192 '16K? Should I get it from the ClusterSize?
- Private Const ZScore As Single = 1.96
- Private Const ErrorMargin As Single = 0.1
- Private Const SampleSize As Single = 100 '0.25 * (ZScore / ErrorMargin) ^ 2
-
- Private DiskClusterSize As Integer = 4096
- Private IsHDD As Boolean = False
-
- Public Sub New()
- End Sub
-
-
- Public Delegate Function CompressionStreamFactory(output As Stream) As Stream
-
-
- Public Class FileDetails
- Public AnalysedFile As AnalysedFileDetails
- Public CompressionRatio As Single
- End Class
-
- Public Shared IsAlternate As Boolean = False
-
- Public Function EstimateCompressability(analysisResult As List(Of AnalysedFileDetails), ishdd As Boolean, Optional MaxParallelism As Integer = 1, Optional clusterSize As Integer = 4096, Optional cancellationToken As Threading.CancellationToken = Nothing) As List(Of (AnalysedFile As AnalysedFileDetails, CompressionRatio As Single))
-
- DiskClusterSize = clusterSize
- Dim _filesList As New Concurrent.ConcurrentBag(Of FileDetails)
- If MaxParallelism <= 0 Then MaxParallelism = Environment.ProcessorCount
-
- Me.IsHDD = ishdd
-
-
- 'Filter the files based on the cluster size and sort them by cluster location if it's an HDD to minimize seek time
- Dim filteredList = analysisResult.Where(Function(f) f.UncompressedSize > clusterSize)
-
- Dim sw = Stopwatch.StartNew()
-
- If ishdd Then filteredList = filteredList.OrderBy(Function(f) GetFirstLcn(f.FileName))
- Dim finalList = filteredList.ToList
- sw.Stop()
- Debug.WriteLine($"Filtered and sorted {finalList.Count} files in {sw.ElapsedMilliseconds} ms")
- If IsAlternate Then Debug.WriteLine("Alternate mode enabled, using different handle method.")
-
-
- Dim paraOptions As New ParallelOptions With {.MaxDegreeOfParallelism = MaxParallelism}
-
- Parallel.ForEach(finalList, parallelOptions:=paraOptions, Sub(fl)
- cancellationToken.ThrowIfCancellationRequested()
-
- Dim estimatedRatio = EstimateCompressabilityLZ4(fl.FileName, fl.UncompressedSize, cancellationToken)
-
- _filesList.Add((New FileDetails With {.AnalysedFile = fl, .CompressionRatio = estimatedRatio}))
- End Sub)
-
- Dim retList As New List(Of (AnalysedFile As AnalysedFileDetails, CompressionRatio As Single))
-
- For Each item In _filesList
- retList.Add((item.AnalysedFile, item.CompressionRatio))
- Next
-
- IsAlternate = Not IsAlternate ' Toggle the alternate mode for next run
-
- Return retList
-
- End Function
-
-
- Public Function EstimateCompressabilityGZip(path As String, filesize As Long) As Double
-
- Using fs As FileStream = File.OpenRead(path)
- Return EstimateCompressability(fs, filesize, Function(output) New GZipStream(output, CompressionLevel.Fastest, True))
- End Using
-
- End Function
-
-
- Public Function EstimateCompressabilitySnappy(path As String, filesize As Long) As Double
-
- Using fs As FileStream = File.OpenRead(path)
- Return EstimateCompressability(fs, filesize, Function(output) New Snappier.SnappyStream(output, Compression.CompressionMode.Compress, True))
- End Using
-
- End Function
-
- Public Function EstimateCompressabilityLZ4(path As String, filesize As Long, Optional cancellationToken As Threading.CancellationToken = Nothing) As Double
- Try
- Using fs As FileStream = File.OpenRead(path)
- If IsHDD Then
- Return EstimateCompressabilityHDD(fs, filesize, Function(output) LZ4Stream.Encode(output, LZ4Level.L00_FAST, 0, True), cancellationToken)
- End If
- Return EstimateCompressability(fs, filesize, Function(output) LZ4Stream.Encode(output, LZ4Level.L00_FAST, 0, True), cancellationToken)
- End Using
- Catch cancelledEx As OperationCanceledException
- Throw
- Catch ex As Exception
- Return 1.0 ' If there's an error, assume it's incompressible
- End Try
-
- End Function
-
-
- Private Function EstimateCompressability(input As FileStream, fileSize As Long, compressionFactory As CompressionStreamFactory, Optional cancellationToken As Threading.CancellationToken = Nothing) As Double
-
- Dim totalBlocks As Long = fileSize \ BlockSize
- Dim samplesNeeded As Integer = Math.Ceiling((totalBlocks * SampleSize) / (SampleSize + totalBlocks - 1))
- Dim totalWritten As Long = 0
-
- Dim compressed = New MemoryStream()
- Using compressionStream As Stream = compressionFactory(compressed)
-
- ' If file is small or sample count is zero, compress the whole file
- If samplesNeeded = 0 OrElse fileSize < samplesNeeded * BlockSize * 2 Then
-
- Dim buffer(BlockSize - 1) As Byte
- input.Position = 0
- Dim bytesRead As Integer = input.Read(buffer, 0, BlockSize)
-
- While bytesRead > 0
- cancellationToken.ThrowIfCancellationRequested()
- compressionStream.Write(buffer, 0, bytesRead)
- totalWritten += bytesRead
- bytesRead = input.Read(buffer, 0, BlockSize)
- End While
-
- Else
- ' Sample evenly spaced blocks
- Dim stepSize As Long = BlockSize * (totalBlocks \ samplesNeeded)
- Dim buffer(BlockSize - 1) As Byte
- For i As Integer = 0 To samplesNeeded - 1
- cancellationToken.ThrowIfCancellationRequested()
- input.Position = stepSize * i
- Dim bytesRead As Integer = input.Read(buffer, 0, BlockSize)
- compressionStream.Write(buffer, 0, bytesRead)
- totalWritten += bytesRead
- Next
- End If
- End Using
-
- Return Math.Min(compressed.Length / Math.Max(totalWritten, 1), 1.0)
- End Function
-
-
- Private Function EstimateCompressabilityHDD(input As FileStream, fileSize As Long, compressionFactory As CompressionStreamFactory, Optional cancellationToken As Threading.CancellationToken = Nothing) As Double
- Dim NumClusters As Integer = SampleSize ' or any small number you want to sample
- Dim clusterSize As Integer = DiskClusterSize
-
- Dim middleCluster As Long = (fileSize \ 2) \ clusterSize
- Dim alignedStart As Long = middleCluster * clusterSize
- Dim chunkSize As Integer = CInt(Math.Min(clusterSize * NumClusters, fileSize - alignedStart))
-
- Dim totalWritten As Long = 0
- Dim compressed = New MemoryStream()
-
- Using compressionStream As Stream = compressionFactory(compressed)
- Dim buffer(chunkSize - 1) As Byte
- input.Position = alignedStart
- Dim bytesRead As Integer = input.Read(buffer, 0, chunkSize)
-
- If cancellationToken <> Nothing AndAlso cancellationToken.IsCancellationRequested Then
- Throw New OperationCanceledException(cancellationToken)
- End If
-
- If bytesRead > 0 Then
- compressionStream.Write(buffer, 0, bytesRead)
- totalWritten += bytesRead
- End If
- End Using
-
- Return Math.Min(compressed.Length / Math.Max(totalWritten, 1), 1.0)
- End Function
-
- Public Function GetFirstLcn(filePath As String) As Long
-
- Dim handle As SafeFileHandle = File.OpenHandle(filePath)
-
- If handle.IsInvalid Then Throw New IOException("Failed to open file handle.")
-
-
- Dim inBuffer As NtfsInterop.STARTING_VCN_INPUT_BUFFER
- inBuffer.StartingVcn = 0
- Dim inBufferSize = Marshal.SizeOf(inBuffer)
- Dim inBufferPtr = Marshal.AllocHGlobal(inBufferSize)
- Marshal.StructureToPtr(inBuffer, inBufferPtr, False)
-
- Dim outBufferSize = 4096
- Dim outBufferPtr = Marshal.AllocHGlobal(outBufferSize)
- Dim bytesReturned As Integer = 0
-
- Try
- Dim result = WOFHelper.DeviceIoControl(
- handle,
- NtfsInterop.FSCTL_GET_RETRIEVAL_POINTERS,
- inBufferPtr,
- inBufferSize,
- outBufferPtr,
- outBufferSize,
- bytesReturned,
- IntPtr.Zero
- )
-
-
-
- 'Probably errors because the file is empty
- If Not result Then Return Long.MaxValue
-
-
- ' Marshal the output buffer to get the first LCN
- Dim extentOffset As Integer = Marshal.OffsetOf(Of RETRIEVAL_POINTERS_BUFFER)("Extents").ToInt32()
- Dim lcn As Long = Marshal.ReadInt64(outBufferPtr, extentOffset + 8)
- Return lcn
-
- Finally
- Marshal.FreeHGlobal(inBufferPtr)
- Marshal.FreeHGlobal(outBufferPtr)
- handle.Close()
- End Try
- End Function
-
-End Class
diff --git a/CompactGUI.CoreVB/FodyWeavers.xml b/CompactGUI.CoreVB/FodyWeavers.xml
deleted file mode 100644
index 003b8f77..00000000
--- a/CompactGUI.CoreVB/FodyWeavers.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CompactGUI.CoreVB/ICompressor.vb b/CompactGUI.CoreVB/ICompressor.vb
deleted file mode 100644
index 0fadeabb..00000000
--- a/CompactGUI.CoreVB/ICompressor.vb
+++ /dev/null
@@ -1,7 +0,0 @@
-Public Interface ICompressor : Inherits IDisposable
- Function RunAsync(filesList As List(Of String), Optional progressMonitor As IProgress(Of CompressionProgress) = Nothing, Optional maxParallelism As Integer = 1) As Task(Of Boolean)
- Sub Pause()
- Sub [Resume]()
- Sub Cancel()
-
-End Interface
diff --git a/CompactGUI.CoreVB/NtfsInterop.vb b/CompactGUI.CoreVB/NtfsInterop.vb
deleted file mode 100644
index 560566b0..00000000
--- a/CompactGUI.CoreVB/NtfsInterop.vb
+++ /dev/null
@@ -1,42 +0,0 @@
-Imports System.Runtime.InteropServices
-
-Imports Microsoft.Win32.SafeHandles
-
-Friend Module NtfsInterop
- Public Const FSCTL_GET_RETRIEVAL_POINTERS As UInteger = &H90073
- Public Const OPEN_EXISTING As Integer = 3
- Public Const FILE_FLAG_BACKUP_SEMANTICS As Integer = &H2000000
- Public Const FILE_SHARE_READ As Integer = 1
- Public Const FILE_SHARE_WRITE As Integer = 2
- Public Const GENERIC_READ As Integer = &H80000000
-
-
- Public Function CreateFile(
- lpFileName As String,
- dwDesiredAccess As Integer,
- dwShareMode As Integer,
- lpSecurityAttributes As IntPtr,
- dwCreationDisposition As Integer,
- dwFlagsAndAttributes As Integer,
- hTemplateFile As IntPtr
- ) As SafeFileHandle
- End Function
-
-
- Public Structure STARTING_VCN_INPUT_BUFFER
- Public StartingVcn As Long
- End Structure
-
-
- Public Structure RETRIEVAL_POINTERS_BUFFER
- Public ExtentCount As Integer
- Public StartingVcn As Long
- Public Extents As LCN_EXTENT ' This is actually an array, but we only need the first. ?Perhaps I should get the LCN of the middle cluster in future?
- End Structure
-
-
- Public Structure LCN_EXTENT
- Public NextVcn As Long
- Public Lcn As Long
- End Structure
-End Module
\ No newline at end of file
diff --git a/CompactGUI.CoreVB/SharedMethods.vb b/CompactGUI.CoreVB/SharedMethods.vb
deleted file mode 100644
index 85214b29..00000000
--- a/CompactGUI.CoreVB/SharedMethods.vb
+++ /dev/null
@@ -1,199 +0,0 @@
-Imports System.IO
-Imports System.Runtime.CompilerServices
-Imports System.Runtime.InteropServices
-Imports System.Text
-Public Module SharedMethods
- Public Enum FolderVerificationResult
- Valid = 0
- DirectoryDoesNotExist
- SystemDirectory
- RootDirectory
- DirectoryEmptyOrUnauthorized
- OneDriveFolder
- NonNTFSDrive
- InsufficientPermission
- End Enum
-
- Function verifyFolder(folder As String) As FolderVerificationResult
-
- If Not Directory.Exists(folder) Then : Return FolderVerificationResult.DirectoryDoesNotExist
- ElseIf folder.ToLowerInvariant.Contains((Environment.GetFolderPath(Environment.SpecialFolder.Windows)).ToLowerInvariant) Then : Return FolderVerificationResult.SystemDirectory
- ElseIf folder.EndsWith(":\") Then : Return FolderVerificationResult.RootDirectory
- ElseIf IsDirectoryEmptySafe(folder) Then : Return FolderVerificationResult.DirectoryEmptyOrUnauthorized
- ElseIf IsOneDriveFolder(folder) Then : Return FolderVerificationResult.OneDriveFolder
- ElseIf DriveInfo.GetDrives().First(Function(f) folder.StartsWith(f.Name)).DriveFormat <> "NTFS" Then : Return FolderVerificationResult.NonNTFSDrive
- ElseIf Not Analyser.HasDirectoryWritePermission(folder) Then : Return FolderVerificationResult.InsufficientPermission
- End If
-
- Return FolderVerificationResult.Valid
-
- End Function
-
-
- Function GetFolderVerificationMessage(result As FolderVerificationResult) As String
- Select Case result
- Case FolderVerificationResult.Valid
- Return ""
- Case FolderVerificationResult.DirectoryDoesNotExist
- Return "Directory does not exist"
- Case FolderVerificationResult.SystemDirectory
- Return "Cannot compress system directory"
- Case FolderVerificationResult.RootDirectory
- Return "Cannot compress root directory"
- Case FolderVerificationResult.DirectoryEmptyOrUnauthorized
- Return "This directory is either empty or you are not authorized to access its files."
- Case FolderVerificationResult.OneDriveFolder
- Return "Files synced with OneDrive cannot be compressed as they use a different storage structure"
- Case FolderVerificationResult.NonNTFSDrive
- Return "Cannot compress a directory on a non-NTFS drive"
- Case FolderVerificationResult.InsufficientPermission
- Return "Insufficient permission to access this folder."
- Case Else
- Return "Unknown error"
- End Select
- End Function
-
-
-
- Function IsDirectoryEmptySafe(folder As String)
-
- Try
- Return Not Directory.EnumerateFileSystemEntries(folder).Any()
-
-
- Catch ex As UnauthorizedAccessException
- Return False
-
- Catch ex As Exception
- Return False
- End Try
-
- End Function
-
- Function GetFileSizeOnDisk(file As String) As Long
- Dim hosize As UInteger
- Dim losize As UInteger = GetCompressedFileSizeW(file, hosize)
- 'INVALID_FILE_SIZE (0xFFFFFFFF)
- If losize = 4294967295 Then
- Dim errCode As Integer
- errCode = Marshal.GetLastPInvokeError()
- If errCode <> 0 Then
- Return -1
- End If
- End If
- Return CLng(hosize) << 32 Or losize
- End Function
-
-
-
- Function AsShortPathNames(filesList As IEnumerable(Of String)) As List(Of String)
-
- Return filesList.Select(Of String) _
- (Function(fl)
- If fl.Length >= 255 Then
- Dim sfp = GetShortPath(fl)
- If sfp IsNot Nothing Then Return sfp
- End If
- Return fl
- End Function).ToList
-
- End Function
-
-
- Function GetShortPath(filePath As String) As String
-
- If String.IsNullOrWhiteSpace(filePath) Then Return Nothing
- Dim hasPrefix As Boolean = False
-
- If filePath.Length >= 255 AndAlso Not filePath.StartsWith("\\?\") Then
- filePath = "\\?\" & filePath
- hasPrefix = True
- End If
-
- Dim shortPath = New StringBuilder(1024)
- Dim res As Integer = GetShortPathName(filePath, shortPath, 1024)
- If res = 0 Then Return Nothing
- filePath = shortPath.ToString()
- If hasPrefix Then filePath = filePath.Substring(4)
- Return filePath
-
- End Function
-
-
- Function GetClusterSize(folderPath As String)
-
- Dim lpSectorsPerCluster As UInteger
- Dim lpBytesPerSector As UInteger
- Dim res As Integer = GetDiskFreeSpace(New DirectoryInfo(folderPath).Root.ToString, lpSectorsPerCluster, lpBytesPerSector, Nothing, Nothing)
- Return lpSectorsPerCluster * lpBytesPerSector
-
- End Function
-
- Function IsOneDriveFolder(folderPath As String) As Boolean
- Dim userProfile As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
- Dim oneDrivePaths As New List(Of String) From {
- Path.Combine(userProfile, "OneDrive"), ' Personal OneDrive
- Path.Combine(userProfile, "OneDrive - Personal"), ' Alternative Personal OneDrive
- Path.Combine(userProfile, "OneDrive for Business"), ' OneDrive for Business
- Path.Combine(userProfile, "OneDrive - Business") ' Alternative OneDrive for Business
- }
-
- ' Normalize the folder path to compare
- Dim normalizedFolderPath As String = Path.GetFullPath(folderPath).TrimEnd(Path.DirectorySeparatorChar).ToLowerInvariant()
-
- ' Check if the folder path starts with any of the known OneDrive paths
- Return oneDrivePaths.Any(Function(odPath) normalizedFolderPath.StartsWith(Path.GetFullPath(odPath).TrimEnd(Path.DirectorySeparatorChar).ToLowerInvariant()))
- End Function
-
- Public Sub PreventSleep()
- SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS Or EXECUTION_STATE.ES_SYSTEM_REQUIRED Or EXECUTION_STATE.ES_DISPLAY_REQUIRED)
- End Sub
- Public Sub RestoreSleep()
- SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS)
- End Sub
-
-
-#Region "DLL Imports"
-
-
- Private Function GetCompressedFileSizeW(
- <[In](), MarshalAs(UnmanagedType.LPWStr)> lpFileName As String,
- ByRef lpFileSizeHigh As UInteger) _
- As UInteger
- End Function
-
-
- Private Function GetShortPathName(
- path As String,
- shortPath As StringBuilder, shortPathLength As Integer) As Integer
-
- End Function
-
-
-
-
- Private Function GetDiskFreeSpace(
- lpRootPathName As String,
- ByRef lpSectorsPerCluster As UInteger,
- ByRef lpBytesPerSector As UInteger,
- ByRef lpNumberOfFreeClusters As UInteger,
- ByRef lpTotalNumberOfClusters As UInteger) As Boolean
- End Function
-
-
-
- Private Function SetThreadExecutionState(esFlags As EXECUTION_STATE) As EXECUTION_STATE
- End Function
-
-
- Private Enum EXECUTION_STATE As UInteger
- ES_AWAYMODE_REQUIRED = &H40
- ES_CONTINUOUS = &H80000000UI
- ES_DISPLAY_REQUIRED = &H2
- ES_SYSTEM_REQUIRED = &H1
- End Enum
-
-#End Region
-
-
-End Module
diff --git a/CompactGUI.CoreVB/SharedObjects.vb b/CompactGUI.CoreVB/SharedObjects.vb
deleted file mode 100644
index b0ddb85b..00000000
--- a/CompactGUI.CoreVB/SharedObjects.vb
+++ /dev/null
@@ -1,54 +0,0 @@
-Public Class AnalysedFileDetails
-
- Public Property FileName As String
- Public Property UncompressedSize As Long
- Public Property CompressedSize As Long
- Public Property CompressionMode As WOFCompressionAlgorithm
- Public Property FileInfo As IO.FileInfo
-End Class
-
-
-'Used to track efficiency of compression and built results for submission to wiki
-Public Class ExtensionResult
-
- Public Property extension As String
- Public Property uncompressedBytes As Long
- Public Property compressedBytes As Long
- Public Property totalFiles As Integer
- ReadOnly Property cRatio As Decimal
- Get
- Return Math.Round(compressedBytes / uncompressedBytes, 2)
- End Get
- End Property
-
-End Class
-
-Public Structure CompressionProgress
- Public ProgressPercent As Integer
- Public FileName As String
-
- Public Sub New(_progressPercent As Integer, _fileName As String)
- ProgressPercent = _progressPercent
- FileName = _fileName
- End Sub
-
-End Structure
-
-
-
-Public Enum CompressionMode
- XPRESS4K
- XPRESS8K
- XPRESS16K
- LZX
- None
-End Enum
-
-Public Enum WOFCompressionAlgorithm
- NO_COMPRESSION = -2
- LZNT1 = -1
- XPRESS4K = 0
- LZX = 1
- XPRESS8K = 2
- XPRESS16K = 3
-End Enum
\ No newline at end of file
diff --git a/CompactGUI.CoreVB/Uncompactor.vb b/CompactGUI.CoreVB/Uncompactor.vb
deleted file mode 100644
index 6d6aae15..00000000
--- a/CompactGUI.CoreVB/Uncompactor.vb
+++ /dev/null
@@ -1,85 +0,0 @@
-Imports System.IO
-Imports System.Threading
-
-Imports Microsoft.Win32.SafeHandles
-
-Public Class Uncompactor : Implements ICompressor, IDisposable
-
-
- Private _pauseSemaphore As New SemaphoreSlim(1, 2)
- Private _processedFileCount As New Concurrent.ConcurrentDictionary(Of String, Integer)
- Private _cancellationTokenSource As New CancellationTokenSource
-
-
- Public Async Function RunAsync(filesList As List(Of String), Optional progressMonitor As IProgress(Of CompressionProgress) = Nothing, Optional MaxParallelism As Integer = 1) As Task(Of Boolean) Implements ICompressor.RunAsync
-
- Dim totalFiles As Integer = filesList.Count
- If MaxParallelism <= 0 Then MaxParallelism = Environment.ProcessorCount
- Dim paraOptions As New ParallelOptions With {.MaxDegreeOfParallelism = MaxParallelism}
-
- _processedFileCount.Clear()
- Try
- Await Parallel.ForEachAsync(filesList, paraOptions,
- Function(file, _ctx) As ValueTask
- _ctx.ThrowIfCancellationRequested()
- Return New ValueTask(PauseAndProcessFile(file, totalFiles, _cancellationTokenSource.Token, progressMonitor))
- End Function).ConfigureAwait(False)
- Catch ex As OperationCanceledException
- Return False
- End Try
-
- Return True
-
- End Function
-
- Private Async Function PauseAndProcessFile(file As String, totalFiles As Integer, _ctx As CancellationToken, progressMonitor As IProgress(Of CompressionProgress)) As Task
-
- Try
- Await _pauseSemaphore.WaitAsync(_ctx).ConfigureAwait(False)
- _pauseSemaphore.Release()
- Catch ex As OperationCanceledException
- Throw
- Return
- End Try
-
- _ctx.ThrowIfCancellationRequested()
-
- Dim res = WOFDecompressFile(file)
- _processedFileCount.TryAdd(file, 1)
-
- progressMonitor?.Report(New CompressionProgress((CInt(((_processedFileCount.Count / totalFiles) * 100))), file))
-
- End Function
-
- Private Function WOFDecompressFile(path As String)
-
- Try
- Using fs As SafeFileHandle = File.OpenHandle(path)
- Dim res = WOFHelper.DeviceIoControl(fs, FSCTL_DELETE_EXTERNAL_BACKING, IntPtr.Zero, 0, IntPtr.Zero, 0, IntPtr.Zero, IntPtr.Zero)
- Return res
- End Using
- Catch ex As Exception
- Debug.WriteLine(ex.Message)
- Return Nothing
- End Try
-
- End Function
-
-
- Public Sub Pause() Implements ICompressor.Pause
- _pauseSemaphore.Wait()
- End Sub
-
- Public Sub [Resume]() Implements ICompressor.Resume
- If _pauseSemaphore.CurrentCount = 0 Then _pauseSemaphore.Release()
- End Sub
- Public Sub Cancel() Implements ICompressor.Cancel
- [Resume]()
- _cancellationTokenSource.Cancel()
- End Sub
-
- Public Sub Dispose() Implements IDisposable.Dispose
- _pauseSemaphore?.Dispose()
- _cancellationTokenSource?.Dispose()
- End Sub
-End Class
diff --git a/CompactGUI.CoreVB/WOFHelper.vb b/CompactGUI.CoreVB/WOFHelper.vb
deleted file mode 100644
index 36ff9f8b..00000000
--- a/CompactGUI.CoreVB/WOFHelper.vb
+++ /dev/null
@@ -1,83 +0,0 @@
-Imports System.Runtime.InteropServices
-
-Imports Microsoft.Win32.SafeHandles
-
-Public Module WOFHelper
-
- Public Const WOF_PROVIDER_FILE As ULong = 2
- Public Const FSCTL_DELETE_EXTERNAL_BACKING As UInteger = &H90314
-
- Public Function WOFConvertCompressionLevel(compressionlevel As Integer) As Integer
-
- Select Case compressionlevel
- Case 0 : Return WOFCompressionAlgorithm.XPRESS4K
- Case 1 : Return WOFCompressionAlgorithm.XPRESS8K
- Case 2 : Return WOFCompressionAlgorithm.XPRESS16K
- Case 3 : Return WOFCompressionAlgorithm.LZX
- Case Else : Return WOFCompressionAlgorithm.XPRESS4K
- End Select
-
- End Function
-
- Public Function WOFConvertCompressionLevel(compressionlevel As CompressionMode) As Integer
- Select Case compressionlevel
- Case CompressionMode.XPRESS4K : Return WOFCompressionAlgorithm.XPRESS4K
- Case CompressionMode.XPRESS8K : Return WOFCompressionAlgorithm.XPRESS8K
- Case CompressionMode.XPRESS16K : Return WOFCompressionAlgorithm.XPRESS16K
- Case CompressionMode.LZX : Return WOFCompressionAlgorithm.LZX
- Case Else : Return WOFCompressionAlgorithm.XPRESS4K
- End Select
- End Function
-
-
- Public Function WOFConvertBackCompressionLevel(WOFCompressionLevel As WOFCompressionAlgorithm) As Integer
-
- Select Case WOFCompressionLevel
- Case WOFCompressionAlgorithm.XPRESS4K : Return 0
- Case WOFCompressionAlgorithm.XPRESS8K : Return 1
- Case WOFCompressionAlgorithm.XPRESS16K : Return 2
- Case WOFCompressionAlgorithm.LZX : Return 3
- Case Else : Return 0
- End Select
-
- End Function
-
-
- Public Structure WOF_FILE_COMPRESSION_INFO_V1
- Public Algorithm As UInteger
- Public Flags As UInteger
- End Structure
-
-
-
- Friend Function WofIsExternalFile(
- Filepath As String,
- ByRef IsExternalFile As Integer,
- ByRef Provider As UInteger,
- ByRef Info As WOF_FILE_COMPRESSION_INFO_V1,
- ByRef BufferLength As UInteger) As Integer
- End Function
-
-
- Friend Function WofSetFileDataLocation(
- FileHandle As SafeFileHandle,
- Provider As ULong,
- ExternalFileInfo As IntPtr,
- Length As ULong) As Integer
- End Function
-
- 'Most of these should be optional if MS Docs are to be believed -.-
-
- Friend Function DeviceIoControl(
- hDevice As SafeFileHandle,
- dwIoControlCode As UInteger,
- lpInBuffer As IntPtr,
- nInBufferSize As UInteger,
- lpOutBuffer As IntPtr,
- nOutBufferSize As UInteger,
- ByRef lpBytesReturned As IntPtr,
- lpOverlapped As IntPtr) As Boolean
-
- End Function
-
-End Module
From 809e0ae72a5620e62dbd2993a1054238e6e80b49 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 25 Aug 2026 23:05:21 +1000
Subject: [PATCH 014/134] Move to README folder
---
README_cn.md => README/README_cn.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename README_cn.md => README/README_cn.md (99%)
diff --git a/README_cn.md b/README/README_cn.md
similarity index 99%
rename from README_cn.md
rename to README/README_cn.md
index 16be950a..4472d9bb 100644
--- a/README_cn.md
+++ b/README/README_cn.md
@@ -111,4 +111,4 @@ LZX|压缩率最高,解压速度最慢|适合用于存档文件、备份数据
请考虑在 Ko-Fi 上打赏一下 :)
-
\ No newline at end of file
+
From 92f254ae1302996a7c0b9d6ec1514c31d35eda30 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 25 Aug 2026 23:05:45 +1000
Subject: [PATCH 015/134] Move to README folder
---
README_ru.md => README/README_ru.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename README_ru.md => README/README_ru.md (100%)
diff --git a/README_ru.md b/README/README_ru.md
similarity index 100%
rename from README_ru.md
rename to README/README_ru.md
From 2082f6a0be347dd09131a71d522237cc3a25980b Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 25 Aug 2026 23:07:18 +1000
Subject: [PATCH 016/134] Fix links to localized README files
Updated links to Russian and Chinese README files.
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 07cbdeb6..f2cf2f5a 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,8 @@
---
From 1ad3922d28149ca10ebbdac731bdd4d444febad7 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 25 Aug 2026 23:24:02 +1000
Subject: [PATCH 017/134] Revise README for clarity and additional features
---
README.md | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index f2cf2f5a..05d0cc8f 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+
@@ -15,7 +16,11 @@
-
+
+
+
+
+
---
@@ -25,14 +30,19 @@
-**What is `compact.exe`?**
-It's a commandlet with a collection of new algorithms introduced in Windows 10 that allow you to transparently compress games, programs and other folders with virtually no performance loss. CompactGUI simply leverages the same API to expose the functionality in a more user-friendly way.
+**How it works**:
+
+CompactGUI is a friendly interface that makes use of the underlying filesystem compression algorithms exposed by the Windows Overlay Filter (WOF) Driver, utilising high-performance compression that was first introduced in Windows 10. It allows compression of any files or folders (with a focus on games) to occur transparently, without any resultant performance loss and allowing large disk storage savings.
**Transparently? What does that mean?**
+
Transparent compression means that files can still be used normally on the computer as if nothing had happened - they don't get repackaged like Zip and Rar files do. You can still browse, launch games and programs exactly as you did before, except they take up less space.
**How is this different from the built-in compression in older versions of Windows?**
-This is similar to the old compression built-in to Windows (Right click > Properties > Compress to save space) however the newer algorithms introduced in Windows 10+ are far superior, resulting in greater compression ratios with almost no performance impact. Those with older HDDs may even see a performance gain in the form of reduced loading times - smaller files can be read into RAM faster, and the CPU can decompress them on the fly much faster than a typical HDD can supply them. [More information can be found here](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)
+
+This is *similar* to the old compression built-in to Windows (Right click > Properties > Compress to save space) however the newer algorithms introduced in Windows 10+ are far superior, resulting in greater compression ratios with almost no performance impact. [More information can be found here](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)
+
+
Installation
@@ -56,9 +66,10 @@ Use this tool to compress folders while still being able to use/run them normall
## Extra Features
- Visual feedback on compression progress and statistics
-- Configurable list of poorly-compressed filetypes that can be skipped.
-- Online integration with community-sourced [database](https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results) to get compression estimates
- - Steam game results can be submitted to the online database from within CompactGUI
+- Configurable list of poorly-compressed filetypes that can be skipped, editable per-folder
+- Compression Estimation - built using over 100,000 community submission (honestly it was way more, but I didn't realise google forms broke at 100,000 so I've lost a lot of submissions) for accurate data on many Steam Games
+ - Non-Steam games can still utilise an algorithmic estimation instead that still gives a reasonable idea of compressability.
+ - If you would like to contribute, Steam game results can be submitted to the online database from within CompactGUI
- Integration into Windows Explorer context menus for easier use.
- Analyze the status of existing folders
- Background Watcher - keeps track of folders and monitors them for changes (e.g. Steam game updates) and automatically keeps them compressed in the background.
@@ -66,8 +77,6 @@ Use this tool to compress folders while still being able to use/run them normall
See the Wiki for a list of that have been tested from over 100,000 submissions
-
-
## Caveat
**This tool should not be used on games that utilise DirectStorage on Windows 11.**
@@ -78,7 +87,7 @@ DirectStorage is a new API that allows games to load assets directly from the SS
Windows 10 introduced a little-known but very useful tool called `compact.exe` that allows one to compress folders and files on disk, decompressing them at runtime. With any modern CPU (I have tested as old as an i3-370M from 2010 with negligible impact), this added load is hardly noticed, and the space savings are of most use on those with smaller SSDs.
-As program folders and games can be shrunk by up to 60%, this has the added bonus of potentially reducing load times - especially on slower HDDs.
+As program folders and games can be shrunk by up to 60%, this has the added bonus of potentially reducing load times - especially on slower HDDs.
More information on the inbuilt Windows function can be found [here](https://technet.microsoft.com/library/bb490884.aspx) and [here](https://msdn.microsoft.com/library/windows/desktop/hh920921(v=vs.85).aspx) or by typing `compact /q` into the commandline
@@ -101,10 +110,6 @@ LZX|Slowest, but strongest|Suitable for storing archived files, backup data, or
---
-### Screenshots
-
-
-
### Like this project?
Please consider leaving a tip on Ko-Fi :)
From aeb53dea815b0ea22c2c429b755a262d4895eb32 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Wed, 26 Aug 2026 14:57:09 +1000
Subject: [PATCH 018/134] Fix DirectStorage check (whoops) - Also add
additional folder where Dstorage.dll can be located
---
CompactGUI.Core/SharedMethods.cs | 1 +
CompactGUI/Models/CompressableFolders/CompressableFolder.vb | 4 +---
CompactGUI/Models/CompressableFolders/StandardFolder.vb | 3 +--
CompactGUI/Models/CompressableFolders/SteamFolder.vb | 3 +--
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 910e39c6..d99385b5 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -229,6 +229,7 @@ public static bool IsDirectStorageGameFolder(string folderPath)
string[] directStoragePaths = new[]
{
"dstorage.dll",
+ Path.Combine("bin", "dstorage.dll"),
Path.Combine("Bin64", "dstorage.dll"),
Path.Combine("Engine", "Binaries", "ThirdParty", "Windows", "DirectStorage", "x64", "dstorage.dll")
};
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 4a3fcfef..63fed0a2 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -46,16 +46,14 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _IsDirectStorage As Boolean = False
- Public Sub New()
+ Public Sub CheckDirectStorage()
If Not CompressableFolderService.IsHDD(Me) AndAlso Core.SharedMethods.IsDirectStorageGameFolder(FolderName) Then
Application.GetService(Of CustomSnackBarService).ShowDirectStorageWarning(DisplayName)
IsDirectStorage = True
End If
-
End Sub
-
Public ReadOnly Property BytesSaved As Long
Get
Return UncompressedBytes - CompressedBytes
diff --git a/CompactGUI/Models/CompressableFolders/StandardFolder.vb b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
index 7e8c8141..c1396f79 100644
--- a/CompactGUI/Models/CompressableFolders/StandardFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
@@ -3,10 +3,9 @@
Public NotInheritable Class StandardFolder : Inherits CompressableFolder
Public Sub New(path As String)
- MyBase.New()
FolderName = path
DisplayName = IO.Path.GetFileName(path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar))
-
+ CheckDirectStorage()
End Sub
End Class
diff --git a/CompactGUI/Models/CompressableFolders/SteamFolder.vb b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
index b9c13c93..67954dc7 100644
--- a/CompactGUI/Models/CompressableFolders/SteamFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
@@ -19,11 +19,10 @@ Public Class SteamFolder : Inherits CompressableFolder
Public Sub New(folderName As String, displayName As String, steamappId As Integer)
- MyBase.New()
Me.FolderName = folderName
Me.SteamAppID = steamappId
Me.DisplayName = displayName
-
+ CheckDirectStorage()
End Sub
From 3f94b56a048a37729058c9f1f898f70218c2513f Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Wed, 26 Aug 2026 15:09:32 +1000
Subject: [PATCH 019/134] Generalised DirectStorage check to work at any level
in the folder tree - The warning banner has been removed and only the badge
has been left
---
CompactGUI.Core/Analyser.cs | 5 ++++-
CompactGUI.Core/SharedMethods.cs | 22 -------------------
.../CompressableFolders/CompressableFolder.vb | 7 ------
.../CompressableFolders/StandardFolder.vb | 1 -
.../Models/CompressableFolders/SteamFolder.vb | 1 -
.../Services/CompressableFolderService.vb | 1 +
6 files changed, 5 insertions(+), 32 deletions(-)
diff --git a/CompactGUI.Core/Analyser.cs b/CompactGUI.Core/Analyser.cs
index 68fe9cec..0fb1f3a2 100644
--- a/CompactGUI.Core/Analyser.cs
+++ b/CompactGUI.Core/Analyser.cs
@@ -15,6 +15,7 @@ public sealed class Analyser : IDisposable
public bool HasFolderChanged => _folderMonitor.HasChanged;
public DateTime LastFolderChanged => _folderMonitor.LastChanged;
+ public bool IsDirectStorage { get; private set; }
public Analyser(string folder, ILogger logger)
{
@@ -65,7 +66,7 @@ private static bool GetContainsCompressedFiles(List fileCom
{
List? AnalysedFileDetails;
-
+ IsDirectStorage = false;
AnalyserLog.StartingAnalysis(_logger, FolderName);
Stopwatch sw = Stopwatch.StartNew();
try
@@ -78,6 +79,8 @@ private static bool GetContainsCompressedFiles(List fileCom
.OfType()
.ToList();
+ IsDirectStorage = allFiles.Any(f => Path.GetFileName(f).Equals("dstorage.dll", StringComparison.OrdinalIgnoreCase));
+
AnalysedFileDetails = fileDetails;
}
catch (Exception ex)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index d99385b5..79a37426 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -221,27 +221,5 @@ public static bool IsFolderLZNT1Compressed(string folderPath)
return attributes.HasFlag(FileAttributes.Compressed);
}
- public static bool IsDirectStorageGameFolder(string folderPath)
- {
- if (string.IsNullOrWhiteSpace(folderPath) || !Directory.Exists(folderPath)) return false;
-
- // List of possible DirectStorage DLL relative paths from https://github.com/SteamDatabase/FileDetectionRuleSets/blob/main/tests/types/SDK.DirectStorage.txt
- string[] directStoragePaths = new[]
- {
- "dstorage.dll",
- Path.Combine("bin", "dstorage.dll"),
- Path.Combine("Bin64", "dstorage.dll"),
- Path.Combine("Engine", "Binaries", "ThirdParty", "Windows", "DirectStorage", "x64", "dstorage.dll")
- };
-
- foreach (var relativePath in directStoragePaths)
- {
- string fullPath = Path.Combine(folderPath, relativePath);
- if (File.Exists(fullPath)) return true;
- }
-
- return false;
- }
-
}
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 63fed0a2..a37fcb72 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -47,13 +47,6 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _IsDirectStorage As Boolean = False
- Public Sub CheckDirectStorage()
- If Not CompressableFolderService.IsHDD(Me) AndAlso Core.SharedMethods.IsDirectStorageGameFolder(FolderName) Then
- Application.GetService(Of CustomSnackBarService).ShowDirectStorageWarning(DisplayName)
- IsDirectStorage = True
- End If
- End Sub
-
Public ReadOnly Property BytesSaved As Long
Get
Return UncompressedBytes - CompressedBytes
diff --git a/CompactGUI/Models/CompressableFolders/StandardFolder.vb b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
index c1396f79..208d128a 100644
--- a/CompactGUI/Models/CompressableFolders/StandardFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/StandardFolder.vb
@@ -5,7 +5,6 @@ Public NotInheritable Class StandardFolder : Inherits CompressableFolder
Public Sub New(path As String)
FolderName = path
DisplayName = IO.Path.GetFileName(path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar))
- CheckDirectStorage()
End Sub
End Class
diff --git a/CompactGUI/Models/CompressableFolders/SteamFolder.vb b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
index 67954dc7..0be36039 100644
--- a/CompactGUI/Models/CompressableFolders/SteamFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/SteamFolder.vb
@@ -22,7 +22,6 @@ Public Class SteamFolder : Inherits CompressableFolder
Me.FolderName = folderName
Me.SteamAppID = steamappId
Me.DisplayName = displayName
- CheckDirectStorage()
End Sub
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 5e4eb458..8ad9817d 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -93,6 +93,7 @@ Public Class CompressableFolderService
folder.AnalysisResults = New ObservableCollection(Of AnalysedFileDetails)(retAnalysisResults)
folder.UncompressedBytes = folder.Analyser.UncompressedBytes
folder.CompressedBytes = folder.Analyser.CompressedBytes
+ folder.IsDirectStorage = folder.Analyser.IsDirectStorage
If folder.Analyser.ContainsCompressedFiles OrElse folder.IsFreshlyCompressed Then
folder.FolderActionState = ActionState.Results
From b1185322c78eb30366699157e9d739a90387029b Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Wed, 26 Aug 2026 15:10:18 +1000
Subject: [PATCH 020/134] Version bump
---
CompactGUI/Application.xaml.vb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Application.xaml.vb b/CompactGUI/Application.xaml.vb
index 2faaac82..ea26da18 100644
--- a/CompactGUI/Application.xaml.vb
+++ b/CompactGUI/Application.xaml.vb
@@ -17,7 +17,7 @@ Imports Coravel.Scheduling.Schedule
Partial Public Class Application
- Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 8)
+ Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 9)
Public Shared ReadOnly Property AppVersionText As String
Get
From ea38b4bf8e3a1d0bc351387678ff2e68ab930e43 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sat, 29 Aug 2026 14:23:41 +1000
Subject: [PATCH 021/134] Transition to TOML
---
CompactGUI.Core/Settings/Settings.cs | 2 +-
CompactGUI.slnx | 2 +
CompactGUI/Application.xaml.vb | 6 +-
CompactGUI/CompactGUI.vbproj | 28 +-
.../Components/Converters/IValueConverters.vb | 36 +-
.../Settings/Settings_skiplistflyout.xaml | 35 +-
CompactGUI/LanguageHelper.vb | 143 --
CompactGUI/MainWindow.xaml | 19 +-
CompactGUI/Resources/Localisation/en-AU.toml | 167 ++
CompactGUI/Resources/Localisation/es-ES.toml | 190 ++
CompactGUI/Resources/Localisation/ru-RU.toml | 190 ++
CompactGUI/Resources/Localisation/zh-CN.toml | 190 ++
CompactGUI/Services/ApplicationHostService.vb | 6 +-
CompactGUI/Services/CustomSnackBarService.vb | 32 +-
CompactGUI/Services/LocalisationService.vb | 43 +
CompactGUI/Services/WindowService.vb | 4 +-
CompactGUI/ViewModels/FolderViewModel.vb | 4 +-
CompactGUI/ViewModels/MainWindowViewModel.vb | 4 +-
CompactGUI/ViewModels/SettingsViewModel.vb | 24 +-
.../Components/CompressionMode_Radio.xaml | 10 +-
.../Views/Components/FolderWatcherCard.xaml | 86 +-
CompactGUI/Views/Pages/DatabasePage.xaml | 80 +-
CompactGUI/Views/Pages/FolderView.xaml | 14 +-
CompactGUI/Views/Pages/HomePage.xaml | 20 +-
.../Views/Pages/PendingCompression.xaml | 38 +-
CompactGUI/Views/Pages/ResultsTemplate.xaml | 43 +-
CompactGUI/Views/Pages/WatcherPage.xaml | 5 +-
CompactGUI/Views/SettingsPage.xaml | 149 +-
CompactGUI/Views/SettingsPage.xaml.vb | 43 +-
CompactGUI/i18n/i18n.Designer.vb | 1542 -----------------
CompactGUI/i18n/i18n.es-ES.Designer.vb | 1398 ---------------
CompactGUI/i18n/i18n.es-ES.resx | 579 -------
CompactGUI/i18n/i18n.resx | 626 -------
CompactGUI/i18n/i18n.ru-RU.resx | 625 -------
CompactGUI/i18n/i18n.zh-CN.resx | 599 -------
ResXManager.config.xml | 4 -
36 files changed, 1069 insertions(+), 5917 deletions(-)
delete mode 100644 CompactGUI/LanguageHelper.vb
create mode 100644 CompactGUI/Resources/Localisation/en-AU.toml
create mode 100644 CompactGUI/Resources/Localisation/es-ES.toml
create mode 100644 CompactGUI/Resources/Localisation/ru-RU.toml
create mode 100644 CompactGUI/Resources/Localisation/zh-CN.toml
create mode 100644 CompactGUI/Services/LocalisationService.vb
delete mode 100644 CompactGUI/i18n/i18n.Designer.vb
delete mode 100644 CompactGUI/i18n/i18n.es-ES.Designer.vb
delete mode 100644 CompactGUI/i18n/i18n.es-ES.resx
delete mode 100644 CompactGUI/i18n/i18n.resx
delete mode 100644 CompactGUI/i18n/i18n.ru-RU.resx
delete mode 100644 CompactGUI/i18n/i18n.zh-CN.resx
delete mode 100644 ResXManager.config.xml
diff --git a/CompactGUI.Core/Settings/Settings.cs b/CompactGUI.Core/Settings/Settings.cs
index 2716e23c..4c598fe0 100644
--- a/CompactGUI.Core/Settings/Settings.cs
+++ b/CompactGUI.Core/Settings/Settings.cs
@@ -46,7 +46,7 @@ public partial class Settings : ObservableRecipient
[ObservableProperty] private WindowState windowState = WindowState.Normal;
[ObservableProperty] private bool alwaysShowDetailedCompressionMode = false;
- [ObservableProperty] private string language = "en-US";
+ [ObservableProperty] private string language = "en-AU";
partial void OnScheduledBackgroundIntervalChanged(int value) => UpdateNextScheduledBackgroundRun();
diff --git a/CompactGUI.slnx b/CompactGUI.slnx
index 036be4eb..363962bf 100644
--- a/CompactGUI.slnx
+++ b/CompactGUI.slnx
@@ -13,4 +13,6 @@
+
+
diff --git a/CompactGUI/Application.xaml.vb b/CompactGUI/Application.xaml.vb
index ea26da18..af52cc3f 100644
--- a/CompactGUI/Application.xaml.vb
+++ b/CompactGUI/Application.xaml.vb
@@ -58,6 +58,7 @@ Partial Public Class Application
'Settings handler
services.AddSingleton(Of ISettingsService)(SettingsService)
+ services.AddSingleton(Of LocalisationService)()
services.AddLogging(Sub(logging)
logging.SetMinimumLevel(SettingsService.AppSettings.LogLevel)
@@ -131,7 +132,6 @@ Partial Public Class Application
Return TryCast(_host?.Services.GetService(GetType(T)), T)
End Function
-
Public Shared ReadOnly mutex As New Mutex(False, "Global\CompactGUI")
Private pipeServerCancellation As New CancellationTokenSource()
Private pipeServerTask As Task
@@ -155,7 +155,7 @@ Partial Public Class Application
End If
InitializeHost()
- LanguageHelper.Initialize(GetService(Of ISettingsService).AppSettings)
+ Await GetService(Of LocalisationService).InitializeAsync()
GetService(Of Watcher.Watcher)()
@@ -345,4 +345,4 @@ Partial Public Class Application
' End If
'End Function
-End Class
\ No newline at end of file
+End Class
diff --git a/CompactGUI/CompactGUI.vbproj b/CompactGUI/CompactGUI.vbproj
index 53f273ae..df0006d3 100644
--- a/CompactGUI/CompactGUI.vbproj
+++ b/CompactGUI/CompactGUI.vbproj
@@ -45,6 +45,7 @@
+
@@ -70,6 +71,8 @@
+
+
@@ -79,29 +82,8 @@
-
- i18n.es-ES.resx
- True
- True
-
-
- True
- True
- i18n.resx
-
-
-
-
-
- i18n
- i18n.es-ES.Designer.vb
- PublicResXFileCodeGenerator
-
-
- i18n
- PublicResXFileCodeGenerator
- i18n.Designer.vb
-
+
+
diff --git a/CompactGUI/Components/Converters/IValueConverters.vb b/CompactGUI/Components/Converters/IValueConverters.vb
index 01acbafc..1ed516cc 100644
--- a/CompactGUI/Components/Converters/IValueConverters.vb
+++ b/CompactGUI/Components/Converters/IValueConverters.vb
@@ -18,13 +18,13 @@ Public Class BytesToReadableConverter : Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Dim suf As String() = {
- LanguageHelper.GetString("SizeUnit_B"),
- LanguageHelper.GetString("SizeUnit_KB"),
- LanguageHelper.GetString("SizeUnit_MB"),
- LanguageHelper.GetString("SizeUnit_GB"),
- LanguageHelper.GetString("SizeUnit_TB"),
- LanguageHelper.GetString("SizeUnit_PB"),
- LanguageHelper.GetString("SizeUnit_EB")
+ "B".LT("File size"),
+ "KB".LT("File size"),
+ "MB".LT("File size"),
+ "GB".LT("File size"),
+ "TB".LT("File size"),
+ "PB".LT("File size"),
+ "EB".LT("File size")
}
If value = 1010101010101010 Then Return "?"
@@ -102,16 +102,16 @@ Public Class RelativeDateConverter : Implements IValueConverter
Dim ts As TimeSpan = DateTime.Now - dt
If ts > TimeSpan.FromDays(19000) Then
- Return LanguageHelper.GetString("Time_Unknown")
+ Return "Unknown".LT("Relative date")
End If
If ts > TimeSpan.FromDays(2) Then
- Return String.Format(LanguageHelper.GetString("Time_DaysAgo"), ts.TotalDays)
+ Return "{0:0} days ago".LTF(ts.TotalDays)
ElseIf ts > TimeSpan.FromHours(2) Then
- Return String.Format(LanguageHelper.GetString("Time_HoursAgo"), ts.TotalHours)
+ Return "{0:0} hours ago".LTF(ts.TotalHours)
ElseIf ts > TimeSpan.FromMinutes(2) Then
- Return String.Format(LanguageHelper.GetString("Time_MinutesAgo"), ts.TotalMinutes)
+ Return "{0:0} minutes ago".LTF(ts.TotalMinutes)
Else
- Return LanguageHelper.GetString("Time_Now")
+ Return "just now".LT()
End If
End Function
@@ -300,15 +300,15 @@ Public Class FolderStatusToStringConverter : Implements IValueConverter
Dim status = CType(value, ActionState)
Select Case status
Case ActionState.Idle
- Return LanguageHelper.GetString("Status_AwaitingCompression")
+ Return "Awaiting Compression".LT()
Case ActionState.Analysing
- Return LanguageHelper.GetString("Status_Analysing")
+ Return "Analysing".LT()
Case ActionState.Working, ActionState.Paused
- Return LanguageHelper.GetString("Status_Working")
+ Return "Working".LT()
Case ActionState.Results
- Return LanguageHelper.GetString("Status_Compressed")
+ Return "Compressed".LT()
Case Else
- Return LanguageHelper.GetString("Status_Unknown")
+ Return "Unknown".LT("Folder status")
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
@@ -493,4 +493,4 @@ Public Class EnumToIntConverter
If targetType Is Nothing OrElse Not targetType.IsEnum OrElse value Is Nothing Then Return Binding.DoNothing
Return [Enum].ToObject(targetType, value)
End Function
-End Class
\ No newline at end of file
+End Class
diff --git a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
index 5e3eb144..f5752895 100644
--- a/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
+++ b/CompactGUI/Components/Settings/Settings_skiplistflyout.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Width="620"
@@ -89,9 +90,8 @@
+ Margin="10" FontSize="22" FontWeight="SemiBold"
+ loc:L.Value="edit skipped filetypes" />
@@ -104,9 +104,8 @@
Background="{StaticResource CardBackground}"
Visibility="Collapsed">
-
+
@@ -145,15 +144,13 @@
Margin="10 10 10 0"
Visibility="Collapsed">
+ VerticalAlignment="Center" Checked="UiChkIncludeWiki_Checked"
+ loc:L.Value="Include smart skipped file types"
+ ToolTip="{loc:T 'For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser.'}" Unchecked="UiChkIncludeWiki_Unchecked" />
+ Margin="0 0 130 20" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="UISave_Click"
+ loc:L.Context="Skiplist editor"
+ loc:L.Value="Save" />
+ Margin="0 0 10 20" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="UIReset_Click"
+ loc:L.Value="Reset" />
+
diff --git a/CompactGUI/LanguageHelper.vb b/CompactGUI/LanguageHelper.vb
deleted file mode 100644
index cdda73b8..00000000
--- a/CompactGUI/LanguageHelper.vb
+++ /dev/null
@@ -1,143 +0,0 @@
-Imports System.ComponentModel
-Imports System.Globalization
-Imports System.Resources
-Imports System.Threading
-Imports System.Windows.Markup
-
-Imports CompactGUI.Core.Settings
-
-
-Public Class LanguageItem
- Public Property Name As String
- Public Property ISOCountryCode As String
- Public Property CultureCode As String
-End Class
-
-Public Class LanguageHelper
- ' Supported language list
- ' @i18n
- Private Shared ReadOnly SupportedCultures As String() = {"en-US", "ru-RU", "zh-CN", "es-ES"}
- Private Shared resourceManager As ResourceManager = i18n.i18n.ResourceManager
- Private Shared currentCulture As CultureInfo = Nothing
-
- Private Shared _applicationSettings As Settings
-
- Public Shared Event LanguageChanged As EventHandler
-
- Public Shared Function GetText(key As String) As String
- Return GetString(key)
- End Function
-
- Public Shared Sub Initialize(applicationSettings As Settings)
- _applicationSettings = applicationSettings
- Dim savedLanguage = _applicationSettings.Language
-
- If Not String.IsNullOrEmpty(savedLanguage) AndAlso SupportedCultures.Contains(savedLanguage) Then
- ApplyCulture(savedLanguage)
- Else
- SetDefaultLanguage()
- End If
- End Sub
-
-
- Public Shared Function GetString(key As String, ParamArray args As Object()) As String
- Try
- Dim cultureToUse = If(currentCulture, Thread.CurrentThread.CurrentUICulture)
- Dim rawValue As String = resourceManager.GetString(key, cultureToUse)
-
- If String.IsNullOrEmpty(rawValue) Then
- Return key
- ElseIf args IsNot Nothing AndAlso args.Length > 0 Then
- Return String.Format(cultureToUse, rawValue, args)
- Else
- Return rawValue
- End If
- Catch ex As Exception
- Debug.WriteLine($"Failed to get multilingual text:{key},Error:{ex.Message}")
- Return key
- End Try
- End Function
-
- Public Shared Sub ApplyCulture(cultureName As String)
- Try
- Dim culture As New CultureInfo(cultureName)
- Thread.CurrentThread.CurrentUICulture = culture
- Thread.CurrentThread.CurrentCulture = culture
- currentCulture = culture
-
- _applicationSettings.Language = cultureName
- Application.GetService(Of ISettingsService).SaveSettings()
-
- RaiseEvent LanguageChanged(Nothing, EventArgs.Empty)
- Catch ex As Exception
- Debug.WriteLine($"Application language failure:{cultureName},Error:{ex.Message}")
- SetDefaultLanguage()
- End Try
- End Sub
-
- Private Shared Sub SetDefaultLanguage()
- ' Set the default language according to the system language.
- '@i18n
- Dim langMapping As New Dictionary(Of String, String) From {
- {"en", "en-US"},
- {"ru", "ru-RU"},
- {"zh", "zh-CN"},
- {"es", "es-ES"}
- }
-
- Dim systemLang As String = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToLower()
- Dim defaultLang As String = If(langMapping.ContainsKey(systemLang), langMapping(systemLang), "en-US")
-
- ApplyCulture(defaultLang)
-
- End Sub
-
- Public Shared Function GetCurrentLanguage() As String
- Return If(currentCulture, Thread.CurrentThread.CurrentUICulture).Name
- End Function
-
-
-End Class
-
-
-Public Class LocalizeExtension
- Inherits MarkupExtension
- Implements INotifyPropertyChanged
-
- Private ReadOnly _key As String
-
- Public Sub New(key As String)
- _key = key
- AddHandler LanguageHelper.LanguageChanged, AddressOf OnLanguageChanged
- End Sub
-
- Public ReadOnly Property Value As String
- Get
- Return LanguageHelper.GetString(_key)
- End Get
- End Property
-
- Public Overrides Function ProvideValue(serviceProvider As IServiceProvider) As Object
- Dim provideValueTarget = TryCast(serviceProvider.GetService(GetType(IProvideValueTarget)), IProvideValueTarget)
- Dim targetProperty = provideValueTarget?.TargetProperty
-
- ' If target is not a DependencyProperty (e.g. Binding.StringFormat), return plain string.
- If Not TypeOf targetProperty Is DependencyProperty Then
- Return Value
- End If
-
- Dim binding As New Binding(NameOf(Value)) With {
- .Source = Me,
- .Mode = BindingMode.OneWay
- }
-
- Return binding.ProvideValue(serviceProvider)
- End Function
-
- Private Sub OnLanguageChanged(sender As Object, e As EventArgs)
- RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(NameOf(Value)))
- End Sub
-
- 'Future me: don't try to replace this with ObservableObject. It's cursed
- Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
-End Class
diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml
index 14878635..f933b178 100644
--- a/CompactGUI/MainWindow.xaml
+++ b/CompactGUI/MainWindow.xaml
@@ -4,6 +4,7 @@
xmlns:bh="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
@@ -41,8 +42,7 @@
-
-
-
-
-
@@ -259,11 +257,12 @@
FocusOnLeftClick="True" MenuOnRightClick="True" TooltipText="CompactGUI">
-
-
+
+
+
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
new file mode 100644
index 00000000..544695ae
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -0,0 +1,167 @@
+# CompactGUI Localisation
+# @version 1
+
+# ===================
+# Translations
+
+"Add" = "Add"
+"Add Folder to Queue" = "Add Folder to Queue"
+"Add a custom folder to the watchlist" = "Add a custom folder to the watchlist"
+"Add to compression queue" = "Add to compression queue"
+"Add to right-click context menu" = "Add to right-click context menu"
+"Add to start menu" = "Add to start menu"
+"Added to Queue" = "Added to Queue"
+"Admin" = "Admin"
+"Aggression of online skiplist" = "Aggression of online skiplist"
+"Always show details on Compression Mode buttons" = "Always show details on Compression Mode buttons"
+"Analysing" = "Analysing"
+"Applied to all folders" = "Applied to all folders"
+"Apply to all" = "Apply to all"
+"Ascending" = "Ascending"
+"Awaiting Compression" = "Awaiting Compression"
+"Background Watcher Settings" = "Background Watcher Settings"
+"Cancel" = "Cancel"
+"Cancel Background Compressor" = "Cancel Background Compressor"
+"Cannot remove folder" = "Cannot remove folder"
+"Check for pre-release updates" = "Check for pre-release updates"
+"Click to download" = "Click to download"
+"CompactGUI" = "CompactGUI"
+"Compress Again" = "Compress Again"
+"Compress All Now" = "Compress All Now"
+"Compress Selected" = "Compress Selected"
+"Compress folders: " = "Compress folders: "
+"Compressed" = "Compressed"
+"Compression" = "Compression"
+"Compression DB" = "Compression DB"
+"Compression Mode" = "Compression Mode"
+"Compression Settings" = "Compression Settings"
+"Compression Summary" = "Compression Summary"
+"Compression options have been applied to all folders" = "Compression options have been applied to all folders"
+"Configuration" = "Configuration"
+"Database Results" = "Database Results"
+"Descending" = "Descending"
+"Edit skip list for this folder" = "Edit skip list for this folder"
+"Estimate Compression for non-Steam Folders (beta)" = "Estimate Compression for non-Steam Folders (beta)"
+"Estimated size" = "Estimated size"
+"Exit" = "Exit"
+"Extensions in this folder" = "Extensions in this folder"
+"Failed to submit to wiki" = "Failed to submit to wiki"
+"Files Compressed" = "Files Compressed"
+"Filetype Management" = "Filetype Management"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well."
+"Game" = "Game"
+"Game Name" = "Game Name"
+"Games" = "Games"
+"HDDs only use 1 thread" = "HDDs only use 1 thread"
+"Home" = "Home"
+"Include global skipped file types" = "Include global skipped file types"
+"Include smart skipped file types" = "Include smart skipped file types"
+"Insufficient permission to access this folder" = "Insufficient permission to access this folder"
+"LZX" = "LZX"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Last Fetched: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "Last analysed {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}"
+"Manage local skipped filetypes" = "Manage local skipped filetypes"
+"Max Savings" = "Max Savings"
+"Maximum Compression Threads" = "Maximum Compression Threads"
+"Mode" = "Mode"
+"Monitor compressed folders for changes" = "Monitor compressed folders for changes"
+"Never" = "Never"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}"
+"Not Compressed" = "Not Compressed"
+"On Schedule" = "On Schedule"
+"On Schedule if system is also idle" = "On Schedule if system is also idle"
+"Open" = "Open"
+"Open Settings Folder" = "Open Settings Folder"
+"Please check your internet connection and try again" = "Please check your internet connection and try again"
+"Please wait until the current operation is finished" = "Please wait until the current operation is finished"
+"Re-analyse all watched folders" = "Re-analyse all watched folders"
+"Re-analyse this folder" = "Re-analyse this folder"
+"Remove from Watchlist" = "Remove from Watchlist"
+"Reset" = "Reset"
+"Restart as Admin" = "Restart as Admin"
+"Savings" = "Savings"
+"Search by game name or SteamID..." = "Search by game name or SteamID..."
+"Settings" = "Settings"
+"Show notification on completion" = "Show notification on completion"
+"Sort By" = "Sort By"
+"Space Saved" = "Space Saved"
+"Start CompactGUI in system tray" = "Start CompactGUI in system tray"
+"SteamID" = "SteamID"
+"Submit Results" = "Submit Results"
+"Submitted to wiki" = "Submitted to wiki"
+"Success" = "Success"
+"System Integration" = "System Integration"
+"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "This game uses DirectStorage technology. If you are using this feature, you should not compress this game."
+"Total Results" = "Total Results"
+"UI Settings" = "UI Settings"
+"UID" = "UID"
+"Uncompress" = "Uncompress"
+"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}"
+"Update Settings" = "Update Settings"
+"Use skip list" = "Use skip list"
+"Version" = "Version"
+"Watch folder for changes" = "Watch folder for changes"
+"Watched Folders" = "Watched Folders"
+"Watcher" = "Watcher"
+"WatcherPage" = "WatcherPage"
+"When System is Idle" = "When System is Idle"
+"Working" = "Working"
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
+"Yes" = "Yes"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?"
+"contained files" = "contained files"
+"day(s)" = "day(s)"
+"edit" = "edit"
+"edit skipped filetypes" = "edit skipped filetypes"
+"every" = "every"
+"just now" = "just now"
+"last compressed:" = "last compressed:"
+"last modified:" = "last modified:"
+"select a folder" = "select a folder"
+"uncompressed size" = "uncompressed size"
+"{0:0} days ago" = "{0:0} days ago"
+"{0:0} hours ago" = "{0:0} hours ago"
+"{0:0} minutes ago" = "{0:0} minutes ago"
+"{0} saved" = "{0} saved"
+"{0}% decayed" = "{0}% decayed"
+
+[context."Compression estimate"]
+"unknown" = "unknown"
+
+[context."Compression size"]
+"After" = "After"
+"Before" = "Before"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder status"]
+"Unknown" = "Unknown"
+
+[context."Relative date"]
+"Unknown" = "Unknown"
+
+[context."Schedule"]
+"at" = "at"
+
+[context."Skiplist aggression"]
+"high" = "high"
+"low" = "low"
+"medium" = "medium"
+
+[context."Skiplist editor"]
+"Save" = "Save"
+
+[context."Storage savings"]
+"saved" = "saved"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
new file mode 100644
index 00000000..68e736de
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -0,0 +1,190 @@
+# CompactGUI Localisation
+# @version 1
+
+# ===================
+# Translations
+
+"Add" = "Añadir "
+"Add Folder to Queue" = "Añadir carpeta a la cola"
+"Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista"
+"Add to compression queue" = "Añadir a la cola de compresión"
+"Add to right-click context menu" = "Añadir al menú contextual"
+"Add to start menu" = "Añadir al menú inicio"
+"Added to Queue" = "Añadido a la cola"
+"Admin" = "Admin"
+"Aggression of online skiplist" = "Agresividad de la lista de omisión online"
+"Always show details on Compression Mode buttons" = "Mostrar siempre detalles en botones de modo de compresión"
+"Analysing" = "Analizando"
+"Applied to all folders" = "Aplicado a todas las carpetas"
+"Apply to all" = "Aplicar a todo"
+"Ascending" = "Ascendente"
+"Awaiting Compression" = "Esperando compresión"
+"Background Watcher Settings" = "Ajustes del Monitor en segundo plano"
+"Cancel" = "Cancelar "
+"Cancel Background Compressor" = "Cancelar compresor en segundo plano"
+"Cannot remove folder" = "No se puede eliminar la carpeta"
+"Check for pre-release updates" = "Buscar actualizaciones preliminares"
+"Click to download" = "Clic para descargar"
+"CompactGUI" = "CompactGUI"
+"Compress Again" = "Comprimir de nuevo"
+"Compress All Now" = "Comprimir todo ahora"
+"Compress Selected" = "Comprimir seleccionados"
+"Compress folders: " = "Comprimir carpetas:"
+"Compressed" = "Comprimido"
+"Compression" = "Compresión"
+"Compression DB" = "DB de Compresión"
+"Compression Mode" = "Modo de compresión"
+"Compression Settings" = "Ajustes de compresión"
+"Compression Summary" = "Resumen de compresión"
+"Compression options have been applied to all folders" = "Las opciones de compresión se han aplicado a todas las carpetas"
+"Configuration" = "Configuración"
+"Database Results" = "Resultados de la base de datos"
+"Descending" = "Descendente"
+"Edit skip list for this folder" = "Editar lista de exclusión de esta carpeta"
+"Estimate Compression for non-Steam Folders (beta)" = "Estimar compresión para carpetas no-Steam (beta)"
+"Estimated size" = "Tamaño estimado"
+"Exit" = "Salir"
+"Extensions in this folder" = "Extensiones en esta carpeta"
+"Failed to submit to wiki" = "Fallo al enviar a la wiki"
+"Files Compressed" = "Archivos comprimidos"
+"Filetype Management" = "Gestión de tipos de archivo"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo para juegos de Steam.\nAl elegir omitir los tipos de archivo enviados por los usuarios, esta configuración determina cuántas solicitudes se requieren para cada tipo de archivo para considerar su omisión.\nGeneralmente, la opción \"baja\" es la mejor, ya que las opciones más altas conllevan el riesgo de omitir archivos que, de otro modo, se comprimirían correctamente."
+"Game" = "Juego"
+"Game Name" = "Nombre del juego"
+"Games" = "Juegos"
+"HDDs only use 1 thread" = "Los HDD usan solo 1 hilo"
+"Home" = "Inicio"
+"Include global skipped file types" = "Incluir tipos de archivo omitidos globales"
+"Include smart skipped file types" = "Incluir tipos de archivo inteligentes omitidos"
+"Insufficient permission to access this folder" = "Permiso insuficiente para acceder a esta carpeta."
+"LZX" = "LZX" # LOC:TODO
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Última obtención: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "Último análisis {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Última ejecución: {0:dd MMM yyyy} a las {0:HH:mm:ss}"
+"Manage local skipped filetypes" = "Gestionar tipos de archivo omitidos locales"
+"Max Savings" = "Ahorro máx."
+"Maximum Compression Threads" = "Hilos máximos de compresión"
+"Mode" = "Modo "
+"Monitor compressed folders for changes" = "Monitorizar cambios en carpetas comprimidas"
+"Never" = "Nunca"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Próxima programada: {0:dd MMM yyyy} a las {0:HH:mm:ss}"
+"Not Compressed" = "No comprimido"
+"On Schedule" = "Programado"
+"On Schedule if system is also idle" = "Programado (si el sistema está inactivo)"
+"Open" = "Abrir"
+"Open Settings Folder" = "Abrir Ajustes carpetas "
+"Please check your internet connection and try again" = "Por favor verifique su conexión a internet e intente de nuevo"
+"Please wait until the current operation is finished" = "Por favor espere hasta que la operación actual termine"
+"Re-analyse all watched folders" = "Reanalizar todas las carpetas monitorizadas"
+"Re-analyse this folder" = "Reanalizar esta carpeta"
+"Remove from Watchlist" = "Eliminar de la lista"
+"Reset" = "Reiniciar"
+"Restart as Admin" = "Reiniciar como Admin"
+"Savings" = "Ahorro"
+"Search by game name or SteamID..." = "Buscar por nombre o SteamID..."
+"Settings" = "Ajustes"
+"Show notification on completion" = "Mostrar notificación al finalizar"
+"Sort By" = "Ordenar por"
+"Space Saved" = "Espacio ahorrado"
+"Start CompactGUI in system tray" = "Iniciar CompactGUI en la bandeja del sistema"
+"SteamID" = "SteamID"
+"Submit Results" = "Enviar resultados"
+"Submitted to wiki" = "Enviado a la wiki"
+"Success" = "Éxito"
+"System Integration" = "Integración del sistema"
+"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" # LOC:TODO
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Este juego usa tecnología DirectStorage. Si usa esta función, no debería comprimir este juego."
+"Total Results" = "Totales"
+"UI Settings" = "Ajustes de interfaz"
+"UID" = "UID" # LOC:TODO
+"Uncompress" = "Descomprimir"
+"Update Available ▸ Version {0}" = "Actualización disponible ▸ Versión {0}"
+"Update Settings" = "Ajustes de actualización"
+"Use skip list" = "Usar lista de exclusión"
+"Version" = "Versión"
+"Watch folder for changes" = "Monitorizar cambios en carpeta"
+"Watched Folders" = "Carpetas monitorizadas"
+"Watcher" = "Monitor"
+"WatcherPage" = "Monitor"
+"When System is Idle" = "Cuando el sistema esté inactivo"
+"Working" = "Trabajando"
+"XPRESS 16K" = "XPRESS 16K" # LOC:TODO
+"XPRESS 4K" = "XPRESS 4K" # LOC:TODO
+"XPRESS 8K" = "XPRESS 8K" # LOC:TODO
+"Yes" = "Sí"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Actualmente tiene {0} carpetas siendo monitorizadas. Cerrar CompactGUI detendrá su monitorización.{1}{1}¿Está seguro de que desea salir?"
+"contained files" = "archivos contenidos"
+"day(s)" = "día(s)"
+"edit" = "editar"
+"edit skipped filetypes" = "editar tipos de archivo omitidos"
+"every" = "cada"
+"just now" = "ahora mismo"
+"last compressed:" = "última compresión:"
+"last modified:" = "última modificación:"
+"select a folder" = "seleccionar carpeta"
+"uncompressed size" = "tamaño sin comprimir"
+"{0:0} days ago" = "{0:0} hace días"
+"{0:0} hours ago" = "{0:0} hace horas"
+"{0:0} minutes ago" = "{0:0} hace minutos"
+"{0} saved" = "{0} ahorrado"
+"{0}% decayed" = "{0}% degradado"
+
+[context."Compression estimate"]
+"unknown" = "desconocido"
+
+[context."Compression size"]
+"After" = "Después"
+"Before" = "Antes"
+
+[context."File size"]
+"B" = "B" # LOC:TODO
+"EB" = "EB" # LOC:TODO
+"GB" = "GB" # LOC:TODO
+"KB" = "KB" # LOC:TODO
+"MB" = "MB" # LOC:TODO
+"PB" = "PB" # LOC:TODO
+"TB" = "TB" # LOC:TODO
+
+[context."Folder status"]
+"Unknown" = "Desconocido"
+
+[context."Relative date"]
+"Unknown" = "Desconocido"
+
+[context."Schedule"]
+"at" = "a las"
+
+[context."Skiplist aggression"]
+"high" = "alta"
+"low" = "bajo"
+"medium" = "media"
+
+[context."Skiplist editor"]
+"Save" = "Ahorrar"
+
+[context."Storage savings"]
+"saved" = "ahorrado"
+
+[obsolete]
+"Custom list — {0} entries" = "Lista personalizada — {0} entradas"
+"Custom: {0} entries" = "Personalizada: {0} entradas"
+"DB — {0} files" = "Wiki — {0} archivos"
+"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "Para juegos de Steam:\nomite archivos basado en resultados de la BD\n\nPara carpetas no-Steam:\nomite archivos basado en estimación de compresión"
+"Global + DB — {0} files" = "Global + Wiki — {0} archivos"
+"Global — {0} files" = "Global — {0} archivos"
+"Global: {0} skipped" = "Global: {0} omitidos"
+"Language (Requires Restart)" = "Idioma (Requiere reinicio)"
+"Language Changed" = "Language Changed" # LOC:TODO
+"Language changed successfully. You may need to restart the application for all changes to take effect." = "Language changed successfully. You may need to restart the application for all changes to take effect." # LOC:TODO
+"Last analysed" = "Último análisis"
+"OK" = "OK" # LOC:TODO
+"Off" = "Desactivado"
+"Results State" = "Estado de los resultados"
+"Skip file types likely to compress poorly" = "Omitir tipos de archivo difícilmente comprimibles"
+"Skip file types specified in settings" = "Omitir tipos de archivo especificados en ajustes"
+"Smart: {0} skipped" = "Inteligente: {0} omitidos"
+"Welcome" = "Bienvenido"
+"decayed" = "degradado"
+"files will be skipped" = "archivos serán omitidos"
+"not configured" = "no configurado"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
new file mode 100644
index 00000000..a363e148
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -0,0 +1,190 @@
+# CompactGUI Localisation
+# @version 1
+
+# ===================
+# Translations
+
+"Add" = "Добавить"
+"Add Folder to Queue" = "Добавить папку в очередь"
+"Add a custom folder to the watchlist" = "Добавить свою папку в список отслеживания"
+"Add to compression queue" = "Добавить в очередь сжатия"
+"Add to right-click context menu" = "Добавить в контекстное меню правой кнопки мыши"
+"Add to start menu" = "Добавить в меню «Пуск»"
+"Added to Queue" = "Добавлено в очередь"
+"Admin" = "Администратор"
+"Aggression of online skiplist" = "Уровень агрессивности онлайн-списка пропуска"
+"Always show details on Compression Mode buttons" = "Всегда показывать подробности на кнопках режимов сжатия"
+"Analysing" = "Анализ"
+"Applied to all folders" = "Применено ко всем папкам"
+"Apply to all" = "Применить ко всем"
+"Ascending" = "По возрастанию"
+"Awaiting Compression" = "Ожидание сжатия"
+"Background Watcher Settings" = "Настройки фонового отслеживания"
+"Cancel" = "Отмена"
+"Cancel Background Compressor" = "Отменить фоновое сжатие"
+"Cannot remove folder" = "Не удаётся удалить папку"
+"Check for pre-release updates" = "Проверять предварительные версии обновлений"
+"Click to download" = "Нажмите, чтобы скачать"
+"CompactGUI" = "CompactGUI"
+"Compress Again" = "Сжать заново"
+"Compress All Now" = "Сжать всё сейчас"
+"Compress Selected" = "Сжать выбранное"
+"Compress folders: " = "Сжимать папки: "
+"Compressed" = "Сжато"
+"Compression" = "Сжатие"
+"Compression DB" = "База сжатия"
+"Compression Mode" = "Режим сжатия"
+"Compression Settings" = "Настройки сжатия"
+"Compression Summary" = "Сводка сжатия"
+"Compression options have been applied to all folders" = "Параметры сжатия применены ко всем папкам"
+"Configuration" = "Конфигурация"
+"Database Results" = "Результаты базы данных"
+"Descending" = "По убыванию"
+"Edit skip list for this folder" = "Изменить список исключений для этой папки"
+"Estimate Compression for non-Steam Folders (beta)" = "Оценивать сжатие для папок не из Steam (бета)"
+"Estimated size" = "Предполагаемый размер"
+"Exit" = "Выход"
+"Extensions in this folder" = "Расширения в этой папке"
+"Failed to submit to wiki" = "Не удалось отправить в Вики"
+"Files Compressed" = "Файлов сжато"
+"Filetype Management" = "Управление типами файлов"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Для игр Steam используется база данных для определения пропускаемых типов. Для папок не из Steam это основано на умном анализаторе."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Только для игр Steam.\nПри выборе пропуска файлов, предложенных пользователями, этот параметр определяет, сколько подтверждений необходимо для каждого типа файлов, чтобы его пропускать.\n«Низкий» обычно оптимален, так как более высокие значения могут привести к пропуску файлов, которые на самом деле хорошо сжимаются."
+"Game" = "Игра"
+"Game Name" = "Названию игры"
+"Games" = "Игры"
+"HDDs only use 1 thread" = "Для HDD использовать только 1 поток"
+"Home" = "Главная"
+"Include global skipped file types" = "Включить глобальный список пропускаемых типов"
+"Include smart skipped file types" = "Включить умные пропускаемые типы файлов"
+"Insufficient permission to access this folder" = "Недостаточно прав для доступа к этой папке"
+"LZX" = "LZX" # LOC:TODO
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Последнее получение: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "Последний анализ {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Последний запуск: {0:dd MMM yyyy} в {0:HH:mm:ss}"
+"Manage local skipped filetypes" = "Управление локальным списком пропускаемых типов файлов"
+"Max Savings" = "Максимальной экономии"
+"Maximum Compression Threads" = "Максимум потоков сжатия"
+"Mode" = "Режим"
+"Monitor compressed folders for changes" = "Отслеживать изменения в сжатых папках"
+"Never" = "Никогда"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Следующее по расписанию: {0:dd MMM yyyy} в {0:HH:mm:ss}"
+"Not Compressed" = "Не сжато"
+"On Schedule" = "По расписанию"
+"On Schedule if system is also idle" = "По расписанию, если система также бездействует"
+"Open" = "Открыть"
+"Open Settings Folder" = "Открыть папку настроек"
+"Please check your internet connection and try again" = "Проверьте подключение к интернету и повторите попытку"
+"Please wait until the current operation is finished" = "Подождите завершения текущей операции"
+"Re-analyse all watched folders" = "Переанализировать все отслеживаемые папки"
+"Re-analyse this folder" = "Повторно проанализировать эту папку"
+"Remove from Watchlist" = "Удалить из списка отслеживания"
+"Reset" = "Сбросить"
+"Restart as Admin" = "Перезапустить от имени администратора"
+"Savings" = "Экономия"
+"Search by game name or SteamID..." = "Поиск по названию игры или SteamID..."
+"Settings" = "Настройки"
+"Show notification on completion" = "Показывать уведомление о завершении"
+"Sort By" = "Сортировать по"
+"Space Saved" = "Сэкономлено места"
+"Start CompactGUI in system tray" = "Запускать CompactGUI в области уведомлений"
+"SteamID" = "SteamID"
+"Submit Results" = "Отправить результаты"
+"Submitted to wiki" = "Отправлено в Вики"
+"Success" = "Успешно"
+"System Integration" = "Интеграция в систему"
+"The SnackbarPresenter was never set" = "SnackbarPresenter не установлен"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Эта игра использует технологию DirectStorage. Если вы используете эту функцию, вам не следует сжимать эту игру."
+"Total Results" = "Всего результатов"
+"UI Settings" = "Настройки интерфейса"
+"UID" = "UID" # LOC:TODO
+"Uncompress" = "Распаковать"
+"Update Available ▸ Version {0}" = "Доступно обновление ▸ Версия {0}"
+"Update Settings" = "Настройки обновлений"
+"Use skip list" = "Использовать список исключений"
+"Version" = "Версия"
+"Watch folder for changes" = "Отслеживать изменения в папке"
+"Watched Folders" = "Отслеживаемые папки"
+"Watcher" = "Наблюдение"
+"WatcherPage" = "Страница отслеживания"
+"When System is Idle" = "Когда система бездействует"
+"Working" = "Выполняется"
+"XPRESS 16K" = "XPRESS 16K" # LOC:TODO
+"XPRESS 4K" = "XPRESS 4K" # LOC:TODO
+"XPRESS 8K" = "XPRESS 8K" # LOC:TODO
+"Yes" = "Да"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "В данный момент отслеживается папок ({0}). Закрытие CompactGUI прекратит их отслеживание.{1}{1}Вы уверены, что хотите выйти?"
+"contained files" = "содержит файлов"
+"day(s)" = "дн."
+"edit" = "изменить"
+"edit skipped filetypes" = "изменить список пропускаемых типов"
+"every" = "каждые"
+"just now" = "только что"
+"last compressed:" = "последнее сжатие:"
+"last modified:" = "последнее изменение:"
+"select a folder" = "выберите папку"
+"uncompressed size" = "исходный размер"
+"{0:0} days ago" = "{0:0} дн. назад"
+"{0:0} hours ago" = "{0:0} ч. назад"
+"{0:0} minutes ago" = "{0:0} мин. назад"
+"{0} saved" = "{0} сэкономлено"
+"{0}% decayed" = "{0}% устарело"
+
+[context."Compression estimate"]
+"unknown" = "неизвестно"
+
+[context."Compression size"]
+"After" = "После"
+"Before" = "До"
+
+[context."File size"]
+"B" = "б"
+"EB" = "Эб"
+"GB" = "Гб"
+"KB" = "Кб"
+"MB" = "Мб"
+"PB" = "Пб"
+"TB" = "Тб"
+
+[context."Folder status"]
+"Unknown" = "Неизвестно"
+
+[context."Relative date"]
+"Unknown" = "Неизвестно"
+
+[context."Schedule"]
+"at" = "в"
+
+[context."Skiplist aggression"]
+"high" = "высокий"
+"low" = "низкий"
+"medium" = "средний"
+
+[context."Skiplist editor"]
+"Save" = "Сохранить"
+
+[context."Storage savings"]
+"saved" = "сэкономлено"
+
+[obsolete]
+"Custom list — {0} entries" = "Свой список — {0} записей"
+"Custom: {0} entries" = "Свой: {0} записей"
+"DB — {0} files" = "Вики — {0} файлов"
+"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "Для игр Steam:\nпропускает файлы на основе результатов базы данных\n\nДля папок не из Steam:\nпропускает файлы на основе оценки сжатия"
+"Global + DB — {0} files" = "Глобальный + Вики — {0} файлов"
+"Global — {0} files" = "Глобальный — {0} файлов"
+"Global: {0} skipped" = "Глобальный: {0} пропущено"
+"Language (Requires Restart)" = "Язык (требуется перезапуск)"
+"Language Changed" = "Язык изменён"
+"Language changed successfully. You may need to restart the application for all changes to take effect." = "Смена языка выполнена. Возможно, потребуется перезапустить приложение, чтобы все изменения вступили в силу."
+"Last analysed" = "Последний анализ"
+"OK" = "хорошо"
+"Off" = "Выкл"
+"Results State" = "Состояние результатов"
+"Skip file types likely to compress poorly" = "Пропускать типы файлов, которые сжимаются плохо"
+"Skip file types specified in settings" = "Пропускать типы файлов, указанные в настройках"
+"Smart: {0} skipped" = "Умный: {0} пропущено"
+"Welcome" = "Добро пожаловать"
+"decayed" = "устарело"
+"files will be skipped" = "фл. будет пропущено"
+"not configured" = "не настроено"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
new file mode 100644
index 00000000..30c2e6d5
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -0,0 +1,190 @@
+# CompactGUI Localisation
+# @version 1
+
+# ===================
+# Translations
+
+"Add" = "添加"
+"Add Folder to Queue" = "添加文件夹到队列"
+"Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表"
+"Add to compression queue" = "添加到压缩队列"
+"Add to right-click context menu" = "添加到右键菜单"
+"Add to start menu" = "添加到开始菜单"
+"Added to Queue" = "已添加到队列"
+"Admin" = "管理员权限"
+"Aggression of online skiplist" = "在线跳过列表的激进程度"
+"Always show details on Compression Mode buttons" = "始终显示压缩模式按钮的详细信息"
+"Analysing" = "正在分析"
+"Applied to all folders" = "已应用到所有文件夹"
+"Apply to all" = "应用到所有"
+"Ascending" = "升序"
+"Awaiting Compression" = "等待压缩"
+"Background Watcher Settings" = "后台监控设置"
+"Cancel" = "否"
+"Cancel Background Compressor" = "取消后台压缩"
+"Cannot remove folder" = "无法移除文件夹"
+"Check for pre-release updates" = "检查预发布更新"
+"Click to download" = "点击下载"
+"CompactGUI" = "CompactGUI"
+"Compress Again" = "再次压缩"
+"Compress All Now" = "立即全部压缩"
+"Compress Selected" = "压缩选中项"
+"Compress folders: " = "压缩文件夹:"
+"Compressed" = "已压缩"
+"Compression" = "压缩模式"
+"Compression DB" = "压缩数据库"
+"Compression Mode" = "压缩模式"
+"Compression Settings" = "压缩设置"
+"Compression Summary" = "压缩摘要"
+"Compression options have been applied to all folders" = "压缩选项已应用到所有文件夹"
+"Configuration" = "配置"
+"Database Results" = "数据库结果"
+"Descending" = "降序"
+"Edit skip list for this folder" = "编辑此文件夹的跳过列表"
+"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
+"Estimated size" = "预估大小"
+"Exit" = "退出"
+"Extensions in this folder" = "此文件夹中的扩展名"
+"Failed to submit to wiki" = "提交到 Wiki 失败"
+"Files Compressed" = "文件已压缩"
+"Filetype Management" = "文件类型管理"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。"
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。"
+"Game" = "游戏"
+"Game Name" = "游戏名称"
+"Games" = "游戏列表"
+"HDDs only use 1 thread" = "HDD 仅使用 1 个线程"
+"Home" = "主页"
+"Include global skipped file types" = "包含全局跳过的文件类型"
+"Include smart skipped file types" = "包含智能跳过的文件类型"
+"Insufficient permission to access this folder" = "没有足够的权限访问此文件夹"
+"LZX" = "LZX" # LOC:TODO
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "最后获取: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Last analysed {0}" = "上次分析 {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Manage local skipped filetypes" = "管理本地跳过的文件类型"
+"Max Savings" = "最大节省"
+"Maximum Compression Threads" = "最大压缩线程数"
+"Mode" = "压缩模式"
+"Monitor compressed folders for changes" = "监控已压缩文件夹的更改"
+"Never" = "从不"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Not Compressed" = "未压缩"
+"On Schedule" = "按计划"
+"On Schedule if system is also idle" = "按计划且系统空闲时"
+"Open" = "打开"
+"Open Settings Folder" = "打开设置文件夹"
+"Please check your internet connection and try again" = "请检查您的网络连接并重试"
+"Please wait until the current operation is finished" = "请等待当前操作完成"
+"Re-analyse all watched folders" = "重新分析所有受监控文件夹"
+"Re-analyse this folder" = "重新分析此文件夹"
+"Remove from Watchlist" = "从监控列表移除"
+"Reset" = "重置"
+"Restart as Admin" = "以管理员身份重新启动"
+"Savings" = "节省"
+"Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索..."
+"Settings" = "设置"
+"Show notification on completion" = "完成后显示通知"
+"Sort By" = "排序方式"
+"Space Saved" = "节省空间"
+"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI"
+"SteamID" = "SteamID"
+"Submit Results" = "提交结果"
+"Submitted to wiki" = "已提交到 Wiki"
+"Success" = "成功"
+"System Integration" = "系统集成"
+"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。"
+"Total Results" = "总结果"
+"UI Settings" = "UI 设置"
+"UID" = "UID" # LOC:TODO
+"Uncompress" = "解压缩"
+"Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}"
+"Update Settings" = "更新设置"
+"Use skip list" = "使用跳过列表"
+"Version" = "版本"
+"Watch folder for changes" = "监控文件夹更改"
+"Watched Folders" = "受监控文件夹"
+"Watcher" = "监控"
+"WatcherPage" = "监控页"
+"When System is Idle" = "当系统空闲时"
+"Working" = "正在处理"
+"XPRESS 16K" = "XPRESS 16K" # LOC:TODO
+"XPRESS 4K" = "XPRESS 4K" # LOC:TODO
+"XPRESS 8K" = "XPRESS 8K" # LOC:TODO
+"Yes" = "是"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "你目前有 {0} 个文件夹正在被监控。关闭 CompactGUI 将停止对它们的监控。{1}{1}你确定要退出吗?"
+"contained files" = "包含文件"
+"day(s)" = "天"
+"edit" = "编辑"
+"edit skipped filetypes" = "编辑跳过类型"
+"every" = "每"
+"just now" = "刚刚"
+"last compressed:" = "上次压缩:"
+"last modified:" = "上次修改:"
+"select a folder" = "选择文件夹"
+"uncompressed size" = "未压缩大小"
+"{0:0} days ago" = "{0:0} 天前"
+"{0:0} hours ago" = "{0:0} 小时前"
+"{0:0} minutes ago" = "{0:0} 分钟前"
+"{0} saved" = "{0} 已节省"
+"{0}% decayed" = "{0}% 已衰减"
+
+[context."Compression estimate"]
+"unknown" = "未知"
+
+[context."Compression size"]
+"After" = "压缩后"
+"Before" = "压缩前"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder status"]
+"Unknown" = "未知"
+
+[context."Relative date"]
+"Unknown" = "未知"
+
+[context."Schedule"]
+"at" = "at" # LOC:TODO
+
+[context."Skiplist aggression"]
+"high" = "高"
+"low" = "低"
+"medium" = "中"
+
+[context."Skiplist editor"]
+"Save" = "保存"
+
+[context."Storage savings"]
+"saved" = "已节省"
+
+[obsolete]
+"Custom list — {0} entries" = "自定义列表 — {0} 条"
+"Custom: {0} entries" = "自定义: {0} 条"
+"DB — {0} files" = "Wiki — {0} 个文件"
+"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "对于 Steam 游戏:\n根据数据库结果跳过文件\n\n对于非 Steam 文件夹:\n基于压缩估计跳过文件"
+"Global + DB — {0} files" = "全局 + Wiki — {0} 个文件"
+"Global — {0} files" = "全局 — {0} 个文件"
+"Global: {0} skipped" = "全局: 已跳过 {0}"
+"Language (Requires Restart)" = "语言 (需要重启)"
+"Language Changed" = "语言更改"
+"Language changed successfully. You may need to restart the application for all changes to take effect." = "语言更改成功。您可能需要重启应用程序以使所有更改生效。"
+"Last analysed" = "上次分析"
+"OK" = "好"
+"Off" = "关闭"
+"Results State" = "数据库状态"
+"Skip file types likely to compress poorly" = "跳过可能压缩效果不佳的文件类型"
+"Skip file types specified in settings" = "跳过设置中指定的文件类型"
+"Smart: {0} skipped" = "智能: 已跳过 {0}"
+"Welcome" = "欢迎"
+"decayed" = "已衰减"
+"files will be skipped" = "个文件将被跳过"
+"not configured" = "未配置"
diff --git a/CompactGUI/Services/ApplicationHostService.vb b/CompactGUI/Services/ApplicationHostService.vb
index acf8b16f..778ccc06 100644
--- a/CompactGUI/Services/ApplicationHostService.vb
+++ b/CompactGUI/Services/ApplicationHostService.vb
@@ -75,5 +75,9 @@ Public Class ApplicationHostService
Dim navigationWindow = DirectCast(sender, MainWindow)
navigationWindow.NavigationView.Navigate(GetType(HomePage))
+
+#If DEBUG Then
+ LazyTranslate.LocalisationCatalogueBuilder.Build(sourceCulture:="en-AU")
+#End If
End Sub
-End Class
\ No newline at end of file
+End Class
diff --git a/CompactGUI/Services/CustomSnackBarService.vb b/CompactGUI/Services/CustomSnackBarService.vb
index 66d663a8..902273bb 100644
--- a/CompactGUI/Services/CustomSnackBarService.vb
+++ b/CompactGUI/Services/CustomSnackBarService.vb
@@ -20,7 +20,7 @@ Public Class CustomSnackBarService
Public Sub ShowCustom(message As UIElement, title As String, appearance As ControlAppearance, Optional icon As IconElement = Nothing, Optional timeout As TimeSpan = Nothing)
- If GetSnackbarPresenter() Is Nothing Then Throw New InvalidOperationException(LanguageHelper.GetString("SnackBar_SnackbarPresenter")) 'The SnackbarPresenter was never set
+ If GetSnackbarPresenter() Is Nothing Then Throw New InvalidOperationException("The SnackbarPresenter was never set".LT())
If _snackbar Is Nothing Then _snackbar = New Snackbar(GetSnackbarPresenter())
_snackbar.SetCurrentValue(Snackbar.TitleProperty, title)
@@ -52,20 +52,20 @@ Public Class CustomSnackBarService
Public Sub ShowInsufficientPermission(folderName As String)
Dim button = New Button With {
- .Content = LanguageHelper.GetString("SnackBar_RestartAdmin"), '"Restart as Admin"
+ .Content = "Restart as Admin".LT(),
.Command = New RelayCommand(Sub() RunAsAdmin(folderName)),
.Margin = New Thickness(-3, 10, 0, 0)
}
- ShowCustom(button, LanguageHelper.GetString("SnackBar_RestartAdminTip"), ControlAppearance.Danger, timeout:=TimeSpan.FromSeconds(60)) '"Insufficient permission to access this folder."
+ ShowCustom(button, "Insufficient permission to access this folder".LT(), ControlAppearance.Danger, timeout:=TimeSpan.FromSeconds(60))
End Sub
Public Sub ShowUpdateAvailable(newVersion As String, isPreRelease As Boolean)
Dim textBlock = New TextBlock
- textBlock.Text = LanguageHelper.GetString("SnackBar_UpdateDownload") '"Click to download"
+ textBlock.Text = "Click to download".LT()
' Show the custom snackbar
SnackbarServiceLog.ShowUpdateAvailable(logger, newVersion, isPreRelease)
- Dim title As String = String.Format(LanguageHelper.GetString("SnackBar_UpdateAvailable"), newVersion) 'Update Available ▸ Version {newVersion}
+ Dim title As String = "Update Available ▸ Version {0}".LTF(newVersion)
ShowCustom(textBlock, title, If(isPreRelease, ControlAppearance.Info, ControlAppearance.Success), timeout:=TimeSpan.FromSeconds(10))
Dim handler As MouseButtonEventHandler = Nothing
@@ -87,49 +87,49 @@ Public Class CustomSnackBarService
End Sub
Public Sub ShowFailedToSubmitToWiki()
- Show(LanguageHelper.GetString("SnackBar_SubmitWikiFailed"), LanguageHelper.GetString("SnackBar_SubmitWikiFailedTip"), Wpf.Ui.Controls.ControlAppearance.Danger, Nothing, TimeSpan.FromSeconds(5))
+ Show("Failed to submit to wiki".LT(), "Please check your internet connection and try again".LT(), Wpf.Ui.Controls.ControlAppearance.Danger, Nothing, TimeSpan.FromSeconds(5))
'"Failed to submit to wiki", "Please check your internet connection and try again"
SnackbarServiceLog.ShowFailedToSubmitToWiki(logger)
End Sub
Public Sub ShowSubmittedToWiki(steamsubmitdata As SteamSubmissionData, compressionMode As Integer)
Dim compressionName As String = [Enum].GetName(GetType(Core.WOFCompressionAlgorithm), Core.WOFHelper.WOFConvertCompressionLevel(compressionMode))
- Dim message As String = $"{LanguageHelper.GetString("SnackBar_SubmitWiki_UID")}: {steamsubmitdata.UID}{vbCrLf}" &
- $"{LanguageHelper.GetString("SnackBar_SubmitWiki_Game")}: {steamsubmitdata.GameName}{vbCrLf}" &
- $"{LanguageHelper.GetString("SnackBar_SubmitWiki_SteamID")}: {steamsubmitdata.SteamID}{vbCrLf}" &
- $"{LanguageHelper.GetString("SnackBar_SubmitWiki_Compression")}: {compressionName}"
+ Dim message As String = $"{"UID".LT()}: {steamsubmitdata.UID}{vbCrLf}" &
+ $"{"Game".LT()}: {steamsubmitdata.GameName}{vbCrLf}" &
+ $"{"SteamID".LT()}: {steamsubmitdata.SteamID}{vbCrLf}" &
+ $"{"Compression".LT()}: {compressionName}"
'Show("Submitted to wiki", $"UID: {0}{1}Game: {2}{1}SteamID: {3}{1}Compression: {4}
- Show(LanguageHelper.GetString("SnackBar_SubmitWikiTitle"), message, Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(10))
+ Show("Submitted to wiki".LT(), message, Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(10))
SnackbarServiceLog.ShowSubmittedToWiki(logger, steamsubmitdata.UID, steamsubmitdata.GameName, steamsubmitdata.SteamID, steamsubmitdata.CompressionMode)
End Sub
Public Sub ShowAppliedToAllFolders()
- Show(LanguageHelper.GetString("SnackBar_AppliedAllFolders"), LanguageHelper.GetString("SnackBar_AppliedAllFoldersTip"), Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(5))
+ Show("Applied to all folders".LT(), "Compression options have been applied to all folders".LT(), Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(5))
'"Applied to all folders", "Compression options have been applied to all folders"
SnackbarServiceLog.ShowAppliedToAllFolders(logger)
End Sub
Public Sub ShowCannotRemoveFolder()
- Show(LanguageHelper.GetString("SnackBar_CannotRemoveFolder"), LanguageHelper.GetString("SnackBar_CannotRemoveFolderTip"), Wpf.Ui.Controls.ControlAppearance.Caution, Nothing, TimeSpan.FromSeconds(5))
+ Show("Cannot remove folder".LT(), "Please wait until the current operation is finished".LT(), Wpf.Ui.Controls.ControlAppearance.Caution, Nothing, TimeSpan.FromSeconds(5))
'"Cannot remove folder", "Please wait until the current operation is finished"
SnackbarServiceLog.ShowCannotRemoveFolder(logger)
End Sub
Public Sub ShowAddedToQueue()
- Show(LanguageHelper.GetString("SnackBar_Success"), LanguageHelper.GetString("SnackBar_SuccessTip"), Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(5))
+ Show("Success".LT(), "Added to Queue".LT(), Wpf.Ui.Controls.ControlAppearance.Success, Nothing, TimeSpan.FromSeconds(5))
'"Success", "Added to Queue"
SnackbarServiceLog.ShowAddedToQueue(logger)
End Sub
Public Sub ShowDirectStorageWarning(displayName As String)
Show(displayName,
- LanguageHelper.GetString("SnackBar_DirectStorageTechnology"),
+ "This game uses DirectStorage technology. If you are using this feature, you should not compress this game.".LT(),
Wpf.Ui.Controls.ControlAppearance.Info,
Nothing,
TimeSpan.FromSeconds(20))
'"This game uses DirectStorage technology. If you are using this feature, you should not compress this game.",
SnackbarServiceLog.ShowDirectStorageWarning(logger, displayName)
End Sub
-End Class
\ No newline at end of file
+End Class
diff --git a/CompactGUI/Services/LocalisationService.vb b/CompactGUI/Services/LocalisationService.vb
new file mode 100644
index 00000000..f482d366
--- /dev/null
+++ b/CompactGUI/Services/LocalisationService.vb
@@ -0,0 +1,43 @@
+Imports System.IO
+
+Imports CompactGUI.Core.Settings
+
+Imports LazyTranslate
+
+Public NotInheritable Class LocalisationService
+
+ Public Const DefaultCulture As String = "en-AU"
+
+ Private ReadOnly _settingsService As ISettingsService
+
+ Public Sub New(settingsService As ISettingsService)
+ _settingsService = settingsService
+ End Sub
+
+ Public Async Function InitializeAsync() As Task
+ Dim configuredLanguage = _settingsService.AppSettings.Language
+
+ If String.Equals(configuredLanguage, "en-US", StringComparison.OrdinalIgnoreCase) Then
+ configuredLanguage = DefaultCulture
+ _settingsService.AppSettings.Language = DefaultCulture
+ _settingsService.SaveSettings()
+ End If
+
+ Await LazyTranslate.InitialiseAsync(New LocalisationOptions With {
+ .SourceCulture = DefaultCulture,
+ .InitialCulture = configuredLanguage,
+ .CatalogueDirectory = Path.Combine(_settingsService.DataFolder.FullName, "Localisation"),
+ .ResourceAssembly = GetType(Application).Assembly,
+ .ApplicationName = "CompactGUI"
+ })
+ End Function
+
+ Public Function LoadLanguage(languageCode As String) As Boolean
+ If Not L.TryLoadLanguage(languageCode) Then Return False
+
+ _settingsService.AppSettings.Language = languageCode
+ _settingsService.SaveSettings()
+ Return True
+ End Function
+
+End Class
diff --git a/CompactGUI/Services/WindowService.vb b/CompactGUI/Services/WindowService.vb
index 764aefe4..a4d70ab4 100644
--- a/CompactGUI/Services/WindowService.vb
+++ b/CompactGUI/Services/WindowService.vb
@@ -33,8 +33,8 @@ Public Class WindowService
.Title = title,
.Content = content,
.IsPrimaryButtonEnabled = True,
- .PrimaryButtonText = LanguageHelper.GetString("UniYes"),
- .CloseButtonText = LanguageHelper.GetString("UniCancel")
+ .PrimaryButtonText = "Yes".LT(),
+ .CloseButtonText = "Cancel".LT()
}
Dim result = Await msgBox.ShowDialogAsync()
Return result = Wpf.Ui.Controls.MessageBoxResult.Primary
diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb
index 6f02eed2..ad08714d 100644
--- a/CompactGUI/ViewModels/FolderViewModel.vb
+++ b/CompactGUI/ViewModels/FolderViewModel.vb
@@ -61,9 +61,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
Get
If Folder.AnalysisResults Is Nothing OrElse
Not Folder.AnalysisResults.Any(Function(x) x.CompressionMode <> Core.WOFCompressionAlgorithm.NO_COMPRESSION) Then
- Return LanguageHelper.GetString("Status_NotCompressed") 'Not Compressed
+ Return "Not Compressed".LT()
End If
- Return LanguageHelper.GetString("Status_Compressed") 'Compressed
+ Return "Compressed".LT()
End Get
End Property
diff --git a/CompactGUI/ViewModels/MainWindowViewModel.vb b/CompactGUI/ViewModels/MainWindowViewModel.vb
index ffcd00cd..bf6f914c 100644
--- a/CompactGUI/ViewModels/MainWindowViewModel.vb
+++ b/CompactGUI/ViewModels/MainWindowViewModel.vb
@@ -39,8 +39,8 @@ Partial Public Class MainWindowViewModel : Inherits ObservableRecipient : Implem
Private Async Function NotifyIconExit() As Task
If _watcher.WatchedFolders.Count = 0 Then Application.Current.Shutdown()
- Dim message As String = String.Format(LanguageHelper.GetString("MessageBox_ExitText"), _watcher.WatchedFolders.Count)
- Dim confirmed = Await _windowService.ShowMessageBox(LanguageHelper.GetString("Title_CompactGUI"), message)
+ Dim message = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?".LTF(_watcher.WatchedFolders.Count, vbCrLf)
+ Dim confirmed = Await _windowService.ShowMessageBox("CompactGUI".LT(), message)
If Not confirmed Then Return
_watcher.WriteToFile()
Application.Current.Shutdown()
diff --git a/CompactGUI/ViewModels/SettingsViewModel.vb b/CompactGUI/ViewModels/SettingsViewModel.vb
index 377abf35..1f06a630 100644
--- a/CompactGUI/ViewModels/SettingsViewModel.vb
+++ b/CompactGUI/ViewModels/SettingsViewModel.vb
@@ -16,19 +16,24 @@ Imports Coravel.Scheduling.Schedule.Interfaces
Imports Microsoft.Extensions.Logging
+Imports LazyTranslate
+
Public NotInheritable Class SettingsViewModel : Inherits ObservableObject
Private ReadOnly _logger As ILogger(Of Settings)
Private ReadOnly _settingsService As ISettingsService
+ Private ReadOnly _localisationService As LocalisationService
Public ReadOnly Property AppSettings As Settings
- Public Sub New(settingsService As ISettingsService, logger As ILogger(Of Settings))
+ Public Sub New(settingsService As ISettingsService, logger As ILogger(Of Settings), localisationService As LocalisationService)
Me._logger = logger
_settingsService = settingsService
+ _localisationService = localisationService
AppSettings = settingsService.AppSettings
+ LanguageItems = LazyTranslate.GetAvailableLanguages()
AddHandler AppSettings.PropertyChanged, AddressOf SettingsPropertyChanged
End Sub
@@ -153,12 +158,17 @@ Public NotInheritable Class SettingsViewModel : Inherits ObservableObject
Public Property OpenGitHubCommand As ICommand = New RelayCommand(Sub() Process.Start(New ProcessStartInfo("https://github.com/IridiumIO/CompactGUI") With {.UseShellExecute = True}))
Public Property OpenKoFiCommand As ICommand = New RelayCommand(Sub() Process.Start(New ProcessStartInfo("https://ko-fi.com/IridiumIO") With {.UseShellExecute = True}))
- Public Property LanguageItems As New List(Of LanguageItem) From {
- New LanguageItem With {.Name = "English", .CultureCode = "en-US", .ISOCountryCode = "US"},
- New LanguageItem With {.Name = "Русский", .CultureCode = "ru-RU", .ISOCountryCode = "RU"},
- New LanguageItem With {.Name = "简体中文", .CultureCode = "zh-CN", .ISOCountryCode = "CN"},
- New LanguageItem With {.Name = "Español", .CultureCode = "es-ES", .ISOCountryCode = "ES"}
- }
+ Public Property LanguageItems As List(Of LanguageItem)
+
+ Public ReadOnly Property CurrentLanguage As String
+ Get
+ Return L.CurrentCulture.Name
+ End Get
+ End Property
+
+ Public Function LoadLanguage(languageCode As String) As Boolean
+ Return _localisationService.LoadLanguage(languageCode)
+ End Function
End Class
diff --git a/CompactGUI/Views/Components/CompressionMode_Radio.xaml b/CompactGUI/Views/Components/CompressionMode_Radio.xaml
index 85dfc359..dcce8b3f 100644
--- a/CompactGUI/Views/Components/CompressionMode_Radio.xaml
+++ b/CompactGUI/Views/Components/CompressionMode_Radio.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
x:Name="Root"
@@ -41,8 +42,7 @@
-
@@ -279,3 +278,4 @@
+
diff --git a/CompactGUI/Views/Components/FolderWatcherCard.xaml b/CompactGUI/Views/Components/FolderWatcherCard.xaml
index a408c107..dba6d26a 100644
--- a/CompactGUI/Views/Components/FolderWatcherCard.xaml
+++ b/CompactGUI/Views/Components/FolderWatcherCard.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
@@ -40,10 +41,9 @@
-
+
-
@@ -73,7 +72,7 @@
HorizontalAlignment="Left" VerticalAlignment="Top"
FontSize="18" FontWeight="SemiBold" Foreground="#40FFFFFF">
-
+
-
-
-
-
-
-
-
+ d:Text="Last analysed: just now" FontSize="14" FontWeight="SemiBold" Foreground="#40FFFFFF"
+ Text="{loc:Binding Watcher.LastAnalysed, Format={}Last analysed {0}, Converter={StaticResource RelativeDateConverter}}" />
-
@@ -116,13 +109,13 @@
HorizontalAlignment="Right"
Orientation="Horizontal">
-
-
@@ -246,29 +239,12 @@
-
-
-
-
-
-
-
+ d:Text="7% decayed" FontSize="12" Foreground="#FFBFC7CE"
+ Text="{loc:Binding DecayPercentage, Format={}{0}% decayed, Converter={StaticResource DecimalToPercentageConverter}}" />
-
-
-
-
-
-
-
-
-
-
-
-
+ d:Text="39GB saved" FontSize="12" Foreground="#FFBFC7CE" Visibility="Collapsed"
+ Text="{loc:Binding SavedSpace, Format={}{0} saved, Converter={StaticResource BytesToReadableConverter}, ConverterParameter=0}" />
-
+
-
+
@@ -304,8 +278,8 @@
-
@@ -328,8 +302,8 @@
-
@@ -343,8 +317,8 @@
-
diff --git a/CompactGUI/Views/Pages/DatabasePage.xaml b/CompactGUI/Views/Pages/DatabasePage.xaml
index c8ce95d3..4b8ea580 100644
--- a/CompactGUI/Views/Pages/DatabasePage.xaml
+++ b/CompactGUI/Views/Pages/DatabasePage.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DataContext="{d:DesignInstance Type=local:DatabaseViewModel}"
@@ -18,21 +19,15 @@
-
-
-
-
-
-
+ FontSize="12" Foreground="#10FFFFFF"
+ Text="{loc:Binding LastUpdatedDatabase, Format={}Last Fetched: {0:dd MMM yyyy HH:mm:ss}}" />
-->
-
+
@@ -65,38 +59,38 @@
Height="36"
Margin="20 0 0 0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
Foreground="{StaticResource LabelForeground}">
-
+
-
@@ -193,29 +187,27 @@
-
+ loc:L.Value="Mode" />
+ loc:L.Context="Compression size"
+ loc:L.Value="Before" />
+ loc:L.Context="Compression size"
+ loc:L.Value="After" />
+ loc:L.Value="Savings" />
+ loc:L.Value="Total Results" />
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 778b0d90..51e67b4d 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DataContext="{d:DesignInstance Type=local:FolderViewModel}"
@@ -105,7 +106,7 @@
Visibility="{Binding Folder.IsDirectStorage, Converter={StaticResource BoolToVisConverter}}">
-
+
@@ -118,16 +119,14 @@
TextTrimming="WordEllipsis" />
-
+
-
+
@@ -213,3 +212,4 @@
+
diff --git a/CompactGUI/Views/Pages/HomePage.xaml b/CompactGUI/Views/Pages/HomePage.xaml
index 0a6cdd47..b64d9713 100644
--- a/CompactGUI/Views/Pages/HomePage.xaml
+++ b/CompactGUI/Views/Pages/HomePage.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CompactGUI"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" Background="Transparent"
x:Name="Root" Title="HomePage" AllowDrop="True" DragOver="Root_DragOver" Drop="Root_Drop"
@@ -14,8 +15,7 @@
-
-
+
@@ -62,10 +62,10 @@
Margin="0,-90,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"
Visibility="{Binding HomeViewIsFresh, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
-
+
-
+
@@ -112,7 +112,7 @@
+ Margin="15,2,15,10"
+ NavigationCacheMode="Disabled"
+ Tag="{Binding}"
+ TargetPageType="{x:Type local:DatabasePage}">
+
+
+
+
+
+
@@ -177,9 +187,8 @@
+ Margin="20,16" HorizontalAlignment="Left"
+ d:Visibility="Visible" FontSize="14" Visibility="Collapsed">
@@ -211,10 +220,17 @@
-
-
-
-
+
+
+
+
diff --git a/CompactGUI/Models/NewModels/SteamACFParser.vb b/CompactGUI/Models/NewModels/SteamACFParser.vb
index 1ba7fd75..41f24d32 100644
--- a/CompactGUI/Models/NewModels/SteamACFParser.vb
+++ b/CompactGUI/Models/NewModels/SteamACFParser.vb
@@ -49,7 +49,7 @@ Public Class SteamACFParser
Return TryCast(SteamLibraryCache.Get(steamAppsFolder.FullName), Dictionary(Of String, SteamACFResult?))
End Function
- Private Shared Function LookupAllSteamGames(steamAppsFolder As IO.DirectoryInfo) As Dictionary(Of String, SteamACFResult?)
+ Public Shared Function LookupAllSteamGames(steamAppsFolder As IO.DirectoryInfo) As Dictionary(Of String, SteamACFResult?)
Dim allGames As New Dictionary(Of String, SteamACFResult?)
For Each fl In steamAppsFolder.EnumerateFiles("*.acf").Where(Function(f) f.Length > 0)
@@ -72,7 +72,13 @@ Public Class SteamACFParser
Dim appID = CInt(ACFFile.Value.Item("appid").ToString)
Dim sName = ACFFile.Value.Item("name").ToString
Dim sInstallDir = ACFFile.Value.Item("installdir").ToString
- Return New SteamACFResult With {.AppID = appID, .GameName = sName, .InstallDirectory = sInstallDir}
+ Dim stateFlags As Long
+ Dim lastUpdatedUnix As Long
+ Long.TryParse(ACFFile.Value.Item("StateFlags")?.ToString, stateFlags)
+ Long.TryParse(ACFFile.Value.Item("LastUpdated")?.ToString, lastUpdatedUnix)
+
+ Dim lastUpdated = If(lastUpdatedUnix > 0, DateTimeOffset.FromUnixTimeSeconds(lastUpdatedUnix).LocalDateTime, DateTime.MinValue)
+ Return New SteamACFResult With {.AppID = appID, .GameName = sName, .InstallDirectory = sInstallDir, .LastUpdated = lastUpdated, .HasPendingUpdate = (stateFlags And 2) <> 0}
End Function
@@ -82,6 +88,8 @@ Public Structure SteamACFResult
Public AppID As Integer
Public GameName As String
Public InstallDirectory As String
+ Public LastUpdated As DateTime
+ Public HasPendingUpdate As Boolean
' Special placeholder for "no result"
Public Shared ReadOnly NoResult As New SteamACFResult With {
@@ -90,4 +98,4 @@ Public Structure SteamACFResult
.InstallDirectory = String.Empty
}
-End Structure
\ No newline at end of file
+End Structure
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
new file mode 100644
index 00000000..321279fc
--- /dev/null
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -0,0 +1,634 @@
+Imports System.Collections.ObjectModel
+Imports System.ComponentModel
+Imports System.IO
+Imports System.Threading
+
+Imports CommunityToolkit.Mvvm.ComponentModel
+Imports CommunityToolkit.Mvvm.Input
+
+Imports Gameloop.Vdf
+Imports Gameloop.Vdf.JsonConverter
+
+Public Class SteamMonitorViewModel : Inherits ObservableObject
+
+ Private ReadOnly _wikiService As IWikiService
+ Private ReadOnly _watcher As Watcher.Watcher
+ Private ReadOnly _operationGate As New SemaphoreSlim(1, 1)
+ Private _hasLoaded As Boolean
+ Private _isLoading As Boolean
+ Private _errorMessage As String
+ Private _searchText As String
+
+ Public ReadOnly Property SteamGamesData As New ObservableCollection(Of SteamDetailedResult)
+ Public ReadOnly Property FilteredSteamGames As ICollectionView
+
+ Public Property SearchText As String
+ Get
+ Return _searchText
+ End Get
+ Set(value As String)
+ If Not SetProperty(_searchText, value) Then Return
+ FilteredSteamGames.Refresh()
+ End Set
+ End Property
+
+ Public Property IsLoading As Boolean
+ Get
+ Return _isLoading
+ End Get
+ Private Set(value As Boolean)
+ If _isLoading = value Then Return
+ _isLoading = value
+ OnPropertyChanged()
+ OnPropertyChanged(NameOf(HasNoGames))
+ End Set
+ End Property
+
+ Public Property ErrorMessage As String
+ Get
+ Return _errorMessage
+ End Get
+ Private Set(value As String)
+ If _errorMessage = value Then Return
+ _errorMessage = value
+ OnPropertyChanged()
+ OnPropertyChanged(NameOf(HasError))
+ End Set
+ End Property
+
+ Public ReadOnly Property HasError As Boolean
+ Get
+ Return Not String.IsNullOrWhiteSpace(ErrorMessage)
+ End Get
+ End Property
+
+ Public ReadOnly Property HasNoGames As Boolean
+ Get
+ Return _hasLoaded AndAlso Not IsLoading AndAlso SteamGamesData.Count = 0
+ End Get
+ End Property
+
+ Public ReadOnly Property CompressCommand As IAsyncRelayCommand(Of SteamDetailedResult)
+ Public ReadOnly Property UncompressCommand As IAsyncRelayCommand(Of SteamDetailedResult)
+ Public ReadOnly Property SortCommand As IRelayCommand(Of Object)
+
+ Public Sub New(wikiService As IWikiService, watcher As Watcher.Watcher)
+ _wikiService = wikiService
+ _watcher = watcher
+ FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData)
+ FilteredSteamGames.Filter = AddressOf FilterGames
+ CompressCommand = New AsyncRelayCommand(Of SteamDetailedResult)(AddressOf CompressGameAsync)
+ UncompressCommand = New AsyncRelayCommand(Of SteamDetailedResult)(AddressOf UncompressGameAsync)
+ SortCommand = New RelayCommand(Of Object)(AddressOf SortGames)
+ End Sub
+
+ Private Function FilterGames(value As Object) As Boolean
+ If String.IsNullOrWhiteSpace(SearchText) Then Return True
+
+ Dim game = TryCast(value, SteamDetailedResult)
+ If game Is Nothing Then Return False
+
+ Dim search = SearchText.Trim()
+ Dim normalizedSearch = NormalizeSearchText(search)
+ Return game.GameName.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0 OrElse NormalizeSearchText(game.GameName).Contains(normalizedSearch) OrElse game.AppID.ToString().Contains(search)
+ End Function
+
+ Private Shared Function NormalizeSearchText(value As String) As String
+ If String.IsNullOrEmpty(value) Then Return String.Empty
+ Return New String(value.Where(Function(character) Char.IsLetterOrDigit(character) OrElse Char.IsWhiteSpace(character)).ToArray()).ToLowerInvariant()
+ End Function
+
+ Private Sub SortGames(parameter As Object)
+ FilteredSteamGames.SortDescriptions.Clear()
+
+ Select Case parameter?.ToString()
+ Case "GameNameAsc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Ascending))
+ Case "GameNameDesc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Descending))
+ Case "StatusAsc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Ascending))
+ Case "StatusDesc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Descending))
+ Case "CurrentSizeAsc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Ascending))
+ Case "CurrentSizeDesc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Descending))
+ Case "SavingsAsc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Ascending))
+ Case "SavingsDesc"
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Descending))
+ End Select
+ End Sub
+
+ Public Async Function LoadGamesAsync() As Task
+ If _hasLoaded OrElse IsLoading Then Return
+
+ IsLoading = True
+ ErrorMessage = Nothing
+
+ Try
+ Dim games = Await Task.Run(AddressOf GetInstalledSteamGames)
+ Dim databaseResults As List(Of DatabaseCompressionResult)
+
+ Try
+ databaseResults = Await _wikiService.GetAllDatabaseCompressionResultsAsync()
+ Catch ex As Exception
+ databaseResults = New List(Of DatabaseCompressionResult)
+ ErrorMessage = $"Compression recommendations could not be loaded: {ex.Message}"
+ End Try
+
+ Dim databaseByAppId = databaseResults.GroupBy(Function(result) result.SteamID).ToDictionary(Function(group) group.Key, Function(group) group.First())
+
+ For Each game In games.OrderBy(Function(item) item.GameName)
+ If Not Directory.Exists(game.InstallDirectory) Then Continue For
+
+ Dim databaseResult As DatabaseCompressionResult = Nothing
+ databaseByAppId.TryGetValue(game.AppID, databaseResult)
+
+ Dim watchedFolder = _watcher.WatchedFolders.FirstOrDefault(Function(folder) String.Equals(folder.Folder, game.InstallDirectory, StringComparison.OrdinalIgnoreCase))
+ Dim detailedResult = CreateDetailedResult(game, databaseResult, watchedFolder)
+ Await AnalyseGameAsync(detailedResult)
+ If detailedResult.CurrentFolderSize > 0 Then SteamGamesData.Add(detailedResult)
+ Next
+ Catch ex As Exception
+ ErrorMessage = $"Steam games could not be loaded: {ex.Message}"
+ Finally
+ _hasLoaded = True
+ IsLoading = False
+ End Try
+ End Function
+
+ Private Shared Function CreateDetailedResult(game As SteamACFResult, databaseResult As DatabaseCompressionResult, watchedFolder As Watcher.WatchedFolder) As SteamDetailedResult
+ Dim wikiResults As WikiCompressionResults = Nothing
+ Dim poorlyCompressedFiles As New List(Of String)
+
+ If databaseResult IsNot Nothing Then
+ wikiResults = New WikiCompressionResults(New List(Of CompressionResult)) With {
+ .XPress4K = databaseResult.Result_X4K,
+ .XPress8K = databaseResult.Result_X8K,
+ .XPress16K = databaseResult.Result_X16K,
+ .LZX = databaseResult.Result_LZX
+ }
+
+ poorlyCompressedFiles = databaseResult.PoorlyCompressedExtensions?.Where(Function(item) item.Count > 100 AndAlso Not String.IsNullOrWhiteSpace(item.Extension)).Select(Function(item) item.Extension).ToList()
+ If poorlyCompressedFiles Is Nothing Then poorlyCompressedFiles = New List(Of String)
+ End If
+
+ Return New SteamDetailedResult(game.GameName, game.InstallDirectory, game.AppID, game.LastUpdated, game.HasPendingUpdate, watchedFolder?.LastCompressedDate, wikiResults, poorlyCompressedFiles)
+ End Function
+
+ Private Shared Async Function AnalyseGameAsync(game As SteamDetailedResult) As Task
+ Dim analyser As New Core.Analyser(game.GamePath)
+
+ Try
+ Await analyser.AnalyseFolder(CancellationToken.None)
+ game.UpdateAnalysis(analyser.UncompressedBytes, analyser.CompressedBytes, analyser.ContainsCompressedFiles)
+ Finally
+ analyser.FileCompressionDetailsList.Clear()
+ End Try
+ End Function
+
+ Private Async Function CompressGameAsync(game As SteamDetailedResult) As Task
+ If game Is Nothing OrElse Not game.CanCompress Then Return
+ Await RunGameOperationAsync(game, False)
+ End Function
+
+ Private Async Function UncompressGameAsync(game As SteamDetailedResult) As Task
+ If game Is Nothing OrElse Not game.CanUncompress Then Return
+ Await RunGameOperationAsync(game, True)
+ End Function
+
+ Private Async Function RunGameOperationAsync(game As SteamDetailedResult, uncompress As Boolean) As Task
+
+ Await _operationGate.WaitAsync()
+ Try
+ If (uncompress AndAlso Not game.CanUncompress) OrElse (Not uncompress AndAlso Not game.CanCompress) Then Return
+ game.SetWorking(True, If(uncompress, "Uncompressing...", "Compressing..."))
+ Await RunFolderOperationAsync(game, uncompress)
+ Catch ex As Exception
+ game.SetWorking(False, $"Operation failed: {ex.Message}")
+ Finally
+ _operationGate.Release()
+ End Try
+ End Function
+
+ Private Async Function RunFolderOperationAsync(game As SteamDetailedResult, uncompress As Boolean) As Task
+ Dim folder As New StandardFolder(game.GamePath)
+ Dim backgroundingDisabled As Boolean
+ Dim sleepPrevented As Boolean
+ Dim operationException As Exception = Nothing
+
+ Try
+ Await _watcher.DisableBackgrounding()
+ backgroundingDisabled = True
+ Core.SharedMethods.PreventSleep()
+ sleepPrevented = True
+
+ folder.WikiPoorlyCompressedFiles = game.WikiPoorlyCompressedFiles
+ Dim analysisResult = Await folder.AnalyseFolderAsync()
+ If analysisResult = -1 Then Throw New UnauthorizedAccessException("CompactGUI does not have permission to modify this folder.")
+
+ Dim isCurrentlyCompressed = folder.AnalysisResults.Any(Function(file) file.CompressionMode <> Core.WOFCompressionAlgorithm.NO_COMPRESSION)
+ Dim succeeded As Boolean
+
+ If uncompress Then
+ If Not isCurrentlyCompressed Then Throw New InvalidOperationException("This game is not currently compressed.")
+ succeeded = Await folder.UncompressFolder()
+ Else
+ If Not game.RecommendedCompressionMode.HasValue Then Throw New InvalidOperationException("This game does not have a compression recommendation.")
+ folder.CompressionOptions.SelectedCompressionMode = game.RecommendedCompressionMode.Value
+ succeeded = Await folder.CompressFolder()
+ Await folder.AnalyseFolderAsync()
+ End If
+
+ game.UpdateAnalysis(folder.UncompressedBytes, folder.CompressedBytes, folder.AnalysisResults.Any(Function(file) file.CompressionMode <> Core.WOFCompressionAlgorithm.NO_COMPRESSION))
+
+ If folder.Analyser IsNot Nothing Then
+ Dim completedAnalyser = folder.Analyser
+ _watcher.UpdateWatched(folder.FolderName, completedAnalyser, Not uncompress AndAlso succeeded)
+ End If
+
+ If succeeded AndAlso Not uncompress Then game.SetLastCompactGuiUpdate(DateTime.Now)
+ If Not succeeded Then game.SetStatus("The operation did not complete successfully.")
+ Catch ex As Exception
+ operationException = ex
+ Finally
+ folder.AnalysisResults?.Clear()
+ folder.Analyser?.FileCompressionDetailsList.Clear()
+ folder.Analyser = Nothing
+ folder.Compressor = Nothing
+ If sleepPrevented Then Core.SharedMethods.RestoreSleep()
+ game.SetWorking(False)
+ End Try
+
+ If backgroundingDisabled Then Await _watcher.EnableBackgrounding()
+ If operationException IsNot Nothing Then Throw operationException
+ End Function
+
+ Private Shared Function GetInstalledSteamGames() As List(Of SteamACFResult)
+ Dim steamFolder = GetSteamFolderFromRegistry()
+ If steamFolder Is Nothing Then Return New List(Of SteamACFResult)
+
+ Dim games As New List(Of SteamACFResult)
+ For Each library In GetSteamLibraries(steamFolder)
+ For Each entry In SteamACFParser.LookupAllSteamGames(New DirectoryInfo(library.Path)).Values
+ If Not entry.HasValue Then Continue For
+
+ Dim game = entry.Value
+ game.InstallDirectory = Path.Combine(library.Path, "common", game.InstallDirectory)
+ games.Add(game)
+ Next
+ Next
+
+ Return games.GroupBy(Function(game) game.InstallDirectory, StringComparer.OrdinalIgnoreCase).Select(Function(group) group.First()).ToList()
+ End Function
+
+ Private Shared Function GetSteamFolderFromRegistry() As DirectoryInfo
+ Using regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Valve\Steam")
+ Dim steamPath = TryCast(regKey?.GetValue("SteamPath"), String)
+ If String.IsNullOrWhiteSpace(steamPath) Then Return Nothing
+ Return New DirectoryInfo(steamPath)
+ End Using
+ End Function
+
+ Private Shared Function GetSteamLibraries(steamFolder As DirectoryInfo) As List(Of SteamLibraryACFEntry)
+ Dim results As New List(Of SteamLibraryACFEntry)
+ Dim knownPaths As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase)
+ Dim primarySteamAppsPath = Path.Combine(steamFolder.FullName, "steamapps")
+
+ AddSteamLibrary(results, knownPaths, primarySteamAppsPath)
+
+ Dim libraryVdfPath = Path.Combine(primarySteamAppsPath, "libraryfolders.vdf")
+ If Not File.Exists(libraryVdfPath) Then Return results
+
+ Dim libraryVdf = VdfConvert.Deserialize(File.ReadAllText(libraryVdfPath))
+ Dim libraries = libraryVdf.Value.ToJson().ToObject(Of Dictionary(Of String, RawSteamLibraryEntry))()
+
+ For Each library In libraries.Values
+ If library IsNot Nothing AndAlso Not String.IsNullOrWhiteSpace(library.Path) Then AddSteamLibrary(results, knownPaths, Path.Combine(library.Path, "steamapps"))
+ Next
+
+ Return results
+ End Function
+
+ Private Shared Sub AddSteamLibrary(results As List(Of SteamLibraryACFEntry), knownPaths As HashSet(Of String), steamAppsPath As String)
+ If Not Directory.Exists(steamAppsPath) OrElse Not knownPaths.Add(steamAppsPath) Then Return
+ results.Add(New SteamLibraryACFEntry With {.Path = steamAppsPath})
+ End Sub
+
+ Private Class RawSteamLibraryEntry
+ Public Property Path As String
+ End Class
+
+End Class
+
+Public Class SteamLibraryACFEntry
+ Public Property Path As String
+End Class
+
+Public Enum SteamGameStatus
+ Compressed
+ Uncompressed
+ RecentlyUpdated
+ PendingSteamUpdate
+End Enum
+
+Public Class SteamDetailedResult : Inherits ObservableObject
+
+ Private Const MinimumUsefulSaving As Double = 0.05
+ Private Const MaximumIncrementalSaving As Double = 0.02
+
+ Private _uncompressedBytes As Long
+ Private _currentFolderSize As Long
+ Private _isCompressed As Boolean
+ Private ReadOnly _lastSteamUpdate As DateTime
+ Private _lastCompactGuiUpdate As DateTime?
+ Private ReadOnly _hasPendingSteamUpdate As Boolean
+ Private _status As SteamGameStatus
+ Private _recommendedCompressionMode As Core.CompressionMode?
+ Private _recommendedAction As String
+ Private _expectedCompressionSavings As Long
+ Private _hasCompressionEstimate As Boolean
+ Private _isWorking As Boolean
+ Private _operationMessage As String
+
+ Public ReadOnly Property GameName As String
+ Public ReadOnly Property GamePath As String
+ Public ReadOnly Property AppID As Integer
+ Public ReadOnly Property WikiCompressionResults As WikiCompressionResults
+ Public ReadOnly Property WikiPoorlyCompressedFiles As List(Of String)
+ Public ReadOnly Property SelectCompressionModeCommand As IRelayCommand(Of Core.CompressionMode)
+
+ Public ReadOnly Property DisplayPath As String
+ Get
+ Return New DirectoryInfo(GamePath).Parent?.Parent?.Parent?.FullName
+ End Get
+ End Property
+
+ Public ReadOnly Property CurrentFolderSize As Long
+ Get
+ Return _currentFolderSize
+ End Get
+ End Property
+
+ Public ReadOnly Property IsCompressed As Boolean
+ Get
+ Return _isCompressed
+ End Get
+ End Property
+
+ Public ReadOnly Property Status As SteamGameStatus
+ Get
+ Return _status
+ End Get
+ End Property
+
+ Public ReadOnly Property StatusMessage As String
+ Get
+ Select Case Status
+ Case SteamGameStatus.Compressed
+ Return "Compressed"
+ Case SteamGameStatus.Uncompressed
+ Return "Uncompressed"
+ Case SteamGameStatus.RecentlyUpdated
+ Return "Recently updated"
+ Case SteamGameStatus.PendingSteamUpdate
+ Return "Pending update"
+ Case Else
+ Return "Unknown"
+ End Select
+ End Get
+ End Property
+
+ Public ReadOnly Property RecommendedCompressionMode As Core.CompressionMode?
+ Get
+ Return _recommendedCompressionMode
+ End Get
+ End Property
+
+ Public ReadOnly Property RecommendedAction As String
+ Get
+ Return _recommendedAction
+ End Get
+ End Property
+
+ Public ReadOnly Property ExpectedCompressionSavings As Long
+ Get
+ Return _expectedCompressionSavings
+ End Get
+ End Property
+
+ Public ReadOnly Property DisplayedSavings As Long
+ Get
+ If IsDisplayingActualSavings Then Return Math.Max(0, _uncompressedBytes - CurrentFolderSize)
+ Return ExpectedCompressionSavings
+ End Get
+ End Property
+
+ Public ReadOnly Property IsDisplayingActualSavings As Boolean
+ Get
+ Return IsCompressed AndAlso Status <> SteamGameStatus.RecentlyUpdated
+ End Get
+ End Property
+
+ Public ReadOnly Property HasSavingsData As Boolean
+ Get
+ Return IsDisplayingActualSavings OrElse HasCompressionEstimate
+ End Get
+ End Property
+
+ Public ReadOnly Property HasCompressionEstimate As Boolean
+ Get
+ Return _hasCompressionEstimate
+ End Get
+ End Property
+
+ Public Property IsWorking As Boolean
+ Get
+ Return _isWorking
+ End Get
+ Private Set(value As Boolean)
+ If _isWorking = value Then Return
+ _isWorking = value
+ OnPropertyChanged()
+ OnPropertyChanged(NameOf(CanCompress))
+ OnPropertyChanged(NameOf(CanUncompress))
+ End Set
+ End Property
+
+ Public ReadOnly Property OperationMessage As String
+ Get
+ Return _operationMessage
+ End Get
+ End Property
+
+ Public ReadOnly Property HasOperationMessage As Boolean
+ Get
+ Return Not String.IsNullOrWhiteSpace(OperationMessage)
+ End Get
+ End Property
+
+ Public ReadOnly Property CanCompress As Boolean
+ Get
+ Return Not IsWorking AndAlso Status <> SteamGameStatus.PendingSteamUpdate AndAlso RecommendedCompressionMode.HasValue AndAlso (Not IsCompressed OrElse Status = SteamGameStatus.RecentlyUpdated)
+ End Get
+ End Property
+
+ Public ReadOnly Property CanUncompress As Boolean
+ Get
+ Return Not IsWorking AndAlso IsCompressed
+ End Get
+ End Property
+
+ Public Sub New(gameName As String, gamePath As String, appId As Integer, lastSteamUpdate As DateTime, hasPendingSteamUpdate As Boolean, lastCompactGuiUpdate As DateTime?, wikiResults As WikiCompressionResults, poorlyCompressedFiles As List(Of String))
+ Me.GameName = gameName
+ Me.GamePath = gamePath
+ Me.AppID = appId
+ _lastSteamUpdate = lastSteamUpdate
+ _hasPendingSteamUpdate = hasPendingSteamUpdate
+ _lastCompactGuiUpdate = lastCompactGuiUpdate
+ Me.WikiCompressionResults = wikiResults
+ Me.WikiPoorlyCompressedFiles = poorlyCompressedFiles
+ SelectCompressionModeCommand = New RelayCommand(Of Core.CompressionMode)(AddressOf SelectCompressionMode)
+ End Sub
+
+ Public Sub UpdateAnalysis(uncompressedBytes As Long, currentFolderSize As Long, isCompressed As Boolean)
+ _uncompressedBytes = uncompressedBytes
+ _currentFolderSize = currentFolderSize
+ _isCompressed = isCompressed
+ SetRecommendation()
+ SetGameStatus()
+ _operationMessage = Nothing
+
+ OnPropertyChanged(NameOf(currentFolderSize))
+ OnPropertyChanged(NameOf(isCompressed))
+ OnPropertyChanged(NameOf(Status))
+ OnPropertyChanged(NameOf(StatusMessage))
+ OnPropertyChanged(NameOf(RecommendedCompressionMode))
+ OnPropertyChanged(NameOf(RecommendedAction))
+ OnPropertyChanged(NameOf(ExpectedCompressionSavings))
+ OnPropertyChanged(NameOf(DisplayedSavings))
+ OnPropertyChanged(NameOf(IsDisplayingActualSavings))
+ OnPropertyChanged(NameOf(HasCompressionEstimate))
+ OnPropertyChanged(NameOf(HasSavingsData))
+ OnPropertyChanged(NameOf(OperationMessage))
+ OnPropertyChanged(NameOf(HasOperationMessage))
+ OnPropertyChanged(NameOf(CanCompress))
+ OnPropertyChanged(NameOf(CanUncompress))
+ End Sub
+
+ Public Sub SetWorking(value As Boolean, Optional status As String = Nothing)
+ IsWorking = value
+ If status IsNot Nothing Then SetStatus(status)
+ End Sub
+
+ Public Sub SetStatus(status As String)
+ _operationMessage = status
+ OnPropertyChanged(NameOf(OperationMessage))
+ OnPropertyChanged(NameOf(HasOperationMessage))
+ End Sub
+
+ Public Sub SetLastCompactGuiUpdate(updated As DateTime)
+ _lastCompactGuiUpdate = updated
+ SetGameStatus()
+ OnPropertyChanged(NameOf(Status))
+ OnPropertyChanged(NameOf(StatusMessage))
+ OnPropertyChanged(NameOf(DisplayedSavings))
+ OnPropertyChanged(NameOf(IsDisplayingActualSavings))
+ OnPropertyChanged(NameOf(HasSavingsData))
+ OnPropertyChanged(NameOf(CanCompress))
+ End Sub
+
+ Private Sub SetGameStatus()
+ If _hasPendingSteamUpdate Then
+ _status = SteamGameStatus.PendingSteamUpdate
+ ElseIf _lastCompactGuiUpdate.HasValue AndAlso _lastSteamUpdate > _lastCompactGuiUpdate.Value Then
+ _status = SteamGameStatus.RecentlyUpdated
+ ElseIf IsCompressed Then
+ _status = SteamGameStatus.Compressed
+ Else
+ _status = SteamGameStatus.Uncompressed
+ End If
+ End Sub
+
+ Private Sub SetRecommendation()
+ Dim candidates As New List(Of (Mode As Core.CompressionMode, Result As CompressionResult)) From {
+ (Core.CompressionMode.XPRESS4K, WikiCompressionResults?.XPress4K),
+ (Core.CompressionMode.XPRESS8K, WikiCompressionResults?.XPress8K),
+ (Core.CompressionMode.XPRESS16K, WikiCompressionResults?.XPress16K),
+ (Core.CompressionMode.LZX, WikiCompressionResults?.LZX)
+ }
+
+ Dim validResults = candidates.Where(Function(candidate) candidate.Result IsNot Nothing AndAlso candidate.Result.TotalResults > 0 AndAlso candidate.Result.BeforeBytes > 0 AndAlso candidate.Result.AfterBytes > 0).Select(Function(candidate) (candidate.Mode, Savings:=Math.Max(0, 1 - (CDbl(candidate.Result.AfterBytes) / candidate.Result.BeforeBytes)))).ToList()
+
+ If validResults.Count = 0 Then
+ _recommendedCompressionMode = Nothing
+ _recommendedAction = "No wiki data"
+ _expectedCompressionSavings = 0
+ _hasCompressionEstimate = False
+ Return
+ End If
+
+ _hasCompressionEstimate = True
+ Dim bestSaving = validResults.Max(Function(result) result.Savings)
+
+ If bestSaving < MinimumUsefulSaving Then
+ _recommendedCompressionMode = Nothing
+ _recommendedAction = "Do not compress"
+ _expectedCompressionSavings = 0
+ Return
+ End If
+
+ Dim recommendation = validResults.OrderBy(Function(result) CInt(result.Mode)).First(Function(result) bestSaving - result.Savings <= MaximumIncrementalSaving)
+ SelectCompressionMode(recommendation.Mode)
+ End Sub
+
+ Private Sub SelectCompressionMode(mode As Core.CompressionMode)
+ _recommendedCompressionMode = mode
+ _recommendedAction = $"Compress with {GetCompressionModeName(mode)}"
+
+ Dim result = GetCompressionResult(mode)
+ _hasCompressionEstimate = result IsNot Nothing AndAlso result.TotalResults > 0 AndAlso result.BeforeBytes > 0 AndAlso result.AfterBytes > 0
+ _expectedCompressionSavings = If(_hasCompressionEstimate, CLng(Math.Round(_uncompressedBytes * Math.Max(0, 1 - (CDbl(result.AfterBytes) / result.BeforeBytes)))), 0)
+
+ OnPropertyChanged(NameOf(RecommendedCompressionMode))
+ OnPropertyChanged(NameOf(RecommendedAction))
+ OnPropertyChanged(NameOf(ExpectedCompressionSavings))
+ OnPropertyChanged(NameOf(DisplayedSavings))
+ OnPropertyChanged(NameOf(HasCompressionEstimate))
+ OnPropertyChanged(NameOf(HasSavingsData))
+ OnPropertyChanged(NameOf(CanCompress))
+ End Sub
+
+ Private Function GetCompressionResult(mode As Core.CompressionMode) As CompressionResult
+ Select Case mode
+ Case Core.CompressionMode.XPRESS4K
+ Return WikiCompressionResults?.XPress4K
+ Case Core.CompressionMode.XPRESS8K
+ Return WikiCompressionResults?.XPress8K
+ Case Core.CompressionMode.XPRESS16K
+ Return WikiCompressionResults?.XPress16K
+ Case Core.CompressionMode.LZX
+ Return WikiCompressionResults?.LZX
+ Case Else
+ Return Nothing
+ End Select
+ End Function
+
+ Private Shared Function GetCompressionModeName(mode As Core.CompressionMode) As String
+ Select Case mode
+ Case Core.CompressionMode.XPRESS4K
+ Return "X4K"
+ Case Core.CompressionMode.XPRESS8K
+ Return "X8K"
+ Case Core.CompressionMode.XPRESS16K
+ Return "X16K"
+ Case Core.CompressionMode.LZX
+ Return "LZX"
+ Case Else
+ Return mode.ToString()
+ End Select
+ End Function
+
+End Class
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
new file mode 100644
index 00000000..f2e95733
--- /dev/null
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -0,0 +1,304 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb
new file mode 100644
index 00000000..a76eeded
--- /dev/null
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb
@@ -0,0 +1,27 @@
+Public Class SteamMonitorPage
+
+ Private ReadOnly _viewModel As SteamMonitorViewModel
+
+ Public Sub New(viewmodel As SteamMonitorViewModel)
+ InitializeComponent()
+ _viewModel = viewmodel
+ DataContext = viewmodel
+ End Sub
+
+ Private Async Sub OnLoaded(sender As Object, e As RoutedEventArgs)
+ Await _viewModel.LoadGamesAsync()
+ End Sub
+
+ Private Sub OnCompressSplitButtonLoaded(sender As Object, e As RoutedEventArgs)
+ Dim splitButton = DirectCast(sender, Wpf.Ui.Controls.SplitButton)
+ splitButton.ApplyTemplate()
+
+ Dim toggleButton = TryCast(splitButton.Template.FindName("PART_ToggleButton", splitButton), Primitives.ToggleButton)
+ Dim toggleBorder = If(toggleButton Is Nothing, Nothing, TryCast(Media.VisualTreeHelper.GetParent(toggleButton), Border))
+ Dim layoutGrid = If(toggleBorder Is Nothing, Nothing, TryCast(Media.VisualTreeHelper.GetParent(toggleBorder), Grid))
+
+ If layoutGrid Is Nothing OrElse layoutGrid.ColumnDefinitions.Count <> 2 Then Return
+ layoutGrid.ColumnDefinitions(0).Width = New GridLength(1, GridUnitType.Star)
+ End Sub
+
+End Class
From 7857845cf0f09c2eb6c4c393b69331b484a4dc54 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 1 Sep 2026 15:54:47 +1000
Subject: [PATCH 031/134] Migrate SteamFolderViewModel to use
MVVM.VBSourceGenerators properties and relaycommands
---
.../ViewModels/SteamMonitorViewModel.vb | 231 ++++++------------
1 file changed, 70 insertions(+), 161 deletions(-)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index e49916aa..74a8669f 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -19,47 +19,21 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private ReadOnly _analyserLogger As ILogger(Of Core.Analyser)
Private ReadOnly _operationGate As New SemaphoreSlim(1, 1)
Private _hasLoaded As Boolean
+
+
+
Private _isLoading As Boolean
+
+
+
Private _errorMessage As String
+
+
Private _searchText As String
Public ReadOnly Property SteamGamesData As New ObservableCollection(Of SteamDetailedResult)
Public ReadOnly Property FilteredSteamGames As ICollectionView
- Public Property SearchText As String
- Get
- Return _searchText
- End Get
- Set(value As String)
- If Not SetProperty(_searchText, value) Then Return
- FilteredSteamGames.Refresh()
- End Set
- End Property
-
- Public Property IsLoading As Boolean
- Get
- Return _isLoading
- End Get
- Private Set(value As Boolean)
- If _isLoading = value Then Return
- _isLoading = value
- OnPropertyChanged()
- OnPropertyChanged(NameOf(HasNoGames))
- End Set
- End Property
-
- Public Property ErrorMessage As String
- Get
- Return _errorMessage
- End Get
- Private Set(value As String)
- If _errorMessage = value Then Return
- _errorMessage = value
- OnPropertyChanged()
- OnPropertyChanged(NameOf(HasError))
- End Set
- End Property
-
Public ReadOnly Property HasError As Boolean
Get
Return Not String.IsNullOrWhiteSpace(ErrorMessage)
@@ -72,10 +46,6 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Get
End Property
- Public ReadOnly Property CompressCommand As IAsyncRelayCommand(Of SteamDetailedResult)
- Public ReadOnly Property UncompressCommand As IAsyncRelayCommand(Of SteamDetailedResult)
- Public ReadOnly Property SortCommand As IRelayCommand(Of Object)
-
Public Sub New(wikiService As IWikiService, watcher As Watcher.Watcher, compressableFolderService As CompressableFolderService, analyserLogger As ILogger(Of Core.Analyser))
_wikiService = wikiService
_watcher = watcher
@@ -83,9 +53,10 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
_analyserLogger = analyserLogger
FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData)
FilteredSteamGames.Filter = AddressOf FilterGames
- CompressCommand = New AsyncRelayCommand(Of SteamDetailedResult)(AddressOf CompressGameAsync)
- UncompressCommand = New AsyncRelayCommand(Of SteamDetailedResult)(AddressOf UncompressGameAsync)
- SortCommand = New RelayCommand(Of Object)(AddressOf SortGames)
+ End Sub
+
+ Private Sub OnSearchTextChanged(value As String)
+ FilteredSteamGames.Refresh()
End Sub
Private Function FilterGames(value As Object) As Boolean
@@ -104,7 +75,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Return New String(value.Where(Function(character) Char.IsLetterOrDigit(character) OrElse Char.IsWhiteSpace(character)).ToArray()).ToLowerInvariant()
End Function
- Private Sub SortGames(parameter As Object)
+
+ Private Sub Sort(parameter As Object)
FilteredSteamGames.SortDescriptions.Clear()
Select Case parameter?.ToString()
@@ -192,12 +164,14 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Using
End Function
- Private Async Function CompressGameAsync(game As SteamDetailedResult) As Task
+
+ Private Async Function Compress(game As SteamDetailedResult) As Task
If game Is Nothing OrElse Not game.CanCompress Then Return
Await RunGameOperationAsync(game, False)
End Function
- Private Async Function UncompressGameAsync(game As SteamDetailedResult) As Task
+
+ Private Async Function Uncompress(game As SteamDetailedResult) As Task
If game Is Nothing OrElse Not game.CanUncompress Then Return
Await RunGameOperationAsync(game, True)
End Function
@@ -340,18 +314,47 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Private Const MinimumUsefulSaving As Double = 0.05
Private Const MaximumIncrementalSaving As Double = 0.02
+
+
Private _uncompressedBytes As Long
+
+
+
Private _currentFolderSize As Long
+
+
+
Private _isCompressed As Boolean
+
Private ReadOnly _lastSteamUpdate As DateTime
Private _lastCompactGuiUpdate As DateTime?
Private ReadOnly _hasPendingSteamUpdate As Boolean
+
+
+
Private _status As SteamGameStatus
+
+
+
Private _recommendedCompressionMode As Core.CompressionMode?
+
+
Private _recommendedAction As String
+
+
+
Private _expectedCompressionSavings As Long
+
+
+
Private _hasCompressionEstimate As Boolean
+
+
+
Private _isWorking As Boolean
+
+
+
Private _operationMessage As String
Public ReadOnly Property GameName As String
@@ -359,7 +362,6 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Public ReadOnly Property AppID As Integer
Public ReadOnly Property WikiCompressionResults As WikiCompressionResults
Public ReadOnly Property WikiPoorlyCompressedFiles As List(Of String)
- Public ReadOnly Property SelectCompressionModeCommand As IRelayCommand(Of Core.CompressionMode)
Public ReadOnly Property DisplayPath As String
Get
@@ -367,24 +369,6 @@ Public Class SteamDetailedResult : Inherits ObservableObject
End Get
End Property
- Public ReadOnly Property CurrentFolderSize As Long
- Get
- Return _currentFolderSize
- End Get
- End Property
-
- Public ReadOnly Property IsCompressed As Boolean
- Get
- Return _isCompressed
- End Get
- End Property
-
- Public ReadOnly Property Status As SteamGameStatus
- Get
- Return _status
- End Get
- End Property
-
Public ReadOnly Property StatusMessage As String
Get
Select Case Status
@@ -402,27 +386,9 @@ Public Class SteamDetailedResult : Inherits ObservableObject
End Get
End Property
- Public ReadOnly Property RecommendedCompressionMode As Core.CompressionMode?
- Get
- Return _recommendedCompressionMode
- End Get
- End Property
-
- Public ReadOnly Property RecommendedAction As String
- Get
- Return _recommendedAction
- End Get
- End Property
-
- Public ReadOnly Property ExpectedCompressionSavings As Long
- Get
- Return _expectedCompressionSavings
- End Get
- End Property
-
Public ReadOnly Property DisplayedSavings As Long
Get
- If IsDisplayingActualSavings Then Return Math.Max(0, _uncompressedBytes - CurrentFolderSize)
+ If IsDisplayingActualSavings Then Return Math.Max(0, UncompressedBytes - CurrentFolderSize)
Return ExpectedCompressionSavings
End Get
End Property
@@ -439,31 +405,6 @@ Public Class SteamDetailedResult : Inherits ObservableObject
End Get
End Property
- Public ReadOnly Property HasCompressionEstimate As Boolean
- Get
- Return _hasCompressionEstimate
- End Get
- End Property
-
- Public Property IsWorking As Boolean
- Get
- Return _isWorking
- End Get
- Private Set(value As Boolean)
- If _isWorking = value Then Return
- _isWorking = value
- OnPropertyChanged()
- OnPropertyChanged(NameOf(CanCompress))
- OnPropertyChanged(NameOf(CanUncompress))
- End Set
- End Property
-
- Public ReadOnly Property OperationMessage As String
- Get
- Return _operationMessage
- End Get
- End Property
-
Public ReadOnly Property HasOperationMessage As Boolean
Get
Return Not String.IsNullOrWhiteSpace(OperationMessage)
@@ -491,32 +432,15 @@ Public Class SteamDetailedResult : Inherits ObservableObject
_lastCompactGuiUpdate = lastCompactGuiUpdate
Me.WikiCompressionResults = wikiResults
Me.WikiPoorlyCompressedFiles = poorlyCompressedFiles
- SelectCompressionModeCommand = New RelayCommand(Of Core.CompressionMode)(AddressOf SelectCompressionMode)
End Sub
Public Sub UpdateAnalysis(uncompressedBytes As Long, currentFolderSize As Long, isCompressed As Boolean)
- _uncompressedBytes = uncompressedBytes
- _currentFolderSize = currentFolderSize
- _isCompressed = isCompressed
+ Me.UncompressedBytes = uncompressedBytes
+ Me.CurrentFolderSize = currentFolderSize
+ Me.IsCompressed = isCompressed
SetRecommendation()
SetGameStatus()
- _operationMessage = Nothing
-
- OnPropertyChanged(NameOf(currentFolderSize))
- OnPropertyChanged(NameOf(isCompressed))
- OnPropertyChanged(NameOf(Status))
- OnPropertyChanged(NameOf(StatusMessage))
- OnPropertyChanged(NameOf(RecommendedCompressionMode))
- OnPropertyChanged(NameOf(RecommendedAction))
- OnPropertyChanged(NameOf(ExpectedCompressionSavings))
- OnPropertyChanged(NameOf(DisplayedSavings))
- OnPropertyChanged(NameOf(IsDisplayingActualSavings))
- OnPropertyChanged(NameOf(HasCompressionEstimate))
- OnPropertyChanged(NameOf(HasSavingsData))
- OnPropertyChanged(NameOf(OperationMessage))
- OnPropertyChanged(NameOf(HasOperationMessage))
- OnPropertyChanged(NameOf(CanCompress))
- OnPropertyChanged(NameOf(CanUncompress))
+ OperationMessage = Nothing
End Sub
Public Sub SetWorking(value As Boolean, Optional status As String = Nothing)
@@ -525,31 +449,23 @@ Public Class SteamDetailedResult : Inherits ObservableObject
End Sub
Public Sub SetStatus(status As String)
- _operationMessage = status
- OnPropertyChanged(NameOf(OperationMessage))
- OnPropertyChanged(NameOf(HasOperationMessage))
+ OperationMessage = status
End Sub
Public Sub SetLastCompactGuiUpdate(updated As DateTime)
_lastCompactGuiUpdate = updated
SetGameStatus()
- OnPropertyChanged(NameOf(Status))
- OnPropertyChanged(NameOf(StatusMessage))
- OnPropertyChanged(NameOf(DisplayedSavings))
- OnPropertyChanged(NameOf(IsDisplayingActualSavings))
- OnPropertyChanged(NameOf(HasSavingsData))
- OnPropertyChanged(NameOf(CanCompress))
End Sub
Private Sub SetGameStatus()
If _hasPendingSteamUpdate Then
- _status = SteamGameStatus.PendingSteamUpdate
+ Status = SteamGameStatus.PendingSteamUpdate
ElseIf _lastCompactGuiUpdate.HasValue AndAlso _lastSteamUpdate > _lastCompactGuiUpdate.Value Then
- _status = SteamGameStatus.RecentlyUpdated
+ Status = SteamGameStatus.RecentlyUpdated
ElseIf IsCompressed Then
- _status = SteamGameStatus.Compressed
+ Status = SteamGameStatus.Compressed
Else
- _status = SteamGameStatus.Uncompressed
+ Status = SteamGameStatus.Uncompressed
End If
End Sub
@@ -564,20 +480,20 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Dim validResults = candidates.Where(Function(candidate) candidate.Result IsNot Nothing AndAlso candidate.Result.TotalResults > 0 AndAlso candidate.Result.BeforeBytes > 0 AndAlso candidate.Result.AfterBytes > 0).Select(Function(candidate) (candidate.Mode, Savings:=Math.Max(0, 1 - (CDbl(candidate.Result.AfterBytes) / candidate.Result.BeforeBytes)))).ToList()
If validResults.Count = 0 Then
- _recommendedCompressionMode = Nothing
- _recommendedAction = "No wiki data"
- _expectedCompressionSavings = 0
- _hasCompressionEstimate = False
+ RecommendedCompressionMode = Nothing
+ RecommendedAction = "No wiki data"
+ ExpectedCompressionSavings = 0
+ HasCompressionEstimate = False
Return
End If
- _hasCompressionEstimate = True
+ HasCompressionEstimate = True
Dim bestSaving = validResults.Max(Function(result) result.Savings)
If bestSaving < MinimumUsefulSaving Then
- _recommendedCompressionMode = Nothing
- _recommendedAction = "Do not compress"
- _expectedCompressionSavings = 0
+ RecommendedCompressionMode = Nothing
+ RecommendedAction = "Do not compress"
+ ExpectedCompressionSavings = 0
Return
End If
@@ -585,21 +501,14 @@ Public Class SteamDetailedResult : Inherits ObservableObject
SelectCompressionMode(recommendation.Mode)
End Sub
+
Private Sub SelectCompressionMode(mode As Core.CompressionMode)
- _recommendedCompressionMode = mode
- _recommendedAction = $"Compress with {GetCompressionModeName(mode)}"
+ RecommendedCompressionMode = mode
+ RecommendedAction = $"Compress with {GetCompressionModeName(mode)}"
Dim result = GetCompressionResult(mode)
- _hasCompressionEstimate = result IsNot Nothing AndAlso result.TotalResults > 0 AndAlso result.BeforeBytes > 0 AndAlso result.AfterBytes > 0
- _expectedCompressionSavings = If(_hasCompressionEstimate, CLng(Math.Round(_uncompressedBytes * Math.Max(0, 1 - (CDbl(result.AfterBytes) / result.BeforeBytes)))), 0)
-
- OnPropertyChanged(NameOf(RecommendedCompressionMode))
- OnPropertyChanged(NameOf(RecommendedAction))
- OnPropertyChanged(NameOf(ExpectedCompressionSavings))
- OnPropertyChanged(NameOf(DisplayedSavings))
- OnPropertyChanged(NameOf(HasCompressionEstimate))
- OnPropertyChanged(NameOf(HasSavingsData))
- OnPropertyChanged(NameOf(CanCompress))
+ HasCompressionEstimate = result IsNot Nothing AndAlso result.TotalResults > 0 AndAlso result.BeforeBytes > 0 AndAlso result.AfterBytes > 0
+ ExpectedCompressionSavings = If(HasCompressionEstimate, CLng(Math.Round(UncompressedBytes * Math.Max(0, 1 - (CDbl(result.AfterBytes) / result.BeforeBytes)))), 0)
End Sub
Private Function GetCompressionResult(mode As Core.CompressionMode) As CompressionResult
From 750c9abd5c1f3d1f67faf05b301c9ed3efcf9773 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 1 Sep 2026 16:28:16 +1000
Subject: [PATCH 032/134] Add cancellation support to steam games page - add
context menu options to add to queue and to go to database results - minor UI
tweaks and rename elements
---
CompactGUI/MainWindow.xaml | 84 +++++++++----------
.../ViewModels/SteamMonitorViewModel.vb | 62 ++++++++++++--
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 69 ++++++++++-----
3 files changed, 145 insertions(+), 70 deletions(-)
diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml
index 1bd3d036..df164278 100644
--- a/CompactGUI/MainWindow.xaml
+++ b/CompactGUI/MainWindow.xaml
@@ -3,20 +3,27 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:bh="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:local="clr-namespace:CompactGUI"
- xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
- x:Name="MainWindow" Title="CompactGUI"
- Width="1300" Height="700" MinWidth="768" MinHeight="600"
+ x:Name="MainWindow"
+ Title="CompactGUI"
+ Width="1300"
+ Height="700"
+ MinWidth="768"
+ MinHeight="600"
d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
- Closing="MainWindow_Closing" ExtendsContentIntoTitleBar="True"
+ Closing="MainWindow_Closing"
+ ExtendsContentIntoTitleBar="True"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
- RenderOptions.BitmapScalingMode="HighQuality" WindowBackdropType="Mica"
- WindowCornerPreference="Round" WindowStartupLocation="CenterScreen"
+ RenderOptions.BitmapScalingMode="HighQuality"
+ WindowBackdropType="Mica"
+ WindowCornerPreference="Round"
+ WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
@@ -30,21 +37,19 @@
-
+
-
@@ -53,9 +58,8 @@
-
@@ -63,38 +67,37 @@
-
+ TargetPageType="{x:Type local:SteamMonitorPage}">
-
+
-
+ TargetPageType="{x:Type local:DatabasePage}">
-
+
+
+
-
-
+
@@ -169,14 +172,12 @@
-
+
-
+
@@ -208,7 +209,7 @@
@@ -228,8 +229,7 @@
+ Storyboard.TargetProperty="(RenderTransform).(TranslateTransform.Y)" From="10" To="0" Duration="0:0:0.5">
@@ -242,16 +242,14 @@
-
-
+
@@ -267,8 +265,8 @@
FocusOnLeftClick="True" MenuOnRightClick="True" TooltipText="CompactGUI">
-
-
+
+
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 74a8669f..744ccfd6 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -5,23 +5,31 @@ Imports System.Threading
Imports CommunityToolkit.Mvvm.ComponentModel
Imports CommunityToolkit.Mvvm.Input
+Imports CommunityToolkit.Mvvm.Messaging
Imports Gameloop.Vdf
Imports Gameloop.Vdf.JsonConverter
Imports Microsoft.Extensions.Logging
+Imports Wpf.Ui
+
Public Class SteamMonitorViewModel : Inherits ObservableObject
Private ReadOnly _wikiService As IWikiService
Private ReadOnly _watcher As Watcher.Watcher
Private ReadOnly _compressableFolderService As CompressableFolderService
Private ReadOnly _analyserLogger As ILogger(Of Core.Analyser)
+ Private ReadOnly _navigationService As INavigationService
Private ReadOnly _operationGate As New SemaphoreSlim(1, 1)
+ Private _activeFolder As StandardFolder
+ Private _activeGame As SteamDetailedResult
+ Private _cancelRequested As Boolean
Private _hasLoaded As Boolean
+
Private _isLoading As Boolean
@@ -46,11 +54,12 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Get
End Property
- Public Sub New(wikiService As IWikiService, watcher As Watcher.Watcher, compressableFolderService As CompressableFolderService, analyserLogger As ILogger(Of Core.Analyser))
+ Public Sub New(wikiService As IWikiService, watcher As Watcher.Watcher, compressableFolderService As CompressableFolderService, analyserLogger As ILogger(Of Core.Analyser), navigationService As INavigationService)
_wikiService = wikiService
_watcher = watcher
_compressableFolderService = compressableFolderService
_analyserLogger = analyserLogger
+ _navigationService = navigationService
FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData)
FilteredSteamGames.Filter = AddressOf FilterGames
End Sub
@@ -59,6 +68,38 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
FilteredSteamGames.Refresh()
End Sub
+
+ Private Async Function RefreshAll() As Task
+ SteamGamesData.Clear()
+ _hasLoaded = False
+ Await LoadGamesAsync()
+ End Function
+
+ Private Function CanRefreshAll() As Boolean
+ Return Not IsLoading AndAlso _activeGame Is Nothing
+ End Function
+
+
+ Private Sub AddToCompressionQueue(game As SteamDetailedResult)
+ If game Is Nothing Then Return
+ WeakReferenceMessenger.Default.Send(New WatcherAddedFolderToQueueMessage(game.GamePath))
+ End Sub
+
+
+ Private Sub GoToDatabaseResults(game As SteamDetailedResult)
+ If game Is Nothing Then Return
+ _navigationService.Navigate(GetType(DatabasePage))
+ End Sub
+
+
+ Private Sub CancelOperation(game As SteamDetailedResult)
+ If game Is Nothing OrElse Not ReferenceEquals(game, _activeGame) Then Return
+ _cancelRequested = True
+ game.SetStatus("Cancelling...")
+ _compressableFolderService.CancelEstimation(_activeFolder)
+ If _activeFolder.FolderActionState = ActionState.Working Then _activeFolder.Compressor?.Cancel()
+ End Sub
+
Private Function FilterGames(value As Object) As Boolean
If String.IsNullOrWhiteSpace(SearchText) Then Return True
@@ -181,17 +222,25 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Await _operationGate.WaitAsync()
Try
If (uncompress AndAlso Not game.CanUncompress) OrElse (Not uncompress AndAlso Not game.CanCompress) Then Return
+ _cancelRequested = False
game.SetWorking(True, If(uncompress, "Uncompressing...", "Compressing..."))
Await RunFolderOperationAsync(game, uncompress)
+ If _cancelRequested Then game.SetStatus("Operation cancelled.")
Catch ex As Exception
- game.SetWorking(False, $"Operation failed: {ex.Message}")
+ game.SetWorking(False, If(_cancelRequested OrElse TypeOf ex Is OperationCanceledException, "Operation cancelled.", $"Operation failed: {ex.Message}"))
Finally
+ _cancelRequested = False
+ _activeGame = Nothing
+ RefreshAllCommand.NotifyCanExecuteChanged()
_operationGate.Release()
End Try
End Function
Private Async Function RunFolderOperationAsync(game As SteamDetailedResult, uncompress As Boolean) As Task
Dim folder As New StandardFolder(game.GamePath)
+ _activeFolder = folder
+ _activeGame = game
+ RefreshAllCommand.NotifyCanExecuteChanged()
Dim backgroundingDisabled As Boolean
Dim sleepPrevented As Boolean
Dim operationException As Exception = Nothing
@@ -199,6 +248,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Try
Await _watcher.DisableBackgrounding()
backgroundingDisabled = True
+ If _cancelRequested Then Throw New OperationCanceledException()
Core.SharedMethods.PreventSleep()
sleepPrevented = True
@@ -206,6 +256,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
folder.CompressionOptions.SkipUserSubmittedFiletypes = folder.WikiPoorlyCompressedFiles.Count > 0
Dim analysisResult = Await _compressableFolderService.AnalyseFolderAsync(folder)
If analysisResult = -1 Then Throw New UnauthorizedAccessException("CompactGUI does not have permission to modify this folder.")
+ If analysisResult <> 0 OrElse _cancelRequested Then Throw New OperationCanceledException()
Dim isCurrentlyCompressed = folder.AnalysisResults.Any(Function(file) file.CompressionMode <> Core.WOFCompressionAlgorithm.NO_COMPRESSION)
Dim succeeded As Boolean
@@ -233,6 +284,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
operationException = ex
Finally
folder.Dispose()
+ _activeFolder = Nothing
If sleepPrevented Then Core.SharedMethods.RestoreSleep()
game.SetWorking(False)
End Try
@@ -377,9 +429,9 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Case SteamGameStatus.Uncompressed
Return "Uncompressed"
Case SteamGameStatus.RecentlyUpdated
- Return "Recently updated"
+ Return "Recently Updated"
Case SteamGameStatus.PendingSteamUpdate
- Return "Pending update"
+ Return "Update Available"
Case Else
Return "Unknown"
End Select
@@ -504,7 +556,7 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Private Sub SelectCompressionMode(mode As Core.CompressionMode)
RecommendedCompressionMode = mode
- RecommendedAction = $"Compress with {GetCompressionModeName(mode)}"
+ RecommendedAction = $"Compress | {GetCompressionModeName(mode)}"
Dim result = GetCompressionResult(mode)
HasCompressionEstimate = result IsNot Nothing AndAlso result.TotalResults > 0 AndAlso result.BeforeBytes > 0 AndAlso result.AfterBytes > 0
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index a95ac5fb..ce6ea57d 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -21,7 +21,16 @@
-
+
+
+
+
+
+
@@ -29,13 +38,14 @@
-
-
@@ -71,9 +81,9 @@
-
-
-
+
+
+
@@ -129,6 +139,13 @@
Tag="{Binding DataContext, ElementName=PageRoot}">
+
+
+
-
-
-
+
+
+
-
+
+
+
+
-
+
-
@@ -335,10 +354,10 @@
-
-
@@ -175,8 +171,7 @@
IsEnabled="{Binding DataContext.CanUncompress}" />
-
-
+
@@ -185,7 +180,6 @@
-
-
-
-
-
-
-
-
-
+
-
-
+
-
+
-
@@ -267,28 +251,17 @@
-
-
-
+ Background="#8373808C" CornerRadius="5"
+ Visibility="{Binding IsCompressed, Converter={StaticResource BoolToVisConverter}}">
-
-
@@ -308,10 +281,9 @@
-
-
+
@@ -321,7 +293,7 @@
-
+
@@ -329,8 +301,7 @@
-
-
+
-
-
+
-
@@ -385,6 +354,566 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
Date: Sat, 5 Sep 2026 17:02:12 +1000
Subject: [PATCH 053/134] Disable details view for now
---
.../ViewModels/SteamMonitorViewModel.vb | 2 +-
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 21 +++++++++----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index d86408a7..62bfd04a 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -423,7 +423,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Await RunGameOperationAsync(game, True)
End Function
-
+ 'TODO: Fix the issue with creating a new StandardFolder - this does not allow the extensions to show up in the skiplist. Need to retain a thin version of the analyser results for this.
Private Sub EditSkipList(game As SteamDetailedResult)
If game Is Nothing OrElse game.IsWorking Then Return
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index c8b268e3..df8c3bb6 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -104,7 +104,7 @@
-
+
@@ -138,8 +138,7 @@
ItemsSource="{Binding FilteredSteamGames}"
ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedGame, Mode=TwoWay}"
- VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling"
- Visibility="{Binding HasSelectedGame, Converter={StaticResource BooleanToInverseVisibilityConverter}}">
+ VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling" Visibility="Visible">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -355,7 +394,7 @@
+ Visibility="Collapsed">
From 3a6023b5ba7db66ed55f5c8face028addd7413ee Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sat, 5 Sep 2026 19:09:29 +1000
Subject: [PATCH 055/134] Steam Library - Add checkboxes and add multiple to
queue
---
.../Messages/SteamGamesAddedToQueueMessage.vb | 17 ++++
CompactGUI/Resources/Localisation/en-AU.toml | 6 ++
CompactGUI/Resources/Localisation/es-ES.toml | 6 ++
CompactGUI/Resources/Localisation/ru-RU.toml | 6 ++
CompactGUI/Resources/Localisation/zh-CN.toml | 6 ++
CompactGUI/ViewModels/HomeViewModel.vb | 27 ++++--
.../ViewModels/SteamMonitorViewModel.vb | 55 ++++++++++++
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 83 ++++++++++++++++++-
.../Views/Pages/SteamMonitorPage.xaml.vb | 57 +++++++++++++
9 files changed, 254 insertions(+), 9 deletions(-)
create mode 100644 CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb
diff --git a/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb b/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb
new file mode 100644
index 00000000..ed3048ad
--- /dev/null
+++ b/CompactGUI/Messages/SteamGamesAddedToQueueMessage.vb
@@ -0,0 +1,17 @@
+Imports CommunityToolkit.Mvvm.Messaging.Messages
+
+Public Class SteamGamesAddedToQueueMessage : Inherits ValueChangedMessage(Of IReadOnlyList(Of SteamQueueItem))
+ Public Sub New(value As IReadOnlyList(Of SteamQueueItem))
+ MyBase.New(value)
+ End Sub
+End Class
+
+Public Class SteamQueueItem
+ Public ReadOnly Property FolderPath As String
+ Public ReadOnly Property CompressionOptions As CompressionOptions
+
+ Public Sub New(folderPath As String, compressionOptions As CompressionOptions)
+ Me.FolderPath = folderPath
+ Me.CompressionOptions = compressionOptions
+ End Sub
+End Class
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index f58dbbdf..475defa7 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -7,6 +7,7 @@
"Add" = "Add"
"Add Folder to Queue" = "Add Folder to Queue"
"Add a custom folder to the watchlist" = "Add a custom folder to the watchlist"
+"Add all to queue" = "Add all to queue"
"Add to Compression Queue" = "Add to Compression Queue"
"Add to compression queue" = "Add to compression queue"
"Add to right-click context menu" = "Add to right-click context menu"
@@ -108,8 +109,10 @@
"Scanning installed Steam games..." = "Scanning installed Steam games..."
"Search by game name or SteamID..." = "Search by game name or SteamID..."
"Select a folder to compress" = "Select a folder to compress"
+"Select all visible games" = "Select all visible games"
"Settings" = "Settings"
"Show notification on completion" = "Show notification on completion"
+"Sort" = "Sort"
"Sort By" = "Sort By"
"Space Saved" = "Space Saved"
"Start CompactGUI in system tray" = "Start CompactGUI in system tray"
@@ -133,7 +136,10 @@
"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}"
"Update Settings" = "Update Settings"
"Update in Steam" = "Update in Steam"
+"Use global skiplist" = "Use global skiplist"
+"Use recommended compression level" = "Use recommended compression level"
"Use skip list" = "Use skip list"
+"Use smart skiplist" = "Use smart skiplist"
"Version" = "Version"
"Watch folder for changes" = "Watch folder for changes"
"Watched Folders" = "Watched Folders"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 725760bb..d39f24c8 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -7,6 +7,7 @@
"Add" = "Añadir "
"Add Folder to Queue" = "Añadir carpeta a la cola"
"Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista"
+"Add all to queue" = "Add all to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
"Add to compression queue" = "Añadir a la cola de compresión"
"Add to right-click context menu" = "Añadir al menú contextual"
@@ -108,8 +109,10 @@
"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
"Search by game name or SteamID..." = "Buscar por nombre o SteamID..."
"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
+"Select all visible games" = "Select all visible games" # LOC:TODO
"Settings" = "Ajustes"
"Show notification on completion" = "Mostrar notificación al finalizar"
+"Sort" = "Sort" # LOC:TODO
"Sort By" = "Ordenar por"
"Space Saved" = "Espacio ahorrado"
"Start CompactGUI in system tray" = "Iniciar CompactGUI en la bandeja del sistema"
@@ -133,7 +136,10 @@
"Update Available ▸ Version {0}" = "Actualización disponible ▸ Versión {0}"
"Update Settings" = "Ajustes de actualización"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use global skiplist" = "Use global skiplist" # LOC:TODO
+"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
"Use skip list" = "Usar lista de exclusión"
+"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Version" = "Versión"
"Watch folder for changes" = "Monitorizar cambios en carpeta"
"Watched Folders" = "Carpetas monitorizadas"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index c77f2947..83ceb7d2 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -7,6 +7,7 @@
"Add" = "Добавить"
"Add Folder to Queue" = "Добавить папку в очередь"
"Add a custom folder to the watchlist" = "Добавить свою папку в список отслеживания"
+"Add all to queue" = "Add all to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
"Add to compression queue" = "Добавить в очередь сжатия"
"Add to right-click context menu" = "Добавить в контекстное меню правой кнопки мыши"
@@ -108,8 +109,10 @@
"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
"Search by game name or SteamID..." = "Поиск по названию игры или SteamID..."
"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
+"Select all visible games" = "Select all visible games" # LOC:TODO
"Settings" = "Настройки"
"Show notification on completion" = "Показывать уведомление о завершении"
+"Sort" = "Sort" # LOC:TODO
"Sort By" = "Сортировать по"
"Space Saved" = "Сэкономлено места"
"Start CompactGUI in system tray" = "Запускать CompactGUI в области уведомлений"
@@ -133,7 +136,10 @@
"Update Available ▸ Version {0}" = "Доступно обновление ▸ Версия {0}"
"Update Settings" = "Настройки обновлений"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use global skiplist" = "Use global skiplist" # LOC:TODO
+"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
"Use skip list" = "Использовать список исключений"
+"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Version" = "Версия"
"Watch folder for changes" = "Отслеживать изменения в папке"
"Watched Folders" = "Отслеживаемые папки"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index eeb43661..650aa888 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -7,6 +7,7 @@
"Add" = "添加"
"Add Folder to Queue" = "添加文件夹到队列"
"Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表"
+"Add all to queue" = "Add all to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
"Add to compression queue" = "添加到压缩队列"
"Add to right-click context menu" = "添加到右键菜单"
@@ -108,8 +109,10 @@
"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
"Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索..."
"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
+"Select all visible games" = "Select all visible games" # LOC:TODO
"Settings" = "设置"
"Show notification on completion" = "完成后显示通知"
+"Sort" = "Sort" # LOC:TODO
"Sort By" = "排序方式"
"Space Saved" = "节省空间"
"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI"
@@ -133,7 +136,10 @@
"Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}"
"Update Settings" = "更新设置"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use global skiplist" = "Use global skiplist" # LOC:TODO
+"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
"Use skip list" = "使用跳过列表"
+"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Version" = "版本"
"Watch folder for changes" = "监控文件夹更改"
"Watched Folders" = "受监控文件夹"
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index ad565602..7571cb11 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -13,7 +13,7 @@ Imports CompactGUI.Logging
Imports Microsoft.Extensions.Logging
-Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient : Implements IRecipient(Of WatcherAddedFolderToQueueMessage)
+Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient : Implements IRecipient(Of WatcherAddedFolderToQueueMessage), IRecipient(Of SteamGamesAddedToQueueMessage)
Private ReadOnly _folderViewModels As New Dictionary(Of CompressableFolder, FolderViewModel)
@@ -64,6 +64,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Sub New(watcher As Watcher.Watcher, snackbarService As CustomSnackBarService, logger As ILogger(Of HomeViewModel), settingsService As ISettingsService, compressableFolderService As CompressableFolderService)
WeakReferenceMessenger.Default.Register(Of WatcherAddedFolderToQueueMessage)(Me)
+ WeakReferenceMessenger.Default.Register(Of SteamGamesAddedToQueueMessage)(Me)
AddHandler Folders.CollectionChanged, AddressOf OnFoldersCollectionChanged
_watcher = watcher
_snackbarService = snackbarService
@@ -106,7 +107,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
- Public Async Function AddFoldersAsync(folderPaths As IEnumerable(Of String)) As Task
+ Public Async Function AddFoldersAsync(folderPaths As IEnumerable(Of String), Optional queueOptions As IReadOnlyDictionary(Of String, CompressionOptions) = Nothing) As Task
HomeViewModelLog.AddingFolders(_logger, folderPaths)
@@ -128,6 +129,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
newFolder.CompressionOptions.SkipPoorlyCompressedFileTypes = _settingsService.AppSettings.SkipNonCompressable
newFolder.CompressionOptions.SkipUserSubmittedFiletypes = _settingsService.AppSettings.SkipUserNonCompressable
+ Dim requestedOptions As CompressionOptions = Nothing
+ Dim hasRequestedOptions = queueOptions?.TryGetValue(folderName, requestedOptions)
+ If hasRequestedOptions Then newFolder.CompressionOptions = requestedOptions.Clone()
+
If Not Folders.Any(Function(f) f.FolderName = newFolder.FolderName) Then
Folders.Add(newFolder)
Dim vm As New FolderViewModel(newFolder, _watcher, _snackbarService, _compressableFolderService)
@@ -149,11 +154,13 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
If _watcher.WatchedFolders.Any(Function(w) w.Folder = newFolder.FolderName) Then
Dim watchedFolder = _watcher.WatchedFolders.First(Function(w) w.Folder = newFolder.FolderName)
newFolder.CompressionOptions.WatchFolderForChanges = True
- If watchedFolder.CompressionLevel <> Core.WOFCompressionAlgorithm.NO_COMPRESSION Then
- newFolder.CompressionOptions.SelectedCompressionMode = Core.WOFHelper.CompressionModeFromWOFMode(watchedFolder.CompressionLevel)
- End If
- If watchedFolder.SkipList IsNot Nothing Then
- newFolder.CompressionOptions.SkipList = New List(Of String)(watchedFolder.SkipList)
+ If Not hasRequestedOptions Then
+ If watchedFolder.CompressionLevel <> Core.WOFCompressionAlgorithm.NO_COMPRESSION Then
+ newFolder.CompressionOptions.SelectedCompressionMode = Core.WOFHelper.CompressionModeFromWOFMode(watchedFolder.CompressionLevel)
+ End If
+ If watchedFolder.SkipList IsNot Nothing Then
+ newFolder.CompressionOptions.SkipList = New List(Of String)(watchedFolder.SkipList)
+ End If
End If
End If
@@ -320,4 +327,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Application.GetService(Of CustomSnackBarService).ShowAddedToQueue()
Await AddFoldersAsync({message.Value})
End Sub
+
+ Public Async Sub Receive(message As SteamGamesAddedToQueueMessage) Implements IRecipient(Of SteamGamesAddedToQueueMessage).Receive
+ Application.GetService(Of CustomSnackBarService).ShowAddedToQueue()
+ Dim options = message.Value.GroupBy(Function(item) item.FolderPath, StringComparer.OrdinalIgnoreCase).ToDictionary(Function(group) group.Key, Function(group) group.Last().CompressionOptions, StringComparer.OrdinalIgnoreCase)
+ Await AddFoldersAsync(options.Keys, options)
+ End Sub
End Class
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 8cbbaae8..a66c2f87 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -31,6 +31,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private ReadOnly _operationGate As New SemaphoreSlim(1, 1)
Private ReadOnly _imageDownloadGate As New SemaphoreSlim(4, 4)
Private ReadOnly _trackedSteamGames As New HashSet(Of SteamDetailedResult)
+ Private ReadOnly _selectedGames As New List(Of SteamDetailedResult)
Private Shared ReadOnly SteamImageClient As New HttpClient()
Private _activeFolder As StandardFolder
Private _activeGame As SteamDetailedResult
@@ -56,12 +57,35 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private _selectedGame As SteamDetailedResult
+
+
+ Private _selectedGameCount As Integer
+
+
+
+ Private _useRecommendedCompressionLevel As Boolean = True
+
+
+ Private _queueCompressionMode As Core.CompressionMode = Core.CompressionMode.XPRESS4K
+
+
+ Private _useGlobalSkiplist As Boolean
+
+
+ Private _useSmartSkiplist As Boolean
+
Public ReadOnly Property HasSelectedGame As Boolean
Get
Return SelectedGame IsNot Nothing
End Get
End Property
+ Public ReadOnly Property HasSelectedGames As Boolean
+ Get
+ Return SelectedGameCount > 0
+ End Get
+ End Property
+
Public ReadOnly Property SteamGamesData As New ObservableCollection(Of SteamDetailedResult)
Public ReadOnly Property LibraryLocations As New ObservableCollection(Of SteamLibraryFilterOption)
Public ReadOnly Property FilteredSteamGames As ICollectionView
@@ -97,6 +121,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
_analyserLogger = analyserLogger
_navigationService = navigationService
_settingsService = settingsService
+ QueueCompressionMode = settingsService.AppSettings.SelectedCompressionMode
+ UseGlobalSkiplist = settingsService.AppSettings.SkipNonCompressable
+ UseSmartSkiplist = settingsService.AppSettings.SkipUserNonCompressable
FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData)
FilteredSteamGames.Filter = AddressOf FilterGames
AddHandler SteamGamesData.CollectionChanged, AddressOf OnSteamGamesCollectionChanged
@@ -150,6 +177,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private Async Function RefreshAll() As Task
SelectedGame = Nothing
+ _selectedGames.Clear()
+ SelectedGameCount = 0
SteamGamesData.Clear()
_hasLoaded = False
Await LoadGamesAsync()
@@ -197,6 +226,32 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Return True
End Function
+ Friend Sub UpdateSelectedGames(selectedItems As IList)
+ _selectedGames.Clear()
+ _selectedGames.AddRange(selectedItems.Cast(Of SteamDetailedResult))
+ SelectedGameCount = _selectedGames.Count
+ AddSelectedToQueueCommand.NotifyCanExecuteChanged()
+ End Sub
+
+
+ Private Sub AddSelectedToQueue()
+ Dim requests = _selectedGames.Select(Function(game)
+ Dim mode = If(UseRecommendedCompressionLevel, game.RecommendedCompressionMode.Value, QueueCompressionMode)
+ Dim options As New CompressionOptions With {
+ .SelectedCompressionMode = mode,
+ .SkipPoorlyCompressedFileTypes = UseGlobalSkiplist,
+ .SkipUserSubmittedFiletypes = UseSmartSkiplist,
+ .SkipListEnabled = UseGlobalSkiplist OrElse UseSmartSkiplist
+ }
+ Return New SteamQueueItem(game.GamePath, options)
+ End Function).ToList()
+ WeakReferenceMessenger.Default.Send(New SteamGamesAddedToQueueMessage(requests))
+ End Sub
+
+ Private Function CanAddSelectedToQueue() As Boolean
+ Return _selectedGames.Count > 0 AndAlso (Not UseRecommendedCompressionLevel OrElse _selectedGames.All(Function(game) game.RecommendedCompressionMode.HasValue))
+ End Function
+
Private Sub FilterLibrary(path As String)
_libraryFilter = If(String.Equals(_libraryFilter, path, StringComparison.OrdinalIgnoreCase), Nothing, path)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 1293f292..84e00c00 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -12,6 +12,7 @@
d:DesignHeight="600"
d:DesignWidth="1100"
Loaded="OnLoaded"
+ Unloaded="OnUnloaded"
mc:Ignorable="d">
@@ -152,6 +153,10 @@
+
-
+ SelectionChanged="OnSteamGamesSelectionChanged" SelectionMode="Extended" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling"
+ Visibility="Visible">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
0 AndAlso visibleGames.All(Function(game) SteamGamesList.SelectedItems.Contains(game))
+
+ _isUpdatingSelection = True
+ If allVisibleSelected Then
+ For Each game In visibleGames
+ SteamGamesList.SelectedItems.Remove(game)
+ Next
+ Else
+ For Each game In visibleGames
+ If Not SteamGamesList.SelectedItems.Contains(game) Then SteamGamesList.SelectedItems.Add(game)
+ Next
+ End If
+ _isUpdatingSelection = False
+
+ _viewModel.UpdateSelectedGames(SteamGamesList.SelectedItems)
+ UpdateMasterCheckbox()
+ End Sub
+
+ Private Sub OnVisibleGamesChanged(sender As Object, e As System.Collections.Specialized.NotifyCollectionChangedEventArgs)
+ Dispatcher.BeginInvoke(New Action(AddressOf UpdateMasterCheckbox))
+ End Sub
+
+ Private Sub UpdateMasterCheckbox()
+ Dim visibleGames = SteamGamesList.Items.Cast(Of Object).ToList()
+ Dim selectedCount = visibleGames.Where(Function(game) SteamGamesList.SelectedItems.Contains(game)).Count()
+
+ If selectedCount = 0 Then
+ SelectAllVisibleCheckBox.IsChecked = False
+ ElseIf selectedCount = visibleGames.Count Then
+ SelectAllVisibleCheckBox.IsChecked = True
+ Else
+ SelectAllVisibleCheckBox.IsChecked = Nothing
+ End If
End Sub
Private Sub OnCompressSplitButtonLoaded(sender As Object, e As RoutedEventArgs)
From 59fc241c9b2a049ec6401a910fc8d770d23b5ae6 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sat, 5 Sep 2026 19:11:07 +1000
Subject: [PATCH 056/134] add a margin to last item in steam library view so
selection banner doesn't hide it
---
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 84e00c00..a63a031a 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -185,6 +185,22 @@
SelectedItem="{Binding SelectedGame, Mode=TwoWay}"
SelectionChanged="OnSteamGamesSelectionChanged" SelectionMode="Extended" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.ScrollUnit="Pixel" VirtualizingPanel.VirtualizationMode="Recycling"
Visibility="Visible">
+
+
+
+
+
+
+
+
+
+
@@ -83,6 +93,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -992,58 +1029,69 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content="{loc:T Add selected to queue}" />
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb
index 662da1a2..6c5e7c21 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml.vb
@@ -32,20 +32,35 @@ Public Class SteamMonitorPage
UpdateMasterCheckbox()
End Sub
+ 'Today I learned about Func and this seems like a perfectly dumb place to use it
Private Sub OnSelectAllVisibleClick(sender As Object, e As RoutedEventArgs)
Dim visibleGames = SteamGamesList.Items.Cast(Of Object).ToList()
Dim allVisibleSelected = visibleGames.Count > 0 AndAlso visibleGames.All(Function(game) SteamGamesList.SelectedItems.Contains(game))
+ SetVisibleSelection(Function(game) Not allVisibleSelected)
+ End Sub
+
+ Private Sub OnSelectAllClick(sender As Object, e As RoutedEventArgs)
+ SetVisibleSelection(Function(game) True)
+ End Sub
+
+ Private Sub OnSelectAllCompressableClick(sender As Object, e As RoutedEventArgs)
+ SetVisibleSelection(Function(game) game.CanCompress)
+ End Sub
+
+ Private Sub OnDeselectAllClick(sender As Object, e As RoutedEventArgs)
+ SetVisibleSelection(Function(game) False)
+ End Sub
+
+ Private Sub SetVisibleSelection(shouldSelect As Func(Of SteamDetailedResult, Boolean))
_isUpdatingSelection = True
- If allVisibleSelected Then
- For Each game In visibleGames
- SteamGamesList.SelectedItems.Remove(game)
- Next
- Else
- For Each game In visibleGames
+ For Each game As SteamDetailedResult In SteamGamesList.Items
+ If shouldSelect(game) Then
If Not SteamGamesList.SelectedItems.Contains(game) Then SteamGamesList.SelectedItems.Add(game)
- Next
- End If
+ Else
+ SteamGamesList.SelectedItems.Remove(game)
+ End If
+ Next
_isUpdatingSelection = False
_viewModel.UpdateSelectedGames(SteamGamesList.SelectedItems)
From ccdac2258916ef8f3d6973677adcad6a29e1705d Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 6 Sep 2026 10:41:50 +1000
Subject: [PATCH 058/134] Split Queue into its own view and added it to all
pages
---
CompactGUI/MainWindow.xaml | 30 ++-
CompactGUI/MainWindow.xaml.vb | 2 +
CompactGUI/Resources/Localisation/en-AU.toml | 1 -
CompactGUI/Resources/Localisation/es-ES.toml | 2 +-
CompactGUI/Resources/Localisation/ru-RU.toml | 2 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 2 +-
CompactGUI/ViewModels/MainWindowViewModel.vb | 8 +
CompactGUI/Views/Pages/FolderView.xaml | 2 +-
CompactGUI/Views/Pages/HomePage.xaml | 254 ++++--------------
CompactGUI/Views/Pages/HomePage.xaml.vb | 2 +-
.../Views/Pages/PendingCompression.xaml | 32 ++-
CompactGUI/Views/Pages/QueueSidebar.xaml | 159 +++++++++++
CompactGUI/Views/Pages/QueueSidebar.xaml.vb | 32 +++
13 files changed, 296 insertions(+), 232 deletions(-)
create mode 100644 CompactGUI/Views/Pages/QueueSidebar.xaml
create mode 100644 CompactGUI/Views/Pages/QueueSidebar.xaml.vb
diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml
index 94a3af12..28bd0202 100644
--- a/CompactGUI/MainWindow.xaml
+++ b/CompactGUI/MainWindow.xaml
@@ -63,8 +63,7 @@
Tag="{Binding}"
TargetPageType="{x:Type local:SteamMonitorPage}">
-
@@ -114,7 +113,32 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CompactGUI/MainWindow.xaml.vb b/CompactGUI/MainWindow.xaml.vb
index 185b3d03..565cd587 100644
--- a/CompactGUI/MainWindow.xaml.vb
+++ b/CompactGUI/MainWindow.xaml.vb
@@ -52,10 +52,12 @@ Class MainWindow : Implements INavigationWindow, INotifyPropertyChanged
Private Sub OnNavigated(sender As NavigationView, args As NavigatedEventArgs)
If args.Page.GetType Is GetType(HomePage) Then
_isOnHomePage = True
+ QueueOverlayHost.Visibility = Visibility.Collapsed
_MainWindowViewModel.IsActive = True
HVPropertyChanged(Application.GetService(Of HomeViewModel)(), New PropertyChangedEventArgs(NameOf(HomeViewModel.HomeViewIsFresh)))
Else
_isOnHomePage = False
+ QueueOverlayHost.Visibility = Visibility.Visible
_MainWindowViewModel.IsActive = False
ProgTitle.Visibility = Visibility.Visible
End If
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index a1e08304..aa8bc85e 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -5,7 +5,6 @@
# Translations
"Add" = "Add"
-"Add Folder to Queue" = "Add Folder to Queue"
"Add a custom folder to the watchlist" = "Add a custom folder to the watchlist"
"Add selected to queue" = "Add selected to queue"
"Add to Compression Queue" = "Add to Compression Queue"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 033c454c..0a003c0f 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -5,7 +5,6 @@
# Translations
"Add" = "Añadir "
-"Add Folder to Queue" = "Añadir carpeta a la cola"
"Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista"
"Add selected to queue" = "Add selected to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
@@ -229,6 +228,7 @@
"saved" = "ahorrado"
[obsolete]
+"Add Folder to Queue" = "Añadir carpeta a la cola"
"Add all to queue" = "Add all to queue" # LOC:TODO
"Custom list — {0} entries" = "Lista personalizada — {0} entradas"
"Custom: {0} entries" = "Personalizada: {0} entradas"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index 282c4269..91d3e511 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -5,7 +5,6 @@
# Translations
"Add" = "Добавить"
-"Add Folder to Queue" = "Добавить папку в очередь"
"Add a custom folder to the watchlist" = "Добавить свою папку в список отслеживания"
"Add selected to queue" = "Add selected to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
@@ -229,6 +228,7 @@
"saved" = "сэкономлено"
[obsolete]
+"Add Folder to Queue" = "Добавить папку в очередь"
"Add all to queue" = "Add all to queue" # LOC:TODO
"Custom list — {0} entries" = "Свой список — {0} записей"
"Custom: {0} entries" = "Свой: {0} записей"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 46c5cd77..20934ac5 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -5,7 +5,6 @@
# Translations
"Add" = "添加"
-"Add Folder to Queue" = "添加文件夹到队列"
"Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表"
"Add selected to queue" = "Add selected to queue" # LOC:TODO
"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
@@ -229,6 +228,7 @@
"saved" = "已节省"
[obsolete]
+"Add Folder to Queue" = "添加文件夹到队列"
"Add all to queue" = "Add all to queue" # LOC:TODO
"Custom list — {0} entries" = "自定义列表 — {0} 条"
"Custom: {0} entries" = "自定义: {0} 条"
diff --git a/CompactGUI/ViewModels/MainWindowViewModel.vb b/CompactGUI/ViewModels/MainWindowViewModel.vb
index bf6f914c..3855106d 100644
--- a/CompactGUI/ViewModels/MainWindowViewModel.vb
+++ b/CompactGUI/ViewModels/MainWindowViewModel.vb
@@ -12,6 +12,9 @@ Partial Public Class MainWindowViewModel : Inherits ObservableRecipient : Implem
Private _BackgroundImage As BitmapImage
+
+ Private _IsQueueSidebarOpen As Boolean
+
Private ReadOnly _watcher As Watcher.Watcher
Private ReadOnly _windowService As IWindowService
Private ReadOnly _settingsService As ISettingsService
@@ -35,6 +38,11 @@ Partial Public Class MainWindowViewModel : Inherits ObservableRecipient : Implem
_windowService.ShowMainWindow()
End Sub
+
+ Private Sub ToggleQueueSidebar()
+ IsQueueSidebarOpen = Not IsQueueSidebarOpen
+ End Sub
+
Private Async Function NotifyIconExit() As Task
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 14ff352a..3d1d4e5c 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -198,7 +198,7 @@
CanContentScroll="True" Focusable="False" IsDeferredScrollingEnabled="False">
-
diff --git a/CompactGUI/Views/Pages/HomePage.xaml b/CompactGUI/Views/Pages/HomePage.xaml
index b64d9713..e326089c 100644
--- a/CompactGUI/Views/Pages/HomePage.xaml
+++ b/CompactGUI/Views/Pages/HomePage.xaml
@@ -2,22 +2,28 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CompactGUI"
xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
+ xmlns:local="clr-namespace:CompactGUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" Background="Transparent"
- x:Name="Root" Title="HomePage" AllowDrop="True" DragOver="Root_DragOver" Drop="Root_Drop"
+ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
+ x:Name="Root"
+ Title="HomePage"
d:DataContext="{d:DesignInstance Type=local:HomeViewModel}"
- d:DesignHeight="450" d:DesignWidth="800"
+ d:DesignHeight="450"
+ d:DesignWidth="800"
+ AllowDrop="True"
+ Background="Transparent"
+ DragOver="Root_DragOver"
+ Drop="Root_Drop"
mc:Ignorable="d">
-
@@ -25,13 +31,11 @@
-
+
-
+
-
+
+
-
-
+
+
-
+
@@ -110,8 +113,11 @@
-
-
+
+
@@ -127,18 +133,16 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -156,185 +160,23 @@
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Visibility="{Binding HomeViewIsFresh, Converter={StaticResource BooleanToInverseVisibilityConverter}, Mode=OneWay}">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ ResizeBehavior="PreviousAndCurrent" />
-
-
diff --git a/CompactGUI/Views/Pages/HomePage.xaml.vb b/CompactGUI/Views/Pages/HomePage.xaml.vb
index b017dcdb..556994e6 100644
--- a/CompactGUI/Views/Pages/HomePage.xaml.vb
+++ b/CompactGUI/Views/Pages/HomePage.xaml.vb
@@ -16,7 +16,7 @@
End Sub
- Private Async Sub AddFolderButton_Click(sender As Object, e As RoutedEventArgs) Handles BtnAddFolder1.Click, BtnAddFolder2.Click
+ Private Async Sub AddFolderButton_Click(sender As Object, e As RoutedEventArgs) Handles BtnAddFolder1.Click
Dim folderBrowser As New Microsoft.Win32.OpenFolderDialog With {
.Title = "Select a folder to compress".LT(),
.Multiselect = True,
diff --git a/CompactGUI/Views/Pages/PendingCompression.xaml b/CompactGUI/Views/Pages/PendingCompression.xaml
index ca9d03ae..a55aca0b 100644
--- a/CompactGUI/Views/Pages/PendingCompression.xaml
+++ b/CompactGUI/Views/Pages/PendingCompression.xaml
@@ -3,8 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core="clr-namespace:CompactGUI.Core;assembly=CompactGUI.Core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:local="clr-namespace:CompactGUI"
- xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DataContext="{d:DesignInstance Type=local:FolderViewModel}"
@@ -22,8 +22,8 @@
-
+
-->
-
+
@@ -136,17 +135,16 @@
+ Text="{loc:Binding Folder.SkippedFileCount,
+ Format={} {0} files will be skipped}" />
-
+
@@ -157,9 +155,9 @@
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
new file mode 100644
index 00000000..f9907a1e
--- /dev/null
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml.vb b/CompactGUI/Views/Pages/QueueSidebar.xaml.vb
new file mode 100644
index 00000000..d1b45b88
--- /dev/null
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml.vb
@@ -0,0 +1,32 @@
+Class QueueSidebar
+
+ Public Shared ReadOnly ShowCloseButtonProperty As DependencyProperty =
+ DependencyProperty.Register(NameOf(ShowCloseButton), GetType(Boolean), GetType(QueueSidebar), New PropertyMetadata(True))
+
+ Public Property ShowCloseButton As Boolean
+ Get
+ Return CBool(GetValue(ShowCloseButtonProperty))
+ End Get
+ Set(value As Boolean)
+ SetValue(ShowCloseButtonProperty, value)
+ End Set
+ End Property
+
+ Public Sub New()
+ InitializeComponent()
+ DataContext = Application.GetService(Of HomeViewModel)()
+ End Sub
+
+ Private Async Sub AddFolderButton_Click(sender As Object, e As RoutedEventArgs)
+ Dim folderBrowser As New Microsoft.Win32.OpenFolderDialog With {
+ .Title = "Select a folder to compress".LT(),
+ .Multiselect = True,
+ .ValidateNames = True
+ }
+ folderBrowser.ShowDialog()
+
+ If folderBrowser.FolderNames.Length > 0 Then
+ Await CType(DataContext, HomeViewModel).AddFoldersAsync(folderBrowser.FolderNames)
+ End If
+ End Sub
+End Class
From c3487bcc8a79e5e8d4d3002c028fb7c27c474317 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 7 Sep 2026 20:34:05 +1000
Subject: [PATCH 059/134] Make the queue overlay hide when interacting with the
rest of the UI
---
CompactGUI/MainWindow.xaml | 12 ++++++------
CompactGUI/MainWindow.xaml.vb | 7 +++++++
CompactGUI/Views/Pages/QueueSidebar.xaml | 16 +++++++++-------
3 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml
index 28bd0202..00fb5eda 100644
--- a/CompactGUI/MainWindow.xaml
+++ b/CompactGUI/MainWindow.xaml
@@ -31,7 +31,7 @@
-
+
@@ -114,13 +114,12 @@
-
-
+
@@ -128,13 +127,14 @@
-
-
+
diff --git a/CompactGUI/MainWindow.xaml.vb b/CompactGUI/MainWindow.xaml.vb
index 565cd587..c1a6d9b9 100644
--- a/CompactGUI/MainWindow.xaml.vb
+++ b/CompactGUI/MainWindow.xaml.vb
@@ -77,6 +77,13 @@ Class MainWindow : Implements INavigationWindow, INotifyPropertyChanged
End If
End Sub
+ Private Sub Root_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
+ If _isOnHomePage OrElse Not _MainWindowViewModel.IsQueueSidebarOpen Then Return
+ If QueueHostBorder.IsMouseOver Then Return
+
+ _MainWindowViewModel.IsQueueSidebarOpen = False
+ End Sub
+
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub SetServiceProvider(serviceProvider As IServiceProvider) Implements INavigationWindow.SetServiceProvider
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index f9907a1e..b606f8ca 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -6,13 +6,12 @@
xmlns:local="clr-namespace:CompactGUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
- x:Name="PageRoot" HorizontalContentAlignment="Stretch"
+ x:Name="PageRoot"
+ HorizontalContentAlignment="Stretch"
d:DataContext="{d:DesignInstance Type=local:HomeViewModel}"
TextBlock.Foreground="{StaticResource TextControlForeground}"
mc:Ignorable="d">
-
+
@@ -27,8 +26,11 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ Text="{Binding CompressionProgress.FileName, Converter={StaticResource TokenisedFolderPathConverter}, ConverterParameter=TrimStart}"
+ />
+
+
+
+
+
+
+
+
+
@@ -125,32 +208,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
-
+ Command="{Binding ActiveFolderViewModel.PauseCommand}">
+
+ Command="{Binding ActiveFolderViewModel.CancelCommand}">
From a6fe2e43e9ca92e00051354d8ac92b1d15985f52 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 10:56:45 +1000
Subject: [PATCH 061/134] UI tweaks to the Queue
---
CompactGUI/ViewModels/HomeViewModel.vb | 6 +-
CompactGUI/Views/Pages/QueueSidebar.xaml | 76 +++++++++++++++---------
2 files changed, 53 insertions(+), 29 deletions(-)
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index 75ea4372..c9a599bb 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -151,6 +151,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
If e.PropertyName = NameOf(CompressableFolder.FolderActionState) Then
OnPropertyChanged(NameOf(HomeViewModelState))
Application.Current.Dispatcher.Invoke(Sub() RemoveFolderCommand.NotifyCanExecuteChanged())
+ Application.Current.Dispatcher.Invoke(Sub() CompressAllCommand.NotifyCanExecuteChanged())
End If
If e.PropertyName = NameOf(CompressableFolder.FolderActionState) OrElse
@@ -203,6 +204,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Sub OnFoldersCollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
OnPropertyChanged(NameOf(HomeViewModelState))
+ CompressAllCommand.NotifyCanExecuteChanged()
If e.Action = NotifyCollectionChangedAction.Add Then
For Each folder As CompressableFolder In e.NewItems
AddHandler folder.PropertyChanged, AddressOf OnAnyFolderPropertyChanged
@@ -406,7 +408,9 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Function CanCompressAll() As Boolean
- Return HomeViewModelState <> ActionState.Working AndAlso Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing)
+ Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle) AndAlso
+ HomeViewModelState <> ActionState.Working AndAlso
+ Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing)
End Function
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index e01fd54a..5483aa12 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -109,11 +109,13 @@
-
-
@@ -134,8 +136,8 @@
Text="{Binding CompressionOptions.SelectedCompressionMode, Converter={StaticResource CompressionModeAbbreviatedConverter}}" />
-
+
-
-
-
+
@@ -241,26 +238,49 @@
Text="{Binding TotalSaved, Mode=OneWay, Converter={StaticResource BytesToReadableConverter}}" />
-
-
+
+
+
+
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
+
From 4d08e5e571eec921c376c60d36c3ef5aa70e8783 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 11:33:07 +1000
Subject: [PATCH 062/134] Speed up loading of Steam Library by separating the
list loading from analysing
---
CompactGUI/Resources/Localisation/en-AU.toml | 1 +
CompactGUI/Resources/Localisation/es-ES.toml | 1 +
CompactGUI/Resources/Localisation/ru-RU.toml | 1 +
CompactGUI/Resources/Localisation/zh-CN.toml | 1 +
.../ViewModels/SteamMonitorViewModel.vb | 64 +++++++++++++++++--
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 18 +++++-
6 files changed, 78 insertions(+), 8 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index aa8bc85e..972a4574 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -16,6 +16,7 @@
"Aggression of online skiplist" = "Aggression of online skiplist"
"Always show details on Compression Mode buttons" = "Always show details on Compression Mode buttons"
"Analysing" = "Analysing"
+"Analysing..." = "Analysing..."
"Applied to all folders" = "Applied to all folders"
"Apply to all" = "Apply to all"
"Ascending" = "Ascending"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 0a003c0f..182aef5d 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -16,6 +16,7 @@
"Aggression of online skiplist" = "Agresividad de la lista de omisión online"
"Always show details on Compression Mode buttons" = "Mostrar siempre detalles en botones de modo de compresión"
"Analysing" = "Analizando"
+"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "Aplicado a todas las carpetas"
"Apply to all" = "Aplicar a todo"
"Ascending" = "Ascendente"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index 91d3e511..b9caebca 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -16,6 +16,7 @@
"Aggression of online skiplist" = "Уровень агрессивности онлайн-списка пропуска"
"Always show details on Compression Mode buttons" = "Всегда показывать подробности на кнопках режимов сжатия"
"Analysing" = "Анализ"
+"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "Применено ко всем папкам"
"Apply to all" = "Применить ко всем"
"Ascending" = "По возрастанию"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 20934ac5..dd739d48 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -16,6 +16,7 @@
"Aggression of online skiplist" = "在线跳过列表的激进程度"
"Always show details on Compression Mode buttons" = "始终显示压缩模式按钮的详细信息"
"Analysing" = "正在分析"
+"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "已应用到所有文件夹"
"Apply to all" = "应用到所有"
"Ascending" = "升序"
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 12a0fc31..a8493b49 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -5,6 +5,7 @@ Imports System.IO
Imports System.Net.Http
Imports System.Text.Json
Imports System.Threading
+Imports System.Windows.Threading
Imports System.Windows.Input
Imports CommunityToolkit.Mvvm.ComponentModel
@@ -46,6 +47,10 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private _isLoading As Boolean
+
+
+ Private _isAnalysingGames As Boolean
+
Private _errorMessage As String
@@ -158,11 +163,15 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End If
End If
- OnPropertyChanged(NameOf(HasNoGames))
- NotifySavingsTotalsChanged()
+ If Not IsLoading Then
+ OnPropertyChanged(NameOf(HasNoGames))
+ NotifySavingsTotalsChanged()
+ End If
End Sub
Private Sub OnSteamGamePropertyChanged(sender As Object, e As PropertyChangedEventArgs)
+ If IsAnalysingGames Then Return
+
Select Case e.PropertyName
Case Nothing, String.Empty, NameOf(SteamDetailedResult.UncompressedBytes), NameOf(SteamDetailedResult.CurrentFolderSize), NameOf(SteamDetailedResult.IsCompressed), NameOf(SteamDetailedResult.RecommendedCompressionMode), NameOf(SteamDetailedResult.ExpectedCompressionSavings), NameOf(SteamDetailedResult.HasCompressionEstimate)
NotifySavingsTotalsChanged()
@@ -191,7 +200,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Function
Private Function CanRefreshAll() As Boolean
- Return Not IsLoading AndAlso _activeGame Is Nothing
+ Return Not IsLoading AndAlso Not IsAnalysingGames AndAlso _activeGame Is Nothing
End Function
@@ -323,6 +332,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If _hasLoaded OrElse IsLoading Then Return
Dim imageLoadTasks As New List(Of Task)
+ Dim gamesToAnalyse As New List(Of SteamDetailedResult)
+ Dim displayedGames As New List(Of SteamDetailedResult)
IsLoading = True
ErrorMessage = Nothing
@@ -339,6 +350,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Try
Dim databaseByAppId = databaseResults.GroupBy(Function(result) result.SteamID).ToDictionary(Function(group) group.Key, Function(group) group.First())
+ Dim watchedByPath = _watcher.WatchedFolders.GroupBy(Function(folder) folder.Folder, StringComparer.OrdinalIgnoreCase).ToDictionary(Function(group) group.Key, Function(group) group.First(), StringComparer.OrdinalIgnoreCase)
For Each game In games.OrderBy(Function(item) item.GameName)
If Not Directory.Exists(game.InstallDirectory) Then Continue For
@@ -346,24 +358,57 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Dim databaseResult As DatabaseCompressionResult = Nothing
databaseByAppId.TryGetValue(game.AppID, databaseResult)
- Dim watchedFolder = _watcher.WatchedFolders.FirstOrDefault(Function(folder) String.Equals(folder.Folder, game.InstallDirectory, StringComparison.OrdinalIgnoreCase))
+ Dim watchedFolder As Watcher.WatchedFolder = Nothing
+ watchedByPath.TryGetValue(game.InstallDirectory, watchedFolder)
Dim detailedResult = CreateDetailedResult(game, databaseResult, watchedFolder)
- Await AnalyseGameAsync(detailedResult)
- If detailedResult.CurrentFolderSize > 0 Then
+ Dim requiresAnalysis = Not TryApplyWatchedAnalysis(detailedResult, game, watchedFolder)
+
+ If requiresAnalysis Then gamesToAnalyse.Add(detailedResult)
+ If requiresAnalysis OrElse detailedResult.CurrentFolderSize > 0 Then
+ displayedGames.Add(detailedResult)
SteamGamesData.Add(detailedResult)
- imageLoadTasks.Add(LoadGameHeaderAsync(detailedResult, steamFolder))
End If
Next
+
+ _hasLoaded = True
+ IsAnalysingGames = gamesToAnalyse.Count > 0
+ IsLoading = False
+ OnPropertyChanged(NameOf(HasNoGames))
+ NotifySavingsTotalsChanged()
+
+ Await Dispatcher.Yield(DispatcherPriority.Background)
+
+ For Each game In displayedGames
+ imageLoadTasks.Add(LoadGameHeaderAsync(game, steamFolder))
+ Next
+
+ For Each game In gamesToAnalyse
+ Await AnalyseGameAsync(game)
+ If game.CurrentFolderSize = 0 Then SteamGamesData.Remove(game)
+ Next
Catch ex As Exception
ErrorMessage = $"Steam games could not be loaded: {ex.Message}"
Finally
_hasLoaded = True
IsLoading = False
+ IsAnalysingGames = False
+ OnPropertyChanged(NameOf(HasNoGames))
+ NotifySavingsTotalsChanged()
+ If _statusFilter.HasValue OrElse _recommendedActionFilter.HasValue Then FilteredSteamGames.Refresh()
End Try
If imageLoadTasks.Count > 0 Then Await Task.WhenAll(imageLoadTasks)
End Function
+ Private Shared Function TryApplyWatchedAnalysis(game As SteamDetailedResult, steamGame As SteamACFResult, watchedFolder As Watcher.WatchedFolder) As Boolean
+ If watchedFolder Is Nothing OrElse watchedFolder.HasTargetChanged Then Return False
+ If watchedFolder.LastCheckedDate <= DateTime.UnixEpoch OrElse steamGame.LastUpdated > watchedFolder.LastCheckedDate Then Return False
+ If watchedFolder.LastUncompressedSize <= 0 OrElse watchedFolder.LastCheckedSize <= 0 Then Return False
+
+ game.UpdateAnalysis(watchedFolder.LastUncompressedSize, watchedFolder.LastCheckedSize, watchedFolder.CompressionLevel, False)
+ Return True
+ End Function
+
Private Async Function LoadGameHeaderAsync(game As SteamDetailedResult, steamFolder As DirectoryInfo) As Task
If game.AppID = 0 Then Return
@@ -691,6 +736,7 @@ Public Enum SteamGameStatus
Uncompressed
RecentlyUpdated
PendingSteamUpdate
+ Analysing
End Enum
Public Enum SteamRecommendedAction
@@ -797,6 +843,8 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Return "Recently Updated".LT()
Case SteamGameStatus.PendingSteamUpdate
Return "Update Available".LT()
+ Case SteamGameStatus.Analysing
+ Return "Analysing...".LT()
Case Else
Return "Unknown".LT()
End Select
@@ -875,6 +923,8 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Me.WikiCompressionResults = wikiResults
Me.WikiPoorlyCompressedFiles = poorlyCompressedFiles
CompressionOptions.SkipUserSubmittedFiletypes = poorlyCompressedFiles.Count > 0
+ Status = SteamGameStatus.Analysing
+ RecommendedAction = "Analysing...".LT()
End Sub
Public Sub UpdateAnalysis(uncompressedBytes As Long, currentFolderSize As Long, compressionLevel As Core.WOFCompressionAlgorithm, isDirectStorage As Boolean)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 736d1053..f70f7618 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -32,9 +32,14 @@
Margin="10 2 0 0" Padding="0" VerticalAlignment="Top"
Background="Transparent" BorderThickness="0"
Command="{Binding RefreshAllCommand}"
- ToolTip="{loc:T Reload Steam Library list}">
+ ToolTip="{loc:T Reload Steam Library list}"
+ Visibility="{Binding IsAnalysingGames, Converter={StaticResource BooleanToInverseVisibilityConverter}}">
+
@@ -153,6 +158,10 @@
+
@@ -162,6 +171,10 @@
+
@@ -358,6 +371,9 @@
+
+
+
From 6ce1e39d000df38d342ba0862902594b4d661c6d Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 11:45:18 +1000
Subject: [PATCH 063/134] Layout tweaks for Selection banner on Steam Library
page
---
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index f70f7618..35e9e423 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -1045,7 +1045,7 @@
@@ -1101,11 +1101,11 @@
-
+
From e1a75324159291c03cde7242576e9fa4e4d2c091 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 11:51:47 +1000
Subject: [PATCH 064/134] Reduce wasted space in Queue
---
CompactGUI/Views/Pages/QueueSidebar.xaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 5483aa12..a9c97f8d 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -56,8 +56,8 @@
SelectedItem="{Binding SelectedFolder, Mode=TwoWay}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
+ Height="32"
+ Padding="10 1 10 0"
+ Click="AddFolderButton_Click" TextOptions.TextFormattingMode="Display">
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Text="To process" />
+ FontSize="11" FontWeight="SemiBold"
+ Text="{Binding ToProcessSize, Mode=OneWay, Converter={StaticResource BytesToReadableConverter}}" />
-
+
+ Text="Expected saving" />
+ FontSize="11" FontWeight="SemiBold" Foreground="#45c1e8"
+ Text="{Binding ExpectedSavings, Mode=OneWay, Converter={StaticResource BytesToReadableConverter}}" />
-
+
+ Text="Already saved" />
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml.vb b/CompactGUI/Views/Pages/QueueSidebar.xaml.vb
index d1b45b88..8351a0f3 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml.vb
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml.vb
@@ -29,4 +29,9 @@ Class QueueSidebar
Await CType(DataContext, HomeViewModel).AddFoldersAsync(folderBrowser.FolderNames)
End If
End Sub
+
+ Private Sub QueueSelectionChanged(sender As Object, e As SelectionChangedEventArgs)
+ Dim selectedFolder = If(e.AddedItems.Count > 0, TryCast(e.AddedItems(0), CompressableFolder), Nothing)
+ If selectedFolder IsNot Nothing Then CType(DataContext, HomeViewModel).SelectedFolder = selectedFolder
+ End Sub
End Class
From ac9e340eaa45f1d9834be497f1bf50b8666d08b7 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 16:46:36 +1000
Subject: [PATCH 066/134] Add drag/drop support to reorder the queue
---
CompactGUI/CompactGUI.vbproj | 1 +
CompactGUI/ViewModels/HomeViewModel.vb | 57 +++++++++++++++++++----
CompactGUI/ViewModels/QueueDropHandler.vb | 37 +++++++++++++++
CompactGUI/Views/Pages/QueueSidebar.xaml | 49 +++++++++++++------
4 files changed, 123 insertions(+), 21 deletions(-)
create mode 100644 CompactGUI/ViewModels/QueueDropHandler.vb
diff --git a/CompactGUI/CompactGUI.vbproj b/CompactGUI/CompactGUI.vbproj
index 2705465a..00792754 100644
--- a/CompactGUI/CompactGUI.vbproj
+++ b/CompactGUI/CompactGUI.vbproj
@@ -57,6 +57,7 @@
+
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index ce3fb6d8..f4b67dcd 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -87,6 +87,12 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
End Get
End Property
+ Public ReadOnly Property QueueDropHandler As QueueDropHandler
+ Get
+ Return _queueDropHandler
+ End Get
+ End Property
+
Public ReadOnly Property CompletedFolders As IEnumerable(Of CompressableFolder)
Get
Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Results)
@@ -186,6 +192,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private ReadOnly _logger As ILogger(Of HomeViewModel)
Private ReadOnly _settingsService As ISettingsService
Private ReadOnly _compressableFolderService As CompressableFolderService
+ Private ReadOnly _queueDropHandler As QueueDropHandler
Sub New(watcher As Watcher.Watcher, snackbarService As CustomSnackBarService, logger As ILogger(Of HomeViewModel), settingsService As ISettingsService, compressableFolderService As CompressableFolderService)
WeakReferenceMessenger.Default.Register(Of WatcherAddedFolderToQueueMessage)(Me)
@@ -196,6 +203,39 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
_logger = logger
_settingsService = settingsService
_compressableFolderService = compressableFolderService
+ _queueDropHandler = New QueueDropHandler(Me)
+ End Sub
+
+ Public Function CanReorderQueuedFolder(folder As CompressableFolder) As Boolean
+ Return folder IsNot Nothing AndAlso
+ folder.FolderActionState = ActionState.Idle AndAlso
+ Not Folders.Any(Function(item) item.FolderActionState = ActionState.Analysing)
+ End Function
+
+ Public Sub MoveQueuedFolder(folder As CompressableFolder, insertIndex As Integer)
+ If Not CanReorderQueuedFolder(folder) Then Return
+
+ Dim awaitingFolders = Folders.Where(Function(item) item.FolderActionState = ActionState.Idle).ToList()
+ Dim sourceQueueIndex = awaitingFolders.IndexOf(folder)
+ If sourceQueueIndex < 0 Then Return
+
+ Dim destinationQueueIndex = Math.Max(0, Math.Min(insertIndex, awaitingFolders.Count))
+ If destinationQueueIndex > sourceQueueIndex Then destinationQueueIndex -= 1
+
+ awaitingFolders.RemoveAt(sourceQueueIndex)
+ If destinationQueueIndex > awaitingFolders.Count Then destinationQueueIndex = awaitingFolders.Count
+ If destinationQueueIndex = sourceQueueIndex Then Return
+
+ Dim sourceFolderIndex = Folders.IndexOf(folder)
+ Dim insertionFolderIndex As Integer
+ If destinationQueueIndex < awaitingFolders.Count Then
+ insertionFolderIndex = Folders.IndexOf(awaitingFolders(destinationQueueIndex))
+ Else
+ insertionFolderIndex = Folders.IndexOf(awaitingFolders.Last()) + 1
+ End If
+
+ If sourceFolderIndex < insertionFolderIndex Then insertionFolderIndex -= 1
+ Folders.Move(sourceFolderIndex, insertionFolderIndex)
End Sub
@@ -447,12 +487,14 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Compressing = True
Core.SharedMethods.PreventSleep()
- Dim tasks As New List(Of Task)()
- Dim foldersToCompress = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle).ToList
- HomeViewModelLog.StartingBatchCompression(_logger, foldersToCompress.Count)
- For Each folder In foldersToCompress
- If folder.FolderActionState = ActionState.Idle Then
- Await Task.Run(Async Function()
+ Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle).Count()
+ HomeViewModelLog.StartingBatchCompression(_logger, queuedFolderCount)
+
+ Do
+ Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle)
+ If folder Is Nothing Then Exit Do
+
+ Await Task.Run(Async Function()
HomeViewModelLog.CompressingFolder(_logger, folder.FolderName)
Dim ret = Await _compressableFolderService.CompressFolder(folder)
Dim analysis = Await _compressableFolderService.AnalyseFolderAsync(folder)
@@ -471,8 +513,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Return True
End Function)
- End If
- Next
+ Loop
Compressing = False
For Each folder In Folders.Where(Function(f) f.CompressionOptions.WatchFolderForChanges)
diff --git a/CompactGUI/ViewModels/QueueDropHandler.vb b/CompactGUI/ViewModels/QueueDropHandler.vb
new file mode 100644
index 00000000..4b0d1770
--- /dev/null
+++ b/CompactGUI/ViewModels/QueueDropHandler.vb
@@ -0,0 +1,37 @@
+Imports GongSolutions.Wpf.DragDrop
+Imports System.Windows
+
+Public NotInheritable Class QueueDropHandler
+ Implements IDropTarget
+
+ Private ReadOnly _homeViewModel As HomeViewModel
+
+ Public Sub New(homeViewModel As HomeViewModel)
+ _homeViewModel = homeViewModel
+ End Sub
+
+ Public Sub DragOver(dropInfo As IDropInfo) Implements IDropTarget.DragOver
+ Dim folder = TryCast(dropInfo.Data, CompressableFolder)
+ If Not _homeViewModel.CanReorderQueuedFolder(folder) Then Return
+
+ dropInfo.Effects = DragDropEffects.Move
+ dropInfo.DropTargetAdorner = DropTargetAdorners.Insert
+ End Sub
+
+ Public Sub DragEnter(dropInfo As IDropInfo) Implements IDropTarget.DragEnter
+ End Sub
+
+ Public Sub DragLeave(dropInfo As IDropInfo) Implements IDropTarget.DragLeave
+ End Sub
+
+ Public Sub DropHint(dropHintInfo As IDropHintInfo) Implements IDropTarget.DropHint
+ End Sub
+
+ Public Sub Drop(dropInfo As IDropInfo) Implements IDropTarget.Drop
+ Dim folder = TryCast(dropInfo.Data, CompressableFolder)
+ If folder Is Nothing Then Return
+
+ _homeViewModel.MoveQueuedFolder(folder, dropInfo.InsertIndex)
+ _homeViewModel.SelectedFolder = folder
+ End Sub
+End Class
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 7d634a06..9b3bc8d3 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:local="clr-namespace:CompactGUI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -21,15 +22,34 @@
-
+
-
+
+
+
+
+
+
+
+
+
@@ -141,7 +161,7 @@
@@ -222,9 +242,11 @@
-
-
-
+
+
+
@@ -238,16 +260,17 @@
Height="1"
Margin="8 0" VerticalAlignment="Center"
Background="#40FFFFFF" />
-
-
@@ -265,11 +288,11 @@
Margin="8 0" VerticalAlignment="Center"
Background="#40FFFFFF" />
-
Date: Tue, 8 Sep 2026 17:19:16 +1000
Subject: [PATCH 067/134] Fix deadlock when spamming pause/cancel in the queue.
---
CompactGUI.Core/Compactor.cs | 14 ++++----
CompactGUI.Core/Uncompactor.cs | 15 ++++-----
.../Services/CompressableFolderService.vb | 9 ++++--
CompactGUI/ViewModels/HomeViewModel.vb | 32 ++++++++++++++++++-
CompactGUI/Views/Pages/QueueSidebar.xaml | 4 +--
5 files changed, 54 insertions(+), 20 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 7b43e3d1..7421ffd3 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -23,7 +23,7 @@ public sealed class Compactor : ICompressor, IDisposable
private UInt32 compressionInfoSize;
private long totalProcessedBytes = 0;
- private readonly SemaphoreSlim pauseSemaphore = new SemaphoreSlim(1, 2);
+ private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private ILogger _logger;
@@ -96,8 +96,8 @@ private async Task PauseAndProcessFile(FileDetails file, long totalFilesSize, Ca
{
CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize);
- await pauseSemaphore.WaitAsync(token).ConfigureAwait(false);
- pauseSemaphore.Release();
+ pauseGate.Wait(token);
+ token.ThrowIfCancellationRequested();
var res = WOFCompressFile(file.FileName);
Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
@@ -148,20 +148,20 @@ public async Task> BuildWorkingFilesList()
public void Pause()
{
CompactorLog.CompressionPaused(_logger);
- pauseSemaphore.Wait(cancellationTokenSource.Token);
+ pauseGate.Reset();
}
public void Resume()
{
- if (pauseSemaphore.CurrentCount == 0) pauseSemaphore.Release();
+ pauseGate.Set();
CompactorLog.CompressionResumed(_logger);
}
public void Cancel()
{
- Resume();
+ pauseGate.Set();
cancellationTokenSource.Cancel();
}
@@ -169,7 +169,7 @@ public void Cancel()
public void Dispose()
{
cancellationTokenSource?.Dispose();
- pauseSemaphore?.Dispose();
+ pauseGate?.Dispose();
if (compressionInfoPtr != IntPtr.Zero)
{
Marshal.FreeHGlobal(compressionInfoPtr);
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 17f9a52a..1c8db85e 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -12,7 +12,7 @@ namespace CompactGUI.Core;
public sealed class Uncompactor : ICompressor, IDisposable
{
- private SemaphoreSlim pauseSemaphore = new SemaphoreSlim(1, 2);
+ private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private ConcurrentDictionary processedFileCount = new ConcurrentDictionary();
@@ -27,7 +27,7 @@ public async Task RunAsync(List filesList, IProgress
Private _Compressing As Boolean = False
+ Private _cancelQueueRequested As Boolean
+
+
+ Private Sub PauseQueue()
+ Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused)
+ If activeFolder?.Compressor Is Nothing Then Return
+
+ If activeFolder.FolderActionState = ActionState.Working Then
+ activeFolder.Compressor.Pause()
+ activeFolder.FolderActionState = ActionState.Paused
+ Else
+ activeFolder.Compressor.Resume()
+ activeFolder.FolderActionState = ActionState.Working
+ End If
+ End Sub
+
+
+ Private Sub CancelQueue()
+ Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused)
+ If activeFolder?.Compressor Is Nothing Then Return
+
+ _cancelQueueRequested = True
+ activeFolder.Compressor.Cancel()
+ End Sub
+
@@ -486,6 +511,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Await _watcher.DisableBackgrounding()
Compressing = True
+ _cancelQueueRequested = False
Core.SharedMethods.PreventSleep()
Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle).Count()
HomeViewModelLog.StartingBatchCompression(_logger, queuedFolderCount)
@@ -494,9 +520,12 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle)
If folder Is Nothing Then Exit Do
- Await Task.Run(Async Function()
+ Dim completed = Await Task.Run(Async Function()
HomeViewModelLog.CompressingFolder(_logger, folder.FolderName)
Dim ret = Await _compressableFolderService.CompressFolder(folder)
+
+ If Not ret Then Return False
+
Dim analysis = Await _compressableFolderService.AnalyseFolderAsync(folder)
If _settingsService.AppSettings.ShowNotifications Then
@@ -513,6 +542,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Return True
End Function)
+ If _cancelQueueRequested OrElse Not completed Then Exit Do
Loop
Compressing = False
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 9b3bc8d3..baa98565 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -367,12 +367,12 @@
+ Command="{Binding PauseQueueCommand}">
+ Command="{Binding CancelQueueCommand}">
From ad9d9da193ffaa5fd640747d4211a1484acb4287 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 8 Sep 2026 18:05:23 +1000
Subject: [PATCH 068/134] fix multiselection in queue
---
CompactGUI/Views/Pages/QueueSidebar.xaml | 6 ++++--
CompactGUI/Views/Pages/QueueSidebar.xaml.vb | 10 +++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index baa98565..2dbbb511 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -265,7 +265,8 @@
Foreground="{StaticResource CardForegroundDisabled}"
Text="{Binding UpNextFolderCount, Mode=OneWay}" />
-
- 0, TryCast(e.AddedItems(0), CompressableFolder), Nothing)
- If selectedFolder IsNot Nothing Then CType(DataContext, HomeViewModel).SelectedFolder = selectedFolder
+ If selectedFolder Is Nothing Then Return
+
+ If ReferenceEquals(sender, UpNextListView) Then
+ CompletedListView.SelectedItem = Nothing
+ Else
+ UpNextListView.SelectedItem = Nothing
+ End If
+
+ CType(DataContext, HomeViewModel).SelectedFolder = selectedFolder
End Sub
End Class
From ea67f26022f95171b8bcebdd3542befc25667287 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 11 Sep 2026 16:59:33 +1000
Subject: [PATCH 069/134] Layout tweaks and add progress rings to quueue
---
CompactGUI/Views/Pages/QueueSidebar.xaml | 44 +++++++++++++++---------
1 file changed, 27 insertions(+), 17 deletions(-)
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 2dbbb511..0c0edd73 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -22,20 +22,21 @@
-
+
-
-
+ IsHitTestVisible="False" Text="⋮⋮" >
+
+
+
+
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Background="{StaticResource CardBackgroundFillColorSecondaryBrush}"
+ Command="{Binding SubmitToWikiCommand}">
From c080ee6bfa295ba6bd8fd52396c2a6d903c22491 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 11 Sep 2026 20:21:28 +1000
Subject: [PATCH 073/134] Update Pending Compression layout. Make "Apply to all
folders in queue" button more informative and hide it if there is only one
item in queue
---
.../Components/Converters/Converters.xaml | 1 +
.../Components/Converters/IValueConverters.vb | 28 +-
CompactGUI/Resources/Localisation/en-AU.toml | 12 +-
CompactGUI/Resources/Localisation/es-ES.toml | 22 +-
CompactGUI/Resources/Localisation/ru-RU.toml | 22 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 22 +-
.../Views/Pages/PendingCompression.xaml | 288 +++++++++++++++---
CompactGUI/Views/Pages/ResultsTemplate.xaml | 10 +-
8 files changed, 319 insertions(+), 86 deletions(-)
diff --git a/CompactGUI/Components/Converters/Converters.xaml b/CompactGUI/Components/Converters/Converters.xaml
index 4f9cee8f..f0279652 100644
--- a/CompactGUI/Components/Converters/Converters.xaml
+++ b/CompactGUI/Components/Converters/Converters.xaml
@@ -23,6 +23,7 @@
+
diff --git a/CompactGUI/Components/Converters/IValueConverters.vb b/CompactGUI/Components/Converters/IValueConverters.vb
index acbca094..fac5c17a 100644
--- a/CompactGUI/Components/Converters/IValueConverters.vb
+++ b/CompactGUI/Components/Converters/IValueConverters.vb
@@ -210,7 +210,16 @@ Public Class SelectedModeEstimatedSavingsConverter : Implements IMultiValueConve
result = results.LZX
End Select
- Dim savings = If(result Is Nothing, 0L, Math.Max(0, result.BytesSaved))
+ Dim savings As Long
+
+ If parameter Is Nothing Then
+ savings = If(result Is Nothing, 0L, Math.Max(0, result.BytesSaved))
+ ElseIf CStr(parameter) = "AB" Then
+ savings = If(result Is Nothing, 0L, Math.Max(0, result.AfterBytes))
+
+ End If
+
+
Return New BytesToReadableConverter().Convert(savings, GetType(String), Nothing, culture)
End Function
@@ -219,7 +228,6 @@ Public Class SelectedModeEstimatedSavingsConverter : Implements IMultiValueConve
End Function
End Class
-
Public Class ConfidenceIntToStringConverter : Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case value
@@ -339,6 +347,22 @@ Public Class BooleanToInverseVisibilityConverter : Implements IValueConverter
End Class
+Public Class WidthAtMostConverter : Implements IValueConverter
+ Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
+ Dim width As Double
+ Dim threshold As Double
+
+ If value Is Nothing OrElse Not Double.TryParse(value.ToString(), NumberStyles.Float, culture, width) Then Return False
+ If parameter Is Nothing OrElse Not Double.TryParse(parameter.ToString(), NumberStyles.Float, CultureInfo.InvariantCulture, threshold) Then Return False
+
+ Return width <= threshold
+ End Function
+
+ Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
+ Throw New NotImplementedException()
+ End Function
+End Class
+
Public Class EnumToRadioButtonConverter : Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Dim enumValue = CType(value, [Enum])
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index 972a4574..6d51cf1b 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -18,16 +18,17 @@
"Analysing" = "Analysing"
"Analysing..." = "Analysing..."
"Applied to all folders" = "Applied to all folders"
-"Apply to all" = "Apply to all"
"Ascending" = "Ascending"
"Awaiting Compression" = "Awaiting Compression"
"Background Watcher Settings" = "Background Watcher Settings"
+"COMPARE METHODS" = "COMPARE METHODS"
"Cancel" = "Cancel"
"Cancel Background Compressor" = "Cancel Background Compressor"
"Cancel operation" = "Cancel operation"
"Cancelling..." = "Cancelling..."
"Cannot remove folder" = "Cannot remove folder"
"Check for pre-release updates" = "Check for pre-release updates"
+"Choose Compression" = "Choose Compression"
"Clear filters" = "Clear filters"
"Click to download" = "Click to download"
"CompactGUI" = "CompactGUI"
@@ -40,11 +41,9 @@
"Compressing..." = "Compressing..."
"Compression" = "Compression"
"Compression DB" = "Compression DB"
-"Compression Mode" = "Compression Mode"
"Compression Settings" = "Compression Settings"
"Compression Summary" = "Compression Summary"
"Compression options have been applied to all folders" = "Compression options have been applied to all folders"
-"Configuration" = "Configuration"
"Current Size" = "Current Size"
"Database Results" = "Database Results"
"Descending" = "Descending"
@@ -53,13 +52,12 @@
"Do Not Compress" = "Do Not Compress"
"Do not compress" = "Do not compress"
"Drive unavailable" = "Drive unavailable"
-"Edit skip list for this folder" = "Edit skip list for this folder"
+"Edit list" = "Edit list"
"Estimate Compression for non-Steam Folders (beta)" = "Estimate Compression for non-Steam Folders (beta)"
"Estimated size" = "Estimated size"
"Exit" = "Exit"
"Extensions in this folder" = "Extensions in this folder"
"Failed to submit to wiki" = "Failed to submit to wiki"
-"Files Compressed" = "Files Compressed"
"Filetype Management" = "Filetype Management"
"Filter" = "Filter"
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser."
@@ -120,7 +118,6 @@
"Show notification on completion" = "Show notification on completion"
"Sort" = "Sort"
"Sort By" = "Sort By"
-"Space Saved" = "Space Saved"
"Start CompactGUI in system tray" = "Start CompactGUI in system tray"
"Status" = "Status"
"Steam Library" = "Steam Library"
@@ -142,8 +139,8 @@
"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}"
"Update Settings" = "Update Settings"
"Update in Steam" = "Update in Steam"
+"Use exclusions" = "Use exclusions"
"Use recommended mode" = "Use recommended mode"
-"Use skip list" = "Use skip list"
"Version" = "Version"
"Watch folder for changes" = "Watch folder for changes"
"Watched Folders" = "Watched Folders"
@@ -172,7 +169,6 @@
"{0:0} days ago" = "{0:0} days ago"
"{0:0} hours ago" = "{0:0} hours ago"
"{0:0} minutes ago" = "{0:0} minutes ago"
-"{0} files will be skipped" = "{0} files will be skipped"
"{0} saved" = "{0} saved"
"{0}% decayed" = "{0}% decayed"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 182aef5d..d3e54e8b 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -18,16 +18,17 @@
"Analysing" = "Analizando"
"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "Aplicado a todas las carpetas"
-"Apply to all" = "Aplicar a todo"
"Ascending" = "Ascendente"
"Awaiting Compression" = "Esperando compresión"
"Background Watcher Settings" = "Ajustes del Monitor en segundo plano"
+"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
"Cancel" = "Cancelar "
"Cancel Background Compressor" = "Cancelar compresor en segundo plano"
"Cancel operation" = "Cancel operation" # LOC:TODO
"Cancelling..." = "Cancelling..." # LOC:TODO
"Cannot remove folder" = "No se puede eliminar la carpeta"
"Check for pre-release updates" = "Buscar actualizaciones preliminares"
+"Choose Compression" = "Choose Compression" # LOC:TODO
"Clear filters" = "Clear filters" # LOC:TODO
"Click to download" = "Clic para descargar"
"CompactGUI" = "CompactGUI"
@@ -40,11 +41,9 @@
"Compressing..." = "Compressing..." # LOC:TODO
"Compression" = "Compresión"
"Compression DB" = "DB de Compresión"
-"Compression Mode" = "Modo de compresión"
"Compression Settings" = "Ajustes de compresión"
"Compression Summary" = "Resumen de compresión"
"Compression options have been applied to all folders" = "Las opciones de compresión se han aplicado a todas las carpetas"
-"Configuration" = "Configuración"
"Current Size" = "Current Size" # LOC:TODO
"Database Results" = "Resultados de la base de datos"
"Descending" = "Descendente"
@@ -53,13 +52,12 @@
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Do not compress" # LOC:TODO
"Drive unavailable" = "Drive unavailable" # LOC:TODO
-"Edit skip list for this folder" = "Editar lista de exclusión de esta carpeta"
+"Edit list" = "Edit list" # LOC:TODO
"Estimate Compression for non-Steam Folders (beta)" = "Estimar compresión para carpetas no-Steam (beta)"
"Estimated size" = "Tamaño estimado"
"Exit" = "Salir"
"Extensions in this folder" = "Extensiones en esta carpeta"
"Failed to submit to wiki" = "Fallo al enviar a la wiki"
-"Files Compressed" = "Archivos comprimidos"
"Filetype Management" = "Gestión de tipos de archivo"
"Filter" = "Filter" # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente."
@@ -120,7 +118,6 @@
"Show notification on completion" = "Mostrar notificación al finalizar"
"Sort" = "Sort" # LOC:TODO
"Sort By" = "Ordenar por"
-"Space Saved" = "Espacio ahorrado"
"Start CompactGUI in system tray" = "Iniciar CompactGUI en la bandeja del sistema"
"Status" = "Status" # LOC:TODO
"Steam Library" = "Steam Library" # LOC:TODO
@@ -142,8 +139,8 @@
"Update Available ▸ Version {0}" = "Actualización disponible ▸ Versión {0}"
"Update Settings" = "Ajustes de actualización"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use exclusions" = "Use exclusions" # LOC:TODO
"Use recommended mode" = "Use recommended mode" # LOC:TODO
-"Use skip list" = "Usar lista de exclusión"
"Version" = "Versión"
"Watch folder for changes" = "Monitorizar cambios en carpeta"
"Watched Folders" = "Carpetas monitorizadas"
@@ -172,7 +169,6 @@
"{0:0} days ago" = "{0:0} hace días"
"{0:0} hours ago" = "{0:0} hace horas"
"{0:0} minutes ago" = "{0:0} hace minutos"
-"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
"{0} saved" = "{0} ahorrado"
"{0}% decayed" = "{0}% degradado"
@@ -231,9 +227,16 @@
[obsolete]
"Add Folder to Queue" = "Añadir carpeta a la cola"
"Add all to queue" = "Add all to queue" # LOC:TODO
+"Apply Settings to All Items in Queue" = "Apply Settings to All Items in Queue" # LOC:TODO
+"Apply to all" = "Aplicar a todo"
+"COMPRESSION SUMMARY" = "COMPRESSION SUMMARY" # LOC:TODO
+"Compression Mode" = "Modo de compresión"
+"Configuration" = "Configuración"
"Custom list — {0} entries" = "Lista personalizada — {0} entradas"
"Custom: {0} entries" = "Personalizada: {0} entradas"
"DB — {0} files" = "Wiki — {0} archivos"
+"Edit skip list for this folder" = "Editar lista de exclusión de esta carpeta"
+"Files Compressed" = "Archivos comprimidos"
"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "Para juegos de Steam:\nomite archivos basado en resultados de la BD\n\nPara carpetas no-Steam:\nomite archivos basado en estimación de compresión"
"Global + DB — {0} files" = "Global + Wiki — {0} archivos"
"Global — {0} files" = "Global — {0} archivos"
@@ -249,10 +252,13 @@
"Skip file types likely to compress poorly" = "Omitir tipos de archivo difícilmente comprimibles"
"Skip file types specified in settings" = "Omitir tipos de archivo especificados en ajustes"
"Smart: {0} skipped" = "Inteligente: {0} omitidos"
+"Space Saved" = "Espacio ahorrado"
"Use global skiplist" = "Use global skiplist" # LOC:TODO
"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
+"Use skip list" = "Usar lista de exclusión"
"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Welcome" = "Bienvenido"
"decayed" = "degradado"
"files will be skipped" = "archivos serán omitidos"
"not configured" = "no configurado"
+"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index b9caebca..0108c76a 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -18,16 +18,17 @@
"Analysing" = "Анализ"
"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "Применено ко всем папкам"
-"Apply to all" = "Применить ко всем"
"Ascending" = "По возрастанию"
"Awaiting Compression" = "Ожидание сжатия"
"Background Watcher Settings" = "Настройки фонового отслеживания"
+"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
"Cancel" = "Отмена"
"Cancel Background Compressor" = "Отменить фоновое сжатие"
"Cancel operation" = "Cancel operation" # LOC:TODO
"Cancelling..." = "Cancelling..." # LOC:TODO
"Cannot remove folder" = "Не удаётся удалить папку"
"Check for pre-release updates" = "Проверять предварительные версии обновлений"
+"Choose Compression" = "Choose Compression" # LOC:TODO
"Clear filters" = "Clear filters" # LOC:TODO
"Click to download" = "Нажмите, чтобы скачать"
"CompactGUI" = "CompactGUI"
@@ -40,11 +41,9 @@
"Compressing..." = "Compressing..." # LOC:TODO
"Compression" = "Сжатие"
"Compression DB" = "База сжатия"
-"Compression Mode" = "Режим сжатия"
"Compression Settings" = "Настройки сжатия"
"Compression Summary" = "Сводка сжатия"
"Compression options have been applied to all folders" = "Параметры сжатия применены ко всем папкам"
-"Configuration" = "Конфигурация"
"Current Size" = "Current Size" # LOC:TODO
"Database Results" = "Результаты базы данных"
"Descending" = "По убыванию"
@@ -53,13 +52,12 @@
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Do not compress" # LOC:TODO
"Drive unavailable" = "Drive unavailable" # LOC:TODO
-"Edit skip list for this folder" = "Изменить список исключений для этой папки"
+"Edit list" = "Edit list" # LOC:TODO
"Estimate Compression for non-Steam Folders (beta)" = "Оценивать сжатие для папок не из Steam (бета)"
"Estimated size" = "Предполагаемый размер"
"Exit" = "Выход"
"Extensions in this folder" = "Расширения в этой папке"
"Failed to submit to wiki" = "Не удалось отправить в Вики"
-"Files Compressed" = "Файлов сжато"
"Filetype Management" = "Управление типами файлов"
"Filter" = "Filter" # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Для игр Steam используется база данных для определения пропускаемых типов. Для папок не из Steam это основано на умном анализаторе."
@@ -120,7 +118,6 @@
"Show notification on completion" = "Показывать уведомление о завершении"
"Sort" = "Sort" # LOC:TODO
"Sort By" = "Сортировать по"
-"Space Saved" = "Сэкономлено места"
"Start CompactGUI in system tray" = "Запускать CompactGUI в области уведомлений"
"Status" = "Status" # LOC:TODO
"Steam Library" = "Steam Library" # LOC:TODO
@@ -142,8 +139,8 @@
"Update Available ▸ Version {0}" = "Доступно обновление ▸ Версия {0}"
"Update Settings" = "Настройки обновлений"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use exclusions" = "Use exclusions" # LOC:TODO
"Use recommended mode" = "Use recommended mode" # LOC:TODO
-"Use skip list" = "Использовать список исключений"
"Version" = "Версия"
"Watch folder for changes" = "Отслеживать изменения в папке"
"Watched Folders" = "Отслеживаемые папки"
@@ -172,7 +169,6 @@
"{0:0} days ago" = "{0:0} дн. назад"
"{0:0} hours ago" = "{0:0} ч. назад"
"{0:0} minutes ago" = "{0:0} мин. назад"
-"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
"{0} saved" = "{0} сэкономлено"
"{0}% decayed" = "{0}% устарело"
@@ -231,9 +227,16 @@
[obsolete]
"Add Folder to Queue" = "Добавить папку в очередь"
"Add all to queue" = "Add all to queue" # LOC:TODO
+"Apply Settings to All Items in Queue" = "Apply Settings to All Items in Queue" # LOC:TODO
+"Apply to all" = "Применить ко всем"
+"COMPRESSION SUMMARY" = "COMPRESSION SUMMARY" # LOC:TODO
+"Compression Mode" = "Режим сжатия"
+"Configuration" = "Конфигурация"
"Custom list — {0} entries" = "Свой список — {0} записей"
"Custom: {0} entries" = "Свой: {0} записей"
"DB — {0} files" = "Вики — {0} файлов"
+"Edit skip list for this folder" = "Изменить список исключений для этой папки"
+"Files Compressed" = "Файлов сжато"
"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "Для игр Steam:\nпропускает файлы на основе результатов базы данных\n\nДля папок не из Steam:\nпропускает файлы на основе оценки сжатия"
"Global + DB — {0} files" = "Глобальный + Вики — {0} файлов"
"Global — {0} files" = "Глобальный — {0} файлов"
@@ -249,10 +252,13 @@
"Skip file types likely to compress poorly" = "Пропускать типы файлов, которые сжимаются плохо"
"Skip file types specified in settings" = "Пропускать типы файлов, указанные в настройках"
"Smart: {0} skipped" = "Умный: {0} пропущено"
+"Space Saved" = "Сэкономлено места"
"Use global skiplist" = "Use global skiplist" # LOC:TODO
"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
+"Use skip list" = "Использовать список исключений"
"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Welcome" = "Добро пожаловать"
"decayed" = "устарело"
"files will be skipped" = "фл. будет пропущено"
"not configured" = "не настроено"
+"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index dd739d48..cb3d63e3 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -18,16 +18,17 @@
"Analysing" = "正在分析"
"Analysing..." = "Analysing..." # LOC:TODO
"Applied to all folders" = "已应用到所有文件夹"
-"Apply to all" = "应用到所有"
"Ascending" = "升序"
"Awaiting Compression" = "等待压缩"
"Background Watcher Settings" = "后台监控设置"
+"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
"Cancel" = "否"
"Cancel Background Compressor" = "取消后台压缩"
"Cancel operation" = "Cancel operation" # LOC:TODO
"Cancelling..." = "Cancelling..." # LOC:TODO
"Cannot remove folder" = "无法移除文件夹"
"Check for pre-release updates" = "检查预发布更新"
+"Choose Compression" = "Choose Compression" # LOC:TODO
"Clear filters" = "Clear filters" # LOC:TODO
"Click to download" = "点击下载"
"CompactGUI" = "CompactGUI"
@@ -40,11 +41,9 @@
"Compressing..." = "Compressing..." # LOC:TODO
"Compression" = "压缩模式"
"Compression DB" = "压缩数据库"
-"Compression Mode" = "压缩模式"
"Compression Settings" = "压缩设置"
"Compression Summary" = "压缩摘要"
"Compression options have been applied to all folders" = "压缩选项已应用到所有文件夹"
-"Configuration" = "配置"
"Current Size" = "Current Size" # LOC:TODO
"Database Results" = "数据库结果"
"Descending" = "降序"
@@ -53,13 +52,12 @@
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Do not compress" # LOC:TODO
"Drive unavailable" = "Drive unavailable" # LOC:TODO
-"Edit skip list for this folder" = "编辑此文件夹的跳过列表"
+"Edit list" = "Edit list" # LOC:TODO
"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
"Estimated size" = "预估大小"
"Exit" = "退出"
"Extensions in this folder" = "此文件夹中的扩展名"
"Failed to submit to wiki" = "提交到 Wiki 失败"
-"Files Compressed" = "文件已压缩"
"Filetype Management" = "文件类型管理"
"Filter" = "Filter" # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。"
@@ -120,7 +118,6 @@
"Show notification on completion" = "完成后显示通知"
"Sort" = "Sort" # LOC:TODO
"Sort By" = "排序方式"
-"Space Saved" = "节省空间"
"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI"
"Status" = "Status" # LOC:TODO
"Steam Library" = "Steam Library" # LOC:TODO
@@ -142,8 +139,8 @@
"Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}"
"Update Settings" = "更新设置"
"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use exclusions" = "Use exclusions" # LOC:TODO
"Use recommended mode" = "Use recommended mode" # LOC:TODO
-"Use skip list" = "使用跳过列表"
"Version" = "版本"
"Watch folder for changes" = "监控文件夹更改"
"Watched Folders" = "受监控文件夹"
@@ -172,7 +169,6 @@
"{0:0} days ago" = "{0:0} 天前"
"{0:0} hours ago" = "{0:0} 小时前"
"{0:0} minutes ago" = "{0:0} 分钟前"
-"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
"{0} saved" = "{0} 已节省"
"{0}% decayed" = "{0}% 已衰减"
@@ -231,9 +227,16 @@
[obsolete]
"Add Folder to Queue" = "添加文件夹到队列"
"Add all to queue" = "Add all to queue" # LOC:TODO
+"Apply Settings to All Items in Queue" = "Apply Settings to All Items in Queue" # LOC:TODO
+"Apply to all" = "应用到所有"
+"COMPRESSION SUMMARY" = "COMPRESSION SUMMARY" # LOC:TODO
+"Compression Mode" = "压缩模式"
+"Configuration" = "配置"
"Custom list — {0} entries" = "自定义列表 — {0} 条"
"Custom: {0} entries" = "自定义: {0} 条"
"DB — {0} files" = "Wiki — {0} 个文件"
+"Edit skip list for this folder" = "编辑此文件夹的跳过列表"
+"Files Compressed" = "文件已压缩"
"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "对于 Steam 游戏:\n根据数据库结果跳过文件\n\n对于非 Steam 文件夹:\n基于压缩估计跳过文件"
"Global + DB — {0} files" = "全局 + Wiki — {0} 个文件"
"Global — {0} files" = "全局 — {0} 个文件"
@@ -249,10 +252,13 @@
"Skip file types likely to compress poorly" = "跳过可能压缩效果不佳的文件类型"
"Skip file types specified in settings" = "跳过设置中指定的文件类型"
"Smart: {0} skipped" = "智能: 已跳过 {0}"
+"Space Saved" = "节省空间"
"Use global skiplist" = "Use global skiplist" # LOC:TODO
"Use recommended compression level" = "Use recommended compression level" # LOC:TODO
+"Use skip list" = "使用跳过列表"
"Use smart skiplist" = "Use smart skiplist" # LOC:TODO
"Welcome" = "欢迎"
"decayed" = "已衰减"
"files will be skipped" = "个文件将被跳过"
"not configured" = "未配置"
+"{0} files will be skipped" = "{0} files will be skipped" # LOC:TODO
diff --git a/CompactGUI/Views/Pages/PendingCompression.xaml b/CompactGUI/Views/Pages/PendingCompression.xaml
index a55aca0b..7f438cf3 100644
--- a/CompactGUI/Views/Pages/PendingCompression.xaml
+++ b/CompactGUI/Views/Pages/PendingCompression.xaml
@@ -16,6 +16,9 @@
+
+
+
@@ -23,9 +26,107 @@
+ loc:L.Value="Choose Compression" FontSize="14" FontWeight="SemiBold" TextOptions.TextFormattingMode="Display" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -105,60 +206,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Unchecked="UiChkSkipListEnabled_Unchecked">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ Unchecked="uiChkWatchFolderForChanges_Unchecked">
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
diff --git a/CompactGUI/Views/Pages/ResultsTemplate.xaml b/CompactGUI/Views/Pages/ResultsTemplate.xaml
index df3318dd..59d7de19 100644
--- a/CompactGUI/Views/Pages/ResultsTemplate.xaml
+++ b/CompactGUI/Views/Pages/ResultsTemplate.xaml
@@ -26,7 +26,7 @@
+ loc:L.Value="Compression Summary" FontSize="14" FontWeight="SemiBold" TextOptions.TextFormattingMode="Display" />
@@ -45,8 +45,8 @@
-
@@ -97,8 +97,8 @@
From 38eff0029f2682560781443a9ba3338ae6555c73 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sat, 12 Sep 2026 13:41:40 +1000
Subject: [PATCH 074/134] Minor tweaks to compression radios
---
.../Components/CompressionMode_Radio.xaml | 126 +++++++-----------
1 file changed, 45 insertions(+), 81 deletions(-)
diff --git a/CompactGUI/Views/Components/CompressionMode_Radio.xaml b/CompactGUI/Views/Components/CompressionMode_Radio.xaml
index dcce8b3f..f9e9c108 100644
--- a/CompactGUI/Views/Components/CompressionMode_Radio.xaml
+++ b/CompactGUI/Views/Components/CompressionMode_Radio.xaml
@@ -3,19 +3,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:local="clr-namespace:CompactGUI"
- xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
x:Name="Root"
- Width="185" Height="85"
+ Width="185"
+ Height="85"
mc:Ignorable="d">
@@ -32,9 +33,9 @@
+ FontSize="14" FontWeight="SemiBold"
+ Text="{Binding CompressionMode, FallbackValue=XPRESS4K, RelativeSource={RelativeSource TemplatedParent}}">
@@ -42,11 +43,11 @@
@@ -54,22 +55,21 @@
-
+
-
@@ -77,7 +77,7 @@
@@ -87,7 +87,7 @@
@@ -101,7 +101,7 @@
@@ -115,7 +115,7 @@
@@ -125,9 +125,8 @@
+ Margin="-15 -5" VerticalAlignment="Bottom"
+ Background="Transparent" ClipToBounds="True" CornerRadius="5" RenderTransformOrigin="0.5 1">
@@ -139,8 +138,7 @@
-
+
-
+
@@ -169,52 +165,36 @@
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -224,47 +204,31 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
From e69f24306c0cbeaf45b707735fd6bec54206ca43 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sat, 12 Sep 2026 14:05:57 +1000
Subject: [PATCH 075/134] Improve animations in Queue sidebar
---
CompactGUI/Views/Pages/QueueSidebar.xaml | 36 +++++++++++++++---------
1 file changed, 22 insertions(+), 14 deletions(-)
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index df6e1d92..635d9383 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -32,11 +32,11 @@
-
-
+ IsHitTestVisible="False" Text="⋮⋮">
+
@@ -165,6 +169,9 @@
BorderBrush="{StaticResource PaletteRedBrush}"
Command="{Binding Tag.RemoveFolderCommand, RelativeSource={RelativeSource AncestorType=Border}}"
CommandParameter="{Binding}">
+
+
+
+
+ Background="Transparent" BorderThickness="2" CornerRadius="6"
+ Style="{StaticResource QueueOverlayFadeStyle}">
@@ -136,10 +181,12 @@
-
+ local:LiveBlurBackground.BlurRadius="50" local:LiveBlurBackground.EnableBlur="True" Background="#FF445667" BorderBrush="#40FFFFFF"
+ BorderThickness="1" CornerRadius="6"
+ Style="{StaticResource QueueOverlayFadeStyle}">
+
+
+
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 2a149582..595f1da2 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -335,7 +335,7 @@
From ff099b61a2cd8d1a7a59a841fb3324a8dd0caa8b Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 15:33:21 +1000
Subject: [PATCH 083/134] Fix #659
---
CompactGUI.Core/SharedMethods.cs | 29 ++++++++++++++++++-
.../ViewModels/SteamMonitorViewModel.vb | 13 +++++++--
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 79a37426..d1416924 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -26,6 +26,8 @@ public enum FolderVerificationResult
public static FolderVerificationResult VerifyFolder(string folder)
{
+ folder = NormalizeLocalPath(folder);
+
if (!Directory.Exists(folder))
return FolderVerificationResult.DirectoryDoesNotExist;
else if (folder.ToLowerInvariant().Contains(Environment.GetFolderPath(Environment.SpecialFolder.Windows).ToLowerInvariant()))
@@ -36,7 +38,7 @@ public static FolderVerificationResult VerifyFolder(string folder)
return FolderVerificationResult.DirectoryEmptyOrUnauthorized;
else if (IsOneDriveFolder(folder))
return FolderVerificationResult.OneDriveFolder;
- else if (DriveInfo.GetDrives().First(f => folder.StartsWith(f.Name)).DriveFormat != "NTFS")
+ else if (!IsSupportedLocalNtfsDrive(folder))
return FolderVerificationResult.NonNTFSDrive;
else if (!HasDirectoryWritePermission(folder))
return FolderVerificationResult.InsufficientPermission;
@@ -46,6 +48,31 @@ public static FolderVerificationResult VerifyFolder(string folder)
return FolderVerificationResult.Valid;
}
+ public static string NormalizeLocalPath(string folder)
+ {
+ try
+ {
+ return NormalizeLocalDrivePath(new DirectoryInfo(folder).FullName);
+ }
+ catch (ArgumentException)
+ {
+ return folder;
+ }
+ }
+
+ private static string NormalizeLocalDrivePath(string folder)
+ {
+ if (folder.Length < 2 || folder[1] != ':' || !char.IsAsciiLetter(folder[0])) return folder;
+
+ return char.ToUpperInvariant(folder[0]) + folder[1..];
+ }
+
+ private static bool IsSupportedLocalNtfsDrive(string folder)
+ {
+ var drive = DriveInfo.GetDrives().FirstOrDefault(f => folder.StartsWith(f.Name, StringComparison.OrdinalIgnoreCase));
+ return drive is not null && drive.DriveType != DriveType.Network && drive.DriveFormat == "NTFS";
+ }
+
public static string GetFolderVerificationMessage(FolderVerificationResult result)
{
return result switch
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index f16a6a44..41495e12 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -756,8 +756,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End Function
Private Shared Sub AddSteamLibrary(results As List(Of SteamLibraryACFEntry), knownPaths As HashSet(Of String), steamAppsPath As String)
- If Not Directory.Exists(steamAppsPath) OrElse Not knownPaths.Add(steamAppsPath) Then Return
- results.Add(New SteamLibraryACFEntry With {.Path = steamAppsPath})
+ If Not Directory.Exists(steamAppsPath) Then Return
+
+ Dim normalizedSteamAppsPath = Core.SharedMethods.NormalizeLocalPath(steamAppsPath)
+ If Not knownPaths.Add(normalizedSteamAppsPath) Then Return
+ results.Add(New SteamLibraryACFEntry(normalizedSteamAppsPath))
End Sub
Private Class RawSteamLibraryEntry
@@ -768,6 +771,12 @@ End Class
Public Class SteamLibraryACFEntry
Public Property Path As String
+
+ Public Sub New(steamAppsPath As String)
+ 'normalise drive letter to capitals so it doesn't look bad
+ Path = If(String.IsNullOrWhiteSpace(steamAppsPath), String.Empty, Char.ToUpperInvariant(steamAppsPath(0)) & steamAppsPath.Substring(1))
+ End Sub
+
End Class
Public Enum SteamGameStatus
From cf1a7248c13a986f000f9725b724b1915ffc8ebb Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 15:48:09 +1000
Subject: [PATCH 084/134] Intentionally skip Sparse files when compressing
---
CompactGUI.Core/Analyser.cs | 2 +-
CompactGUI.Core/Compactor.cs | 1 +
CompactGUI.Core/SharedObjects.cs | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CompactGUI.Core/Analyser.cs b/CompactGUI.Core/Analyser.cs
index 920e308e..7b0f4337 100644
--- a/CompactGUI.Core/Analyser.cs
+++ b/CompactGUI.Core/Analyser.cs
@@ -116,7 +116,7 @@ private static bool GetContainsCompressedFiles(List fileCom
? WOFCompressionAlgorithm.NO_COMPRESSION
: WOFHelper.DetectCompression(fileInfo);
- return new AnalysedFileDetails { FileName = file, CompressedSize = compressedSize, UncompressedSize = uncompressedSize, CompressionMode = compressionMode};
+ return new AnalysedFileDetails { FileName = file, Attributes = fileInfo.Attributes, CompressedSize = compressedSize, UncompressedSize = uncompressedSize, CompressionMode = compressionMode};
}
catch (IOException ex)
{
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 7421ffd3..2374d475 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -136,6 +136,7 @@ public async Task> BuildWorkingFilesList()
.Where(fl =>
fl.CompressionMode != wofCompressionAlgorithm
&& fl.UncompressedSize > clusterSize
+ && !fl.Attributes.HasFlag(FileAttributes.SparseFile)
&& !excludedFiles.Contains(fl.FileName)
)
.Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize))
diff --git a/CompactGUI.Core/SharedObjects.cs b/CompactGUI.Core/SharedObjects.cs
index 60d557fb..797c9180 100644
--- a/CompactGUI.Core/SharedObjects.cs
+++ b/CompactGUI.Core/SharedObjects.cs
@@ -4,6 +4,7 @@
public sealed class AnalysedFileDetails
{
public required string FileName { get; set; }
+ public FileAttributes Attributes { get; set; }
public long UncompressedSize { get; set; }
public long CompressedSize { get; set; }
public WOFCompressionAlgorithm CompressionMode { get; set; }
From 0c420db7f73f85289955acdaf8422b1d9c79442a Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 16:10:10 +1000
Subject: [PATCH 085/134] Add safety net: Prevent compression of a folder if
there isn't enough free space on the disk to handle: 50% of the folder size +
size of the largest file in the folder
---
CompactGUI.Core/SharedMethods.cs | 25 +++++++++++++++++
CompactGUI.Logging/Core/CompactorLog.cs | 3 ++
CompactGUI.Watcher/BackgroundCompactor.vb | 11 ++++++--
.../CompressableFolders/CompressableFolder.vb | 3 +-
.../Services/CompressableFolderService.vb | 8 ++++++
CompactGUI/ViewModels/HomeViewModel.vb | 22 ++++++++++-----
.../ViewModels/SteamMonitorViewModel.vb | 6 +++-
CompactGUI/Views/Pages/FolderView.xaml | 28 ++++++++++++++-----
CompactGUI/Views/Pages/QueueSidebar.xaml | 17 ++++++++++-
9 files changed, 103 insertions(+), 20 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index d1416924..13a79c86 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -193,6 +193,31 @@ public static unsafe uint GetClusterSize(string folderPath)
}
+ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,IEnumerable analysedFiles,WOFCompressionAlgorithm compressionAlgorithm,IEnumerable exclusionList)
+ {
+ uint clusterSize = GetClusterSize(workingDirectory);
+ var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList);
+ var candidates = analysedFiles.Where(file =>
+ file.CompressionMode != compressionAlgorithm &&
+ file.UncompressedSize > clusterSize &&
+ !file.Attributes.HasFlag(FileAttributes.SparseFile) &&
+ !excludedFiles.Contains(file.FileName))
+ .ToList();
+
+ //Safety check: Must have at least 50% of the folder size free and 1x the largest file in the folder free
+ long requiredBytes = candidates.Sum(file => file.CompressedSize) / 2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max();
+
+ try
+ {
+ var root = Path.GetPathRoot(workingDirectory);
+ return string.IsNullOrWhiteSpace(root) || new DriveInfo(root).AvailableFreeSpace > requiredBytes;
+ }
+ catch (IOException)
+ {
+ return false;
+ }
+ }
+
public static unsafe long GetFileSizeOnDisk(string file)
{
diff --git a/CompactGUI.Logging/Core/CompactorLog.cs b/CompactGUI.Logging/Core/CompactorLog.cs
index 0033d3f7..f17f5889 100644
--- a/CompactGUI.Logging/Core/CompactorLog.cs
+++ b/CompactGUI.Logging/Core/CompactorLog.cs
@@ -22,6 +22,9 @@ public static partial class CompactorLog
[LoggerMessage(Level = LogLevel.Warning, Message = "File compression failed for: {FileName} with error: {ErrorMessage}")]
public static partial void FileCompressionFailed(ILogger logger, string fileName, string errorMessage);
+ [LoggerMessage(Level = LogLevel.Warning, Message = "Compression did not start because the free-space reserve was not met on {Drive}. Available: {AvailableBytes} bytes; reserve: {ReserveBytes} bytes.")]
+ public static partial void FreeSpaceReserveReached(ILogger logger, string drive, long availableBytes, long reserveBytes);
+
[LoggerMessage(Level = LogLevel.Information, Message = "Compression paused.")]
public static partial void CompressionPaused(ILogger logger);
diff --git a/CompactGUI.Watcher/BackgroundCompactor.vb b/CompactGUI.Watcher/BackgroundCompactor.vb
index cdd25343..ecaea1d4 100644
--- a/CompactGUI.Watcher/BackgroundCompactor.vb
+++ b/CompactGUI.Watcher/BackgroundCompactor.vb
@@ -43,17 +43,22 @@ Public Class BackgroundCompactor
End Sub
- Public Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm, Optional excludedFileTypes As String() = Nothing) As Task(Of Boolean)
+ Public Async Function BeginCompacting(folder As String, compressionLevel As Core.WOFCompressionAlgorithm, Optional excludedFileTypes As String() = Nothing) As Task(Of Boolean)
- If compressionLevel = Core.WOFCompressionAlgorithm.NO_COMPRESSION Then Return Task.FromResult(False)
+ If compressionLevel = Core.WOFCompressionAlgorithm.NO_COMPRESSION Then Return False
Dim effectiveExclusions = If(excludedFileTypes Is Nothing, _excludedFileTypes, excludedFileTypes)
_compactorAnalyser = New Core.Analyser(folder, NullLogger(Of Core.Analyser).Instance)
+ Dim analysedFiles = Await _compactorAnalyser.GetAnalysedFilesAsync(cancellationTokenSource.Token)
+ If cancellationTokenSource.IsCancellationRequested OrElse analysedFiles Is Nothing Then Return False
+
+ If Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False
+
_compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, _compactorAnalyser)
If isCompactingPaused Then _compactor.Pause()
- Return _compactor.RunAsync(Nothing)
+ Return Await _compactor.RunAsync(Nothing)
End Function
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 31e626a4..4ce35836 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -34,6 +34,7 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _PoorlyCompressedFiles As List(Of ExtensionResult)
Private _CompressionOptions As New CompressionOptions
Private _IsFreshlyCompressed As Boolean
+ Private _HasInsufficientFreeSpace As Boolean
Private _FolderBGImage As BitmapImage = Nothing
@@ -149,4 +150,4 @@ Public Enum ActionState
Results
Paused
Waiting
-End Enum
\ No newline at end of file
+End Enum
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index de62a551..45dd0e09 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -19,6 +19,8 @@ Public Class CompressableFolderService
Public Async Function CompressFolder(folder As CompressableFolder) As Task(Of Boolean)
+ If folder.HasInsufficientFreeSpace Then Return False
+
folder.Compressor = New Compactor(folder.FolderName, WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode), GetSkipList(folder), folder.Analyser, CompactorLogger)
Return Await RunCompressionAsync(folder, folder.Compressor, Nothing, True)
@@ -106,6 +108,7 @@ Public Class CompressableFolderService
folder.UncompressedBytes = folder.Analyser.UncompressedBytes
folder.CompressedBytes = folder.Analyser.CompressedBytes
folder.IsDirectStorage = folder.Analyser.IsDirectStorage
+ folder.HasInsufficientFreeSpace = Not HasSufficientFreeSpace(folder)
If folder.Analyser.ContainsCompressedFiles OrElse folder.IsFreshlyCompressed Then
folder.FolderActionState = ActionState.Results
@@ -245,6 +248,11 @@ Public Class CompressableFolderService
Return exclist
End Function
+ Public Function HasSufficientFreeSpace(folder As CompressableFolder) As Boolean
+ Dim compressionAlgorithm = WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode)
+ Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder))
+ End Function
+
Private Sub ReleaseToken(folder As CompressableFolder, cts As CancellationTokenSource)
Dim current As CancellationTokenSource = Nothing
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index d37b7c28..695f2146 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -43,7 +43,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Public ReadOnly Property AwaitingFolderCount As Integer
Get
- Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle).Count()
+ Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle AndAlso Not folder.HasInsufficientFreeSpace).Count()
End Get
End Property
@@ -259,7 +259,8 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
e.PropertyName = NameOf(CompressableFolder.UncompressedBytes) OrElse
e.PropertyName = NameOf(CompressableFolder.CompressedBytes) OrElse
e.PropertyName = NameOf(CompressableFolder.WikiCompressionResults) OrElse
- e.PropertyName = NameOf(CompressableFolder.CompressionOptions) Then
+ e.PropertyName = NameOf(CompressableFolder.CompressionOptions) OrElse
+ e.PropertyName = NameOf(CompressableFolder.HasInsufficientFreeSpace) Then
NotifyQueueSummaryChanged()
End If
@@ -269,7 +270,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
End Sub
Private Sub OnCompressionOptionsPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
- If e.PropertyName = NameOf(CompressionOptions.SelectedCompressionMode) Then NotifyQueueSummaryChanged()
+ If e.PropertyName = NameOf(CompressionOptions.SelectedCompressionMode) Then
+ Dim folder = Folders.FirstOrDefault(Function(item) ReferenceEquals(item.CompressionOptions, sender))
+ If folder IsNot Nothing Then folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder)
+ NotifyQueueSummaryChanged()
+ End If
End Sub
Private Sub NotifyQueueSummaryChanged()
@@ -513,11 +518,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Compressing = True
_cancelQueueRequested = False
Core.SharedMethods.PreventSleep()
- Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle).Count()
+ Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace).Count()
HomeViewModelLog.StartingBatchCompression(_logger, queuedFolderCount)
Do
- Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle)
+ Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace)
If folder Is Nothing Then Exit Do
Dim completed = Await Task.Run(Async Function()
@@ -542,7 +547,10 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Return True
End Function)
- If _cancelQueueRequested OrElse Not completed Then Exit Do
+ If Not completed Then
+ Exit Do
+ End If
+ If _cancelQueueRequested Then Exit Do
Loop
Compressing = False
@@ -557,7 +565,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Function CanCompressAll() As Boolean
- Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle) AndAlso
+ Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace) AndAlso
HomeViewModelState <> ActionState.Working AndAlso
Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing)
End Function
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 41495e12..e4033098 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -683,6 +683,8 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Else
If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.")
folder.CompressionOptions.SelectedCompressionMode = game.SelectedCompressionOption.Mode
+ folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder)
+ If folder.HasInsufficientFreeSpace Then Return
succeeded = Await _compressableFolderService.CompressFolder(folder)
Await _compressableFolderService.AnalyseFolderAsync(folder)
End If
@@ -696,7 +698,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
End If
If succeeded AndAlso Not uncompress Then game.SetLastCompactGuiUpdate(DateTime.Now)
- If Not succeeded Then game.SetStatus("The operation did not complete successfully.")
+ If Not succeeded Then
+ game.SetStatus("The operation did not complete successfully.")
+ End If
Catch ex As Exception
operationException = ex
Finally
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 3d1d4e5c..a592e16e 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -2,8 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:local="clr-namespace:CompactGUI"
- xmlns:loc="clr-namespace:LazyTranslate;assembly=LazyTranslate"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DataContext="{d:DesignInstance Type=local:FolderViewModel}"
@@ -87,6 +87,20 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -104,9 +118,9 @@
Padding="6 3"
Background="#80FFAA00" CornerRadius="5"
Visibility="{Binding Folder.IsDirectStorage, Converter={StaticResource BoolToVisConverter}}">
-
+
-
+
@@ -119,14 +133,14 @@
TextTrimming="WordEllipsis" />
-
+
-
+
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index 595f1da2..90fdd5d9 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -63,6 +63,7 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
Date: Sun, 13 Sep 2026 17:13:43 +1000
Subject: [PATCH 086/134] Add same space safety check for uncompression as well
---
CompactGUI.Core/SharedMethods.cs | 15 +++++++++++----
.../CompressableFolders/CompressableFolder.vb | 1 +
CompactGUI/Resources/Localisation/en-AU.toml | 2 ++
CompactGUI/Resources/Localisation/es-ES.toml | 2 ++
CompactGUI/Resources/Localisation/it-IT.toml | 2 ++
CompactGUI/Resources/Localisation/ko-KR.toml | 2 ++
CompactGUI/Resources/Localisation/ru-RU.toml | 2 ++
CompactGUI/Resources/Localisation/zh-CN.toml | 2 ++
CompactGUI/Services/CompressableFolderService.vb | 7 +++++++
CompactGUI/ViewModels/FolderViewModel.vb | 7 +++++++
CompactGUI/ViewModels/SteamMonitorViewModel.vb | 12 +++++++++++-
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 3 ++-
12 files changed, 51 insertions(+), 6 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 13a79c86..c979f35d 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -193,7 +193,7 @@ public static unsafe uint GetClusterSize(string folderPath)
}
- public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,IEnumerable analysedFiles,WOFCompressionAlgorithm compressionAlgorithm,IEnumerable exclusionList)
+ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, IEnumerable analysedFiles, WOFCompressionAlgorithm compressionAlgorithm, IEnumerable exclusionList, bool reserveUncompressedSize = false)
{
uint clusterSize = GetClusterSize(workingDirectory);
var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList);
@@ -204,13 +204,20 @@ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,
!excludedFiles.Contains(file.FileName))
.ToList();
- //Safety check: Must have at least 50% of the folder size free and 1x the largest file in the folder free
- long requiredBytes = candidates.Sum(file => file.CompressedSize) / 2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max();
+ long requiredBytes;
+ if (reserveUncompressedSize)
+ {
+ requiredBytes = candidates.Sum(file => file.UncompressedSize) /2 + candidates.Select(file => file.UncompressedSize).DefaultIfEmpty().Max();
+ }
+ else
+ {
+ requiredBytes = candidates.Sum(file => file.CompressedSize) /2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max();
+ }
try
{
var root = Path.GetPathRoot(workingDirectory);
- return string.IsNullOrWhiteSpace(root) || new DriveInfo(root).AvailableFreeSpace > requiredBytes;
+ return !string.IsNullOrWhiteSpace(root) && new DriveInfo(root).AvailableFreeSpace > requiredBytes;
}
catch (IOException)
{
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 4ce35836..e1ac8d0c 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -35,6 +35,7 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _CompressionOptions As New CompressionOptions
Private _IsFreshlyCompressed As Boolean
Private _HasInsufficientFreeSpace As Boolean
+ Private _HasInsufficientFreeSpaceForUncompression As Boolean
Private _FolderBGImage As BitmapImage = Nothing
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index bfa97bf0..6efdc764 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "No installed Steam games were found."
"No wiki data" = "No wiki data"
"Not Compressed" = "Not Compressed"
+"Not enough space" = "Not enough space"
"On Schedule" = "On Schedule"
"On Schedule if system is also idle" = "On Schedule if system is also idle"
"Open" = "Open"
@@ -138,6 +139,7 @@
"Success" = "Success"
"System Integration" = "System Integration"
"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "This game uses DirectStorage technology. If you are using this feature, you should not compress this game."
"Total Results" = "Total Results"
"UI Settings" = "UI Settings"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 7519e26d..21452561 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO
"No wiki data" = "No wiki data" # LOC:TODO
"Not Compressed" = "No comprimido"
+"Not enough space" = "Not enough space" # LOC:TODO
"On Schedule" = "Programado"
"On Schedule if system is also idle" = "Programado (si el sistema está inactivo)"
"Open" = "Abrir"
@@ -138,6 +139,7 @@
"Success" = "Éxito"
"System Integration" = "Integración del sistema"
"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Este juego usa tecnología DirectStorage. Si usa esta función, no debería comprimir este juego."
"Total Results" = "Totales"
"UI Settings" = "Ajustes de interfaz"
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index b56c89d8..97d7a9af 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "Nessun gioco Steam installato trovato."
"No wiki data" = "Nessun dato wiki"
"Not Compressed" = "Non compresso"
+"Not enough space" = "Not enough space" # LOC:TODO
"On Schedule" = "Programmato"
"On Schedule if system is also idle" = "Programmato se il sistema è inattivo"
"Open" = "Apri"
@@ -138,6 +139,7 @@
"Success" = "Successo"
"System Integration" = "Integrazione di sistema"
"The SnackbarPresenter was never set" = "The SnackbarPresenter non è stata mai settata"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Questo gioco utilizza la tecnologia DirectStorage. Se utilizzi questa funzione, non dovresti comprimere questo gioco."
"Total Results" = "Risultati totali"
"UI Settings" = "Impostazioni interfaccia"
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index 5244487b..5442993c 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "설치된 Steam 게임을 발견하지 못했습니다."
"No wiki data" = "위키 데이터 없음"
"Not Compressed" = "압축되지 않음"
+"Not enough space" = "Not enough space" # LOC:TODO
"On Schedule" = "예약한 시점에 수행"
"On Schedule if system is also idle" = "예약한 시점인 동시에 시스템이 유휴 상태일 때 수행"
"Open" = "열기"
@@ -138,6 +139,7 @@
"Success" = "성공"
"System Integration" = "시스템 연동"
"The SnackbarPresenter was never set" = "SnackbarPresenter가 설정되어 있지 않습니다"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "이 게임은 DirectStorage 기술을 사용합니다. 이 기능을 사용 중이라면 이 게임을 압축하지 않는 것이 좋습니다."
"Total Results" = "제출된 결과 수"
"UI Settings" = "UI 설정"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index 4735eac0..b0406d26 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO
"No wiki data" = "No wiki data" # LOC:TODO
"Not Compressed" = "Не сжато"
+"Not enough space" = "Not enough space" # LOC:TODO
"On Schedule" = "По расписанию"
"On Schedule if system is also idle" = "По расписанию, если система также бездействует"
"Open" = "Открыть"
@@ -138,6 +139,7 @@
"Success" = "Успешно"
"System Integration" = "Интеграция в систему"
"The SnackbarPresenter was never set" = "SnackbarPresenter не установлен"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Эта игра использует технологию DirectStorage. Если вы используете эту функцию, вам не следует сжимать эту игру."
"Total Results" = "Всего результатов"
"UI Settings" = "Настройки интерфейса"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 741f27e4..ccec0cc3 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -93,6 +93,7 @@
"No installed Steam games were found." = "未发现已安装的Steam游戏。"
"No wiki data" = "无wiki数据"
"Not Compressed" = "未压缩"
+"Not enough space" = "Not enough space" # LOC:TODO
"On Schedule" = "按计划"
"On Schedule if system is also idle" = "按计划且系统空闲时"
"Open" = "打开"
@@ -138,6 +139,7 @@
"Success" = "成功"
"System Integration" = "系统集成"
"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。"
"Total Results" = "总结果"
"UI Settings" = "UI 设置"
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 45dd0e09..9bd700a5 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -30,6 +30,8 @@ Public Class CompressableFolderService
Public Async Function UncompressFolder(folder As CompressableFolder) As Task(Of Boolean)
+ If folder.HasInsufficientFreeSpaceForUncompression Then Return False
+
folder.Compressor = New Uncompactor(UncompactorLogger)
Dim compressedFilesList = folder.AnalysisResults.Where(Function(rs) rs.CompressedSize < rs.UncompressedSize).Select(Of String)(Function(f) f.FileName).ToList
Return Await RunCompressionAsync(folder, folder.Compressor, compressedFilesList, isCompressing:=False)
@@ -109,6 +111,7 @@ Public Class CompressableFolderService
folder.CompressedBytes = folder.Analyser.CompressedBytes
folder.IsDirectStorage = folder.Analyser.IsDirectStorage
folder.HasInsufficientFreeSpace = Not HasSufficientFreeSpace(folder)
+ folder.HasInsufficientFreeSpaceForUncompression = Not HasSufficientFreeSpaceForUncompression(folder)
If folder.Analyser.ContainsCompressedFiles OrElse folder.IsFreshlyCompressed Then
folder.FolderActionState = ActionState.Results
@@ -253,6 +256,10 @@ Public Class CompressableFolderService
Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder))
End Function
+ Public Function HasSufficientFreeSpaceForUncompression(folder As CompressableFolder) As Boolean
+ Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, WOFCompressionAlgorithm.NO_COMPRESSION, Array.Empty(Of String)(), reserveUncompressedSize:=True)
+ End Function
+
Private Sub ReleaseToken(folder As CompressableFolder, cts As CancellationTokenSource)
Dim current As CancellationTokenSource = Nothing
diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb
index b8adf238..e0ea17e5 100644
--- a/CompactGUI/ViewModels/FolderViewModel.vb
+++ b/CompactGUI/ViewModels/FolderViewModel.vb
@@ -142,6 +142,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
CompressionProgress = Folder.CompressionProgress.ProgressPercent
CompressionProgressFile = Folder.CompressionProgress.FileName.Replace(Folder.FolderName, "")
+ ElseIf e.PropertyName = NameOf(Folder.HasInsufficientFreeSpaceForUncompression) Then
+ UncompressCommand.NotifyCanExecuteChanged()
+
End If
End Sub
@@ -157,6 +160,10 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
_watcher.UpdateWatched(Folder.FolderName, Folder.Analyser, False)
End Function
+ Private Function CanUncompress() As Boolean
+ Return Not Folder.HasInsufficientFreeSpaceForUncompression
+ End Function
+
Private Sub ApplyToAll()
Dim allFolders = Application.GetService(Of HomeViewModel)().Folders
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index e4033098..26cd9459 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -600,6 +600,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If analysedFiles Is Nothing Then Return
Dim compressionLevel = If(analyser.ContainsCompressedFiles, analysedFiles.Max(Function(file) file.CompressionMode), Core.WOFCompressionAlgorithm.NO_COMPRESSION)
game.UpdateAnalysis(analyser.UncompressedBytes, analyser.CompressedBytes, compressionLevel, analyser.IsDirectStorage)
+ game.HasInsufficientFreeSpaceForUncompression = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath,
+ analysedFiles,
+ Core.WOFCompressionAlgorithm.NO_COMPRESSION,
+ Array.Empty(Of String)(),
+ reserveUncompressedSize:=True)
End Using
End Function
@@ -679,6 +684,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If uncompress Then
If Not isCurrentlyCompressed Then Throw New InvalidOperationException("This game is not currently compressed.")
+ If folder.HasInsufficientFreeSpaceForUncompression Then Return
succeeded = Await _compressableFolderService.UncompressFolder(folder)
Else
If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.")
@@ -853,6 +859,10 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Private _isWorking As Boolean
+
+
+ Private _hasInsufficientFreeSpaceForUncompression As Boolean
+
Private _operationMessage As String
@@ -960,7 +970,7 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Public ReadOnly Property CanUncompress As Boolean
Get
- Return Not IsWorking AndAlso IsCompressed
+ Return Not IsWorking AndAlso IsCompressed AndAlso Not HasInsufficientFreeSpaceForUncompression
End Get
End Property
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 2f325893..2da86756 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -952,7 +952,8 @@
Appearance="Danger"
Command="{Binding DataContext.UncompressCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
- Content="{loc:T Uncompress}" />
+ Content="{loc:T Uncompress}"
+ IsEnabled="{Binding CanUncompress}" />
From 97123bbc067ff2d29debb7e83ff18b7f99f4f5d9 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 17:41:45 +1000
Subject: [PATCH 087/134] Add sapce warning to Steam Library view and
uncompress buttons
---
.../ViewModels/SteamMonitorViewModel.vb | 11 +
CompactGUI/Views/Pages/ResultsTemplate.xaml | 25 +-
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 551 ++++++++++--------
3 files changed, 328 insertions(+), 259 deletions(-)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 26cd9459..d36beff9 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -600,6 +600,12 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If analysedFiles Is Nothing Then Return
Dim compressionLevel = If(analyser.ContainsCompressedFiles, analysedFiles.Max(Function(file) file.CompressionMode), Core.WOFCompressionAlgorithm.NO_COMPRESSION)
game.UpdateAnalysis(analyser.UncompressedBytes, analyser.CompressedBytes, compressionLevel, analyser.IsDirectStorage)
+ If game.SelectedCompressionOption IsNot Nothing Then
+ game.HasInsufficientFreeSpace = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath,
+ analysedFiles,
+ Core.WOFHelper.WOFConvertCompressionLevel(game.SelectedCompressionOption.Mode),
+ Array.Empty(Of String)())
+ End If
game.HasInsufficientFreeSpaceForUncompression = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath,
analysedFiles,
Core.WOFCompressionAlgorithm.NO_COMPRESSION,
@@ -690,6 +696,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.")
folder.CompressionOptions.SelectedCompressionMode = game.SelectedCompressionOption.Mode
folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder)
+ game.HasInsufficientFreeSpace = folder.HasInsufficientFreeSpace
If folder.HasInsufficientFreeSpace Then Return
succeeded = Await _compressableFolderService.CompressFolder(folder)
Await _compressableFolderService.AnalyseFolderAsync(folder)
@@ -859,6 +866,10 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Private _isWorking As Boolean
+
+
+ Private _hasInsufficientFreeSpace As Boolean
+
Private _hasInsufficientFreeSpaceForUncompression As Boolean
diff --git a/CompactGUI/Views/Pages/ResultsTemplate.xaml b/CompactGUI/Views/Pages/ResultsTemplate.xaml
index 59d7de19..7e7c0793 100644
--- a/CompactGUI/Views/Pages/ResultsTemplate.xaml
+++ b/CompactGUI/Views/Pages/ResultsTemplate.xaml
@@ -194,12 +194,31 @@
HorizontalAlignment="Right" VerticalAlignment="Bottom"
Orientation="Horizontal">
-
+ FontSize="16">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
From ef6bea3a7ce9f31a1b8b2110d4bdf79554ddc268 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 18:26:45 +1000
Subject: [PATCH 088/134] Add more safety checks to compression/uncompression:
- Add cancellation gate to avoid race conditions of files being added to work
while attempting to cancel - Force single-thread compression if VHD images
are identified (why the hell anyone is compressing these is beyond me) - Add
cancellation active count to UI instead of "Cancelling..." text to be more
informative
---
CompactGUI.Core/Compactor.cs | 58 ++++++++++++++++---
CompactGUI.Core/ICompressor.cs | 4 +-
CompactGUI.Core/Uncompactor.cs | 37 +++++++++---
.../CompressableFolders/CompressableFolder.vb | 2 +
CompactGUI/Resources/Localisation/en-AU.toml | 2 +-
CompactGUI/Resources/Localisation/es-ES.toml | 2 +-
CompactGUI/Resources/Localisation/it-IT.toml | 3 +-
CompactGUI/Resources/Localisation/ko-KR.toml | 3 +-
CompactGUI/Resources/Localisation/ru-RU.toml | 2 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 3 +-
.../Services/CompressableFolderService.vb | 4 ++
CompactGUI/ViewModels/FolderViewModel.vb | 5 +-
CompactGUI/ViewModels/HomeViewModel.vb | 5 +-
.../ViewModels/SteamMonitorViewModel.vb | 6 +-
CompactGUI/Views/Pages/FolderView.xaml | 4 ++
CompactGUI/Views/Pages/QueueSidebar.xaml | 5 ++
16 files changed, 117 insertions(+), 28 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 2374d475..545d41d6 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -25,6 +25,9 @@ public sealed class Compactor : ICompressor, IDisposable
private long totalProcessedBytes = 0;
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
+ private readonly object cancellationGate = new();
+ private int activeFileOperations;
+ private bool cancellationRequested;
private ILogger _logger;
@@ -62,7 +65,7 @@ public async Task RunAsync(List filesList, IProgress> BuildWorkingFilesList()
&& !fl.Attributes.HasFlag(FileAttributes.SparseFile)
&& !excludedFiles.Contains(fl.FileName)
)
- .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize))
+ .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize, fl.CompressedSize))
.ToList();
}
+ private int GetWorkerCount(int requestedWorkerCount, IEnumerable files)
+ {
+ int workerCount = requestedWorkerCount <= 0 ? Environment.ProcessorCount : requestedWorkerCount;
+ var fileList = files.ToList();
+ bool containsDiskImage = fileList.Any(file => new[] { ".vhd", ".vhdx", ".vmdk", ".qcow2", ".img", ".iso" }.Contains(Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase));
+
+ try
+ {
+ var root = Path.GetPathRoot(workingDirectory);
+ if (string.IsNullOrWhiteSpace(root)) return workerCount;
+
+ long reserveBytes = fileList.Sum(file => file.AllocatedSize) / 2 + fileList.Select(file => file.AllocatedSize).DefaultIfEmpty().Max();
+ bool lowFreeSpace = new DriveInfo(root).AvailableFreeSpace < reserveBytes * 2;
+ return lowFreeSpace || containsDiskImage ? 1 : workerCount;
+ }
+ catch (IOException)
+ {
+ return containsDiskImage ? 1 : workerCount;
+ }
+ }
+
@@ -160,10 +195,17 @@ public void Resume()
}
- public void Cancel()
+ public int Cancel()
{
+ int activeOperations;
+ lock (cancellationGate)
+ {
+ cancellationRequested = true;
+ activeOperations = activeFileOperations;
+ }
pauseGate.Set();
cancellationTokenSource.Cancel();
+ return activeOperations;
}
@@ -179,7 +221,7 @@ public void Dispose()
}
- public readonly record struct FileDetails(string FileName, long UncompressedSize);
+ public readonly record struct FileDetails(string FileName, long UncompressedSize, long AllocatedSize);
}
diff --git a/CompactGUI.Core/ICompressor.cs b/CompactGUI.Core/ICompressor.cs
index e9c3c8fc..08b4ed03 100644
--- a/CompactGUI.Core/ICompressor.cs
+++ b/CompactGUI.Core/ICompressor.cs
@@ -8,7 +8,7 @@ Task RunAsync(List filesList,
void Pause();
void Resume();
- void Cancel();
+ int Cancel();
-}
\ No newline at end of file
+}
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 1c8db85e..3018e5a8 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -14,6 +14,9 @@ public sealed class Uncompactor : ICompressor, IDisposable
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
+ private readonly object cancellationGate = new();
+ private int activeFileOperations;
+ private bool cancellationRequested;
private ConcurrentDictionary processedFileCount = new ConcurrentDictionary();
private readonly ILogger _logger;
@@ -60,14 +63,25 @@ private async Task PauseAndProcessFile(string file, int totalFiles, IProgress Private _IsFreshlyCompressed As Boolean
Private _HasInsufficientFreeSpace As Boolean
Private _HasInsufficientFreeSpaceForUncompression As Boolean
+ Private _IsCancelling As Boolean
+ Private _ActiveFileOperations As Integer
Private _FolderBGImage As BitmapImage = Nothing
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index 6efdc764..815c7d60 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -27,7 +27,6 @@
"Cancel" = "Cancel"
"Cancel Background Compressor" = "Cancel Background Compressor"
"Cancel operation" = "Cancel operation"
-"Cancelling..." = "Cancelling..."
"Cannot remove folder" = "Cannot remove folder"
"Check for pre-release updates" = "Check for pre-release updates"
"Choose Compression" = "Choose Compression"
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "Failed to submit to wiki"
"Filetype Management" = "Filetype Management"
"Filter" = "Filter"
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off."
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well."
"Game" = "Game"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 21452561..458ebd1c 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -27,7 +27,6 @@
"Cancel" = "Cancelar "
"Cancel Background Compressor" = "Cancelar compresor en segundo plano"
"Cancel operation" = "Cancel operation" # LOC:TODO
-"Cancelling..." = "Cancelling..." # LOC:TODO
"Cannot remove folder" = "No se puede eliminar la carpeta"
"Check for pre-release updates" = "Buscar actualizaciones preliminares"
"Choose Compression" = "Choose Compression" # LOC:TODO
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "Fallo al enviar a la wiki"
"Filetype Management" = "Gestión de tipos de archivo"
"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo para juegos de Steam.\nAl elegir omitir los tipos de archivo enviados por los usuarios, esta configuración determina cuántas solicitudes se requieren para cada tipo de archivo para considerar su omisión.\nGeneralmente, la opción \"baja\" es la mejor, ya que las opciones más altas conllevan el riesgo de omitir archivos que, de otro modo, se comprimirían correctamente."
"Game" = "Juego"
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index 97d7a9af..cf380017 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -27,7 +27,6 @@
"Cancel" = "Annulla"
"Cancel Background Compressor" = "Annulla compressione in background"
"Cancel operation" = "Annulla operazione"
-"Cancelling..." = "Annullamento in corso..."
"Cannot remove folder" = "Impossibile rimuovere la cartella"
"Check for pre-release updates" = "Verifica aggiornamenti pre-release"
"Choose Compression" = "Choose Compression" # LOC:TODO
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "Invio al wiki fallito"
"Filetype Management" = "Gestione tipi di file"
"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Per i giochi Steam, usa il database per determinare i tipi da escludere. Per le cartelle non-Steam si basa sull'analizzatore intelligente."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo per giochi Steam.\nQuando si sceglie di escludere i tipi di file inviati dagli utenti, questa impostazione determina quanti invii sono necessari per ogni tipo di file per considerarlo da escludere. \n'low' è generalmente la scelta migliore, poiché opzioni più alte comportano il rischio di escludere file che altrimenti si comprimerebbero bene."
"Game" = "Gioco"
@@ -254,6 +254,7 @@
[obsolete]
"Add Folder to Queue" = "Aggiungi cartella alla coda"
"Apply to all" = "Applica a tutto"
+"Cancelling..." = "Annullamento in corso..."
"Compression Mode" = "Modalità di compressione"
"Configuration" = "Configurazione"
"Custom list — {0} entries" = "Lista personalizzata — {0} voci"
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index 5442993c..5fc4cc62 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -27,7 +27,6 @@
"Cancel" = "취소"
"Cancel Background Compressor" = "백그라운드 압축 취소"
"Cancel operation" = "작업 취소"
-"Cancelling..." = "취소 중..."
"Cannot remove folder" = "폴더를 대기열에서 제거할 수 없습니다"
"Check for pre-release updates" = "프리릴리스 업데이트까지 확인"
"Choose Compression" = "Choose Compression" # LOC:TODO
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "위키 제출에 실패했습니다"
"Filetype Management" = "파일 확장자 관리"
"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam 게임은 데이터베이스를, 그 외 폴더는 분석 결과를 바탕으로 제외할 파일 형식을 자동으로 정합니다."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "다른 사용자들이 제출한 정보를 바탕으로 파일 형식을 얼마나 적극적으로 제외할지 설정합니다.\n\n일반적으로는 '약하게'가 적합하며, 더 강하게 설정하면 압축이 잘 되는 파일까지 제외할 수 있습니다.\n\nSteam 게임에서만 적용됩니다."
"Game" = "게임"
@@ -254,6 +254,7 @@
[obsolete]
"Add Folder to Queue" = "새로운 폴더 추가"
"Apply to all" = "모든 폴더에 적용"
+"Cancelling..." = "취소 중..."
"Compression Mode" = "압축 모드"
"Configuration" = "설정"
"Edit skip list for this folder" = "이 폴더에서 제외할 항목 편집"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index b0406d26..1c98812a 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -27,7 +27,6 @@
"Cancel" = "Отмена"
"Cancel Background Compressor" = "Отменить фоновое сжатие"
"Cancel operation" = "Cancel operation" # LOC:TODO
-"Cancelling..." = "Cancelling..." # LOC:TODO
"Cannot remove folder" = "Не удаётся удалить папку"
"Check for pre-release updates" = "Проверять предварительные версии обновлений"
"Choose Compression" = "Choose Compression" # LOC:TODO
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "Не удалось отправить в Вики"
"Filetype Management" = "Управление типами файлов"
"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Для игр Steam используется база данных для определения пропускаемых типов. Для папок не из Steam это основано на умном анализаторе."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Только для игр Steam.\nПри выборе пропуска файлов, предложенных пользователями, этот параметр определяет, сколько подтверждений необходимо для каждого типа файлов, чтобы его пропускать.\n«Низкий» обычно оптимален, так как более высокие значения могут привести к пропуску файлов, которые на самом деле хорошо сжимаются."
"Game" = "Игра"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index ccec0cc3..1b5a51fd 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -27,7 +27,6 @@
"Cancel" = "否"
"Cancel Background Compressor" = "取消后台压缩"
"Cancel operation" = "取消操作"
-"Cancelling..." = "取消中……"
"Cannot remove folder" = "无法移除文件夹"
"Check for pre-release updates" = "检查预发布更新"
"Choose Compression" = "Choose Compression" # LOC:TODO
@@ -65,6 +64,7 @@
"Failed to submit to wiki" = "提交到 Wiki 失败"
"Filetype Management" = "文件类型管理"
"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。"
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。"
"Game" = "游戏"
@@ -254,6 +254,7 @@
[obsolete]
"Add Folder to Queue" = "添加文件夹到队列"
"Apply to all" = "应用到所有"
+"Cancelling..." = "取消中……"
"Compression Mode" = "压缩模式"
"Configuration" = "配置"
"Custom list — {0} entries" = "自定义列表 — {0} 条"
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 9bd700a5..f7205ddd 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -41,6 +41,8 @@ Public Class CompressableFolderService
Private Async Function RunCompressionAsync(folder As CompressableFolder, compressor As ICompressor, filesList As List(Of String), isCompressing As Boolean) As Task(Of Boolean)
folder.FolderActionState = ActionState.Working
+ folder.IsCancelling = False
+ folder.ActiveFileOperations = 0
CancelEstimation(folder)
Dim cts = New CancellationTokenSource()
@@ -72,6 +74,8 @@ Public Class CompressableFolderService
Finally
+ folder.IsCancelling = False
+ folder.ActiveFileOperations = 0
compressor.Dispose()
ReleaseToken(folder, cts)
diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb
index e0ea17e5..052f9be9 100644
--- a/CompactGUI/ViewModels/FolderViewModel.vb
+++ b/CompactGUI/ViewModels/FolderViewModel.vb
@@ -183,6 +183,7 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
Private Sub Pause()
+ If Folder.IsCancelling Then Return
If Folder.FolderActionState = ActionState.Working Then
Folder.Compressor?.Pause()
@@ -196,7 +197,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
Private Sub Cancel()
- Folder.Compressor?.Cancel()
+ If Folder.Compressor Is Nothing Then Return
+ Folder.ActiveFileOperations = Folder.Compressor.Cancel()
+ Folder.IsCancelling = True
End Sub
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index 695f2146..9cd89102 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -488,6 +488,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Sub PauseQueue()
Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused)
If activeFolder?.Compressor Is Nothing Then Return
+ If activeFolder.IsCancelling Then Return
If activeFolder.FolderActionState = ActionState.Working Then
activeFolder.Compressor.Pause()
@@ -502,9 +503,11 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Sub CancelQueue()
Dim activeFolder = Folders.FirstOrDefault(Function(folder) folder.FolderActionState = ActionState.Working OrElse folder.FolderActionState = ActionState.Paused)
If activeFolder?.Compressor Is Nothing Then Return
+ If activeFolder.IsCancelling Then Return
_cancelQueueRequested = True
- activeFolder.Compressor.Cancel()
+ activeFolder.ActiveFileOperations = activeFolder.Compressor.Cancel()
+ activeFolder.IsCancelling = True
End Sub
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index d36beff9..f36e59cb 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -219,9 +219,11 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private Sub CancelOperation(game As SteamDetailedResult)
If game Is Nothing OrElse Not ReferenceEquals(game, _activeGame) Then Return
_cancelRequested = True
- game.SetStatus("Cancelling...".LT())
_compressableFolderService.CancelEstimation(_activeFolder)
- If _activeFolder.FolderActionState = ActionState.Working Then _activeFolder.Compressor?.Cancel()
+ If _activeFolder.FolderActionState = ActionState.Working AndAlso _activeFolder.Compressor IsNot Nothing Then
+ Dim activeOperations = _activeFolder.Compressor.Cancel()
+ game.SetStatus("Finishing {0} active file operations; do not power off.".LTF(activeOperations))
+ End If
End Sub
'TODO: DIsable string.equals linting so rsharper stops being mad
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index a592e16e..6829de99 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -26,6 +26,10 @@
+
+
+
From e46faadb6f57412af852c90e5137046a89f60774 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 13 Sep 2026 18:52:50 +1000
Subject: [PATCH 089/134] Make the UI show all processing files at once rather
than just one file at a time
---
CompactGUI.Core/Compactor.cs | 23 +++++++++-
CompactGUI.Core/SharedObjects.cs | 4 +-
CompactGUI.Core/Uncompactor.cs | 25 ++++++++---
.../CompressableFolders/CompressableFolder.vb | 15 +++++++
.../Services/CompressableFolderService.vb | 45 ++++++++++++++++++-
CompactGUI/Views/Pages/FolderView.xaml | 22 +++++++--
6 files changed, 121 insertions(+), 13 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 545d41d6..fc414e7a 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -26,8 +26,10 @@ public sealed class Compactor : ICompressor, IDisposable
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private readonly object cancellationGate = new();
+ private readonly ConcurrentDictionary activeFiles = new();
private int activeFileOperations;
private bool cancellationRequested;
+ private long lastProgressReportTicks;
private ILogger _logger;
@@ -66,6 +68,7 @@ public async Task RunAsync(List filesList, IProgress progressMonitor, long totalFilesSize, string fileName, bool force = false)
+ {
+ long now = Stopwatch.GetTimestamp();
+ if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 10) return;
+
+ Interlocked.Exchange(ref lastProgressReportTicks, now);
+ progressMonitor?.Report(new CompressionProgress((int)((double)totalProcessedBytes / totalFilesSize * 100.0), fileName, activeFiles.Keys.ToArray()));
+ }
+
private unsafe int? WOFCompressFile(string filePath)
{
try
diff --git a/CompactGUI.Core/SharedObjects.cs b/CompactGUI.Core/SharedObjects.cs
index 797c9180..d7f4e8b5 100644
--- a/CompactGUI.Core/SharedObjects.cs
+++ b/CompactGUI.Core/SharedObjects.cs
@@ -28,11 +28,13 @@ public struct CompressionProgress
{
public int ProgressPercent { get; set; }
public string FileName { get; set; }
+ public string[] ActiveFiles { get; set; }
- public CompressionProgress(int progressPercent, string fileName)
+ public CompressionProgress(int progressPercent, string fileName, string[] activeFiles = null)
{
ProgressPercent = progressPercent;
FileName = fileName;
+ ActiveFiles = activeFiles ?? Array.Empty();
}
}
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 3018e5a8..16f891b7 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -15,8 +15,10 @@ public sealed class Uncompactor : ICompressor, IDisposable
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private readonly object cancellationGate = new();
+ private readonly ConcurrentDictionary activeFiles = new();
private int activeFileOperations;
private bool cancellationRequested;
+ private long lastProgressReportTicks;
private ConcurrentDictionary processedFileCount = new ConcurrentDictionary();
private readonly ILogger _logger;
@@ -46,11 +48,13 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
}
catch (OperationCanceledException) {
UncompactorLog.DecompressionCanceled(_logger);
+ ReportProgress(progressMonitor, totalFiles, "", true);
return false;
}
finally { sw.Stop(); }
UncompactorLog.DecompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3));
+ ReportProgress(progressMonitor, totalFiles, "", true);
return true;
}
@@ -67,24 +71,35 @@ private async Task PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, int totalFiles, string fileName, bool force = false)
+ {
+ long now = Stopwatch.GetTimestamp();
+ if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 5) return;
+
+ Interlocked.Exchange(ref lastProgressReportTicks, now);
+ progressMonitor?.Report(new CompressionProgress((int)(processedFileCount.Count / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
+ }
+
private unsafe bool? WOFDecompressFile(string file)
{
try
diff --git a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
index 4b042650..897f6d7a 100644
--- a/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
+++ b/CompactGUI/Models/CompressableFolders/CompressableFolder.vb
@@ -38,6 +38,10 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
Private _HasInsufficientFreeSpaceForUncompression As Boolean
Private _IsCancelling As Boolean
Private _ActiveFileOperations As Integer
+ Private _ActiveCompressionFiles As New ObservableCollection(Of ActiveCompressionFile)
+ Private _VisibleActiveCompressionFiles As New ObservableCollection(Of ActiveCompressionFile)
+
+ Private _AdditionalActiveCompressionFileCount As Integer
Private _FolderBGImage As BitmapImage = Nothing
@@ -65,6 +69,12 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
End Get
End Property
+ Public ReadOnly Property HasAdditionalActiveCompressionFiles As Boolean
+ Get
+ Return AdditionalActiveCompressionFileCount > 0
+ End Get
+ End Property
+
Public ReadOnly Property GlobalPoorlyCompressedFileCount
Get
@@ -144,6 +154,11 @@ Public MustInherit Class CompressableFolder : Inherits ObservableObject : Implem
End Sub
End Class
+Public Class ActiveCompressionFile : Inherits ObservableObject
+ Private _FileName As String
+ Private _DisplayName As String
+ Private _IsActive As Boolean
+End Class
Public Enum ActionState
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index f7205ddd..1be5a899 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -50,7 +50,10 @@ Public Class CompressableFolderService
Try
- Dim progress As IProgress(Of CompressionProgress) = New Progress(Of CompressionProgress)(Sub(x) folder.CompressionProgress = x)
+ Dim progress As IProgress(Of CompressionProgress) = New Progress(Of CompressionProgress)(Sub(x)
+ folder.CompressionProgress = x
+ UpdateActiveCompressionFiles(folder, x.ActiveFiles)
+ End Sub)
progress.Report(New CompressionProgress(0, ""))
@@ -76,6 +79,7 @@ Public Class CompressableFolderService
folder.IsCancelling = False
folder.ActiveFileOperations = 0
+ UpdateActiveCompressionFiles(folder, Array.Empty(Of String)())
compressor.Dispose()
ReleaseToken(folder, cts)
@@ -255,6 +259,45 @@ Public Class CompressableFolderService
Return exclist
End Function
+ Private Shared Sub UpdateActiveCompressionFiles(folder As CompressableFolder, fileNames As String())
+ If Not Application.Current.Dispatcher.CheckAccess() Then
+ Application.Current.Dispatcher.BeginInvoke(Sub() UpdateActiveCompressionFiles(folder, fileNames))
+ Return
+ End If
+
+ Dim activeFiles = folder.ActiveCompressionFiles
+
+ For Each activeFile In activeFiles
+ activeFile.IsActive = fileNames.Contains(activeFile.FileName)
+ Next
+
+ For Each fileName In fileNames
+ If activeFiles.Any(Function(activeFile) activeFile.IsActive AndAlso activeFile.FileName = fileName) Then Continue For
+
+ Dim availableSlot = activeFiles.FirstOrDefault(Function(activeFile) Not activeFile.IsActive)
+ If availableSlot Is Nothing Then
+ activeFiles.Add(New ActiveCompressionFile With {.FileName = fileName, .DisplayName = fileName.Replace(folder.FolderName, ""), .IsActive = True})
+ Else
+ availableSlot.FileName = fileName
+ availableSlot.DisplayName = fileName.Replace(folder.FolderName, "")
+ availableSlot.IsActive = True
+ End If
+ Next
+
+ Dim visibleFiles = activeFiles.Where(Function(activeFile) activeFile.IsActive).Take(5).ToList()
+ Dim displayedFiles = folder.VisibleActiveCompressionFiles
+
+ For index = displayedFiles.Count - 1 To 0 Step -1
+ If Not visibleFiles.Contains(displayedFiles(index)) Then displayedFiles.RemoveAt(index)
+ Next
+
+ For Each visibleFile In visibleFiles
+ If Not displayedFiles.Contains(visibleFile) Then displayedFiles.Add(visibleFile)
+ Next
+
+ folder.AdditionalActiveCompressionFileCount = Math.Max(0, activeFiles.Where(Function(activeFile) activeFile.IsActive).Count() - visibleFiles.Count)
+ End Sub
+
Public Function HasSufficientFreeSpace(folder As CompressableFolder) As Boolean
Dim compressionAlgorithm = WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode)
Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, compressionAlgorithm, GetSkipList(folder))
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 6829de99..d90eb3a0 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -30,10 +30,24 @@
Foreground="{StaticResource PaletteAmberBrush}"
Text="{Binding Folder.ActiveFileOperations, StringFormat=Finishing {0} active file operations; do not power off.}"
Visibility="{Binding Folder.IsCancelling, Converter={StaticResource BooleanToVisibilityConverter}}" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
Date: Sun, 13 Sep 2026 18:19:51 +0300
Subject: [PATCH 090/134] Convert Turkish translation to TOML format
---
CompactGUI/Resources/Localisation/tr-TR.toml | 252 +++++++++++++++++++
1 file changed, 252 insertions(+)
create mode 100644 CompactGUI/Resources/Localisation/tr-TR.toml
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
new file mode 100644
index 00000000..3a157acc
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -0,0 +1,252 @@
+# CompactGUI Localisation
+# @version 1
+# @programversion 4.0.0-beta.11
+
+# ===================
+# Translations
+
+"Add" = "Ekle"
+"Add a custom folder to the watchlist" = "─░zleme listesine ├Âzel klas├Âr ekle"
+"Add selected to queue" = "Add selected to queue" # LOC:TODO
+"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
+"Add to compression queue" = "S─▒k─▒┼şt─▒rma kuyru─şuna ekle"
+"Add to right-click context menu" = "Sa─ş t─▒k ba─şlam men├╝s├╝ne ekle"
+"Add to start menu" = "Ba┼şlat men├╝s├╝ne ekle"
+"Added to Queue" = "Kuyru─şa Eklendi"
+"Admin" = "Y├Ânetici"
+"Aggression of online skiplist" = "├çevrimi├ği atlama listesi agresifli─şi"
+"Always show details on Compression Mode buttons" = "S─▒k─▒┼şt─▒rma Modu d├╝─şmelerinde her zaman ayr─▒nt─▒lar─▒ g├Âster"
+"Analysing" = "Analiz Ediliyor"
+"Analysing..." = "Analysing..." # LOC:TODO
+"Applied to all folders" = "T├╝m klas├Ârlere uyguland─▒"
+"Ascending" = "Artan"
+"Awaiting Compression" = "S─▒k─▒┼şt─▒rma Bekleniyor"
+"Background Watcher Settings" = "Arkaplan ─░zleyici Ayarlar─▒"
+"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
+"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
+"Cancel" = "─░ptal"
+"Cancel Background Compressor" = "Arkaplan S─▒k─▒┼şt─▒r─▒c─▒y─▒ ─░ptal Et"
+"Cancel operation" = "Cancel operation" # LOC:TODO
+"Cannot remove folder" = "Klas├Âr kald─▒r─▒lam─▒yor"
+"Check for pre-release updates" = "Ön sürüm güncellemelerini denetle"
+"Choose Compression" = "Choose Compression" # LOC:TODO
+"Clear filters" = "Clear filters" # LOC:TODO
+"Click to download" = "─░ndirmek i├ğin t─▒klay─▒n"
+"CompactGUI" = "CompactGUI"
+"Complete" = "Complete" # LOC:TODO
+"Compress" = "Compress" # LOC:TODO
+"Compress Again" = "Tekrar S─▒k─▒┼şt─▒r"
+"Compress All Now" = "Hepsini ┼Şimdi S─▒k─▒┼şt─▒r"
+"Compress Selected" = "Se├ğilenleri S─▒k─▒┼şt─▒r"
+"Compress folders: " = "Klas├Ârleri s─▒k─▒┼şt─▒r: "
+"Compressed" = "S─▒k─▒┼şt─▒r─▒ld─▒"
+"Compressing..." = "Compressing..." # LOC:TODO
+"Compression" = "S─▒k─▒┼şt─▒rma"
+"Compression DB" = "S─▒k─▒┼şt─▒rma Veritaban─▒"
+"Compression Settings" = "S─▒k─▒┼şt─▒rma Ayarlar─▒"
+"Compression Summary" = "S─▒k─▒┼şt─▒rma ├ûzeti"
+"Compression options have been applied to all folders" = "S─▒k─▒┼şt─▒rma se├ğenekleri t├╝m klas├Ârlere uyguland─▒"
+"Current Size" = "Current Size" # LOC:TODO
+"Database Results" = "Veritaban─▒ Sonu├ğlar─▒"
+"Descending" = "Azalan"
+"Deselect all" = "Deselect all" # LOC:TODO
+"Direct Storage" = "Direct Storage" # LOC:TODO
+"Do Not Compress" = "Do Not Compress" # LOC:TODO
+"Do not compress" = "Do not compress" # LOC:TODO
+"Drive unavailable" = "Drive unavailable" # LOC:TODO
+"Edit list" = "Edit list" # LOC:TODO
+"Estimate Compression for non-Steam Folders (beta)" = "Steam d─▒┼ş─▒ klas├Ârler i├ğin s─▒k─▒┼şt─▒rmay─▒ tahmin et (beta)"
+"Estimated Size" = "Estimated Size" # LOC:TODO
+"Estimated size" = "Tahmini boyut"
+"Exit" = "├ç─▒k─▒┼ş"
+"Extensions in this folder" = "Bu klas├Ârdeki uzant─▒lar"
+"Failed" = "Failed" # LOC:TODO
+"Failed to submit to wiki" = "Wiki'ye g├Ânderilemedi"
+"Filetype Management" = "Dosya T├╝r├╝ Y├Ânetimi"
+"Filter" = "Filter" # LOC:TODO
+"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam Oyunlar─▒ i├ğin, atlanacak t├╝rleri belirlemek amac─▒yla veritaban─▒n─▒ kullan─▒r. Steam d─▒┼ş─▒ klas├Ârler i├ğin ak─▒ll─▒ analizciye dayan─▒r."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Sadece Steam oyunlar─▒ i├ğin.\nKullan─▒c─▒ taraf─▒ndan g├Ânderilen dosya t├╝rlerinin atlanmas─▒ se├ğildi─şinde, bu ayar her bir dosya t├╝r├╝n├╝n atlanmas─▒ i├ğin ka├ğ g├Ânderim gerekti─şini belirler. \n'd├╝┼ş├╝k' genellikle en iyisidir, ├ğ├╝nk├╝ daha y├╝ksek se├ğenekler normalde iyi s─▒k─▒┼şabilecek dosyalar─▒n atlanmas─▒ riskini ta┼ş─▒r."
+"Game" = "Oyun"
+"Game Name" = "Oyun Ad─▒"
+"Games" = "Oyunlar"
+"Go to Database Results" = "Go to Database Results" # LOC:TODO
+"HDDs only use 1 thread" = "HDD'ler yaln─▒zca 1 i┼ş par├ğac─▒─ş─▒ kullans─▒n"
+"Home" = "Giri┼ş"
+"Include global skiplist" = "Include global skiplist" # LOC:TODO
+"Include global skipped file types" = "Genel atlanan dosya t├╝rlerini dahil et"
+"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
+"Include smart skipped file types" = "Ak─▒ll─▒ atlanan dosya t├╝rlerini dahil et"
+"Insufficient permission to access this folder" = "Bu klas├Âre eri┼şmek i├ğin yetersiz izin"
+"LZX" = "LZX"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Son Alma: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "Last analysed {0}" # LOC:TODO
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO
+"Library location" = "Library location" # LOC:TODO
+"Manage local skipped filetypes" = "Yerel olarak atlanan dosya t├╝rlerini y├Ânet"
+"Max Savings" = "Maksimum Tasarruf"
+"Maximum Compression Threads" = "Maksimum S─▒k─▒┼şt─▒rma ─░┼ş Par├ğac─▒─ş─▒"
+"Mode" = "Mod"
+"Monitor compressed folders for changes" = "S─▒k─▒┼şt─▒r─▒lm─▒┼ş klas├Ârleri de─şi┼şiklikler i├ğin izle"
+"Never" = "Asla"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO
+"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO
+"No wiki data" = "No wiki data" # LOC:TODO
+"Not Compressed" = "S─▒k─▒┼şt─▒r─▒lmam─▒┼ş"
+"Not enough space" = "Not enough space" # LOC:TODO
+"On Schedule" = "Zamanlamaya G├Âre"
+"On Schedule if system is also idle" = "Sistem bo┼şta ise zamanlamaya g├Âre"
+"Open" = "A├ğ"
+"Open Settings Folder" = "Ayarlar Klas├Âr├╝n├╝ A├ğ"
+"Operation cancelled." = "Operation cancelled." # LOC:TODO
+"Operation failed: {0}" = "Operation failed: {0}" # LOC:TODO
+"Original Size" = "Original Size" # LOC:TODO
+"Paused" = "Paused" # LOC:TODO
+"Please check your internet connection and try again" = "L├╝tfen internet ba─şlant─▒n─▒z─▒ kontrol edip tekrar deneyin"
+"Please wait until the current operation is finished" = "L├╝tfen mevcut i┼şlem bitene kadar bekleyin"
+"Preparing" = "Preparing" # LOC:TODO
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" # LOC:TODO
+"Re-analyse all watched folders" = "T├╝m izlenen klas├Ârleri yeniden analiz et"
+"Re-analyse this folder" = "Bu klas├Âr├╝ yeniden analiz et"
+"Recently Updated" = "Recently Updated" # LOC:TODO
+"Recommended Action" = "Recommended Action" # LOC:TODO
+"Reload Languages.\nChecks online for updated language definitions" = "Reload Languages.\nChecks online for updated language definitions" # LOC:TODO
+"Reload Steam Library list" = "Reload Steam Library list" # LOC:TODO
+"Remove from Watchlist" = "─░zleme Listesinden Kald─▒r"
+"Reset" = "S─▒f─▒rla"
+"Restart as Admin" = "Y├Ânetici Olarak Yeniden Ba┼şlat"
+"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
+"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
+"Saved" = "Saved" # LOC:TODO
+"Savings" = "Tasarruf"
+"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
+"Search by game name or SteamID..." = "Oyun ad─▒ veya SteamID ile ara..."
+"Select" = "Select" # LOC:TODO
+"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
+"Select all" = "Select all" # LOC:TODO
+"Select all compressable" = "Select all compressable" # LOC:TODO
+"Select all visible games" = "Select all visible games" # LOC:TODO
+"Settings" = "Ayarlar"
+"Show notification on completion" = "Tamamland─▒─ş─▒nda bildirim g├Âster"
+"Sort" = "Sort" # LOC:TODO
+"Sort By" = "S─▒ralama ├ûl├ğ├╝t├╝"
+"Start CompactGUI in system tray" = "CompactGUI'yi sistem tepsisinde ba┼şlat"
+"Status" = "Status" # LOC:TODO
+"Steam Library" = "Steam Library" # LOC:TODO
+"SteamID" = "SteamID"
+"Submit Results" = "Sonu├ğlar─▒ G├Ânder"
+"Submitted to wiki" = "Wiki'ye g├Ânderildi"
+"Success" = "Ba┼şar─▒l─▒"
+"System Integration" = "Sistem Entegrasyonu"
+"The SnackbarPresenter was never set" = "SnackbarPresenter ayarlanmad─▒"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Bu oyun DirectStorage teknolojisini kullan─▒yor. E─şer bu ├Âzelli─şi kullan─▒yorsan─▒z, bu oyunu s─▒k─▒┼şt─▒rmamal─▒s─▒n─▒z."
+"Total Results" = "Toplam Sonu├ğlar"
+"UI Settings" = "Aray├╝z Ayarlar─▒"
+"UID" = "UID"
+"Uncompress" = "S─▒k─▒┼şt─▒rmay─▒ A├ğ"
+"Uncompressed" = "Uncompressed" # LOC:TODO
+"Uncompressing..." = "Uncompressing..." # LOC:TODO
+"Unknown" = "Bilinmiyor"
+"Update Available" = "Update Available" # LOC:TODO
+"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}" # LOC:TODO
+"Update Settings" = "G├╝ncelleme Ayarlar─▒"
+"Update in Steam" = "Update in Steam" # LOC:TODO
+"Use exclusions" = "Use exclusions" # LOC:TODO
+"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Version" = "S├╝r├╝m"
+"Waiting" = "Waiting" # LOC:TODO
+"Watch folder for changes" = "Klas├Âr├╝ de─şi┼şiklikler i├ğin izle"
+"Watched Folders" = "─░zlenen Klas├Ârler"
+"Watcher" = "─░zleyici"
+"WatcherPage" = "WatcherPage"
+"When System is Idle" = "Sistem Bo┼ştayken"
+"Working" = "├çal─▒┼ş─▒yor"
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
+"Yes" = "Evet"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
+"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
+"can be saved" = "can be saved" # LOC:TODO
+"contained files" = "i├ğerilen dosyalar"
+"day(s)" = "g├╝n"
+"edit" = "d├╝zenle"
+"edit skipped filetypes" = "atlanan dosya t├╝rlerini d├╝zenle"
+"estimated savings" = "estimated savings" # LOC:TODO
+"every" = "her"
+"games" = "games" # LOC:TODO
+"just now" = "az ├Ânce"
+"last compressed:" = "son s─▒k─▒┼şt─▒r─▒lma:"
+"last modified:" = "son de─şi┼ştirilme:"
+"recommended" = "recommended" # LOC:TODO
+"saved" = "kaydedildi"
+"select a folder" = "bir klas├Âr se├ğin"
+"uncompressed size" = "s─▒k─▒┼şt─▒r─▒lmam─▒┼ş boyut"
+"{0:0} days ago" = "{0:0} g├╝n ├Ânce"
+"{0:0} hours ago" = "{0:0} saat ├Ânce"
+"{0:0} minutes ago" = "{0:0} dakika ├Ânce"
+"{0} saved" = "{0} saved" # LOC:TODO
+"{0}% decayed" = "{0}% decayed" # LOC:TODO
+
+[context."Background Scheduler"]
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI is running a scheduled task and will compress monitored folders in the background" # LOC:TODO
+"Next scheduled task is on {0}" = "Next scheduled task is on {0}" # LOC:TODO
+"Scheduled Compression Completed" = "Scheduled Compression Completed" # LOC:TODO
+"Scheduled Compression Running" = "Scheduled Compression Running" # LOC:TODO
+
+[context."Compression estimate"]
+"unknown" = "bilinmiyor"
+
+[context."Compression size"]
+"After" = "Sonra"
+"Before" = "Önce"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder Compression Queue"]
+"COMPLETED" = "COMPLETED" # LOC:TODO
+"Clear completed" = "Clear completed" # LOC:TODO
+"Expected savings" = "Expected savings" # LOC:TODO
+"PENDING" = "PENDING" # LOC:TODO
+"Queue" = "Queue" # LOC:TODO
+"To process" = "To process" # LOC:TODO
+"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+
+[context."Folder status"]
+"Unknown" = "Bilinmiyor"
+
+[context."Relative date"]
+"Unknown" = "Bilinmiyor"
+
+[context."Schedule"]
+"at" = "saat"
+
+[context."Skiplist aggression"]
+"high" = "y├╝ksek"
+"low" = "d├╝┼ş├╝k"
+"medium" = "orta"
+
+[context."Skiplist editor"]
+"Save" = "Kaydet"
+
+[context."Steam Library Compression Mode Button"]
+"Compress | {0}" = "Compress | {0}" # LOC:TODO
+
+[context."Steam Library Tab Headings"]
+"CURRENT SIZE" = "CURRENT SIZE" # LOC:TODO
+"GAME" = "GAME" # LOC:TODO
+"RECOMMENDED ACTION" = "RECOMMENDED ACTION" # LOC:TODO
+"SAVINGS" = "SAVINGS" # LOC:TODO
+"STATUS" = "STATUS" # LOC:TODO
+
+[context."Storage savings"]
+"saved" = "kaydedildi"
From b5b78ec56c49f2b1485677a2be409d9ba2e195ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20ERT=C3=9CRK?=
Date: Mon, 14 Sep 2026 19:52:23 +0300
Subject: [PATCH 091/134] Update missing translations in tr-TR.toml
---
CompactGUI/Resources/Localisation/tr-TR.toml | 178 +++++++++----------
1 file changed, 89 insertions(+), 89 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index 3a157acc..fbfb4de3 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -7,8 +7,8 @@
"Add" = "Ekle"
"Add a custom folder to the watchlist" = "─░zleme listesine ├Âzel klas├Âr ekle"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
-"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
+"Add selected to queue" = "Seçilenleri sıraya ekle"
+"Add to Compression Queue" = "Sıkıştırma Sırasına Ekle"
"Add to compression queue" = "S─▒k─▒┼şt─▒rma kuyru─şuna ekle"
"Add to right-click context menu" = "Sa─ş t─▒k ba─şlam men├╝s├╝ne ekle"
"Add to start menu" = "Ba┼şlat men├╝s├╝ne ekle"
@@ -17,145 +17,145 @@
"Aggression of online skiplist" = "├çevrimi├ği atlama listesi agresifli─şi"
"Always show details on Compression Mode buttons" = "S─▒k─▒┼şt─▒rma Modu d├╝─şmelerinde her zaman ayr─▒nt─▒lar─▒ g├Âster"
"Analysing" = "Analiz Ediliyor"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "Analiz ediliyor..."
"Applied to all folders" = "T├╝m klas├Ârlere uyguland─▒"
"Ascending" = "Artan"
"Awaiting Compression" = "S─▒k─▒┼şt─▒rma Bekleniyor"
"Background Watcher Settings" = "Arkaplan ─░zleyici Ayarlar─▒"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
+"COMPARE METHODS" = "YÖNTEMLERİ KARŞILAŞTIR"
+"COMPRESSION MODE " = "SIKIŞTIRMA MODU "
"Cancel" = "─░ptal"
"Cancel Background Compressor" = "Arkaplan S─▒k─▒┼şt─▒r─▒c─▒y─▒ ─░ptal Et"
-"Cancel operation" = "Cancel operation" # LOC:TODO
+"Cancel operation" = "İşlemi iptal et"
"Cannot remove folder" = "Klas├Âr kald─▒r─▒lam─▒yor"
"Check for pre-release updates" = "Ön sürüm güncellemelerini denetle"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
+"Choose Compression" = "Sıkıştırma Seç"
+"Clear filters" = "Filtreleri temizle"
"Click to download" = "─░ndirmek i├ğin t─▒klay─▒n"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "Tamamlandı"
+"Compress" = "Sıkıştır"
"Compress Again" = "Tekrar S─▒k─▒┼şt─▒r"
"Compress All Now" = "Hepsini ┼Şimdi S─▒k─▒┼şt─▒r"
"Compress Selected" = "Se├ğilenleri S─▒k─▒┼şt─▒r"
"Compress folders: " = "Klas├Ârleri s─▒k─▒┼şt─▒r: "
"Compressed" = "S─▒k─▒┼şt─▒r─▒ld─▒"
-"Compressing..." = "Compressing..." # LOC:TODO
+"Compressing..." = "Sıkıştırılıyor..."
"Compression" = "S─▒k─▒┼şt─▒rma"
"Compression DB" = "S─▒k─▒┼şt─▒rma Veritaban─▒"
"Compression Settings" = "S─▒k─▒┼şt─▒rma Ayarlar─▒"
"Compression Summary" = "S─▒k─▒┼şt─▒rma ├ûzeti"
"Compression options have been applied to all folders" = "S─▒k─▒┼şt─▒rma se├ğenekleri t├╝m klas├Ârlere uyguland─▒"
-"Current Size" = "Current Size" # LOC:TODO
+"Current Size" = "Mevcut Boyut"
"Database Results" = "Veritaban─▒ Sonu├ğlar─▒"
"Descending" = "Azalan"
-"Deselect all" = "Deselect all" # LOC:TODO
-"Direct Storage" = "Direct Storage" # LOC:TODO
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
-"Do not compress" = "Do not compress" # LOC:TODO
-"Drive unavailable" = "Drive unavailable" # LOC:TODO
-"Edit list" = "Edit list" # LOC:TODO
+"Deselect all" = "Tüm seçimleri kaldır"
+"Direct Storage" = "Direct Storage"
+"Do Not Compress" = "Sıkıştırma"
+"Do not compress" = "Sıkıştırma"
+"Drive unavailable" = "Sürücü kullanılamıyor"
+"Edit list" = "Listeyi düzenle"
"Estimate Compression for non-Steam Folders (beta)" = "Steam d─▒┼ş─▒ klas├Ârler i├ğin s─▒k─▒┼şt─▒rmay─▒ tahmin et (beta)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Estimated Size" = "Tahmini Boyut"
"Estimated size" = "Tahmini boyut"
"Exit" = "├ç─▒k─▒┼ş"
"Extensions in this folder" = "Bu klas├Ârdeki uzant─▒lar"
-"Failed" = "Failed" # LOC:TODO
+"Failed" = "Başarısız"
"Failed to submit to wiki" = "Wiki'ye g├Ânderilemedi"
"Filetype Management" = "Dosya T├╝r├╝ Y├Ânetimi"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
+"Filter" = "Filtre"
+"Finishing {0} active file operations; do not power off." = "{0} aktif dosya işlemi tamamlanıyor; bilgisayarı kapatmayın."
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam Oyunlar─▒ i├ğin, atlanacak t├╝rleri belirlemek amac─▒yla veritaban─▒n─▒ kullan─▒r. Steam d─▒┼ş─▒ klas├Ârler i├ğin ak─▒ll─▒ analizciye dayan─▒r."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Sadece Steam oyunlar─▒ i├ğin.\nKullan─▒c─▒ taraf─▒ndan g├Ânderilen dosya t├╝rlerinin atlanmas─▒ se├ğildi─şinde, bu ayar her bir dosya t├╝r├╝n├╝n atlanmas─▒ i├ğin ka├ğ g├Ânderim gerekti─şini belirler. \n'd├╝┼ş├╝k' genellikle en iyisidir, ├ğ├╝nk├╝ daha y├╝ksek se├ğenekler normalde iyi s─▒k─▒┼şabilecek dosyalar─▒n atlanmas─▒ riskini ta┼ş─▒r."
"Game" = "Oyun"
"Game Name" = "Oyun Ad─▒"
"Games" = "Oyunlar"
-"Go to Database Results" = "Go to Database Results" # LOC:TODO
+"Go to Database Results" = "Veritabanı Sonuçlarına Git"
"HDDs only use 1 thread" = "HDD'ler yaln─▒zca 1 i┼ş par├ğac─▒─ş─▒ kullans─▒n"
"Home" = "Giri┼ş"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
+"Include global skiplist" = "Genel atlama listesini dahil et"
"Include global skipped file types" = "Genel atlanan dosya t├╝rlerini dahil et"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
+"Include smart skiplist" = "Akıllı atlama listesini dahil et"
"Include smart skipped file types" = "Ak─▒ll─▒ atlanan dosya t├╝rlerini dahil et"
"Insufficient permission to access this folder" = "Bu klas├Âre eri┼şmek i├ğin yetersiz izin"
"LZX" = "LZX"
"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Son Alma: {0:dd MMM yyyy HH:mm:ss}"
-"Last analysed {0}" = "Last analysed {0}" # LOC:TODO
-"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO
-"Library location" = "Library location" # LOC:TODO
+"Last analysed {0}" = "Son analiz: {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Son çalışma: {0:dd MMM yyyy} saat {0:HH:mm:ss}"
+"Library location" = "Kütüphane konumu"
"Manage local skipped filetypes" = "Yerel olarak atlanan dosya t├╝rlerini y├Ânet"
"Max Savings" = "Maksimum Tasarruf"
"Maximum Compression Threads" = "Maksimum S─▒k─▒┼şt─▒rma ─░┼ş Par├ğac─▒─ş─▒"
"Mode" = "Mod"
"Monitor compressed folders for changes" = "S─▒k─▒┼şt─▒r─▒lm─▒┼ş klas├Ârleri de─şi┼şiklikler i├ğin izle"
"Never" = "Asla"
-"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" # LOC:TODO
-"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO
-"No wiki data" = "No wiki data" # LOC:TODO
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Sonraki zamanlanmış: {0:dd MMM yyyy} saat {0:HH:mm:ss}"
+"No installed Steam games were found." = "Yüklü Steam oyunu bulunamadı."
+"No wiki data" = "Wiki verisi yok"
"Not Compressed" = "S─▒k─▒┼şt─▒r─▒lmam─▒┼ş"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "Yeterli alan yok"
"On Schedule" = "Zamanlamaya G├Âre"
"On Schedule if system is also idle" = "Sistem bo┼şta ise zamanlamaya g├Âre"
"Open" = "A├ğ"
"Open Settings Folder" = "Ayarlar Klas├Âr├╝n├╝ A├ğ"
-"Operation cancelled." = "Operation cancelled." # LOC:TODO
-"Operation failed: {0}" = "Operation failed: {0}" # LOC:TODO
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
+"Operation cancelled." = "İşlem iptal edildi."
+"Operation failed: {0}" = "İşlem başarısız: {0}"
+"Original Size" = "Orijinal Boyut"
+"Paused" = "Duraklatıldı"
"Please check your internet connection and try again" = "L├╝tfen internet ba─şlant─▒n─▒z─▒ kontrol edip tekrar deneyin"
"Please wait until the current operation is finished" = "L├╝tfen mevcut i┼şlem bitene kadar bekleyin"
-"Preparing" = "Preparing" # LOC:TODO
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" # LOC:TODO
+"Preparing" = "Hazırlanıyor"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Diske yazmadan dosyaları hızla tarar ve sıkıştırma oranını tahmin eder. HDD'lerde yavaş olabilir!"
"Re-analyse all watched folders" = "T├╝m izlenen klas├Ârleri yeniden analiz et"
"Re-analyse this folder" = "Bu klas├Âr├╝ yeniden analiz et"
-"Recently Updated" = "Recently Updated" # LOC:TODO
-"Recommended Action" = "Recommended Action" # LOC:TODO
-"Reload Languages.\nChecks online for updated language definitions" = "Reload Languages.\nChecks online for updated language definitions" # LOC:TODO
-"Reload Steam Library list" = "Reload Steam Library list" # LOC:TODO
+"Recently Updated" = "Yakın Zamanda Güncellenenler"
+"Recommended Action" = "Önerilen Eylem"
+"Reload Languages.\nChecks online for updated language definitions" = "Dilleri Yenile.\nGüncel dil tanımlamaları için çevrimiçi kontrol eder"
+"Reload Steam Library list" = "Steam Kütüphane listesini yenile"
"Remove from Watchlist" = "─░zleme Listesinden Kald─▒r"
"Reset" = "S─▒f─▒rla"
"Restart as Admin" = "Y├Ânetici Olarak Yeniden Ba┼şlat"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "SIRAYI GÖSTER"
+"SKIPLIST SELECTION" = "ATLAMA LİSTESİ SEÇİMİ"
+"Saved" = "Tasarruf Edildi"
"Savings" = "Tasarruf"
-"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
+"Scanning installed Steam games..." = "Yüklü Steam oyunları taranıyor..."
"Search by game name or SteamID..." = "Oyun ad─▒ veya SteamID ile ara..."
-"Select" = "Select" # LOC:TODO
-"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select" = "Seç"
+"Select a folder to compress" = "Sıkıştırılacak bir klasör seçin"
+"Select all" = "Tümünü seç"
+"Select all compressable" = "Sıkıştırılabilir olanları seç"
+"Select all visible games" = "Görünür tüm oyunları seç"
"Settings" = "Ayarlar"
"Show notification on completion" = "Tamamland─▒─ş─▒nda bildirim g├Âster"
-"Sort" = "Sort" # LOC:TODO
+"Sort" = "Sırala"
"Sort By" = "S─▒ralama ├ûl├ğ├╝t├╝"
"Start CompactGUI in system tray" = "CompactGUI'yi sistem tepsisinde ba┼şlat"
-"Status" = "Status" # LOC:TODO
-"Steam Library" = "Steam Library" # LOC:TODO
+"Status" = "Durum"
+"Steam Library" = "Steam Kütüphanesi"
"SteamID" = "SteamID"
"Submit Results" = "Sonu├ğlar─▒ G├Ânder"
"Submitted to wiki" = "Wiki'ye g├Ânderildi"
"Success" = "Ba┼şar─▒l─▒"
"System Integration" = "Sistem Entegrasyonu"
"The SnackbarPresenter was never set" = "SnackbarPresenter ayarlanmad─▒"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Bu klasörü güvenle sıkıştırmak için sürücüde yeterli boş alan yok. Windows'un sorun çıkarmaması için klasör boyutunun en az %50'si kadar boş alan gereklidir."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Bu oyun DirectStorage teknolojisini kullan─▒yor. E─şer bu ├Âzelli─şi kullan─▒yorsan─▒z, bu oyunu s─▒k─▒┼şt─▒rmamal─▒s─▒n─▒z."
"Total Results" = "Toplam Sonu├ğlar"
"UI Settings" = "Aray├╝z Ayarlar─▒"
"UID" = "UID"
"Uncompress" = "S─▒k─▒┼şt─▒rmay─▒ A├ğ"
-"Uncompressed" = "Uncompressed" # LOC:TODO
-"Uncompressing..." = "Uncompressing..." # LOC:TODO
+"Uncompressed" = "Sıkıştırılmamış"
+"Uncompressing..." = "Sıkıştırma açılıyor..."
"Unknown" = "Bilinmiyor"
-"Update Available" = "Update Available" # LOC:TODO
-"Update Available ▸ Version {0}" = "Update Available ▸ Version {0}" # LOC:TODO
+"Update Available" = "Güncelleme Mevcut"
+"Update Available ▸ Version {0}" = "Güncelleme Mevcut - Sürüm {0}"
"Update Settings" = "G├╝ncelleme Ayarlar─▒"
-"Update in Steam" = "Update in Steam" # LOC:TODO
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Update in Steam" = "Steam'de Güncelle"
+"Use exclusions" = "İstisnaları kullan"
+"Use recommended mode" = "Önerilen modu kullan"
"Version" = "S├╝r├╝m"
-"Waiting" = "Waiting" # LOC:TODO
+"Waiting" = "Bekliyor"
"Watch folder for changes" = "Klas├Âr├╝ de─şi┼şiklikler i├ğin izle"
"Watched Folders" = "─░zlenen Klas├Ârler"
"Watcher" = "─░zleyici"
@@ -166,35 +166,35 @@
"XPRESS 4K" = "XPRESS 4K"
"XPRESS 8K" = "XPRESS 8K"
"Yes" = "Evet"
-"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" # LOC:TODO
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
-"can be saved" = "can be saved" # LOC:TODO
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Şu anda izlenen {0} klasörünüz var. CompactGUI'yi kapatmak izlenmelerini durduracaktır.{1}{1}Çıkmak istediğinize emin misiniz?"
+"Your settings have been reset to their default to accommodate the update" = "Ayarlarınız güncellemeye uyum sağlamak için varsayılana sıfırlandı"
+"Your settings have been reset to their default." = "Ayarlarınız varsayılana sıfırlandı."
+"can be saved" = "tasarruf edilebilir"
"contained files" = "i├ğerilen dosyalar"
"day(s)" = "g├╝n"
"edit" = "d├╝zenle"
"edit skipped filetypes" = "atlanan dosya t├╝rlerini d├╝zenle"
-"estimated savings" = "estimated savings" # LOC:TODO
+"estimated savings" = "tahmini tasarruf"
"every" = "her"
-"games" = "games" # LOC:TODO
+"games" = "oyunlar"
"just now" = "az ├Ânce"
"last compressed:" = "son s─▒k─▒┼şt─▒r─▒lma:"
"last modified:" = "son de─şi┼ştirilme:"
-"recommended" = "recommended" # LOC:TODO
+"recommended" = "önerilen"
"saved" = "kaydedildi"
"select a folder" = "bir klas├Âr se├ğin"
"uncompressed size" = "s─▒k─▒┼şt─▒r─▒lmam─▒┼ş boyut"
"{0:0} days ago" = "{0:0} g├╝n ├Ânce"
"{0:0} hours ago" = "{0:0} saat ├Ânce"
"{0:0} minutes ago" = "{0:0} dakika ├Ânce"
-"{0} saved" = "{0} saved" # LOC:TODO
-"{0}% decayed" = "{0}% decayed" # LOC:TODO
+"{0} saved" = "{0} tasarruf edildi"
+"{0}% decayed" = "%{0} bozuldu"
[context."Background Scheduler"]
-"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI is running a scheduled task and will compress monitored folders in the background" # LOC:TODO
-"Next scheduled task is on {0}" = "Next scheduled task is on {0}" # LOC:TODO
-"Scheduled Compression Completed" = "Scheduled Compression Completed" # LOC:TODO
-"Scheduled Compression Running" = "Scheduled Compression Running" # LOC:TODO
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI planlanmış bir görevi çalıştırıyor ve izlenen klasörleri arka planda sıkıştıracak"
+"Next scheduled task is on {0}" = "Sonraki planlanmış görev: {0}"
+"Scheduled Compression Completed" = "Planlanmış Sıkıştırma Tamamlandı"
+"Scheduled Compression Running" = "Planlanmış Sıkıştırma Çalışıyor"
[context."Compression estimate"]
"unknown" = "bilinmiyor"
@@ -213,13 +213,13 @@
"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "TAMAMLANDI"
+"Clear completed" = "Tamamlananları temizle"
+"Expected savings" = "Beklenen tasarruf"
+"PENDING" = "BEKLEYEN"
+"Queue" = "Sıra"
+"To process" = "İşlenecek"
+"{0} of {1} completed" = "{1} işlemin {0} kadarı tamamlandı"
[context."Folder status"]
"Unknown" = "Bilinmiyor"
@@ -239,14 +239,14 @@
"Save" = "Kaydet"
[context."Steam Library Compression Mode Button"]
-"Compress | {0}" = "Compress | {0}" # LOC:TODO
+"Compress | {0}" = "Sıkıştır | {0}"
[context."Steam Library Tab Headings"]
-"CURRENT SIZE" = "CURRENT SIZE" # LOC:TODO
-"GAME" = "GAME" # LOC:TODO
-"RECOMMENDED ACTION" = "RECOMMENDED ACTION" # LOC:TODO
-"SAVINGS" = "SAVINGS" # LOC:TODO
-"STATUS" = "STATUS" # LOC:TODO
+"CURRENT SIZE" = "MEVCUT BOYUT"
+"GAME" = "OYUN"
+"RECOMMENDED ACTION" = "ÖNERİLEN EYLEM"
+"SAVINGS" = "TASARRUF"
+"STATUS" = "DURUM"
[context."Storage savings"]
"saved" = "kaydedildi"
From d2596d2e472d88329bbf31492f2f51c7179d5a85 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 15 Sep 2026 19:44:44 +1000
Subject: [PATCH 092/134] Don't duplicate existing steam header images if
they're already found in the appcache folder. Close #664
---
.../ViewModels/SteamMonitorViewModel.vb | 21 ++++++++-----------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index f36e59cb..a05e1e82 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -441,7 +441,6 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Try
Dim cachedImageData = Await File.ReadAllBytesAsync(steamCachedHeader)
game.HeaderImage = CreateFadedHeaderImage(LoadImageFromMemoryStream(cachedImageData))
- Await File.WriteAllBytesAsync(imagePath, cachedImageData)
Return
Catch ex As Exception
Diagnostics.Debug.WriteLine($"Failed to use Steam's cached header for {game.AppID}: {ex.Message}")
@@ -521,21 +520,19 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If Not Directory.Exists(appCacheDirectory) Then Return Nothing
Try
- Dim directories = {appCacheDirectory}.Concat(Directory.EnumerateDirectories(appCacheDirectory))
- Return directories.SelectMany(Function(directoryPath) Directory.EnumerateFiles(directoryPath, "*header*", SearchOption.TopDirectoryOnly)).Where(AddressOf IsSupportedHeaderImage).OrderBy(Function(filePath) If(String.Equals(Path.GetFileName(filePath), "library_header.jpg", StringComparison.OrdinalIgnoreCase), 0, 1)).FirstOrDefault()
- Catch ex As Exception When TypeOf ex Is IOException OrElse TypeOf ex Is UnauthorizedAccessException
+ Dim searchFolders = {appCacheDirectory}.Concat(Directory.EnumerateDirectories(appCacheDirectory))
+
+ Return searchFolders.
+ SelectMany(Function(folderPath) Directory.EnumerateFiles(folderPath, "*header*", SearchOption.TopDirectoryOnly)).
+ Where(Function(imageFile) Path.GetExtension(imageFile).Equals(".jpg", StringComparison.OrdinalIgnoreCase) OrElse
+ Path.GetExtension(imageFile).Equals(".jpeg", StringComparison.OrdinalIgnoreCase) OrElse
+ Path.GetExtension(imageFile).Equals(".png", StringComparison.OrdinalIgnoreCase)).
+ FirstOrDefault()
+ Catch ex As Exception
Return Nothing
End Try
End Function
- Private Shared Function IsSupportedHeaderImage(filePath As String) As Boolean
- Select Case Path.GetExtension(filePath).ToLowerInvariant()
- Case ".jpg", ".jpeg", ".png"
- Return True
- Case Else
- Return False
- End Select
- End Function
Private Shared Async Function TryDownloadImageAsync(url As String) As Task(Of Byte())
If String.IsNullOrWhiteSpace(url) Then Return Nothing
From 50ef7b5b18d78122a4d71b26c10742fb5b5ec2d9 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 15 Sep 2026 19:46:27 +1000
Subject: [PATCH 093/134] Update version number in Turkish localization file
---
CompactGUI/Resources/Localisation/tr-TR.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index fbfb4de3..1574e786 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.11
# ===================
From 96a7a5595a5ce0990673e4dc89ae7995ec76e07a Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 15 Sep 2026 19:47:45 +1000
Subject: [PATCH 094/134] Revert: Update version number in Turkish localization
file
---
CompactGUI/Resources/Localisation/tr-TR.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index 1574e786..fbfb4de3 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 2
+# @version 1
# @programversion 4.0.0-beta.11
# ===================
From 8df176ada0761e4b9282ff46e8304c5e66a67276 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 15 Sep 2026 19:48:26 +1000
Subject: [PATCH 095/134] Add Turkish localization support
---
CompactGUI/Resources/Localisation/manifest.toml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 8de0d940..e76cbc55 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -23,3 +23,7 @@ file = "zh-CN.toml"
[locales."it-IT"]
version = 1
file = "it-IT.toml"
+
+[locales."tr-TR"]
+version = 1
+file = "tr-TR.toml"
From cf5eeb3d93d167ac09198bc54b0283d2f6935ae8 Mon Sep 17 00:00:00 2001
From: MCfywb
Date: Tue, 15 Sep 2026 18:13:16 +0800
Subject: [PATCH 096/134] Update Chinese(Simplified) translation to match
version 4.0 beta 11
---
CompactGUI/Resources/Localisation/zh-CN.toml | 216 ++++++++-----------
1 file changed, 91 insertions(+), 125 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 1b5a51fd..034cbb7b 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -7,7 +7,7 @@
"Add" = "添加"
"Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
+"Add selected to queue" = "添加选中项到队列"
"Add to Compression Queue" = "添加到压缩队列"
"Add to compression queue" = "添加到压缩队列"
"Add to right-click context menu" = "添加到右键菜单"
@@ -15,26 +15,26 @@
"Added to Queue" = "已添加到队列"
"Admin" = "管理员权限"
"Aggression of online skiplist" = "在线跳过列表的激进程度"
-"Always show details on Compression Mode buttons" = "始终显示压缩模式按钮的详细信息"
+"Always show details on Compression Mode buttons" = "始终在压缩模式按钮上显示详细信息"
"Analysing" = "正在分析"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "分析中……"
"Applied to all folders" = "已应用到所有文件夹"
-"Ascending" = "升序"
+"Ascending" = "递增"
"Awaiting Compression" = "等待压缩"
"Background Watcher Settings" = "后台监控设置"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
-"Cancel" = "否"
+"COMPARE METHODS" = "比较压缩模式"
+"COMPRESSION MODE " = "压缩模式"
+"Cancel" = "取消"
"Cancel Background Compressor" = "取消后台压缩"
"Cancel operation" = "取消操作"
"Cannot remove folder" = "无法移除文件夹"
"Check for pre-release updates" = "检查预发布更新"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
+"Choose Compression" = "选择压缩模式"
+"Clear filters" = "清除筛选条件"
"Click to download" = "点击下载"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "完成"
+"Compress" = "压缩"
"Compress Again" = "再次压缩"
"Compress All Now" = "立即全部压缩"
"Compress Selected" = "压缩选中项"
@@ -48,115 +48,115 @@
"Compression options have been applied to all folders" = "压缩选项已应用到所有文件夹"
"Current Size" = "当前大小"
"Database Results" = "数据库结果"
-"Descending" = "降序"
-"Deselect all" = "Deselect all" # LOC:TODO
+"Descending" = "递减"
+"Deselect all" = "取消全选"
"Direct Storage" = "Direct Storage"
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
+"Do Not Compress" = "无需压缩"
"Do not compress" = "无需压缩"
"Drive unavailable" = "驱动器不可用"
-"Edit list" = "Edit list" # LOC:TODO
-"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Edit list" = "编辑列表"
+"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
+"Estimated Size" = "预估大小"
"Estimated size" = "预估大小"
"Exit" = "退出"
-"Extensions in this folder" = "此文件夹中的扩展名"
-"Failed" = "Failed" # LOC:TODO
+"Extensions in this folder" = "此文件夹中包含的扩展名"
+"Failed" = "失败"
"Failed to submit to wiki" = "提交到 Wiki 失败"
"Filetype Management" = "文件类型管理"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
-"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。"
-"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。"
-"Game" = "游戏"
+"Filter" = "筛选"
+"Finishing {0} active file operations; do not power off." = "正在完成 {0} 个活跃的文件操作;请不要关闭软件。"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,将使用数据库确定要跳过的文件类型。对于非 Steam 文件夹,则由智能分析器决定。"
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅适用于 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要达到多少次提交才会考虑跳过。\n“低”通常是最佳选项,因为更高的选项有跳过原本能压缩得很好的文件的风险。"
+"Game" = "游戏名"
"Game Name" = "游戏名称"
-"Games" = "游戏列表"
-"Go to Database Results" = "前往数据库结果"
+"Games" = "个游戏"
+"Go to Database Results" = "查看数据库结果"
"HDDs only use 1 thread" = "机械硬盘仅使用 1 个线程"
"Home" = "主页"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
-"Include global skipped file types" = "包含全局跳过的文件类型"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
-"Include smart skipped file types" = "包含智能跳过的文件类型"
+"Include global skiplist" = "使用全局跳过列表"
+"Include global skipped file types" = "使用全局跳过的文件类型"
+"Include smart skiplist" = "使用智能跳过列表"
+"Include smart skipped file types" = "使用智能跳过的文件类型"
"Insufficient permission to access this folder" = "没有足够的权限访问此文件夹"
"LZX" = "LZX"
-"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "最后获取: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "上次获取: {0:yyyy年 M月 d日 HH:mm:ss}"
"Last analysed {0}" = "上次分析 {0}"
-"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}"
-"Library location" = "Library location" # LOC:TODO
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Library location" = "库位置"
"Manage local skipped filetypes" = "管理本地跳过的文件类型"
"Max Savings" = "最大节省"
"Maximum Compression Threads" = "最大压缩线程数"
"Mode" = "压缩模式"
"Monitor compressed folders for changes" = "监控已压缩文件夹的更改"
"Never" = "从不"
-"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}"
-"No installed Steam games were found." = "未发现已安装的Steam游戏。"
-"No wiki data" = "无wiki数据"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}"
+"No installed Steam games were found." = "未发现已安装的 Steam 游戏。"
+"No wiki data" = "无 wiki 数据"
"Not Compressed" = "未压缩"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "空间不足"
"On Schedule" = "按计划"
"On Schedule if system is also idle" = "按计划且系统空闲时"
"Open" = "打开"
"Open Settings Folder" = "打开设置文件夹"
"Operation cancelled." = "操作已取消。"
"Operation failed: {0}" = "操作失败: {0}"
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
-"Please check your internet connection and try again" = "请检查您的网络连接并重试"
+"Original Size" = "原始大小"
+"Paused" = "已暂停"
+"Please check your internet connection and try again" = "请检查你的网络连接并重试"
"Please wait until the current operation is finished" = "请等待当前操作完成"
-"Preparing" = "Preparing" # LOC:TODO
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿!"
+"Preparing" = "正在准备"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩率而无需写入磁盘。这在机械硬盘上可能会非常卡顿!"
"Re-analyse all watched folders" = "重新分析所有受监控文件夹"
"Re-analyse this folder" = "重新分析此文件夹"
-"Recently Updated" = "最近更新过"
-"Recommended Action" = "Recommended Action" # LOC:TODO
-"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n在线检查语言定义更新"
-"Reload Steam Library list" = "重新加载Steam库列表"
-"Remove from Watchlist" = "从监控列表移除"
+"Recently Updated" = "近期更新"
+"Recommended Action" = "推荐操作"
+"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n联网检查语言文件更新"
+"Reload Steam Library list" = "重新加载 Steam 库列表"
+"Remove from Watchlist" = "从监控列表中移除"
"Reset" = "重置"
"Restart as Admin" = "以管理员身份重新启动"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "展开队列"
+"SKIPLIST SELECTION" = "跳过列表选择"
+"Saved" = "已节省"
"Savings" = "节省"
-"Scanning installed Steam games..." = "正在扫描已安装的Steam游戏……"
+"Scanning installed Steam games..." = "正在扫描已安装的 Steam 游戏……"
"Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索……"
-"Select" = "Select" # LOC:TODO
-"Select a folder to compress" = "选择一个文件夹压缩"
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select" = "选择"
+"Select a folder to compress" = "选择要压缩的文件夹"
+"Select all" = "全选"
+"Select all compressable" = "全选可压缩项"
+"Select all visible games" = "全选可见游戏"
"Settings" = "设置"
-"Show notification on completion" = "完成后显示通知"
-"Sort" = "Sort" # LOC:TODO
+"Show notification on completion" = "完成时显示通知"
+"Sort" = "排序方式"
"Sort By" = "排序方式"
-"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI"
+"Start CompactGUI in system tray" = "启动时最小化到系统托盘"
"Status" = "状态"
-"Steam Library" = "Steam库"
+"Steam Library" = "Steam 库"
"SteamID" = "SteamID"
"Submit Results" = "提交结果"
-"Submitted to wiki" = "已提交到 Wiki"
+"Submitted to wiki" = "已提交到 wiki"
"Success" = "成功"
"System Integration" = "系统集成"
"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
-"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。"
-"Total Results" = "总结果"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果你正在使用此功能,则不应压缩此游戏。"
+"Total Results" = "结果总数"
"UI Settings" = "UI 设置"
"UID" = "UID"
"Uncompress" = "解压缩"
-"Uncompressed" = "已解压缩"
+"Uncompressed" = "未压缩"
"Uncompressing..." = "解压缩中……"
"Unknown" = "未知"
"Update Available" = "更新可用"
"Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}"
"Update Settings" = "更新设置"
-"Update in Steam" = "在Steam中更新"
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Update in Steam" = "在 Steam 中更新"
+"Use exclusions" = "使用跳过列表"
+"Use recommended mode" = "使用推荐模式"
"Version" = "版本"
-"Waiting" = "Waiting" # LOC:TODO
-"Watch folder for changes" = "监控文件夹更改"
+"Waiting" = "正在等待"
+"Watch folder for changes" = "监控此文件夹的更改"
"Watched Folders" = "受监控文件夹"
"Watcher" = "监控"
"WatcherPage" = "监控页"
@@ -165,36 +165,36 @@
"XPRESS 16K" = "XPRESS 16K"
"XPRESS 4K" = "XPRESS 4K"
"XPRESS 8K" = "XPRESS 8K"
-"Yes" = "是"
+"Yes" = "确定"
"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "你目前有 {0} 个文件夹正在被监控。关闭 CompactGUI 将停止对它们的监控。{1}{1}你确定要退出吗?"
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "你的设置已被重置以适应更新"
+"Your settings have been reset to their default." = "你的设置已被重置"
"can be saved" = "可以节省"
-"contained files" = "包含文件"
+"contained files" = "包含文件数"
"day(s)" = "天"
"edit" = "编辑"
-"edit skipped filetypes" = "编辑跳过类型"
-"estimated savings" = "estimated savings" # LOC:TODO
+"edit skipped filetypes" = "编辑跳过的文件类型"
+"estimated savings" = "预估节省"
"every" = "每"
"games" = "个游戏"
"just now" = "刚刚"
-"last compressed:" = "上次压缩:"
-"last modified:" = "上次修改:"
-"recommended" = "recommended" # LOC:TODO
-"saved" = "saved" # LOC:TODO
+"last compressed:" = "上次压缩:"
+"last modified:" = "上次修改:"
+"recommended" = "推荐"
+"saved" = "已节省"
"select a folder" = "选择文件夹"
"uncompressed size" = "未压缩大小"
"{0:0} days ago" = "{0:0} 天前"
"{0:0} hours ago" = "{0:0} 小时前"
"{0:0} minutes ago" = "{0:0} 分钟前"
"{0} saved" = "{0} 已节省"
-"{0}% decayed" = "{0}% 已衰减"
+"{0}% decayed" = "{0}% 需重新压缩"
[context."Background Scheduler"]
"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI正在运行一个计划任务并将会在后台压缩监控文件夹"
-"Next scheduled task is on {0}" = "下一次计划任务在 {0}"
-"Scheduled Compression Completed" = "计划任务压缩完成"
-"Scheduled Compression Running" = "正在运行计划压缩"
+"Next scheduled task is on {0}" = "下一次计划压缩在 {0}"
+"Scheduled Compression Completed" = "计划压缩已完成"
+"Scheduled Compression Running" = "计划压缩运行中"
[context."Compression estimate"]
"unknown" = "未知"
@@ -213,13 +213,13 @@
"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "已完成"
+"Clear completed" = "清除已完成项"
+"Expected savings" = "预期节省"
+"PENDING" = "待压缩"
+"Queue" = "队列"
+"To process" = "待处理"
+"{0} of {1} completed" = "{0} / {1} 已完成"
[context."Folder status"]
"Unknown" = "未知"
@@ -250,37 +250,3 @@
[context."Storage savings"]
"saved" = "已节省"
-
-[obsolete]
-"Add Folder to Queue" = "添加文件夹到队列"
-"Apply to all" = "应用到所有"
-"Cancelling..." = "取消中……"
-"Compression Mode" = "压缩模式"
-"Configuration" = "配置"
-"Custom list — {0} entries" = "自定义列表 — {0} 条"
-"Custom: {0} entries" = "自定义: {0} 条"
-"DB — {0} files" = "Wiki — {0} 个文件"
-"Edit skip list for this folder" = "编辑此文件夹的跳过列表"
-"Files Compressed" = "文件已压缩"
-"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "对于 Steam 游戏:\n根据数据库结果跳过文件\n\n对于非 Steam 文件夹:\n基于压缩估计跳过文件"
-"Global + DB — {0} files" = "全局 + Wiki — {0} 个文件"
-"Global — {0} files" = "全局 — {0} 个文件"
-"Global: {0} skipped" = "全局: 已跳过 {0}"
-"Language (Requires Restart)" = "语言 (需要重启)"
-"Language Changed" = "语言更改"
-"Language changed successfully. You may need to restart the application for all changes to take effect." = "语言更改成功。您可能需要重启应用程序以使所有更改生效。"
-"Last analysed" = "上次分析"
-"OK" = "好"
-"Off" = "关闭"
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs! " = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿! "
-"Results State" = "数据库状态"
-"Skip file types likely to compress poorly" = "跳过可能压缩效果不佳的文件类型"
-"Skip file types specified in settings" = "跳过设置中指定的文件类型"
-"Smart: {0} skipped" = "智能: 已跳过 {0}"
-"Space Saved" = "节省空间"
-"Use skip list" = "使用跳过列表"
-"Welcome" = "欢迎"
-"decayed" = "需重新压缩"
-"files will be skipped" = "个文件将被跳过"
-"not configured" = "未配置"
-"{0} files will be skipped" = "{0} 个文件将会跳过"
From b6b6d209bd27378255319f103cf582f84159ff13 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 15 Sep 2026 20:52:24 +1000
Subject: [PATCH 097/134] Add sorting buttons to headers on steam library page
---
.../ViewModels/SteamMonitorViewModel.vb | 64 ++--
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 281 ++++++++++++++++--
2 files changed, 305 insertions(+), 40 deletions(-)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index a05e1e82..916697e4 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -58,6 +58,12 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private _searchText As String
+
+ Private _activeSortColumn As String
+
+
+ Private _isSortDescending As Boolean
+
Private _selectedGame As SteamDetailedResult
@@ -137,6 +143,9 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
UseSmartSkiplist = settingsService.AppSettings.SkipUserNonCompressable
FilteredSteamGames = CollectionViewSource.GetDefaultView(SteamGamesData)
FilteredSteamGames.Filter = AddressOf FilterGames
+ ActiveSortColumn = "GameName"
+ IsSortDescending = False
+ ApplySort()
AddHandler SteamGamesData.CollectionChanged, AddressOf OnSteamGamesCollectionChanged
End Sub
@@ -308,26 +317,45 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
Private Sub Sort(parameter As Object)
- FilteredSteamGames.SortDescriptions.Clear()
+ Dim requestedSort = parameter?.ToString()
+
+ IsSortDescending = requestedSort.EndsWith("Desc", StringComparison.Ordinal)
+ ActiveSortColumn = requestedSort.Substring(0, requestedSort.Length - If(IsSortDescending, 4, 3))
+ ApplySort()
+ End Sub
+
+
+ Private Sub CycleSort(column As String)
+ If Not String.Equals(ActiveSortColumn, column, StringComparison.Ordinal) Then
+ ActiveSortColumn = column
+ IsSortDescending = False
+ ElseIf Not IsSortDescending Then
+ IsSortDescending = Not IsSortDescending
+ Else
+ ActiveSortColumn = "GameName"
+ IsSortDescending = False
+ End If
+
+ ApplySort()
+ End Sub
- Select Case parameter?.ToString()
- Case "GameNameAsc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Ascending))
- Case "GameNameDesc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.GameName), ListSortDirection.Descending))
- Case "StatusAsc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Ascending))
- Case "StatusDesc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.StatusMessage), ListSortDirection.Descending))
- Case "CurrentSizeAsc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Ascending))
- Case "CurrentSizeDesc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.CurrentFolderSize), ListSortDirection.Descending))
- Case "SavingsAsc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Ascending))
- Case "SavingsDesc"
- FilteredSteamGames.SortDescriptions.Add(New SortDescription(NameOf(SteamDetailedResult.DisplayedSavings), ListSortDirection.Descending))
+ Private Sub ApplySort()
+ Dim propertyName As String
+ Select Case ActiveSortColumn
+ Case "Status"
+ propertyName = NameOf(SteamDetailedResult.StatusMessage)
+ Case "CurrentSize"
+ propertyName = NameOf(SteamDetailedResult.CurrentFolderSize)
+ Case "Savings"
+ propertyName = NameOf(SteamDetailedResult.DisplayedSavings)
+ Case "RecommendedAction"
+ propertyName = NameOf(SteamDetailedResult.RecommendedActionCategory)
+ Case Else
+ propertyName = NameOf(SteamDetailedResult.GameName)
End Select
+
+ FilteredSteamGames.SortDescriptions.Clear()
+ FilteredSteamGames.SortDescriptions.Add(New SortDescription(propertyName, If(IsSortDescending, ListSortDirection.Descending, ListSortDirection.Ascending)))
End Sub
Public Async Function LoadGamesAsync() As Task
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 1cd9d65f..2d5be4e2 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -125,6 +125,10 @@
+
+
+
+
@@ -200,23 +204,254 @@
Margin="-20 -10 0 -10" HorizontalAlignment="Left"
Click="OnSelectAllVisibleClick" IsThreeState="True"
ToolTip="{loc:T Select all visible games}" />
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -279,22 +514,24 @@
-
+
-
-
+
+
-
+
From c988d8ba1d798b0e91fe30a5032e9f1cb357caac Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Tue, 15 Sep 2026 20:56:57 +1000
Subject: [PATCH 098/134] Aded hover colour to list view items in Steam Library
---
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 63 +++++++++++++++++---
1 file changed, 55 insertions(+), 8 deletions(-)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 2d5be4e2..667a8783 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -204,8 +204,8 @@
Margin="-20 -10 0 -10" HorizontalAlignment="Left"
Click="OnSelectAllVisibleClick" IsThreeState="True"
ToolTip="{loc:T Select all visible games}" />
-
@@ -260,15 +260,23 @@
-
-
+
@@ -316,7 +324,15 @@
-
+
@@ -364,7 +380,15 @@
-
+
@@ -412,7 +436,15 @@
-
+
@@ -506,6 +538,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 1faa098d42913b9e21f55f2af8049a48465157cb Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Wed, 16 Sep 2026 00:17:01 +1000
Subject: [PATCH 099/134] Update version number in zh-CN.toml
---
CompactGUI/Resources/Localisation/zh-CN.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 034cbb7b..3db98b90 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.11
# ===================
From f9ef7ac8964378131b42a26b260f9f05a3609fe6 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Wed, 16 Sep 2026 00:17:27 +1000
Subject: [PATCH 100/134] Update version for zh-CN locale to 2
---
CompactGUI/Resources/Localisation/manifest.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index e76cbc55..5e6c5e18 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -17,7 +17,7 @@ version = 1
file = "ru-RU.toml"
[locales."zh-CN"]
-version = 1
+version = 2
file = "zh-CN.toml"
[locales."it-IT"]
From a67df60521717e3cb7c635aa07e21919059fc3be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?MC=E9=A3=8E=E6=9C=88=E6=97=A0=E8=BE=B9?=
Date: Wed, 16 Sep 2026 08:17:48 +0800
Subject: [PATCH 101/134] Update Chinese(Simplified) translation to match
version 4.0 beta 11 (#665)
---
.../Resources/Localisation/manifest.toml | 2 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 218 ++++++++----------
2 files changed, 93 insertions(+), 127 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index e76cbc55..5e6c5e18 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -17,7 +17,7 @@ version = 1
file = "ru-RU.toml"
[locales."zh-CN"]
-version = 1
+version = 2
file = "zh-CN.toml"
[locales."it-IT"]
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 1b5a51fd..3db98b90 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.11
# ===================
@@ -7,7 +7,7 @@
"Add" = "添加"
"Add a custom folder to the watchlist" = "添加自定义文件夹到监控列表"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
+"Add selected to queue" = "添加选中项到队列"
"Add to Compression Queue" = "添加到压缩队列"
"Add to compression queue" = "添加到压缩队列"
"Add to right-click context menu" = "添加到右键菜单"
@@ -15,26 +15,26 @@
"Added to Queue" = "已添加到队列"
"Admin" = "管理员权限"
"Aggression of online skiplist" = "在线跳过列表的激进程度"
-"Always show details on Compression Mode buttons" = "始终显示压缩模式按钮的详细信息"
+"Always show details on Compression Mode buttons" = "始终在压缩模式按钮上显示详细信息"
"Analysing" = "正在分析"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "分析中……"
"Applied to all folders" = "已应用到所有文件夹"
-"Ascending" = "升序"
+"Ascending" = "递增"
"Awaiting Compression" = "等待压缩"
"Background Watcher Settings" = "后台监控设置"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
-"Cancel" = "否"
+"COMPARE METHODS" = "比较压缩模式"
+"COMPRESSION MODE " = "压缩模式"
+"Cancel" = "取消"
"Cancel Background Compressor" = "取消后台压缩"
"Cancel operation" = "取消操作"
"Cannot remove folder" = "无法移除文件夹"
"Check for pre-release updates" = "检查预发布更新"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
+"Choose Compression" = "选择压缩模式"
+"Clear filters" = "清除筛选条件"
"Click to download" = "点击下载"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "完成"
+"Compress" = "压缩"
"Compress Again" = "再次压缩"
"Compress All Now" = "立即全部压缩"
"Compress Selected" = "压缩选中项"
@@ -48,115 +48,115 @@
"Compression options have been applied to all folders" = "压缩选项已应用到所有文件夹"
"Current Size" = "当前大小"
"Database Results" = "数据库结果"
-"Descending" = "降序"
-"Deselect all" = "Deselect all" # LOC:TODO
+"Descending" = "递减"
+"Deselect all" = "取消全选"
"Direct Storage" = "Direct Storage"
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
+"Do Not Compress" = "无需压缩"
"Do not compress" = "无需压缩"
"Drive unavailable" = "驱动器不可用"
-"Edit list" = "Edit list" # LOC:TODO
-"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Edit list" = "编辑列表"
+"Estimate Compression for non-Steam Folders (beta)" = "估算非 Steam 文件夹的压缩率 (测试版)"
+"Estimated Size" = "预估大小"
"Estimated size" = "预估大小"
"Exit" = "退出"
-"Extensions in this folder" = "此文件夹中的扩展名"
-"Failed" = "Failed" # LOC:TODO
+"Extensions in this folder" = "此文件夹中包含的扩展名"
+"Failed" = "失败"
"Failed to submit to wiki" = "提交到 Wiki 失败"
"Filetype Management" = "文件类型管理"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
-"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,使用数据库来确定要跳过的类型。对于非 Steam 文件夹,则基于智能分析器。"
-"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅限 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要提交多少次才能考虑跳过该类型。\n“低”通常是最好的,因为高档有跳过本来可以很好地压缩的文件的风险。"
-"Game" = "游戏"
+"Filter" = "筛选"
+"Finishing {0} active file operations; do not power off." = "正在完成 {0} 个活跃的文件操作;请不要关闭软件。"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "对于 Steam 游戏,将使用数据库确定要跳过的文件类型。对于非 Steam 文件夹,则由智能分析器决定。"
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "仅适用于 Steam 游戏。\n在选择跳过用户提交的文件类型时,该设置决定了每种文件类型需要达到多少次提交才会考虑跳过。\n“低”通常是最佳选项,因为更高的选项有跳过原本能压缩得很好的文件的风险。"
+"Game" = "游戏名"
"Game Name" = "游戏名称"
-"Games" = "游戏列表"
-"Go to Database Results" = "前往数据库结果"
+"Games" = "个游戏"
+"Go to Database Results" = "查看数据库结果"
"HDDs only use 1 thread" = "机械硬盘仅使用 1 个线程"
"Home" = "主页"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
-"Include global skipped file types" = "包含全局跳过的文件类型"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
-"Include smart skipped file types" = "包含智能跳过的文件类型"
+"Include global skiplist" = "使用全局跳过列表"
+"Include global skipped file types" = "使用全局跳过的文件类型"
+"Include smart skiplist" = "使用智能跳过列表"
+"Include smart skipped file types" = "使用智能跳过的文件类型"
"Insufficient permission to access this folder" = "没有足够的权限访问此文件夹"
"LZX" = "LZX"
-"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "最后获取: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "上次获取: {0:yyyy年 M月 d日 HH:mm:ss}"
"Last analysed {0}" = "上次分析 {0}"
-"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}"
-"Library location" = "Library location" # LOC:TODO
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "上次运行: {0:yyyy年 M月 d日 HH:mm:ss}"
+"Library location" = "库位置"
"Manage local skipped filetypes" = "管理本地跳过的文件类型"
"Max Savings" = "最大节省"
"Maximum Compression Threads" = "最大压缩线程数"
"Mode" = "压缩模式"
"Monitor compressed folders for changes" = "监控已压缩文件夹的更改"
"Never" = "从不"
-"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}"
-"No installed Steam games were found." = "未发现已安装的Steam游戏。"
-"No wiki data" = "无wiki数据"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "下次计划: {0:yyyy年 M月 d日 HH:mm:ss}"
+"No installed Steam games were found." = "未发现已安装的 Steam 游戏。"
+"No wiki data" = "无 wiki 数据"
"Not Compressed" = "未压缩"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "空间不足"
"On Schedule" = "按计划"
"On Schedule if system is also idle" = "按计划且系统空闲时"
"Open" = "打开"
"Open Settings Folder" = "打开设置文件夹"
"Operation cancelled." = "操作已取消。"
"Operation failed: {0}" = "操作失败: {0}"
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
-"Please check your internet connection and try again" = "请检查您的网络连接并重试"
+"Original Size" = "原始大小"
+"Paused" = "已暂停"
+"Please check your internet connection and try again" = "请检查你的网络连接并重试"
"Please wait until the current operation is finished" = "请等待当前操作完成"
-"Preparing" = "Preparing" # LOC:TODO
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿!"
+"Preparing" = "正在准备"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "快速分析文件并估算压缩率而无需写入磁盘。这在机械硬盘上可能会非常卡顿!"
"Re-analyse all watched folders" = "重新分析所有受监控文件夹"
"Re-analyse this folder" = "重新分析此文件夹"
-"Recently Updated" = "最近更新过"
-"Recommended Action" = "Recommended Action" # LOC:TODO
-"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n在线检查语言定义更新"
-"Reload Steam Library list" = "重新加载Steam库列表"
-"Remove from Watchlist" = "从监控列表移除"
+"Recently Updated" = "近期更新"
+"Recommended Action" = "推荐操作"
+"Reload Languages.\nChecks online for updated language definitions" = "重新加载语言。\n联网检查语言文件更新"
+"Reload Steam Library list" = "重新加载 Steam 库列表"
+"Remove from Watchlist" = "从监控列表中移除"
"Reset" = "重置"
"Restart as Admin" = "以管理员身份重新启动"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "展开队列"
+"SKIPLIST SELECTION" = "跳过列表选择"
+"Saved" = "已节省"
"Savings" = "节省"
-"Scanning installed Steam games..." = "正在扫描已安装的Steam游戏……"
+"Scanning installed Steam games..." = "正在扫描已安装的 Steam 游戏……"
"Search by game name or SteamID..." = "按游戏名称或 SteamID 搜索……"
-"Select" = "Select" # LOC:TODO
-"Select a folder to compress" = "选择一个文件夹压缩"
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select" = "选择"
+"Select a folder to compress" = "选择要压缩的文件夹"
+"Select all" = "全选"
+"Select all compressable" = "全选可压缩项"
+"Select all visible games" = "全选可见游戏"
"Settings" = "设置"
-"Show notification on completion" = "完成后显示通知"
-"Sort" = "Sort" # LOC:TODO
+"Show notification on completion" = "完成时显示通知"
+"Sort" = "排序方式"
"Sort By" = "排序方式"
-"Start CompactGUI in system tray" = "在系统托盘启动 CompactGUI"
+"Start CompactGUI in system tray" = "启动时最小化到系统托盘"
"Status" = "状态"
-"Steam Library" = "Steam库"
+"Steam Library" = "Steam 库"
"SteamID" = "SteamID"
"Submit Results" = "提交结果"
-"Submitted to wiki" = "已提交到 Wiki"
+"Submitted to wiki" = "已提交到 wiki"
"Success" = "成功"
"System Integration" = "系统集成"
"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
-"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果您正在使用此功能,则不应压缩此游戏。"
-"Total Results" = "总结果"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果你正在使用此功能,则不应压缩此游戏。"
+"Total Results" = "结果总数"
"UI Settings" = "UI 设置"
"UID" = "UID"
"Uncompress" = "解压缩"
-"Uncompressed" = "已解压缩"
+"Uncompressed" = "未压缩"
"Uncompressing..." = "解压缩中……"
"Unknown" = "未知"
"Update Available" = "更新可用"
"Update Available ▸ Version {0}" = "更新可用 ▸ 版本 {0}"
"Update Settings" = "更新设置"
-"Update in Steam" = "在Steam中更新"
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Update in Steam" = "在 Steam 中更新"
+"Use exclusions" = "使用跳过列表"
+"Use recommended mode" = "使用推荐模式"
"Version" = "版本"
-"Waiting" = "Waiting" # LOC:TODO
-"Watch folder for changes" = "监控文件夹更改"
+"Waiting" = "正在等待"
+"Watch folder for changes" = "监控此文件夹的更改"
"Watched Folders" = "受监控文件夹"
"Watcher" = "监控"
"WatcherPage" = "监控页"
@@ -165,36 +165,36 @@
"XPRESS 16K" = "XPRESS 16K"
"XPRESS 4K" = "XPRESS 4K"
"XPRESS 8K" = "XPRESS 8K"
-"Yes" = "是"
+"Yes" = "确定"
"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "你目前有 {0} 个文件夹正在被监控。关闭 CompactGUI 将停止对它们的监控。{1}{1}你确定要退出吗?"
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "你的设置已被重置以适应更新"
+"Your settings have been reset to their default." = "你的设置已被重置"
"can be saved" = "可以节省"
-"contained files" = "包含文件"
+"contained files" = "包含文件数"
"day(s)" = "天"
"edit" = "编辑"
-"edit skipped filetypes" = "编辑跳过类型"
-"estimated savings" = "estimated savings" # LOC:TODO
+"edit skipped filetypes" = "编辑跳过的文件类型"
+"estimated savings" = "预估节省"
"every" = "每"
"games" = "个游戏"
"just now" = "刚刚"
-"last compressed:" = "上次压缩:"
-"last modified:" = "上次修改:"
-"recommended" = "recommended" # LOC:TODO
-"saved" = "saved" # LOC:TODO
+"last compressed:" = "上次压缩:"
+"last modified:" = "上次修改:"
+"recommended" = "推荐"
+"saved" = "已节省"
"select a folder" = "选择文件夹"
"uncompressed size" = "未压缩大小"
"{0:0} days ago" = "{0:0} 天前"
"{0:0} hours ago" = "{0:0} 小时前"
"{0:0} minutes ago" = "{0:0} 分钟前"
"{0} saved" = "{0} 已节省"
-"{0}% decayed" = "{0}% 已衰减"
+"{0}% decayed" = "{0}% 需重新压缩"
[context."Background Scheduler"]
"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI正在运行一个计划任务并将会在后台压缩监控文件夹"
-"Next scheduled task is on {0}" = "下一次计划任务在 {0}"
-"Scheduled Compression Completed" = "计划任务压缩完成"
-"Scheduled Compression Running" = "正在运行计划压缩"
+"Next scheduled task is on {0}" = "下一次计划压缩在 {0}"
+"Scheduled Compression Completed" = "计划压缩已完成"
+"Scheduled Compression Running" = "计划压缩运行中"
[context."Compression estimate"]
"unknown" = "未知"
@@ -213,13 +213,13 @@
"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "已完成"
+"Clear completed" = "清除已完成项"
+"Expected savings" = "预期节省"
+"PENDING" = "待压缩"
+"Queue" = "队列"
+"To process" = "待处理"
+"{0} of {1} completed" = "{0} / {1} 已完成"
[context."Folder status"]
"Unknown" = "未知"
@@ -250,37 +250,3 @@
[context."Storage savings"]
"saved" = "已节省"
-
-[obsolete]
-"Add Folder to Queue" = "添加文件夹到队列"
-"Apply to all" = "应用到所有"
-"Cancelling..." = "取消中……"
-"Compression Mode" = "压缩模式"
-"Configuration" = "配置"
-"Custom list — {0} entries" = "自定义列表 — {0} 条"
-"Custom: {0} entries" = "自定义: {0} 条"
-"DB — {0} files" = "Wiki — {0} 个文件"
-"Edit skip list for this folder" = "编辑此文件夹的跳过列表"
-"Files Compressed" = "文件已压缩"
-"For Steam Games:\nskips files based on database results\n\nFor Non-Steam Folders:\nskips files based on compression estimate" = "对于 Steam 游戏:\n根据数据库结果跳过文件\n\n对于非 Steam 文件夹:\n基于压缩估计跳过文件"
-"Global + DB — {0} files" = "全局 + Wiki — {0} 个文件"
-"Global — {0} files" = "全局 — {0} 个文件"
-"Global: {0} skipped" = "全局: 已跳过 {0}"
-"Language (Requires Restart)" = "语言 (需要重启)"
-"Language Changed" = "语言更改"
-"Language changed successfully. You may need to restart the application for all changes to take effect." = "语言更改成功。您可能需要重启应用程序以使所有更改生效。"
-"Last analysed" = "上次分析"
-"OK" = "好"
-"Off" = "关闭"
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs! " = "快速分析文件并估算压缩比而无需写入磁盘。 这将会导致机械硬盘非常卡顿! "
-"Results State" = "数据库状态"
-"Skip file types likely to compress poorly" = "跳过可能压缩效果不佳的文件类型"
-"Skip file types specified in settings" = "跳过设置中指定的文件类型"
-"Smart: {0} skipped" = "智能: 已跳过 {0}"
-"Space Saved" = "节省空间"
-"Use skip list" = "使用跳过列表"
-"Welcome" = "欢迎"
-"decayed" = "需重新压缩"
-"files will be skipped" = "个文件将被跳过"
-"not configured" = "未配置"
-"{0} files will be skipped" = "{0} 个文件将会跳过"
From 97e7599b67286b6c3aab73a53d17db681e9caed3 Mon Sep 17 00:00:00 2001
From: MCfywb
Date: Thu, 17 Sep 2026 13:17:10 +0800
Subject: [PATCH 102/134] update Chinese(Simplified) README file
---
README/README_cn.md | 117 +++++++++++++++++++++++---------------------
1 file changed, 60 insertions(+), 57 deletions(-)
diff --git a/README/README_cn.md b/README/README_cn.md
index e2a4f007..9c201c2e 100644
--- a/README/README_cn.md
+++ b/README/README_cn.md
@@ -2,114 +2,117 @@
-**什么是 `compact.exe`?**
-它是一个命令行工具,包含 Windows 10 中引入的新算法集合,可以让你几乎不损失性能的情况下无损地压缩游戏、程序和其他文件夹。CompactGUI 只是利用相同的 API,以更友好的用户界面呈现该功能。
+**它是怎么工作的**:
+
+CompactGUI 是一个友好的图形界面,它利用了 Windows 10 中首次引入的高性能压缩功能,即由 Windows 覆盖过滤器(WOF)驱动公开的底层文件系统压缩算法。它允许透明地压缩任何文件或文件夹(重点是游戏),而不会导致任何性能损失并节省大量存储空间。
-**无损?这是什么意思?**
-无损压缩意味着文件仍然可以像以前一样在计算机上正常使用——它们不会像 Zip 和 Rar 文件那样被重新打包。您可以像以前一样浏览网页、启动游戏和程序,只是它们占用的空间更小。
+**透明的?这是什么意思?**
-**这和旧版 Windows 内置压缩有什么不同?**
-这与 Windows 内置的压缩类似(右键点击 > 属性 > 压缩以节省空间),但是 Windows 10 及更高版本引入的新算法要优越得多,能够实现更高的压缩率,且几乎不会影响性能。对于拥有旧硬盘的用户来说,甚至可能看到性能提升,表现为加载时间减少——较小的文件可以更快地读入内存,而 CPU 能够比原本硬盘更快地即时解压缩它们。
+透明压缩意味着文件就像无事发生一样,仍然可以在计算机上正常使用——它们没有像 zip 和 rar 文件那样被重新打包。你仍然可以像之前一样浏览、启动游戏和程序,只是它们占用了更少的空间。
-[更多信息请点击此处](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)
+**这与旧版本 Windows 中的内置压缩有何不同?**
-
From 295681ff2e6e29c2f765c04c2067b5769afa05aa Mon Sep 17 00:00:00 2001
From: Hans Valerie
Date: Thu, 17 Sep 2026 15:52:40 +0700
Subject: [PATCH 103/134] feat(localisation): add Indonesian language support
(#666)
Co-authored-by: Iridium IO
---
CompactGUI/Resources/Localisation/id-ID.toml | 252 ++++++++++++++++++
.../Resources/Localisation/manifest.toml | 4 +
README.md | 3 +-
README/README_id.md | 117 ++++++++
README/README_it.md | 3 +-
README/README_ru.md | 3 +-
6 files changed, 379 insertions(+), 3 deletions(-)
create mode 100644 CompactGUI/Resources/Localisation/id-ID.toml
create mode 100644 README/README_id.md
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
new file mode 100644
index 00000000..d9a28bf3
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -0,0 +1,252 @@
+# CompactGUI Localisation
+# @version 1
+# @programversion 4.0.0-beta.11
+
+# ===================
+# Translations
+
+"Add" = "Tambah"
+"Add a custom folder to the watchlist" = "Tambahkan folder kustom ke daftar pantauan"
+"Add selected to queue" = "Tambahkan yang dipilih ke antrean"
+"Add to Compression Queue" = "Tambahkan ke Antrean Kompresi"
+"Add to compression queue" = "Tambahkan ke antrean kompresi"
+"Add to right-click context menu" = "Tambahkan ke menu konteks klik kanan"
+"Add to start menu" = "Tambahkan ke menu Start"
+"Added to Queue" = "Ditambahkan ke Antrean"
+"Admin" = "Admin"
+"Aggression of online skiplist" = "Agresivitas daftar pengecualian online"
+"Always show details on Compression Mode buttons" = "Selalu tampilkan detail pada tombol Mode Kompresi"
+"Analysing" = "Menganalisis"
+"Analysing..." = "Menganalisis..."
+"Applied to all folders" = "Diterapkan ke semua folder"
+"Ascending" = "Menaik"
+"Awaiting Compression" = "Menunggu Kompresi"
+"Background Watcher Settings" = "Pengaturan Pemantau Latar Belakang"
+"COMPARE METHODS" = "BANDINGKAN METODE"
+"COMPRESSION MODE " = "MODE KOMPRESI "
+"Cancel" = "Batal"
+"Cancel Background Compressor" = "Batalkan Kompresi Latar Belakang"
+"Cancel operation" = "Batalkan operasi"
+"Cannot remove folder" = "Tidak dapat menghapus folder"
+"Check for pre-release updates" = "Periksa pembaruan prarilis"
+"Choose Compression" = "Pilih Kompresi"
+"Clear filters" = "Hapus filter"
+"Click to download" = "Klik untuk mengunduh"
+"CompactGUI" = "CompactGUI"
+"Complete" = "Selesai"
+"Compress" = "Kompres"
+"Compress Again" = "Kompres Lagi"
+"Compress All Now" = "Kompres Semua Sekarang"
+"Compress Selected" = "Kompres yang Dipilih"
+"Compress folders: " = "Kompres folder: "
+"Compressed" = "Dikompresi"
+"Compressing..." = "Mengompresi..."
+"Compression" = "Kompresi"
+"Compression DB" = "Database Kompresi"
+"Compression Settings" = "Pengaturan Kompresi"
+"Compression Summary" = "Ringkasan Kompresi"
+"Compression options have been applied to all folders" = "Opsi kompresi telah diterapkan ke semua folder"
+"Current Size" = "Ukuran Saat Ini"
+"Database Results" = "Hasil Database"
+"Descending" = "Menurun"
+"Deselect all" = "Hapus semua pilihan"
+"Direct Storage" = "Direct Storage"
+"Do Not Compress" = "Jangan Kompres"
+"Do not compress" = "Jangan kompres"
+"Drive unavailable" = "Drive tidak tersedia"
+"Edit list" = "Edit daftar"
+"Estimate Compression for non-Steam Folders (beta)" = "Perkirakan Kompresi untuk Folder non-Steam (beta)"
+"Estimated Size" = "Ukuran Perkiraan"
+"Estimated size" = "Ukuran perkiraan"
+"Exit" = "Keluar"
+"Extensions in this folder" = "Ekstensi dalam folder ini"
+"Failed" = "Gagal"
+"Failed to submit to wiki" = "Gagal mengirim ke wiki"
+"Filetype Management" = "Pengelolaan Jenis File"
+"Filter" = "Filter"
+"Finishing {0} active file operations; do not power off." = "Menyelesaikan {0} operasi file aktif; jangan matikan perangkat."
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Untuk game Steam, database digunakan untuk menentukan jenis file yang dikecualikan. Untuk folder non-Steam, penentuan didasarkan pada penganalisis pintar."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Hanya untuk game Steam.\nSaat memilih untuk mengecualikan jenis file yang dikirim pengguna, pengaturan ini menentukan berapa banyak kiriman yang diperlukan agar suatu jenis file dianggap perlu dikecualikan. \n'low' umumnya paling baik, karena opsi yang lebih tinggi berisiko mengecualikan file yang sebenarnya dapat dikompresi dengan baik."
+"Game" = "Game"
+"Game Name" = "Nama Game"
+"Games" = "Game"
+"Go to Database Results" = "Buka Hasil Database"
+"HDDs only use 1 thread" = "HDD hanya menggunakan 1 thread"
+"Home" = "Beranda"
+"Include global skiplist" = "Sertakan daftar pengecualian global"
+"Include global skipped file types" = "Sertakan jenis file yang dikecualikan secara global"
+"Include smart skiplist" = "Sertakan daftar pengecualian pintar"
+"Include smart skipped file types" = "Sertakan jenis file yang dikecualikan oleh analisis pintar"
+"Insufficient permission to access this folder" = "Izin tidak cukup untuk mengakses folder ini"
+"LZX" = "LZX"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Terakhir diambil: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "Terakhir dianalisis {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Terakhir dijalankan: {0:dd MMM yyyy} pukul {0:HH:mm:ss}"
+"Library location" = "Lokasi pustaka"
+"Manage local skipped filetypes" = "Kelola jenis file yang dikecualikan secara lokal"
+"Max Savings" = "Penghematan Maksimum"
+"Maximum Compression Threads" = "Thread Kompresi Maksimum"
+"Mode" = "Mode"
+"Monitor compressed folders for changes" = "Pantau perubahan pada folder terkompresi"
+"Never" = "Tidak Pernah"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Jadwal berikutnya: {0:dd MMM yyyy} pukul {0:HH:mm:ss}"
+"No installed Steam games were found." = "Tidak ada game Steam terinstal yang ditemukan."
+"No wiki data" = "Tidak ada data wiki"
+"Not Compressed" = "Tidak Dikompresi"
+"Not enough space" = "Ruang tidak cukup"
+"On Schedule" = "Terjadwal"
+"On Schedule if system is also idle" = "Terjadwal jika sistem juga idle"
+"Open" = "Buka"
+"Open Settings Folder" = "Buka Folder Pengaturan"
+"Operation cancelled." = "Operasi dibatalkan."
+"Operation failed: {0}" = "Operasi gagal: {0}"
+"Original Size" = "Ukuran Asli"
+"Paused" = "Dijeda"
+"Please check your internet connection and try again" = "Periksa koneksi internet Anda lalu coba lagi"
+"Please wait until the current operation is finished" = "Harap tunggu hingga operasi saat ini selesai"
+"Preparing" = "Menyiapkan"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Memindai file dengan cepat dan memperkirakan rasio kompresinya tanpa menulis ke disk. Proses ini kemungkinan akan sangat lambat pada HDD!"
+"Re-analyse all watched folders" = "Analisis ulang semua folder yang dipantau"
+"Re-analyse this folder" = "Analisis ulang folder ini"
+"Recently Updated" = "Baru Diperbarui"
+"Recommended Action" = "Tindakan yang Disarankan"
+"Reload Languages.\nChecks online for updated language definitions" = "Muat Ulang Bahasa.\nMemeriksa definisi bahasa terbaru secara online"
+"Reload Steam Library list" = "Muat ulang daftar Pustaka Steam"
+"Remove from Watchlist" = "Hapus dari Daftar Pantauan"
+"Reset" = "Atur Ulang"
+"Restart as Admin" = "Mulai Ulang sebagai Admin"
+"SHOW QUEUE" = "TAMPILKAN ANTREAN"
+"SKIPLIST SELECTION" = "PILIHAN DAFTAR PENGECUALIAN"
+"Saved" = "Dihemat"
+"Savings" = "Penghematan"
+"Scanning installed Steam games..." = "Memindai game Steam yang terinstal..."
+"Search by game name or SteamID..." = "Cari berdasarkan nama game atau SteamID..."
+"Select" = "Pilih"
+"Select a folder to compress" = "Pilih folder untuk dikompresi"
+"Select all" = "Pilih semua"
+"Select all compressable" = "Pilih semua yang dapat dikompresi"
+"Select all visible games" = "Pilih semua game yang terlihat"
+"Settings" = "Pengaturan"
+"Show notification on completion" = "Tampilkan notifikasi setelah selesai"
+"Sort" = "Urutkan"
+"Sort By" = "Urutkan Berdasarkan"
+"Start CompactGUI in system tray" = "Jalankan CompactGUI di system tray"
+"Status" = "Status"
+"Steam Library" = "Pustaka Steam"
+"SteamID" = "SteamID"
+"Submit Results" = "Kirim Hasil"
+"Submitted to wiki" = "Dikirim ke wiki"
+"Success" = "Berhasil"
+"System Integration" = "Integrasi Sistem"
+"The SnackbarPresenter was never set" = "SnackbarPresenter belum pernah diatur"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Ruang kosong pada drive ini tidak cukup untuk mengompresi folder ini dengan aman. Anda memerlukan ruang kosong setidaknya 50% dari ukuran folder ini agar Windows tidak mengalami masalah."
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Game ini menggunakan teknologi DirectStorage. Jika Anda menggunakan fitur ini, sebaiknya jangan kompres game ini."
+"Total Results" = "Total Hasil"
+"UI Settings" = "Pengaturan UI"
+"UID" = "UID"
+"Uncompress" = "Dekompresi"
+"Uncompressed" = "Tidak Dikompresi"
+"Uncompressing..." = "Mendekompresi..."
+"Unknown" = "Tidak Diketahui"
+"Update Available" = "Pembaruan Tersedia"
+"Update Available ▸ Version {0}" = "Pembaruan Tersedia ▸ Versi {0}"
+"Update Settings" = "Pengaturan Pembaruan"
+"Update in Steam" = "Perbarui di Steam"
+"Use exclusions" = "Gunakan daftar pengecualian"
+"Use recommended mode" = "Gunakan mode yang disarankan"
+"Version" = "Versi"
+"Waiting" = "Menunggu"
+"Watch folder for changes" = "Pantau perubahan folder"
+"Watched Folders" = "Folder yang Dipantau"
+"Watcher" = "Pemantau"
+"WatcherPage" = "Pemantau"
+"When System is Idle" = "Saat Sistem Idle"
+"Working" = "Memproses"
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
+"Yes" = "Ya"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Saat ini ada {0} folder yang sedang dipantau. Menutup CompactGUI akan menghentikan pemantauannya.{1}{1}Apakah Anda yakin ingin keluar?"
+"Your settings have been reset to their default to accommodate the update" = "Pengaturan Anda telah dikembalikan ke default agar sesuai dengan pembaruan"
+"Your settings have been reset to their default." = "Pengaturan Anda telah dikembalikan ke default."
+"can be saved" = "dapat dihemat"
+"contained files" = "file di dalamnya"
+"day(s)" = "hari"
+"edit" = "edit"
+"edit skipped filetypes" = "edit jenis file yang dikecualikan"
+"estimated savings" = "perkiraan penghematan"
+"every" = "setiap"
+"games" = "game"
+"just now" = "baru saja"
+"last compressed:" = "terakhir dikompresi:"
+"last modified:" = "terakhir diubah:"
+"recommended" = "disarankan"
+"saved" = "dihemat"
+"select a folder" = "pilih folder"
+"uncompressed size" = "ukuran tanpa kompresi"
+"{0:0} days ago" = "{0:0} hari lalu"
+"{0:0} hours ago" = "{0:0} jam lalu"
+"{0:0} minutes ago" = "{0:0} menit lalu"
+"{0} saved" = "{0} dihemat"
+"{0}% decayed" = "{0}% perlu dikompresi ulang"
+
+[context."Background Scheduler"]
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI sedang menjalankan tugas terjadwal dan akan mengompresi folder yang dipantau di latar belakang"
+"Next scheduled task is on {0}" = "Tugas terjadwal berikutnya: {0}"
+"Scheduled Compression Completed" = "Kompresi Terjadwal Selesai"
+"Scheduled Compression Running" = "Kompresi Terjadwal Sedang Berjalan"
+
+[context."Compression estimate"]
+"unknown" = "tidak diketahui"
+
+[context."Compression size"]
+"After" = "Sesudah"
+"Before" = "Sebelum"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder Compression Queue"]
+"COMPLETED" = "SELESAI"
+"Clear completed" = "Hapus yang selesai"
+"Expected savings" = "Perkiraan penghematan"
+"PENDING" = "MENUNGGU"
+"Queue" = "Antrean"
+"To process" = "Untuk diproses"
+"{0} of {1} completed" = "{0} dari {1} selesai"
+
+[context."Folder status"]
+"Unknown" = "Tidak Diketahui"
+
+[context."Relative date"]
+"Unknown" = "Tidak Diketahui"
+
+[context."Schedule"]
+"at" = "pukul"
+
+[context."Skiplist aggression"]
+"high" = "tinggi"
+"low" = "rendah"
+"medium" = "sedang"
+
+[context."Skiplist editor"]
+"Save" = "Simpan"
+
+[context."Steam Library Compression Mode Button"]
+"Compress | {0}" = "Kompres | {0}"
+
+[context."Steam Library Tab Headings"]
+"CURRENT SIZE" = "UKURAN SAAT INI"
+"GAME" = "GAME"
+"RECOMMENDED ACTION" = "TINDAKAN YANG DISARANKAN"
+"SAVINGS" = "PENGHEMATAN"
+"STATUS" = "STATUS"
+
+[context."Storage savings"]
+"saved" = "dihemat"
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 5e6c5e18..280abd9e 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -27,3 +27,7 @@ file = "it-IT.toml"
[locales."tr-TR"]
version = 1
file = "tr-TR.toml"
+
+[locales."id-ID"]
+version = 1
+file = "id-ID.toml"
diff --git a/README.md b/README.md
index 7b1924fa..8ec9040c 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,8 @@
English -
Русский -
简体中文 -
- Italian
+ Italian -
+ Bahasa Indonesia
diff --git a/README/README_id.md b/README/README_id.md
new file mode 100644
index 00000000..43394053
--- /dev/null
+++ b/README/README_id.md
@@ -0,0 +1,117 @@
+
CompactGUI mengompresi game dan program Anda secara transparan, mengurangi ruang yang digunakan tanpa memengaruhi fungsinya. CompactGUI bekerja langsung dengan Win32 API untuk mencapai hasil yang sama seperti alat baris perintah bawaan compact.exe yang tersedia mulai Windows 10.
+
+
+**Cara kerjanya**:
+
+CompactGUI adalah antarmuka yang mudah digunakan dan memanfaatkan algoritma kompresi sistem file yang disediakan oleh driver Windows Overlay Filter (WOF), menggunakan kompresi berperforma tinggi yang pertama kali diperkenalkan di Windows 10. CompactGUI memungkinkan file atau folder apa pun (dengan fokus pada game) dikompresi secara transparan, tanpa kehilangan performa yang berarti dan dengan potensi penghematan ruang penyimpanan yang besar.
+
+**Transparan? Apa maksudnya?**
+
+Kompresi transparan berarti file tetap dapat digunakan secara normal di komputer seolah-olah tidak terjadi apa pun—file tidak dikemas ulang seperti arsip Zip atau Rar. Anda tetap dapat menjelajah, menjalankan game, dan membuka program seperti sebelumnya, hanya saja file tersebut menggunakan ruang yang lebih sedikit.
+
+**Apa bedanya dengan kompresi bawaan pada versi Windows yang lebih lama?**
+
+Cara ini _mirip_ dengan kompresi lama bawaan Windows (klik kanan > Properties > Compress to save space), tetapi algoritma baru yang diperkenalkan di Windows 10+ jauh lebih baik, menghasilkan rasio kompresi yang lebih tinggi dengan dampak performa yang hampir tidak terasa. [Informasi selengkapnya dapat ditemukan di sini]()
+
+
Instalasi
+
+####
+
+
+
+Atau instal dengan Winget:
+
+```py
+winget install CompactGUI
+```
+
+## Penggunaan
+
+Gunakan alat ini untuk mengompresi folder sambil tetap dapat menggunakan/menjalankannya secara normal:
+
+- Mengurangi ukuran game (misalnya ARK-Survival Evolved: 169 GB > 91.2 GB)
+- Mengurangi ukuran program (misalnya Adobe Photoshop: 1.71 GB > 886 MB)
+- Mengompresi folder lain apa pun di komputer Anda
+
+## Fitur Tambahan
+
+- Umpan balik visual untuk progres dan statistik kompresi
+- Daftar jenis file yang sulit dikompresi dan dapat dikecualikan, dapat dikonfigurasi untuk setiap folder
+- Perkiraan Kompresi - dibuat menggunakan lebih dari 100.000 kiriman komunitas (sebenarnya jauh lebih banyak, tetapi saya tidak menyadari Google Forms berhenti di 100.000 sehingga banyak kiriman hilang) untuk memberikan data akurat pada banyak game Steam
+ - Game non-Steam tetap dapat menggunakan perkiraan berbasis algoritma yang memberikan gambaran wajar tentang potensi kompresinya.
+ - Jika ingin berkontribusi, hasil game Steam dapat dikirim ke database online langsung dari CompactGUI
+- Integrasi dengan menu konteks Windows Explorer agar lebih mudah digunakan.
+- Menganalisis status folder yang sudah ada
+- Pemantau Latar Belakang - melacak folder dan memantau perubahannya (misalnya pembaruan game Steam), lalu secara otomatis menjaga folder tersebut tetap terkompresi di latar belakang.
+
+
Lihat Wiki untuk daftar yang telah diuji dari lebih dari 100.000 kiriman
+
+
+## Catatan Penting
+
+**Alat ini tidak boleh digunakan pada game yang memanfaatkan DirectStorage di Windows 11.**
+
+DirectStorage adalah API baru yang memungkinkan game memuat aset langsung dari SSD tanpa melalui CPU. File terkompresi harus didekompresi sebelum dikirim ke GPU, sehingga keuntungan performa dari DirectStorage dapat hilang.
+
+## Latar Belakang
+
+Windows 10 memperkenalkan alat yang kurang dikenal tetapi sangat berguna bernama `compact.exe`, yang memungkinkan folder dan file pada disk dikompresi lalu didekompresi saat digunakan. Dengan CPU modern apa pun (saya telah mengujinya hingga i3-370M dari tahun 2010 dengan dampak yang nyaris tidak terasa), beban tambahan ini hampir tidak terlihat, sementara penghematan ruang sangat berguna bagi pengguna dengan SSD berkapasitas lebih kecil.
+
+Karena folder program dan game dapat diperkecil hingga 60%, ada manfaat tambahan berupa kemungkinan waktu pemuatan yang lebih singkat—terutama pada HDD yang lebih lambat.
+
+Informasi selengkapnya tentang fungsi bawaan Windows dapat ditemukan [di sini](https://technet.microsoft.com/library/bb490884.aspx) dan [di sini]() atau dengan mengetik `compact /q` di baris perintah.
+
+Alat ini sengaja dirancang hanya untuk mengompresi folder dan file. Seluruh drive dan instalasi Windows tidak dapat diubah dari dalam CompactGUI—pengguna yang memerlukan fungsi tersebut sebaiknya menggunakan `compact /compactOS` dari baris perintah.
+
+Kompresi sepenuhnya transparan—program, game, dan file tetap dapat diakses seperti biasa dan tetap muncul normal di Explorer; file hanya didekompresi ke RAM saat digunakan sementara tetap tersimpan dalam keadaan terkompresi di disk.
+
+## Mode Kompresi
+
+Secara default, program menjalankan Compact dengan algoritma `XPRESS8K` aktif. Mode ini memberikan keseimbangan yang baik antara kecepatan kompresi dan pengurangan ukuran. Default Windows menggunakan `XPRESS4K`, yang lebih cepat tetapi menghasilkan kompresi lebih rendah.
+
+Mode Kompresi Opsional:
+
+| Algoritma | Keunggulan Utama | Deskripsi Terperinci |
+| :-------- | :--------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- |
+| XPRESS4K | Paling cepat, tetapi paling lemah | Cocok untuk file game dengan kebutuhan kecepatan baca sangat tinggi; dapat memaksimalkan performa sambil mengompresi. |
+| XPRESS8K | Seimbang antara kecepatan dan kompresi | Memberikan keseimbangan yang lebih baik antara kecepatan kompresi dan rasio kompresi. |
+| XPRESS16K | Lebih lambat, tetapi lebih kuat | Cocok untuk kondisi dengan ruang penyimpanan terbatas dan kebutuhan kecepatan pemuatan yang rendah. |
+| LZX | Paling lambat, tetapi paling kuat | Cocok untuk menyimpan file arsip, data cadangan, atau data dingin yang jarang diakses. |
+
+---
+
+### Suka proyek ini?
+
+Pertimbangkan untuk memberikan tip melalui Ko-Fi :)
+
+
diff --git a/README/README_it.md b/README/README_it.md
index 1818f365..5d200a8e 100644
--- a/README/README_it.md
+++ b/README/README_it.md
@@ -19,7 +19,8 @@
English -
Русский -
简体中文 -
- Italian
+ Italian -
+ Bahasa Indonesia
diff --git a/README/README_ru.md b/README/README_ru.md
index c3eb56ff..3e499cd3 100644
--- a/README/README_ru.md
+++ b/README/README_ru.md
@@ -14,7 +14,8 @@
English -
Русский -
简体中文 -
- Italian
+ Italian -
+ Bahasa Indonesia
From 595c06b31a27550f6a1b48e4caa33023133ff445 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Thu, 17 Sep 2026 21:36:20 +1000
Subject: [PATCH 104/134] Add setting to bypass low disk space protection.
---
CompactGUI.Core/Compactor.cs | 9 ++++---
CompactGUI.Core/ICompressor.cs | 4 +---
CompactGUI.Core/Settings/Settings.cs | 2 ++
CompactGUI.Core/Uncompactor.cs | 2 +-
CompactGUI.Watcher/BackgroundCompactor.vb | 8 ++++---
CompactGUI.Watcher/Watcher.vb | 2 +-
CompactGUI/Resources/Localisation/id-ID.toml | 2 +-
.../Services/CompressableFolderService.vb | 6 ++---
CompactGUI/ViewModels/FolderViewModel.vb | 14 +++++++++--
CompactGUI/ViewModels/HomeViewModel.vb | 24 ++++++++++++++-----
.../ViewModels/SteamMonitorViewModel.vb | 19 ++++++++++++---
CompactGUI/Views/SettingsPage.xaml | 24 +++++++++++++++++++
12 files changed, 90 insertions(+), 26 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index fc414e7a..a4ebce2d 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -55,7 +55,7 @@ private void InitializeCompressionInfoPointer()
}
- public async Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1)
+ public async Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
{
if(cancellationTokenSource.IsCancellationRequested) { return false; }
@@ -67,7 +67,7 @@ public async Task RunAsync(List filesList, IProgress> BuildWorkingFilesList()
.ToList();
}
- private int GetWorkerCount(int requestedWorkerCount, IEnumerable files)
+ private int GetWorkerCount(int requestedWorkerCount, IEnumerable files, bool bypassLowDiskSpaceProtection)
{
int workerCount = requestedWorkerCount <= 0 ? Environment.ProcessorCount : requestedWorkerCount;
+
+ if (bypassLowDiskSpaceProtection) return workerCount;
+
var fileList = files.ToList();
bool containsDiskImage = fileList.Any(file => new[] { ".vhd", ".vhdx", ".vmdk", ".qcow2", ".img", ".iso" }.Contains(Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase));
diff --git a/CompactGUI.Core/ICompressor.cs b/CompactGUI.Core/ICompressor.cs
index 08b4ed03..7900ba27 100644
--- a/CompactGUI.Core/ICompressor.cs
+++ b/CompactGUI.Core/ICompressor.cs
@@ -2,9 +2,7 @@
public interface ICompressor : IDisposable
{
- Task RunAsync(List filesList,
- IProgress progressMonitor = null,
- int maxParallelism = 1);
+ Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false);
void Pause();
void Resume();
diff --git a/CompactGUI.Core/Settings/Settings.cs b/CompactGUI.Core/Settings/Settings.cs
index 4c598fe0..2f8edc75 100644
--- a/CompactGUI.Core/Settings/Settings.cs
+++ b/CompactGUI.Core/Settings/Settings.cs
@@ -48,6 +48,8 @@ public partial class Settings : ObservableRecipient
[ObservableProperty] private string language = "en-AU";
+ [ObservableProperty] private bool bypassLowSpaceProtection = false;
+
partial void OnScheduledBackgroundIntervalChanged(int value) => UpdateNextScheduledBackgroundRun();
partial void OnScheduledBackgroundHourChanged(int value) => UpdateNextScheduledBackgroundRun();
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 16f891b7..47c45886 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -28,7 +28,7 @@ public Uncompactor(ILogger? logger = null)
_logger = logger ?? NullLogger.Instance;
}
- public async Task RunAsync(List filesList, IProgress? progressMonitor = null, int maxParallelism = 1)
+ public async Task RunAsync(List filesList, IProgress? progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
{
int totalFiles = filesList.Count;
if (maxParallelism <= 0) maxParallelism = Environment.ProcessorCount;
diff --git a/CompactGUI.Watcher/BackgroundCompactor.vb b/CompactGUI.Watcher/BackgroundCompactor.vb
index ecaea1d4..dfc39a4d 100644
--- a/CompactGUI.Watcher/BackgroundCompactor.vb
+++ b/CompactGUI.Watcher/BackgroundCompactor.vb
@@ -27,6 +27,7 @@ Public Class BackgroundCompactor
Private _compactor As Core.Compactor
Private _compactorAnalyser As Core.Analyser
+ Private _settingsService As Core.Settings.ISettingsService
Private _excludedFileTypes As String()
@@ -36,10 +37,11 @@ Public Class BackgroundCompactor
Public Event IsCompactingEvent As EventHandler(Of Boolean)
- Public Sub New(excludedFileTypes As String(), logger As ILogger(Of Watcher))
+ Public Sub New(excludedFileTypes As String(), logger As ILogger(Of Watcher), settingsService As Core.Settings.ISettingsService)
_excludedFileTypes = excludedFileTypes
_logger = logger
+ _settingsService = settingsService
End Sub
@@ -53,12 +55,12 @@ Public Class BackgroundCompactor
Dim analysedFiles = Await _compactorAnalyser.GetAnalysedFilesAsync(cancellationTokenSource.Token)
If cancellationTokenSource.IsCancellationRequested OrElse analysedFiles Is Nothing Then Return False
- If Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False
+ If Not _settingsService.AppSettings.BypassLowSpaceProtection AndAlso Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False
_compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, _compactorAnalyser)
If isCompactingPaused Then _compactor.Pause()
- Return Await _compactor.RunAsync(Nothing)
+ Return Await _compactor.RunAsync(Nothing, bypassLowDiskSpaceProtection:=_settingsService.AppSettings.BypassLowSpaceProtection)
End Function
diff --git a/CompactGUI.Watcher/Watcher.vb b/CompactGUI.Watcher/Watcher.vb
index 2c72e9d7..e9bdb256 100644
--- a/CompactGUI.Watcher/Watcher.vb
+++ b/CompactGUI.Watcher/Watcher.vb
@@ -63,7 +63,7 @@ Partial Public Class Watcher : Inherits ObservableRecipient : Implements IRecipi
AddHandler WatchedFolders.CollectionChanged, AddressOf WatchedFolders_CollectionChanged
- BGCompactor = New BackgroundCompactor(Array.Empty(Of String), _logger)
+ BGCompactor = New BackgroundCompactor(Array.Empty(Of String), _logger, settingsService)
InitializeWatchedFoldersAsync()
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
index d9a28bf3..47209bf0 100644
--- a/CompactGUI/Resources/Localisation/id-ID.toml
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -1,4 +1,4 @@
-# CompactGUI Localisation
+# CompactGUI Localisation
# @version 1
# @programversion 4.0.0-beta.11
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 1be5a899..4c4971fc 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -19,7 +19,7 @@ Public Class CompressableFolderService
Public Async Function CompressFolder(folder As CompressableFolder) As Task(Of Boolean)
- If folder.HasInsufficientFreeSpace Then Return False
+ If Not Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpace Then Return False
folder.Compressor = New Compactor(folder.FolderName, WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode), GetSkipList(folder), folder.Analyser, CompactorLogger)
Return Await RunCompressionAsync(folder, folder.Compressor, Nothing, True)
@@ -30,7 +30,7 @@ Public Class CompressableFolderService
Public Async Function UncompressFolder(folder As CompressableFolder) As Task(Of Boolean)
- If folder.HasInsufficientFreeSpaceForUncompression Then Return False
+ If Not Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpaceForUncompression Then Return False
folder.Compressor = New Uncompactor(UncompactorLogger)
Dim compressedFilesList = folder.AnalysisResults.Where(Function(rs) rs.CompressedSize < rs.UncompressedSize).Select(Of String)(Function(f) f.FileName).ToList
@@ -57,7 +57,7 @@ Public Class CompressableFolderService
progress.Report(New CompressionProgress(0, ""))
- Dim res = Await compressor.RunAsync(filesList, progress, GetThreadCount(folder))
+ Dim res = Await compressor.RunAsync(filesList, progress, GetThreadCount(folder), Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection)
If Not res Then
folder.FolderActionState = ActionState.Idle
diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb
index 052f9be9..7ab1606b 100644
--- a/CompactGUI/ViewModels/FolderViewModel.vb
+++ b/CompactGUI/ViewModels/FolderViewModel.vb
@@ -46,6 +46,8 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
AlwaysShowDetailsCompressionMode = Application.GetService(Of Core.Settings.ISettingsService).AppSettings.AlwaysShowDetailedCompressionMode
ElseIf e.PropertyName = NameOf(Core.Settings.Settings.NonCompressableList) Then
Folder.NotifyPropertyChanged(NameOf(CompressableFolder.SkippedFileCount))
+ ElseIf e.PropertyName = NameOf(Core.Settings.Settings.BypassLowSpaceProtection) Then
+ NotifyCanUncompressChanged()
End If
End Sub
@@ -143,7 +145,7 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
CompressionProgressFile = Folder.CompressionProgress.FileName.Replace(Folder.FolderName, "")
ElseIf e.PropertyName = NameOf(Folder.HasInsufficientFreeSpaceForUncompression) Then
- UncompressCommand.NotifyCanExecuteChanged()
+ NotifyCanUncompressChanged()
End If
End Sub
@@ -161,7 +163,7 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
End Function
Private Function CanUncompress() As Boolean
- Return Not Folder.HasInsufficientFreeSpaceForUncompression
+ Return _appSettings.BypassLowSpaceProtection OrElse Not Folder.HasInsufficientFreeSpaceForUncompression
End Function
@@ -202,6 +204,14 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
Folder.IsCancelling = True
End Sub
+ Private Sub NotifyCanUncompressChanged()
+ If Application.Current.Dispatcher.CheckAccess() Then
+ UncompressCommand.NotifyCanExecuteChanged()
+ Else
+ Application.Current.Dispatcher.BeginInvoke(Sub() UncompressCommand.NotifyCanExecuteChanged())
+ End If
+ End Sub
+
Private Async Function SubmitToWiki() As Task
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index 9cd89102..d271f26d 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -43,7 +43,7 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Public ReadOnly Property AwaitingFolderCount As Integer
Get
- Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle AndAlso Not folder.HasInsufficientFreeSpace).Count()
+ Return Folders.Where(Function(folder) folder.FolderActionState = ActionState.Idle AndAlso (Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection OrElse Not folder.HasInsufficientFreeSpace)).Count()
End Get
End Property
@@ -202,10 +202,18 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
_snackbarService = snackbarService
_logger = logger
_settingsService = settingsService
+ AddHandler _settingsService.AppSettings.PropertyChanged, AddressOf OnAppSettingsPropertyChanged
_compressableFolderService = compressableFolderService
_queueDropHandler = New QueueDropHandler(Me)
End Sub
+ Private Sub OnAppSettingsPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
+ If e.PropertyName = NameOf(Settings.BypassLowSpaceProtection) Then
+ NotifyQueueSummaryChanged()
+ CompressAllCommand.NotifyCanExecuteChanged()
+ End If
+ End Sub
+
Public Function CanReorderQueuedFolder(folder As CompressableFolder) As Boolean
Return folder IsNot Nothing AndAlso
folder.FolderActionState = ActionState.Idle AndAlso
@@ -521,11 +529,12 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Compressing = True
_cancelQueueRequested = False
Core.SharedMethods.PreventSleep()
- Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace).Count()
+ Dim bypassLowSpaceProtection = Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection
+ Dim queuedFolderCount = Folders.Where(Function(f) f.FolderActionState = ActionState.Idle AndAlso (bypassLowSpaceProtection OrElse Not f.HasInsufficientFreeSpace)).Count()
HomeViewModelLog.StartingBatchCompression(_logger, queuedFolderCount)
Do
- Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace)
+ Dim folder = Folders.FirstOrDefault(Function(f) f.FolderActionState = ActionState.Idle AndAlso (bypassLowSpaceProtection OrElse Not f.HasInsufficientFreeSpace))
If folder Is Nothing Then Exit Do
Dim completed = Await Task.Run(Async Function()
@@ -568,9 +577,12 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Private Function CanCompressAll() As Boolean
- Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle AndAlso Not f.HasInsufficientFreeSpace) AndAlso
- HomeViewModelState <> ActionState.Working AndAlso
- Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing)
+ Dim bypassLowSpaceProtection = Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection
+
+ Return Folders.Any(Function(f) f.FolderActionState = ActionState.Idle AndAlso
+ (bypassLowSpaceProtection OrElse Not f.HasInsufficientFreeSpace)) AndAlso
+ HomeViewModelState <> ActionState.Working AndAlso
+ Not Folders.Any(Function(f) f.FolderActionState = ActionState.Analysing)
End Function
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index 916697e4..c530ba61 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -138,6 +138,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
_analyserLogger = analyserLogger
_navigationService = navigationService
_settingsService = settingsService
+ AddHandler _settingsService.AppSettings.PropertyChanged, AddressOf OnAppSettingsPropertyChanged
QueueCompressionMode = settingsService.AppSettings.SelectedCompressionMode
UseGlobalSkiplist = settingsService.AppSettings.SkipNonCompressable
UseSmartSkiplist = settingsService.AppSettings.SkipUserNonCompressable
@@ -324,6 +325,14 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
ApplySort()
End Sub
+ Private Sub OnAppSettingsPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
+ If e.PropertyName <> NameOf(Settings.BypassLowSpaceProtection) Then Return
+
+ For Each game In SteamGamesData
+ game.NotifyCanUncompressChanged()
+ Next
+ End Sub
+
Private Sub CycleSort(column As String)
If Not String.Equals(ActiveSortColumn, column, StringComparison.Ordinal) Then
@@ -717,14 +726,14 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
If uncompress Then
If Not isCurrentlyCompressed Then Throw New InvalidOperationException("This game is not currently compressed.")
- If folder.HasInsufficientFreeSpaceForUncompression Then Return
+ If Not _settingsService.AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpaceForUncompression Then Return
succeeded = Await _compressableFolderService.UncompressFolder(folder)
Else
If game.SelectedCompressionOption Is Nothing Then Throw New InvalidOperationException("This game does not have a selected compression mode.")
folder.CompressionOptions.SelectedCompressionMode = game.SelectedCompressionOption.Mode
folder.HasInsufficientFreeSpace = Not _compressableFolderService.HasSufficientFreeSpace(folder)
game.HasInsufficientFreeSpace = folder.HasInsufficientFreeSpace
- If folder.HasInsufficientFreeSpace Then Return
+ If Not Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpace Then Return
succeeded = Await _compressableFolderService.CompressFolder(folder)
Await _compressableFolderService.AnalyseFolderAsync(folder)
End If
@@ -1008,10 +1017,14 @@ Public Class SteamDetailedResult : Inherits ObservableObject
Public ReadOnly Property CanUncompress As Boolean
Get
- Return Not IsWorking AndAlso IsCompressed AndAlso Not HasInsufficientFreeSpaceForUncompression
+ Return Not IsWorking AndAlso IsCompressed AndAlso (Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection OrElse Not HasInsufficientFreeSpaceForUncompression)
End Get
End Property
+ Public Sub NotifyCanUncompressChanged()
+ OnPropertyChanged(NameOf(CanUncompress))
+ End Sub
+
Public Sub New(gameName As String, gamePath As String, appId As Integer, lastSteamUpdate As DateTime, hasPendingSteamUpdate As Boolean, watchedFolder As Watcher.WatchedFolder, wikiResults As WikiCompressionResults, poorlyCompressedFiles As List(Of String))
Me.GameName = gameName
Me.GamePath = gamePath
diff --git a/CompactGUI/Views/SettingsPage.xaml b/CompactGUI/Views/SettingsPage.xaml
index c4989def..17f4f0df 100644
--- a/CompactGUI/Views/SettingsPage.xaml
+++ b/CompactGUI/Views/SettingsPage.xaml
@@ -265,6 +265,8 @@
+
+
@@ -297,6 +299,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 12bd19f5873b649614a7e7778fa23aef9bf5a010 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 17:53:26 +1000
Subject: [PATCH 105/134] Add tracking of failed files in compactor.cs and
uncompactor.cs. - Also fix WOFDecompressFile contract with
fsctldeleteexternalbacking
---
CompactGUI.Core/Compactor.cs | 39 ++++++++++++++------
CompactGUI.Core/Uncompactor.cs | 44 +++++++++++++++++------
CompactGUI.Logging/Core/UncompactorLog.cs | 3 ++
3 files changed, 65 insertions(+), 21 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index a4ebce2d..3a54969a 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -64,6 +64,7 @@ public async Task RunAsync(List filesList, IProgress f.UncompressedSize);
totalProcessedBytes = 0;
+ int failedFileCount = 0;
var sw = Stopwatch.StartNew();
@@ -79,7 +80,12 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
{
ctx.ThrowIfCancellationRequested();
- return new ValueTask(PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor));
+ if (!PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor))
+ {
+ Interlocked.Increment(ref failedFileCount);
+ }
+
+ return ValueTask.CompletedTask;
}).ConfigureAwait(false);
}
catch (OperationCanceledException){
@@ -93,6 +99,12 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
}
finally { sw.Stop();}
+ if (failedFileCount > 0)
+ {
+ CompactorLog.CompressionFailed(_logger, $"{failedFileCount} file operation(s) failed.");
+ ReportProgress(progressMonitor, totalFilesSize, "", true);
+ return true;
+ }
CompactorLog.CompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3));
@@ -100,14 +112,14 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
return true;
}
- private async Task PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress progressMonitor)
+ private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress progressMonitor)
{
CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize);
pauseGate.Wait(token);
lock (cancellationGate)
{
- if (cancellationRequested) return;
+ if (cancellationRequested) return true;
activeFileOperations++;
activeFiles.TryAdd(file.FileName, 0);
}
@@ -115,8 +127,10 @@ private async Task PauseAndProcessFile(FileDetails file, long totalFilesSize, Ca
try
{
- var res = WOFCompressFile(file.FileName);
- Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
+ bool succeeded = WOFCompressFile(file.FileName);
+ if (succeeded) Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
+
+ return succeeded;
}
finally
{
@@ -138,19 +152,24 @@ private void ReportProgress(IProgress progressMonitor, long
progressMonitor?.Report(new CompressionProgress((int)((double)totalProcessedBytes / totalFilesSize * 100.0), fileName, activeFiles.Keys.ToArray()));
}
- private unsafe int? WOFCompressFile(string filePath)
+ private unsafe bool WOFCompressFile(string filePath)
{
+ const int ErrorCompressionNotBeneficialHResult = unchecked((int)0x80070158);
+
try
{
using (SafeFileHandle fs = File.OpenHandle(filePath))
{
- return PInvoke.WofSetFileDataLocation(fs, (uint)WOFHelper.WOF_PROVIDER_FILE, compressionInfoPtr.ToPointer(), compressionInfoSize);
+ int result = PInvoke.WofSetFileDataLocation(fs, (uint)WOFHelper.WOF_PROVIDER_FILE, compressionInfoPtr.ToPointer(), compressionInfoSize);
+
+ if (result >= 0 || result == ErrorCompressionNotBeneficialHResult) return true;
+
+ return false;
}
}
- catch (Exception ex)
+ catch (Exception)
{
- CompactorLog.FileCompressionFailed(_logger, filePath, ex.Message);
- return null;
+ return false;
}
}
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 47c45886..58e0cac7 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -31,6 +31,7 @@ public Uncompactor(ILogger? logger = null)
public async Task RunAsync(List filesList, IProgress? progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
{
int totalFiles = filesList.Count;
+ int failedFileCount = 0;
if (maxParallelism <= 0) maxParallelism = Environment.ProcessorCount;
ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxParallelism, CancellationToken = cancellationTokenSource.Token };
processedFileCount.Clear();
@@ -43,7 +44,12 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
(file, ctx) =>
{
ctx.ThrowIfCancellationRequested();
- return new ValueTask(PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token));
+ if (!PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token))
+ {
+ Interlocked.Increment(ref failedFileCount);
+ }
+
+ return ValueTask.CompletedTask;
});
}
catch (OperationCanceledException) {
@@ -51,15 +57,27 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
ReportProgress(progressMonitor, totalFiles, "", true);
return false;
}
+ catch (Exception ex)
+ {
+ UncompactorLog.DecompressionFailed(_logger, ex.Message);
+ return false;
+ }
finally { sw.Stop(); }
+ if (failedFileCount > 0)
+ {
+ UncompactorLog.DecompressionFailed(_logger, $"{failedFileCount} file operation(s) failed.");
+ ReportProgress(progressMonitor, totalFiles, "", true);
+ return true;
+ }
+
UncompactorLog.DecompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3));
ReportProgress(progressMonitor, totalFiles, "", true);
return true;
}
- private async Task PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, CancellationToken ctx)
+ private bool PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, CancellationToken ctx)
{
UncompactorLog.ProcessingFile(_logger, file);
try
@@ -69,7 +87,7 @@ private async Task PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, int
progressMonitor?.Report(new CompressionProgress((int)(processedFileCount.Count / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
}
- private unsafe bool? WOFDecompressFile(string file)
+ private unsafe bool WOFDecompressFile(string file)
{
try
{
using (SafeFileHandle fs = File.OpenHandle(file))
{
- var res = PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, null, null);
- return res;
+ uint bytesReturned;
+ bool succeeded = PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, &bytesReturned, null);
+ if (succeeded) return true;
+
+ return false;
}
}
- catch (Exception ex) {
- UncompactorLog.FileDecompressionFailed(_logger, file, ex.Message);
- return null;
+ catch (Exception) {
+ return false;
}
}
diff --git a/CompactGUI.Logging/Core/UncompactorLog.cs b/CompactGUI.Logging/Core/UncompactorLog.cs
index cb8a1d73..1afde2fe 100644
--- a/CompactGUI.Logging/Core/UncompactorLog.cs
+++ b/CompactGUI.Logging/Core/UncompactorLog.cs
@@ -27,6 +27,9 @@ public static partial class UncompactorLog
[LoggerMessage(Level = LogLevel.Information, Message = "Decompression canceled.")]
public static partial void DecompressionCanceled(ILogger logger);
+ [LoggerMessage(Level = LogLevel.Error, Message = "Decompression failed with error: {ErrorMessage}")]
+ public static partial void DecompressionFailed(ILogger logger, string errorMessage);
+
[LoggerMessage(Level = LogLevel.Information, Message = "Decompression completed successfully in {TimeTaken}s.")]
public static partial void DecompressionCompleted(ILogger logger, double timeTaken);
}
From f94e9abd802f599dcc8045a28b6d66896f9b95ad Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 17:58:43 +1000
Subject: [PATCH 106/134] Add analyser failure safety check
---
CompactGUI.Core/Compactor.cs | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 3a54969a..c3258f23 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -61,9 +61,22 @@ public async Task RunAsync(List filesList, IProgress f.UncompressedSize);
totalProcessedBytes = 0;
+ if (totalFilesSize == 0)
+ {
+ CompactorLog.CompressionCompleted(_logger, 0);
+ progressMonitor?.Report(new CompressionProgress(100, ""));
+ return true;
+ }
+
int failedFileCount = 0;
var sw = Stopwatch.StartNew();
@@ -173,14 +186,14 @@ private unsafe bool WOFCompressFile(string filePath)
}
}
- public async Task> BuildWorkingFilesList()
+ public async Task?> BuildWorkingFilesList()
{
uint clusterSize = SharedMethods.GetClusterSize(workingDirectory);
var analysedFiles = await _analyser.GetAnalysedFilesAsync(cancellationTokenSource.Token);
- if (analysedFiles is null) return Enumerable.Empty();
+ if (analysedFiles is null) return null;
var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(f => f.FileName), exclusionList);
From 9bf883f72e487ec43cb30401d579495d6508408e Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 18:06:32 +1000
Subject: [PATCH 107/134] get rid of heap-allocated wof stuff (NOte to self:
don't add this back later, it's not actually more performant)
---
CompactGUI.Core/Compactor.cs | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index c3258f23..c41f9912 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -6,7 +6,6 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using System.IO.Enumeration;
-using System.Runtime.InteropServices;
using Windows.Win32;
namespace CompactGUI.Core;
@@ -19,9 +18,6 @@ public sealed class Compactor : ICompressor, IDisposable
private readonly WOFCompressionAlgorithm wofCompressionAlgorithm;
- private IntPtr compressionInfoPtr;
- private UInt32 compressionInfoSize;
-
private long totalProcessedBytes = 0;
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
@@ -42,17 +38,6 @@ public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, st
wofCompressionAlgorithm = compressionLevel;
_logger = logger ?? NullLogger.Instance;
_analyser = analyser;
- InitializeCompressionInfoPointer();
- }
-
-
- private void InitializeCompressionInfoPointer()
- {
- var _EFInfo = new WOFHelper.WOF_FILE_COMPRESSION_INFO_V1 { Algorithm = (UInt32)wofCompressionAlgorithm, Flags = 0 };
- compressionInfoPtr = Marshal.AllocHGlobal(Marshal.SizeOf(_EFInfo));
- compressionInfoSize = (UInt32)Marshal.SizeOf(_EFInfo);
- Marshal.StructureToPtr(_EFInfo, compressionInfoPtr, true);
-
}
public async Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
@@ -173,7 +158,13 @@ private unsafe bool WOFCompressFile(string filePath)
{
using (SafeFileHandle fs = File.OpenHandle(filePath))
{
- int result = PInvoke.WofSetFileDataLocation(fs, (uint)WOFHelper.WOF_PROVIDER_FILE, compressionInfoPtr.ToPointer(), compressionInfoSize);
+ WOFHelper.WOF_FILE_COMPRESSION_INFO_V1 compressionInfo = new()
+ {
+ Algorithm = (uint)wofCompressionAlgorithm,
+ Flags = 0
+ };
+
+ int result = PInvoke.WofSetFileDataLocation(fs,(uint)WOFHelper.WOF_PROVIDER_FILE, &compressionInfo, (uint)sizeof(WOFHelper.WOF_FILE_COMPRESSION_INFO_V1));
if (result >= 0 || result == ErrorCompressionNotBeneficialHResult) return true;
@@ -265,13 +256,8 @@ public int Cancel()
public void Dispose()
{
- cancellationTokenSource?.Dispose();
- pauseGate?.Dispose();
- if (compressionInfoPtr != IntPtr.Zero)
- {
- Marshal.FreeHGlobal(compressionInfoPtr);
- compressionInfoPtr = IntPtr.Zero;
- }
+ cancellationTokenSource.Dispose();
+ pauseGate.Dispose();
}
From a78814da55b50e63baaed3a1237aa9a29ff46713 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 18:14:44 +1000
Subject: [PATCH 108/134] change ncompactor.cs processedFileCount to int
instead of dictionary
---
CompactGUI.Core/Uncompactor.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 58e0cac7..08ceb554 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -19,7 +19,7 @@ public sealed class Uncompactor : ICompressor, IDisposable
private int activeFileOperations;
private bool cancellationRequested;
private long lastProgressReportTicks;
- private ConcurrentDictionary processedFileCount = new ConcurrentDictionary();
+ private int processedFileCount;
private readonly ILogger _logger;
@@ -34,7 +34,7 @@ public async Task RunAsync(List filesList, IProgress? progressMonitor, int
if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 5) return;
Interlocked.Exchange(ref lastProgressReportTicks, now);
- progressMonitor?.Report(new CompressionProgress((int)(processedFileCount.Count / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
+ progressMonitor?.Report(new CompressionProgress((int)(Volatile.Read(ref processedFileCount) / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
}
private unsafe bool WOFDecompressFile(string file)
From 802be30106e75cda689cbf9b1bc46183be906e4e Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 18:33:07 +1000
Subject: [PATCH 109/134] Improved performance of GetWOrkerCount on very large
folders by avoiding double and triple? parsing of the same list
---
CompactGUI.Core/Compactor.cs | 19 ++++++++++++++-----
CompactGUI.Core/SharedMethods.cs | 13 +++++++++++++
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index c41f9912..0b4f65cf 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -177,7 +177,7 @@ private unsafe bool WOFCompressFile(string filePath)
}
}
- public async Task?> BuildWorkingFilesList()
+ public async Task?> BuildWorkingFilesList()
{
uint clusterSize = SharedMethods.GetClusterSize(workingDirectory);
@@ -199,21 +199,29 @@ private unsafe bool WOFCompressFile(string filePath)
.ToList();
}
- private int GetWorkerCount(int requestedWorkerCount, IEnumerable files, bool bypassLowDiskSpaceProtection)
+ private int GetWorkerCount(int requestedWorkerCount, IReadOnlyList files, bool bypassLowDiskSpaceProtection)
{
int workerCount = requestedWorkerCount <= 0 ? Environment.ProcessorCount : requestedWorkerCount;
if (bypassLowDiskSpaceProtection) return workerCount;
- var fileList = files.ToList();
- bool containsDiskImage = fileList.Any(file => new[] { ".vhd", ".vhdx", ".vmdk", ".qcow2", ".img", ".iso" }.Contains(Path.GetExtension(file.FileName), StringComparer.OrdinalIgnoreCase));
+ long totalAllocatedSize = 0;
+ long largestAllocatedSize = 0;
+ bool containsDiskImage = false;
+
+ foreach (FileDetails file in files)
+ {
+ totalAllocatedSize = checked(totalAllocatedSize + file.AllocatedSize);
+ largestAllocatedSize = Math.Max(largestAllocatedSize, file.AllocatedSize);
+ containsDiskImage |= SharedMethods.IsDiskImage(file.FileName);
+ }
try
{
var root = Path.GetPathRoot(workingDirectory);
if (string.IsNullOrWhiteSpace(root)) return workerCount;
- long reserveBytes = fileList.Sum(file => file.AllocatedSize) / 2 + fileList.Select(file => file.AllocatedSize).DefaultIfEmpty().Max();
+ long reserveBytes = totalAllocatedSize / 2 + largestAllocatedSize;
bool lowFreeSpace = new DriveInfo(root).AvailableFreeSpace < reserveBytes * 2;
return lowFreeSpace || containsDiskImage ? 1 : workerCount;
}
@@ -226,6 +234,7 @@ private int GetWorkerCount(int requestedWorkerCount, IEnumerable fi
+
public void Pause()
{
CompactorLog.CompressionPaused(_logger);
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index c979f35d..687298e9 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -122,6 +122,19 @@ static bool IsOneDriveFolder(string folderPath)
}
+ public static bool IsDiskImage(string fileName)
+ {
+ ReadOnlySpan extension = Path.GetExtension(fileName.AsSpan());
+ return extension.Equals(".vhd", StringComparison.OrdinalIgnoreCase)
+ || extension.Equals(".vhdx", StringComparison.OrdinalIgnoreCase)
+ || extension.Equals(".vmdk", StringComparison.OrdinalIgnoreCase)
+ || extension.Equals(".qcow2", StringComparison.OrdinalIgnoreCase)
+ || extension.Equals(".img", StringComparison.OrdinalIgnoreCase)
+ || extension.Equals(".iso", StringComparison.OrdinalIgnoreCase);
+ }
+
+
+
public static void PreventSleep()
{
PInvoke.SetThreadExecutionState(
From 8a956ac469ba7fcac0bc226153e87d52ad6eb16a Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 18:43:50 +1000
Subject: [PATCH 110/134] Cleanup RunAsync() to be consistent across compactor
and uncompactor (should probably just remove the interface because it doesn't
really make sense)
---
CompactGUI.Core/Compactor.cs | 10 ++++++----
CompactGUI.Core/ICompressor.cs | 2 +-
CompactGUI.Core/Uncompactor.cs | 8 +++++---
CompactGUI.Watcher/BackgroundCompactor.vb | 7 ++++---
CompactGUI/Services/CompressableFolderService.vb | 15 ++++++++-------
5 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 0b4f65cf..7d680344 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -16,6 +16,7 @@ public sealed class Compactor : ICompressor, IDisposable
private readonly string workingDirectory;
private readonly HashSet exclusionList;
private readonly WOFCompressionAlgorithm wofCompressionAlgorithm;
+ private readonly bool bypassLowDiskSpaceProtection;
private long totalProcessedBytes = 0;
@@ -31,16 +32,17 @@ public sealed class Compactor : ICompressor, IDisposable
private Analyser _analyser;
- public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, string[] excludedFileTypes, Analyser analyser, ILogger? logger = null)
+ public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, string[] excludedFileTypes, Analyser analyser, bool bypassLowDiskSpaceProtection, ILogger? logger = null)
{
workingDirectory = folderPath;
exclusionList = new HashSet(excludedFileTypes, StringComparer.OrdinalIgnoreCase);
wofCompressionAlgorithm = compressionLevel;
+ this.bypassLowDiskSpaceProtection = bypassLowDiskSpaceProtection;
_logger = logger ?? NullLogger.Instance;
_analyser = analyser;
}
- public async Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
+ public async Task RunAsync(IProgress? progressMonitor = null, int maxParallelism = 1)
{
if(cancellationTokenSource.IsCancellationRequested) { return false; }
@@ -110,7 +112,7 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
return true;
}
- private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress progressMonitor)
+ private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress? progressMonitor)
{
CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize);
@@ -141,7 +143,7 @@ private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, Cancella
}
- private void ReportProgress(IProgress progressMonitor, long totalFilesSize, string fileName, bool force = false)
+ private void ReportProgress(IProgress? progressMonitor, long totalFilesSize, string fileName, bool force = false)
{
long now = Stopwatch.GetTimestamp();
if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 10) return;
diff --git a/CompactGUI.Core/ICompressor.cs b/CompactGUI.Core/ICompressor.cs
index 7900ba27..c224f3e4 100644
--- a/CompactGUI.Core/ICompressor.cs
+++ b/CompactGUI.Core/ICompressor.cs
@@ -2,7 +2,7 @@
public interface ICompressor : IDisposable
{
- Task RunAsync(List filesList, IProgress progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false);
+ Task RunAsync(IProgress? progressMonitor = null, int maxParallelism = 1);
void Pause();
void Resume();
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 08ceb554..755274f7 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -12,8 +12,9 @@ namespace CompactGUI.Core;
public sealed class Uncompactor : ICompressor, IDisposable
{
+ private readonly IReadOnlyList filesList;
private readonly ManualResetEventSlim pauseGate = new(initialState: true);
- private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
+ private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private readonly object cancellationGate = new();
private readonly ConcurrentDictionary activeFiles = new();
private int activeFileOperations;
@@ -23,12 +24,13 @@ public sealed class Uncompactor : ICompressor, IDisposable
private readonly ILogger _logger;
- public Uncompactor(ILogger? logger = null)
+ public Uncompactor(IReadOnlyList filesList, ILogger? logger = null)
{
+ this.filesList = filesList ?? throw new ArgumentNullException(nameof(filesList));
_logger = logger ?? NullLogger.Instance;
}
- public async Task RunAsync(List filesList, IProgress? progressMonitor = null, int maxParallelism = 1, bool bypassLowDiskSpaceProtection = false)
+ public async Task RunAsync(IProgress? progressMonitor = null, int maxParallelism = 1)
{
int totalFiles = filesList.Count;
int failedFileCount = 0;
diff --git a/CompactGUI.Watcher/BackgroundCompactor.vb b/CompactGUI.Watcher/BackgroundCompactor.vb
index dfc39a4d..e9f3791b 100644
--- a/CompactGUI.Watcher/BackgroundCompactor.vb
+++ b/CompactGUI.Watcher/BackgroundCompactor.vb
@@ -55,12 +55,13 @@ Public Class BackgroundCompactor
Dim analysedFiles = Await _compactorAnalyser.GetAnalysedFilesAsync(cancellationTokenSource.Token)
If cancellationTokenSource.IsCancellationRequested OrElse analysedFiles Is Nothing Then Return False
- If Not _settingsService.AppSettings.BypassLowSpaceProtection AndAlso Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False
+ Dim bypassLowSpaceProtection = _settingsService.AppSettings.BypassLowSpaceProtection
+ If Not bypassLowSpaceProtection AndAlso Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder, analysedFiles, compressionLevel, effectiveExclusions) Then Return False
- _compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, _compactorAnalyser)
+ _compactor = New Core.Compactor(folder, compressionLevel, effectiveExclusions, _compactorAnalyser, bypassLowSpaceProtection)
If isCompactingPaused Then _compactor.Pause()
- Return Await _compactor.RunAsync(Nothing, bypassLowDiskSpaceProtection:=_settingsService.AppSettings.BypassLowSpaceProtection)
+ Return Await _compactor.RunAsync()
End Function
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 4c4971fc..22428f8b 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -19,10 +19,11 @@ Public Class CompressableFolderService
Public Async Function CompressFolder(folder As CompressableFolder) As Task(Of Boolean)
- If Not Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpace Then Return False
+ Dim bypassLowSpaceProtection = Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection
+ If Not bypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpace Then Return False
- folder.Compressor = New Compactor(folder.FolderName, WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode), GetSkipList(folder), folder.Analyser, CompactorLogger)
- Return Await RunCompressionAsync(folder, folder.Compressor, Nothing, True)
+ folder.Compressor = New Compactor(folder.FolderName, WOFHelper.WOFConvertCompressionLevel(folder.CompressionOptions.SelectedCompressionMode), GetSkipList(folder), folder.Analyser, bypassLowSpaceProtection, CompactorLogger)
+ Return Await RunCompressionAsync(folder, folder.Compressor, True)
End Function
@@ -32,14 +33,14 @@ Public Class CompressableFolderService
If Not Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection AndAlso folder.HasInsufficientFreeSpaceForUncompression Then Return False
- folder.Compressor = New Uncompactor(UncompactorLogger)
Dim compressedFilesList = folder.AnalysisResults.Where(Function(rs) rs.CompressedSize < rs.UncompressedSize).Select(Of String)(Function(f) f.FileName).ToList
- Return Await RunCompressionAsync(folder, folder.Compressor, compressedFilesList, isCompressing:=False)
+ folder.Compressor = New Uncompactor(compressedFilesList, UncompactorLogger)
+ Return Await RunCompressionAsync(folder, folder.Compressor, isCompressing:=False)
End Function
- Private Async Function RunCompressionAsync(folder As CompressableFolder, compressor As ICompressor, filesList As List(Of String), isCompressing As Boolean) As Task(Of Boolean)
+ Private Async Function RunCompressionAsync(folder As CompressableFolder, compressor As ICompressor, isCompressing As Boolean) As Task(Of Boolean)
folder.FolderActionState = ActionState.Working
folder.IsCancelling = False
folder.ActiveFileOperations = 0
@@ -57,7 +58,7 @@ Public Class CompressableFolderService
progress.Report(New CompressionProgress(0, ""))
- Dim res = Await compressor.RunAsync(filesList, progress, GetThreadCount(folder), Application.GetService(Of ISettingsService).AppSettings.BypassLowSpaceProtection)
+ Dim res = Await compressor.RunAsync(progress, GetThreadCount(folder))
If Not res Then
folder.FolderActionState = ActionState.Idle
From fd19105adc077588680f57eddf800c2f770341f0 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 19:21:11 +1000
Subject: [PATCH 111/134] Update LazyTranslate and disable debug outputting of
missing translations
---
CompactGUI/CompactGUI.vbproj | 4 ++--
CompactGUI/Services/LocalisationService.vb | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CompactGUI/CompactGUI.vbproj b/CompactGUI/CompactGUI.vbproj
index 686c0328..8aabbee5 100644
--- a/CompactGUI/CompactGUI.vbproj
+++ b/CompactGUI/CompactGUI.vbproj
@@ -59,8 +59,8 @@
-
-
+
+
diff --git a/CompactGUI/Services/LocalisationService.vb b/CompactGUI/Services/LocalisationService.vb
index 35d8dfd2..a182690c 100644
--- a/CompactGUI/Services/LocalisationService.vb
+++ b/CompactGUI/Services/LocalisationService.vb
@@ -37,7 +37,8 @@ Public NotInheritable Class LocalisationService
.CatalogueDirectory = LocalisationFolder,
.ResourceAssembly = GetType(Application).Assembly,
.ApplicationName = "CompactGUI",
- .ProgramVersion = Application.AppVersionText
+ .ProgramVersion = Application.AppVersionText,
+ .OutputMissingTranslationsToDebug = False
})
End Function
From 552d88feef0b8e6fb1fbed45b3b5a5e5a8d14f83 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 19:35:28 +1000
Subject: [PATCH 112/134] Implement sequential retrying of
compression/decompression if near the folder size limit. - added failure mode
tracking for low disk space - compression will retry multiple time -
decompression will only retry sequentially once (no point with multiple
tries) - extracted retry to separate file
---
CompactGUI.Core/Compactor.cs | 58 ++++++++++++++--------
CompactGUI.Core/FileOperationRecovery.cs | 61 ++++++++++++++++++++++++
CompactGUI.Core/Uncompactor.cs | 53 +++++++++++++++-----
3 files changed, 141 insertions(+), 31 deletions(-)
create mode 100644 CompactGUI.Core/FileOperationRecovery.cs
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 7d680344..3371d9be 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -65,6 +65,7 @@ public async Task RunAsync(IProgress? progressMonitor
}
int failedFileCount = 0;
+ ConcurrentBag diskSpaceFailures = new();
var sw = Stopwatch.StartNew();
@@ -80,13 +81,28 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
{
ctx.ThrowIfCancellationRequested();
- if (!PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor))
+ FileOperationResult result = PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor);
+ if (result == FileOperationResult.InsufficientDiskSpace)
+ {
+ diskSpaceFailures.Add(file);
+ }
+ else if (result == FileOperationResult.Failed)
{
Interlocked.Increment(ref failedFileCount);
}
return ValueTask.CompletedTask;
}).ConfigureAwait(false);
+
+ Debug.WriteLine($"Disk space failures: {diskSpaceFailures.Count}");
+
+ // Sequentiall retry any files that failed due to insufficient disk space
+ failedFileCount += FileOperationRecovery.Retry(
+ diskSpaceFailures,
+ file => file.UncompressedSize,
+ file => PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor),
+ cancellationTokenSource.Token,
+ repeatWhileProgress: true);
}
catch (OperationCanceledException){
CompactorLog.CompressionCanceled(_logger);
@@ -112,14 +128,14 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
return true;
}
- private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress? progressMonitor)
+ private FileOperationResult PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress? progressMonitor)
{
CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize);
pauseGate.Wait(token);
lock (cancellationGate)
{
- if (cancellationRequested) return true;
+ if (cancellationRequested) return FileOperationResult.Success;
activeFileOperations++;
activeFiles.TryAdd(file.FileName, 0);
}
@@ -127,10 +143,13 @@ private bool PauseAndProcessFile(FileDetails file, long totalFilesSize, Cancella
try
{
- bool succeeded = WOFCompressFile(file.FileName);
- if (succeeded) Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
+ FileOperationResult result = WOFCompressFile(file.FileName);
+ if (result == FileOperationResult.Success)
+ {
+ Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
+ }
- return succeeded;
+ return result;
}
finally
{
@@ -152,7 +171,7 @@ private void ReportProgress(IProgress? progressMonitor, lon
progressMonitor?.Report(new CompressionProgress((int)((double)totalProcessedBytes / totalFilesSize * 100.0), fileName, activeFiles.Keys.ToArray()));
}
- private unsafe bool WOFCompressFile(string filePath)
+ private unsafe FileOperationResult WOFCompressFile(string filePath)
{
const int ErrorCompressionNotBeneficialHResult = unchecked((int)0x80070158);
@@ -168,14 +187,15 @@ private unsafe bool WOFCompressFile(string filePath)
int result = PInvoke.WofSetFileDataLocation(fs,(uint)WOFHelper.WOF_PROVIDER_FILE, &compressionInfo, (uint)sizeof(WOFHelper.WOF_FILE_COMPRESSION_INFO_V1));
- if (result >= 0 || result == ErrorCompressionNotBeneficialHResult) return true;
+ if (result >= 0 || result == ErrorCompressionNotBeneficialHResult) return FileOperationResult.Success;
+ if (FileOperationRecovery.IsInsufficientDiskSpaceHResult(result)) return FileOperationResult.InsufficientDiskSpace;
- return false;
+ return FileOperationResult.Failed;
}
}
catch (Exception)
{
- return false;
+ return FileOperationResult.Failed;
}
}
@@ -190,15 +210,14 @@ private unsafe bool WOFCompressFile(string filePath)
var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(f => f.FileName), exclusionList);
- return analysedFiles
- .Where(fl =>
- fl.CompressionMode != wofCompressionAlgorithm
- && fl.UncompressedSize > clusterSize
- && !fl.Attributes.HasFlag(FileAttributes.SparseFile)
- && !excludedFiles.Contains(fl.FileName)
- )
- .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize, fl.CompressedSize))
- .ToList();
+ return [.. analysedFiles
+ .Where(fl =>
+ fl.CompressionMode != wofCompressionAlgorithm
+ && fl.UncompressedSize > clusterSize
+ && !fl.Attributes.HasFlag(FileAttributes.SparseFile)
+ && !excludedFiles.Contains(fl.FileName)
+ )
+ .Select(fl => new FileDetails(fl.FileName, fl.UncompressedSize, fl.CompressedSize))];
}
private int GetWorkerCount(int requestedWorkerCount, IReadOnlyList files, bool bypassLowDiskSpaceProtection)
@@ -274,5 +293,4 @@ public void Dispose()
public readonly record struct FileDetails(string FileName, long UncompressedSize, long AllocatedSize);
-
}
diff --git a/CompactGUI.Core/FileOperationRecovery.cs b/CompactGUI.Core/FileOperationRecovery.cs
new file mode 100644
index 00000000..281d13c0
--- /dev/null
+++ b/CompactGUI.Core/FileOperationRecovery.cs
@@ -0,0 +1,61 @@
+namespace CompactGUI.Core;
+
+internal enum FileOperationResult
+{
+ Success,
+ InsufficientDiskSpace,
+ Failed
+}
+
+internal static class FileOperationRecovery
+{
+ private const int ErrorHandleDiskFull = 39;
+ private const int ErrorDiskFull = 112;
+ private const int ErrorDiskQuotaExceeded = 1295;
+
+ public static bool IsInsufficientDiskSpaceError(int errorCode) =>
+ errorCode is ErrorHandleDiskFull or ErrorDiskFull or ErrorDiskQuotaExceeded;
+
+ public static bool IsInsufficientDiskSpaceHResult(int hResult) =>
+ IsInsufficientDiskSpaceError(hResult & 0xFFFF)
+ && (hResult & unchecked((int)0xFFFF0000)) == unchecked((int)0x80070000);
+
+ public static int Retry(
+ IEnumerable failures,
+ Func sizeSelector,
+ Func processFile,
+ CancellationToken token,
+ bool repeatWhileProgress)
+ {
+ List pending = [.. failures.OrderBy(sizeSelector)];
+ int failedFileCount = 0;
+
+ while (pending.Count > 0)
+ {
+ bool madeProgress = false;
+ List remaining = new(pending.Count);
+
+ foreach (T file in pending)
+ {
+ token.ThrowIfCancellationRequested();
+
+ FileOperationResult result = processFile(file);
+ if (result == FileOperationResult.Success) madeProgress = true;
+ else if (result == FileOperationResult.InsufficientDiskSpace) remaining.Add(file);
+ else failedFileCount++;
+ }
+
+ if (remaining.Count == 0) break;
+
+ if (!repeatWhileProgress || !madeProgress)
+ {
+ failedFileCount += remaining.Count;
+ break;
+ }
+
+ pending = remaining;
+ }
+
+ return failedFileCount;
+ }
+}
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 755274f7..51e2f9ed 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -6,6 +6,7 @@
using Windows.Win32;
using CompactGUI.Logging.Core;
using System.Diagnostics;
+using System.Runtime.InteropServices;
namespace CompactGUI.Core;
@@ -34,6 +35,7 @@ public async Task RunAsync(IProgress? progressMonitor
{
int totalFiles = filesList.Count;
int failedFileCount = 0;
+ ConcurrentBag diskSpaceFailures = new();
if (maxParallelism <= 0) maxParallelism = Environment.ProcessorCount;
ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxParallelism, CancellationToken = cancellationTokenSource.Token };
Interlocked.Exchange(ref processedFileCount, 0);
@@ -46,13 +48,25 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
(file, ctx) =>
{
ctx.ThrowIfCancellationRequested();
- if (!PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token))
+ FileOperationResult result = PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token);
+ if (result == FileOperationResult.InsufficientDiskSpace)
+ {
+ diskSpaceFailures.Add(file);
+ }
+ else if (result == FileOperationResult.Failed)
{
Interlocked.Increment(ref failedFileCount);
}
return ValueTask.CompletedTask;
});
+
+ failedFileCount += FileOperationRecovery.Retry(
+ diskSpaceFailures,
+ GetFileLength,
+ file => PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token),
+ cancellationTokenSource.Token,
+ repeatWhileProgress: false);
}
catch (OperationCanceledException) {
UncompactorLog.DecompressionCanceled(_logger);
@@ -79,7 +93,7 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
}
- private bool PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, CancellationToken ctx)
+ private FileOperationResult PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, CancellationToken ctx)
{
UncompactorLog.ProcessingFile(_logger, file);
try
@@ -89,7 +103,7 @@ private bool PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, int
progressMonitor?.Report(new CompressionProgress((int)(Volatile.Read(ref processedFileCount) / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
}
- private unsafe bool WOFDecompressFile(string file)
+ private unsafe FileOperationResult WOFDecompressFile(string file)
{
try
{
using (SafeFileHandle fs = File.OpenHandle(file))
{
uint bytesReturned;
- bool succeeded = PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, &bytesReturned, null);
- if (succeeded) return true;
+ if (PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, &bytesReturned, null))
+ {
+ return FileOperationResult.Success;
+ }
- return false;
+ int errorCode = Marshal.GetLastPInvokeError();
+ return FileOperationRecovery.IsInsufficientDiskSpaceError(errorCode)
+ ? FileOperationResult.InsufficientDiskSpace
+ : FileOperationResult.Failed;
}
}
catch (Exception) {
- return false;
+ return FileOperationResult.Failed;
+ }
+ }
+
+ private static long GetFileLength(string file)
+ {
+ try
+ {
+ return new FileInfo(file).Length;
+ }
+ catch
+ {
+ return long.MaxValue;
}
}
From 0a6af3048a66b70f44b63c70b37abfab9e1dea47 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 21:20:28 +1000
Subject: [PATCH 113/134] Consolidated duplicate pathways in comactor.cs and
uncompactor.cs and probably broke lots of stuff in the process. I really
should add tests..
---
CompactGUI.Core/Compactor.cs | 132 +++--------------
CompactGUI.Core/FileOperationRecovery.cs | 39 -----
CompactGUI.Core/ParallelFileRunner.cs | 174 +++++++++++++++++++++++
CompactGUI.Core/Uncompactor.cs | 124 +++-------------
4 files changed, 213 insertions(+), 256 deletions(-)
create mode 100644 CompactGUI.Core/ParallelFileRunner.cs
diff --git a/CompactGUI.Core/Compactor.cs b/CompactGUI.Core/Compactor.cs
index 3371d9be..7cd3108c 100644
--- a/CompactGUI.Core/Compactor.cs
+++ b/CompactGUI.Core/Compactor.cs
@@ -3,9 +3,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Win32.SafeHandles;
-using System.Collections.Concurrent;
using System.Diagnostics;
-using System.IO.Enumeration;
using Windows.Win32;
namespace CompactGUI.Core;
@@ -17,16 +15,7 @@ public sealed class Compactor : ICompressor, IDisposable
private readonly HashSet exclusionList;
private readonly WOFCompressionAlgorithm wofCompressionAlgorithm;
private readonly bool bypassLowDiskSpaceProtection;
-
-
- private long totalProcessedBytes = 0;
- private readonly ManualResetEventSlim pauseGate = new(initialState: true);
- private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
- private readonly object cancellationGate = new();
- private readonly ConcurrentDictionary activeFiles = new();
- private int activeFileOperations;
- private bool cancellationRequested;
- private long lastProgressReportTicks;
+ private readonly ParallelFileRunner runner;
private ILogger _logger;
@@ -40,11 +29,19 @@ public Compactor(string folderPath, WOFCompressionAlgorithm compressionLevel, st
this.bypassLowDiskSpaceProtection = bypassLowDiskSpaceProtection;
_logger = logger ?? NullLogger.Instance;
_analyser = analyser;
+ runner = new ParallelFileRunner(new ParallelFileRunnerOptions
+ {
+ GetFileName = file => file.FileName,
+ GetProgressWeight = file => file.UncompressedSize,
+ ProcessFile = file => WOFCompressFile(file.FileName),
+ OnProcessing = file => CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize),
+ RecoveryMode = DiskSpaceRecoveryMode.RepeatWhileProgress
+ });
}
public async Task RunAsync(IProgress? progressMonitor = null, int maxParallelism = 1)
{
- if(cancellationTokenSource.IsCancellationRequested) { return false; }
+ if (runner.IsCancellationRequested) return false;
CompactorLog.BuildingWorkingFilesList(_logger, workingDirectory);
var workingFiles = await BuildWorkingFilesList().ConfigureAwait(false);
@@ -56,7 +53,6 @@ public async Task RunAsync(IProgress? progressMonitor
long totalFilesSize = workingFiles.Sum((f) => f.UncompressedSize);
- totalProcessedBytes = 0;
if (totalFilesSize == 0)
{
CompactorLog.CompressionCompleted(_logger, 0);
@@ -64,49 +60,19 @@ public async Task RunAsync(IProgress? progressMonitor
return true;
}
- int failedFileCount = 0;
- ConcurrentBag diskSpaceFailures = new();
-
var sw = Stopwatch.StartNew();
maxParallelism = GetWorkerCount(maxParallelism, workingFiles, bypassLowDiskSpaceProtection);
Debug.WriteLine($"Compactor: Using {maxParallelism} parallel workers for compression.");
- ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxParallelism, CancellationToken = cancellationTokenSource.Token };
-
CompactorLog.StartingCompression(_logger, workingDirectory, wofCompressionAlgorithm.ToString(), maxParallelism);
+ int failedFileCount;
try
{
- await Parallel.ForEachAsync(workingFiles, parallelOptions,
- (file, ctx) =>
- {
- ctx.ThrowIfCancellationRequested();
-
- FileOperationResult result = PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor);
- if (result == FileOperationResult.InsufficientDiskSpace)
- {
- diskSpaceFailures.Add(file);
- }
- else if (result == FileOperationResult.Failed)
- {
- Interlocked.Increment(ref failedFileCount);
- }
-
- return ValueTask.CompletedTask;
- }).ConfigureAwait(false);
-
- Debug.WriteLine($"Disk space failures: {diskSpaceFailures.Count}");
-
- // Sequentiall retry any files that failed due to insufficient disk space
- failedFileCount += FileOperationRecovery.Retry(
- diskSpaceFailures,
- file => file.UncompressedSize,
- file => PauseAndProcessFile(file, totalFilesSize, cancellationTokenSource.Token, progressMonitor),
- cancellationTokenSource.Token,
- repeatWhileProgress: true);
+ failedFileCount = await runner.RunAsync(workingFiles, totalFilesSize, maxParallelism, progressMonitor).ConfigureAwait(false);
}
catch (OperationCanceledException){
CompactorLog.CompressionCanceled(_logger);
- ReportProgress(progressMonitor, totalFilesSize, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return false;
}
catch (Exception ex){
@@ -118,59 +84,16 @@ await Parallel.ForEachAsync(workingFiles, parallelOptions,
if (failedFileCount > 0)
{
CompactorLog.CompressionFailed(_logger, $"{failedFileCount} file operation(s) failed.");
- ReportProgress(progressMonitor, totalFilesSize, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return true;
}
CompactorLog.CompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3));
- ReportProgress(progressMonitor, totalFilesSize, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return true;
}
- private FileOperationResult PauseAndProcessFile(FileDetails file, long totalFilesSize, CancellationToken token, IProgress? progressMonitor)
- {
- CompactorLog.ProcessingFile(_logger, file.FileName, file.UncompressedSize);
-
- pauseGate.Wait(token);
- lock (cancellationGate)
- {
- if (cancellationRequested) return FileOperationResult.Success;
- activeFileOperations++;
- activeFiles.TryAdd(file.FileName, 0);
- }
- ReportProgress(progressMonitor, totalFilesSize, file.FileName);
-
- try
- {
- FileOperationResult result = WOFCompressFile(file.FileName);
- if (result == FileOperationResult.Success)
- {
- Interlocked.Add(ref totalProcessedBytes, file.UncompressedSize);
- }
-
- return result;
- }
- finally
- {
- lock (cancellationGate)
- {
- activeFileOperations--;
- activeFiles.TryRemove(file.FileName, out _);
- }
- }
-
- }
-
- private void ReportProgress(IProgress? progressMonitor, long totalFilesSize, string fileName, bool force = false)
- {
- long now = Stopwatch.GetTimestamp();
- if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 10) return;
-
- Interlocked.Exchange(ref lastProgressReportTicks, now);
- progressMonitor?.Report(new CompressionProgress((int)((double)totalProcessedBytes / totalFilesSize * 100.0), fileName, activeFiles.Keys.ToArray()));
- }
-
private unsafe FileOperationResult WOFCompressFile(string filePath)
{
const int ErrorCompressionNotBeneficialHResult = unchecked((int)0x80070158);
@@ -204,7 +127,7 @@ private unsafe FileOperationResult WOFCompressFile(string filePath)
uint clusterSize = SharedMethods.GetClusterSize(workingDirectory);
- var analysedFiles = await _analyser.GetAnalysedFilesAsync(cancellationTokenSource.Token);
+ var analysedFiles = await _analyser.GetAnalysedFilesAsync(runner.Token);
if (analysedFiles is null) return null;
@@ -259,36 +182,21 @@ private int GetWorkerCount(int requestedWorkerCount, IReadOnlyList
public void Pause()
{
CompactorLog.CompressionPaused(_logger);
- pauseGate.Reset();
+ runner.Pause();
}
public void Resume()
{
- pauseGate.Set();
+ runner.Resume();
CompactorLog.CompressionResumed(_logger);
}
- public int Cancel()
- {
- int activeOperations;
- lock (cancellationGate)
- {
- cancellationRequested = true;
- activeOperations = activeFileOperations;
- }
- pauseGate.Set();
- cancellationTokenSource.Cancel();
- return activeOperations;
- }
+ public int Cancel() => runner.Cancel();
- public void Dispose()
- {
- cancellationTokenSource.Dispose();
- pauseGate.Dispose();
- }
+ public void Dispose() => runner.Dispose();
public readonly record struct FileDetails(string FileName, long UncompressedSize, long AllocatedSize);
diff --git a/CompactGUI.Core/FileOperationRecovery.cs b/CompactGUI.Core/FileOperationRecovery.cs
index 281d13c0..4a9e2bf4 100644
--- a/CompactGUI.Core/FileOperationRecovery.cs
+++ b/CompactGUI.Core/FileOperationRecovery.cs
@@ -19,43 +19,4 @@ public static bool IsInsufficientDiskSpaceError(int errorCode) =>
public static bool IsInsufficientDiskSpaceHResult(int hResult) =>
IsInsufficientDiskSpaceError(hResult & 0xFFFF)
&& (hResult & unchecked((int)0xFFFF0000)) == unchecked((int)0x80070000);
-
- public static int Retry(
- IEnumerable failures,
- Func sizeSelector,
- Func processFile,
- CancellationToken token,
- bool repeatWhileProgress)
- {
- List pending = [.. failures.OrderBy(sizeSelector)];
- int failedFileCount = 0;
-
- while (pending.Count > 0)
- {
- bool madeProgress = false;
- List remaining = new(pending.Count);
-
- foreach (T file in pending)
- {
- token.ThrowIfCancellationRequested();
-
- FileOperationResult result = processFile(file);
- if (result == FileOperationResult.Success) madeProgress = true;
- else if (result == FileOperationResult.InsufficientDiskSpace) remaining.Add(file);
- else failedFileCount++;
- }
-
- if (remaining.Count == 0) break;
-
- if (!repeatWhileProgress || !madeProgress)
- {
- failedFileCount += remaining.Count;
- break;
- }
-
- pending = remaining;
- }
-
- return failedFileCount;
- }
}
diff --git a/CompactGUI.Core/ParallelFileRunner.cs b/CompactGUI.Core/ParallelFileRunner.cs
new file mode 100644
index 00000000..56d29017
--- /dev/null
+++ b/CompactGUI.Core/ParallelFileRunner.cs
@@ -0,0 +1,174 @@
+using System.Collections.Concurrent;
+using System.Diagnostics;
+
+namespace CompactGUI.Core;
+
+internal enum DiskSpaceRecoveryMode
+{
+ SinglePass,
+ RepeatWhileProgress
+}
+
+internal record ParallelFileRunnerOptions
+{
+ public required Func GetFileName { get; init; }
+ public required Func GetProgressWeight { get; init; }
+ public required Func ProcessFile { get; init; }
+ public Action? OnProcessing { get; init; }
+ public Func? GetRecoveryOrder { get; init; }
+ public TimeSpan ProgressInterval { get; init; } = TimeSpan.FromMilliseconds(100);
+ public DiskSpaceRecoveryMode RecoveryMode { get; init; } = DiskSpaceRecoveryMode.SinglePass;
+}
+
+
+//apparently i should seal everything https://www.meziantou.net/performance-benefits-of-sealed-class.htm
+internal sealed class ParallelFileRunner(ParallelFileRunnerOptions options) : IDisposable
+{
+ private readonly Func recoveryOrderSelector = options.GetRecoveryOrder ?? options.GetProgressWeight;
+ private readonly long progressIntervalTicks = (long)(options.ProgressInterval.TotalSeconds * Stopwatch.Frequency);
+ private readonly ManualResetEventSlim pauseGate = new(initialState: true);
+ private readonly CancellationTokenSource cancellationTokenSource = new();
+ private readonly object cancellationGate = new();
+ private readonly ConcurrentDictionary activeFiles = new();
+ private int activeFileOperations;
+ private bool cancellationRequested;
+ private long processedWeight;
+ private long totalWeight;
+ private long lastProgressReportTicks;
+
+ public CancellationToken Token => cancellationTokenSource.Token;
+ public bool IsCancellationRequested => cancellationTokenSource.IsCancellationRequested;
+
+ public async Task RunAsync(IReadOnlyCollection files, long totalWeight, int maxParallelism, IProgress? progressMonitor)
+ {
+ cancellationTokenSource.Token.ThrowIfCancellationRequested();
+ this.totalWeight = totalWeight;
+ Interlocked.Exchange(ref processedWeight, 0);
+ Interlocked.Exchange(ref lastProgressReportTicks, 0);
+
+ if (files.Count == 0 || totalWeight == 0)
+ {
+ progressMonitor?.Report(new CompressionProgress(100, ""));
+ return 0;
+ }
+
+ int failedFileCount = 0;
+ ConcurrentBag diskSpaceFailures = new();
+ ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxParallelism, CancellationToken = cancellationTokenSource.Token };
+
+ await Parallel.ForEachAsync(files, parallelOptions, (file, ctx) =>
+ {
+ ctx.ThrowIfCancellationRequested();
+
+ FileOperationResult result = PauseAndProcessFile(file, progressMonitor, cancellationTokenSource.Token);
+ if (result == FileOperationResult.InsufficientDiskSpace) diskSpaceFailures.Add(file);
+ else if (result == FileOperationResult.Failed) Interlocked.Increment(ref failedFileCount);
+
+ return ValueTask.CompletedTask;
+ }).ConfigureAwait(false);
+
+ Debug.WriteLine($"Disk space failures: {diskSpaceFailures.Count}");
+ return failedFileCount + RetryDiskSpaceFailures(diskSpaceFailures, progressMonitor);
+ }
+
+ private FileOperationResult PauseAndProcessFile(T file, IProgress? progressMonitor, CancellationToken token)
+ {
+ options.OnProcessing?.Invoke(file);
+ pauseGate.Wait(token);
+
+ string fileName = options.GetFileName(file);
+ lock (cancellationGate)
+ {
+ if (cancellationRequested) return FileOperationResult.Success;
+ activeFileOperations++;
+ activeFiles.TryAdd(fileName, 0);
+ }
+ ReportProgress(progressMonitor, fileName);
+
+ try
+ {
+ FileOperationResult result = options.ProcessFile(file);
+ if (result == FileOperationResult.Success) Interlocked.Add(ref processedWeight, options.GetProgressWeight(file));
+ return result;
+ }
+ finally
+ {
+ lock (cancellationGate)
+ {
+ activeFileOperations--;
+ activeFiles.TryRemove(fileName, out _);
+ }
+ }
+ }
+
+ private int RetryDiskSpaceFailures(IEnumerable failures, IProgress? progressMonitor)
+ {
+ List pending = [.. failures.OrderBy(recoveryOrderSelector)];
+ int failedFileCount = 0;
+
+ while (pending.Count > 0)
+ {
+ bool madeProgress = false;
+ List remaining = new(pending.Count);
+
+ foreach (T file in pending)
+ {
+ cancellationTokenSource.Token.ThrowIfCancellationRequested();
+
+ FileOperationResult result = PauseAndProcessFile(file, progressMonitor, cancellationTokenSource.Token);
+ if (result == FileOperationResult.Success) madeProgress = true;
+ else if (result == FileOperationResult.InsufficientDiskSpace) remaining.Add(file);
+ else failedFileCount++;
+ }
+
+ if (remaining.Count == 0) break;
+
+ if (options.RecoveryMode == DiskSpaceRecoveryMode.SinglePass || !madeProgress)
+ {
+ failedFileCount += remaining.Count;
+ break;
+ }
+
+ pending = remaining;
+ }
+
+ return failedFileCount;
+ }
+
+ public void ReportProgress(IProgress? progressMonitor, string fileName = "", bool force = false)
+ {
+ if (totalWeight == 0)
+ {
+ if (force) progressMonitor?.Report(new CompressionProgress(100, fileName, activeFiles.Keys.ToArray()));
+ return;
+ }
+
+ long now = Stopwatch.GetTimestamp();
+ if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < progressIntervalTicks) return;
+
+ Interlocked.Exchange(ref lastProgressReportTicks, now);
+ progressMonitor?.Report(new CompressionProgress((int)((double)Interlocked.Read(ref processedWeight) / totalWeight * 100.0), fileName, activeFiles.Keys.ToArray()));
+ }
+
+ public void Pause() => pauseGate.Reset();
+ public void Resume() => pauseGate.Set();
+
+ public int Cancel()
+ {
+ int activeOperations;
+ lock (cancellationGate)
+ {
+ cancellationRequested = true;
+ activeOperations = activeFileOperations;
+ }
+ pauseGate.Set();
+ cancellationTokenSource.Cancel();
+ return activeOperations;
+ }
+
+ public void Dispose()
+ {
+ cancellationTokenSource.Dispose();
+ pauseGate.Dispose();
+ }
+}
diff --git a/CompactGUI.Core/Uncompactor.cs b/CompactGUI.Core/Uncompactor.cs
index 51e2f9ed..9768a31c 100644
--- a/CompactGUI.Core/Uncompactor.cs
+++ b/CompactGUI.Core/Uncompactor.cs
@@ -2,7 +2,6 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Win32.SafeHandles;
-using System.Collections.Concurrent;
using Windows.Win32;
using CompactGUI.Logging.Core;
using System.Diagnostics;
@@ -14,63 +13,39 @@ public sealed class Uncompactor : ICompressor, IDisposable
{
private readonly IReadOnlyList filesList;
- private readonly ManualResetEventSlim pauseGate = new(initialState: true);
- private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
- private readonly object cancellationGate = new();
- private readonly ConcurrentDictionary activeFiles = new();
- private int activeFileOperations;
- private bool cancellationRequested;
- private long lastProgressReportTicks;
- private int processedFileCount;
-
private readonly ILogger _logger;
+ private readonly ParallelFileRunner runner;
public Uncompactor(IReadOnlyList filesList, ILogger? logger = null)
{
this.filesList = filesList ?? throw new ArgumentNullException(nameof(filesList));
_logger = logger ?? NullLogger.Instance;
+ runner = new ParallelFileRunner(new ParallelFileRunnerOptions
+ {
+ GetFileName = file => file,
+ GetProgressWeight = _ => 1,
+ ProcessFile = WOFDecompressFile,
+ OnProcessing = file => UncompactorLog.ProcessingFile(_logger, file),
+ GetRecoveryOrder = GetFileLength,
+ ProgressInterval = TimeSpan.FromMilliseconds(200)
+ });
}
public async Task RunAsync(IProgress? progressMonitor = null, int maxParallelism = 1)
{
int totalFiles = filesList.Count;
int failedFileCount = 0;
- ConcurrentBag diskSpaceFailures = new();
if (maxParallelism <= 0) maxParallelism = Environment.ProcessorCount;
- ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = maxParallelism, CancellationToken = cancellationTokenSource.Token };
- Interlocked.Exchange(ref processedFileCount, 0);
UncompactorLog.StartingDecompression(_logger, totalFiles, maxParallelism);
Stopwatch sw = Stopwatch.StartNew();
try
{
- await Parallel.ForEachAsync(filesList, parallelOptions,
- (file, ctx) =>
- {
- ctx.ThrowIfCancellationRequested();
- FileOperationResult result = PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token);
- if (result == FileOperationResult.InsufficientDiskSpace)
- {
- diskSpaceFailures.Add(file);
- }
- else if (result == FileOperationResult.Failed)
- {
- Interlocked.Increment(ref failedFileCount);
- }
-
- return ValueTask.CompletedTask;
- });
-
- failedFileCount += FileOperationRecovery.Retry(
- diskSpaceFailures,
- GetFileLength,
- file => PauseAndProcessFile(file, totalFiles, progressMonitor, cancellationTokenSource.Token),
- cancellationTokenSource.Token,
- repeatWhileProgress: false);
+ failedFileCount = await runner.RunAsync(filesList, totalFiles, maxParallelism, progressMonitor).ConfigureAwait(false);
}
catch (OperationCanceledException) {
UncompactorLog.DecompressionCanceled(_logger);
- ReportProgress(progressMonitor, totalFiles, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return false;
}
catch (Exception ex)
@@ -83,59 +58,16 @@ await Parallel.ForEachAsync(filesList, parallelOptions,
if (failedFileCount > 0)
{
UncompactorLog.DecompressionFailed(_logger, $"{failedFileCount} file operation(s) failed.");
- ReportProgress(progressMonitor, totalFiles, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return true;
}
UncompactorLog.DecompressionCompleted(_logger, Math.Round(sw.Elapsed.TotalSeconds, 3));
- ReportProgress(progressMonitor, totalFiles, "", true);
+ runner.ReportProgress(progressMonitor, force: true);
return true;
}
- private FileOperationResult PauseAndProcessFile(string file, int totalFiles, IProgress? progressMonitor, CancellationToken ctx)
- {
- UncompactorLog.ProcessingFile(_logger, file);
- try
- {
- pauseGate.Wait(ctx);
- }
- catch (OperationCanceledException) { throw; }
- lock (cancellationGate)
- {
- if (cancellationRequested) return FileOperationResult.Success;
- activeFileOperations++;
- activeFiles.TryAdd(file, 0);
- }
- ReportProgress(progressMonitor, totalFiles, file);
-
- try
- {
- FileOperationResult result = WOFDecompressFile(file);
- if (result == FileOperationResult.Success) Interlocked.Increment(ref processedFileCount);
-
- return result;
- }
- finally
- {
- lock (cancellationGate)
- {
- activeFileOperations--;
- activeFiles.TryRemove(file, out _);
- }
- }
-
- }
-
- private void ReportProgress(IProgress? progressMonitor, int totalFiles, string fileName, bool force = false)
- {
- long now = Stopwatch.GetTimestamp();
- if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < Stopwatch.Frequency / 5) return;
-
- Interlocked.Exchange(ref lastProgressReportTicks, now);
- progressMonitor?.Report(new CompressionProgress((int)(Volatile.Read(ref processedFileCount) / (float)totalFiles * 100), fileName, activeFiles.Keys.ToArray()));
- }
-
private unsafe FileOperationResult WOFDecompressFile(string file)
{
try
@@ -143,10 +75,7 @@ private unsafe FileOperationResult WOFDecompressFile(string file)
using (SafeFileHandle fs = File.OpenHandle(file))
{
uint bytesReturned;
- if (PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, &bytesReturned, null))
- {
- return FileOperationResult.Success;
- }
+ if (PInvoke.DeviceIoControl(fs, WOFHelper.FSCTL_DELETE_EXTERNAL_BACKING, null, 0, null, 0, &bytesReturned, null)) return FileOperationResult.Success;
int errorCode = Marshal.GetLastPInvokeError();
return FileOperationRecovery.IsInsufficientDiskSpaceError(errorCode)
@@ -174,36 +103,21 @@ private static long GetFileLength(string file)
public void Pause()
{
UncompactorLog.DecompressionPaused(_logger);
- pauseGate.Reset();
+ runner.Pause();
}
public void Resume()
{
- pauseGate.Set();
+ runner.Resume();
UncompactorLog.DecompressionResumed(_logger);
}
- public int Cancel()
- {
- int activeOperations;
- lock (cancellationGate)
- {
- cancellationRequested = true;
- activeOperations = activeFileOperations;
- }
- pauseGate.Set();
- cancellationTokenSource.Cancel();
- return activeOperations;
- }
+ public int Cancel() => runner.Cancel();
- public void Dispose()
- {
- pauseGate.Dispose();
- cancellationTokenSource.Dispose();
- }
+ public void Dispose() => runner.Dispose();
From d9734e340733d35a82709ae9e413c5e19f296843 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Fri, 18 Sep 2026 21:35:00 +1000
Subject: [PATCH 114/134] Add shell fo tests...
---
.gitignore | 1 +
CompactGUI.Core/Properties/AssemblyInfo.cs | 3 +++
CompactGUI.Tests/CompactGUI.Tests.csproj | 26 ++++++++++++++++++++++
CompactGUI.slnx | 2 ++
4 files changed, 32 insertions(+)
create mode 100644 CompactGUI.Core/Properties/AssemblyInfo.cs
create mode 100644 CompactGUI.Tests/CompactGUI.Tests.csproj
diff --git a/.gitignore b/.gitignore
index f9a2ae71..e19bfd2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
*.userosscache
*.sln.docstates
CompactGUI.TestingGround/
+CompactGUI.Tests/
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
diff --git a/CompactGUI.Core/Properties/AssemblyInfo.cs b/CompactGUI.Core/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..cf01371e
--- /dev/null
+++ b/CompactGUI.Core/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("CompactGUI.Tests")]
diff --git a/CompactGUI.Tests/CompactGUI.Tests.csproj b/CompactGUI.Tests/CompactGUI.Tests.csproj
new file mode 100644
index 00000000..1a1ad968
--- /dev/null
+++ b/CompactGUI.Tests/CompactGUI.Tests.csproj
@@ -0,0 +1,26 @@
+
+
+
+ net10.0-windows
+ enable
+ enable
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CompactGUI.slnx b/CompactGUI.slnx
index 036be4eb..af688d98 100644
--- a/CompactGUI.slnx
+++ b/CompactGUI.slnx
@@ -7,9 +7,11 @@
+
+
From 7f5591c3c053851ff87efe8f6d8c863154c05cb0 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 20 Sep 2026 21:07:42 +1000
Subject: [PATCH 115/134] Add status reporting from Core to UI
---
CompactGUI.Core/ParallelFileRunner.cs | 13 +++++++++++--
CompactGUI.Core/SharedObjects.cs | 9 ++++++++-
CompactGUI/Resources/Localisation/en-AU.toml | 1 +
CompactGUI/Resources/Localisation/es-ES.toml | 1 +
CompactGUI/Resources/Localisation/id-ID.toml | 1 +
CompactGUI/Resources/Localisation/it-IT.toml | 1 +
CompactGUI/Resources/Localisation/ko-KR.toml | 1 +
CompactGUI/Resources/Localisation/ru-RU.toml | 1 +
CompactGUI/Resources/Localisation/tr-TR.toml | 1 +
CompactGUI/Resources/Localisation/zh-CN.toml | 1 +
CompactGUI/ViewModels/FolderViewModel.vb | 15 +++++++++++++++
CompactGUI/Views/Pages/FolderView.xaml | 15 +++++++++++++++
12 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/CompactGUI.Core/ParallelFileRunner.cs b/CompactGUI.Core/ParallelFileRunner.cs
index 56d29017..4c4925c9 100644
--- a/CompactGUI.Core/ParallelFileRunner.cs
+++ b/CompactGUI.Core/ParallelFileRunner.cs
@@ -35,6 +35,7 @@ internal sealed class ParallelFileRunner(ParallelFileRunnerOptions options
private long processedWeight;
private long totalWeight;
private long lastProgressReportTicks;
+ private CompressionProgressStatus? status;
public CancellationToken Token => cancellationTokenSource.Token;
public bool IsCancellationRequested => cancellationTokenSource.IsCancellationRequested;
@@ -45,6 +46,7 @@ public async Task RunAsync(IReadOnlyCollection files, long totalWeight,
this.totalWeight = totalWeight;
Interlocked.Exchange(ref processedWeight, 0);
Interlocked.Exchange(ref lastProgressReportTicks, 0);
+ status = null;
if (files.Count == 0 || totalWeight == 0)
{
@@ -68,6 +70,7 @@ await Parallel.ForEachAsync(files, parallelOptions, (file, ctx) =>
}).ConfigureAwait(false);
Debug.WriteLine($"Disk space failures: {diskSpaceFailures.Count}");
+ if (!diskSpaceFailures.IsEmpty) ReportStatus(progressMonitor, CompressionProgressStatus.LowDiskSpaceRetryingSequentially);
return failedFileCount + RetryDiskSpaceFailures(diskSpaceFailures, progressMonitor);
}
@@ -139,7 +142,7 @@ public void ReportProgress(IProgress? progressMonitor, stri
{
if (totalWeight == 0)
{
- if (force) progressMonitor?.Report(new CompressionProgress(100, fileName, activeFiles.Keys.ToArray()));
+ if (force) progressMonitor?.Report(new CompressionProgress(100, fileName, activeFiles.Keys.ToArray(), status));
return;
}
@@ -147,7 +150,13 @@ public void ReportProgress(IProgress? progressMonitor, stri
if (!force && now - Interlocked.Read(ref lastProgressReportTicks) < progressIntervalTicks) return;
Interlocked.Exchange(ref lastProgressReportTicks, now);
- progressMonitor?.Report(new CompressionProgress((int)((double)Interlocked.Read(ref processedWeight) / totalWeight * 100.0), fileName, activeFiles.Keys.ToArray()));
+ progressMonitor?.Report(new CompressionProgress((int)((double)Interlocked.Read(ref processedWeight) / totalWeight * 100.0), fileName, activeFiles.Keys.ToArray(), status));
+ }
+
+ public void ReportStatus(IProgress? progressMonitor, CompressionProgressStatus? status)
+ {
+ this.status = status;
+ ReportProgress(progressMonitor, force: true);
}
public void Pause() => pauseGate.Reset();
diff --git a/CompactGUI.Core/SharedObjects.cs b/CompactGUI.Core/SharedObjects.cs
index d7f4e8b5..45701262 100644
--- a/CompactGUI.Core/SharedObjects.cs
+++ b/CompactGUI.Core/SharedObjects.cs
@@ -29,15 +29,22 @@ public struct CompressionProgress
public int ProgressPercent { get; set; }
public string FileName { get; set; }
public string[] ActiveFiles { get; set; }
+ public CompressionProgressStatus? Status { get; set; }
- public CompressionProgress(int progressPercent, string fileName, string[] activeFiles = null)
+ public CompressionProgress(int progressPercent, string fileName, string[]? activeFiles = null, CompressionProgressStatus? status = null)
{
ProgressPercent = progressPercent;
FileName = fileName;
ActiveFiles = activeFiles ?? Array.Empty();
+ Status = status;
}
}
+public enum CompressionProgressStatus
+{
+ LowDiskSpaceRetryingSequentially
+}
+
public enum CompressionMode: int
{
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index 815c7d60..0a4c5aae 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -51,6 +51,7 @@
"Descending" = "Descending"
"Deselect all" = "Deselect all"
"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially."
"Do Not Compress" = "Do Not Compress"
"Do not compress" = "Do not compress"
"Drive unavailable" = "Drive unavailable"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 458ebd1c..0c1427fb 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -51,6 +51,7 @@
"Descending" = "Descendente"
"Deselect all" = "Deselect all" # LOC:TODO
"Direct Storage" = "Direct Storage" # LOC:TODO
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Do not compress" # LOC:TODO
"Drive unavailable" = "Drive unavailable" # LOC:TODO
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
index 47209bf0..7f3612c2 100644
--- a/CompactGUI/Resources/Localisation/id-ID.toml
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -51,6 +51,7 @@
"Descending" = "Menurun"
"Deselect all" = "Hapus semua pilihan"
"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Jangan Kompres"
"Do not compress" = "Jangan kompres"
"Drive unavailable" = "Drive tidak tersedia"
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index cf380017..5541084c 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -51,6 +51,7 @@
"Descending" = "Decrescente"
"Deselect all" = "Deselect all" # LOC:TODO
"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Non comprimere"
"Drive unavailable" = "Unità non disponibile"
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index 5fc4cc62..497437ff 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -51,6 +51,7 @@
"Descending" = "내림차순"
"Deselect all" = "Deselect all" # LOC:TODO
"Direct Storage" = "DirectStorage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "압축하지 않기"
"Drive unavailable" = "드라이브 사용 불가"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index 1c98812a..d5c209fe 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -51,6 +51,7 @@
"Descending" = "По убыванию"
"Deselect all" = "Deselect all" # LOC:TODO
"Direct Storage" = "Direct Storage" # LOC:TODO
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Do Not Compress" # LOC:TODO
"Do not compress" = "Do not compress" # LOC:TODO
"Drive unavailable" = "Drive unavailable" # LOC:TODO
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index fbfb4de3..47df2501 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -51,6 +51,7 @@
"Descending" = "Azalan"
"Deselect all" = "Tüm seçimleri kaldır"
"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "Sıkıştırma"
"Do not compress" = "Sıkıştırma"
"Drive unavailable" = "Sürücü kullanılamıyor"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 3db98b90..a003616b 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -51,6 +51,7 @@
"Descending" = "递减"
"Deselect all" = "取消全选"
"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
"Do Not Compress" = "无需压缩"
"Do not compress" = "无需压缩"
"Drive unavailable" = "驱动器不可用"
diff --git a/CompactGUI/ViewModels/FolderViewModel.vb b/CompactGUI/ViewModels/FolderViewModel.vb
index 7ab1606b..be99f131 100644
--- a/CompactGUI/ViewModels/FolderViewModel.vb
+++ b/CompactGUI/ViewModels/FolderViewModel.vb
@@ -20,6 +20,9 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
Private _CompressionProgressFile As String
+
+ Private _CompressionStatusMessage As String = String.Empty
+
Private _AlwaysShowDetailsCompressionMode As Boolean = False
@@ -143,6 +146,7 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
ElseIf e.PropertyName = NameOf(Folder.CompressionProgress) Then
CompressionProgress = Folder.CompressionProgress.ProgressPercent
CompressionProgressFile = Folder.CompressionProgress.FileName.Replace(Folder.FolderName, "")
+ CompressionStatusMessage = GetCompressionStatusMessage(Folder.CompressionProgress.Status)
ElseIf e.PropertyName = NameOf(Folder.HasInsufficientFreeSpaceForUncompression) Then
NotifyCanUncompressChanged()
@@ -212,6 +216,17 @@ Public NotInheritable Class FolderViewModel : Inherits ObservableObject : Implem
End If
End Sub
+ Private Shared Function GetCompressionStatusMessage(status As Core.CompressionProgressStatus?) As String
+ If Not status.HasValue Then Return String.Empty
+
+ Select Case status.Value
+ Case Core.CompressionProgressStatus.LowDiskSpaceRetryingSequentially
+ Return "Disk space is low. Retrying affected files sequentially.".LT()
+ Case Else
+ Return String.Empty
+ End Select
+ End Function
+
Private Async Function SubmitToWiki() As Task
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index d90eb3a0..89e572bf 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -30,6 +30,21 @@
Foreground="{StaticResource PaletteAmberBrush}"
Text="{Binding Folder.ActiveFileOperations, StringFormat=Finishing {0} active file operations; do not power off.}"
Visibility="{Binding Folder.IsCancelling, Converter={StaticResource BooleanToVisibilityConverter}}" />
+
+
+
+
+
From 51697c14b51c9d75303b2fd9d93eef04b6617a84 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Sun, 20 Sep 2026 21:50:04 +1000
Subject: [PATCH 116/134] Got rid of 2x folder space limit - now uses 2x
largest file instead as the sequential fallback mechanism has been implement
in compactor/uncomaptor
---
CompactGUI.Core/SharedMethods.cs | 14 +++-----------
CompactGUI/Services/CompressableFolderService.vb | 2 +-
CompactGUI/ViewModels/SteamMonitorViewModel.vb | 3 +--
3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 687298e9..4befaba8 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -206,7 +206,7 @@ public static unsafe uint GetClusterSize(string folderPath)
}
- public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, IEnumerable analysedFiles, WOFCompressionAlgorithm compressionAlgorithm, IEnumerable exclusionList, bool reserveUncompressedSize = false)
+ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, IEnumerable analysedFiles, WOFCompressionAlgorithm compressionAlgorithm, IEnumerable exclusionList)
{
uint clusterSize = GetClusterSize(workingDirectory);
var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList);
@@ -217,20 +217,12 @@ public static bool HasSufficientFreeSpaceForCompression(string workingDirectory,
!excludedFiles.Contains(file.FileName))
.ToList();
- long requiredBytes;
- if (reserveUncompressedSize)
- {
- requiredBytes = candidates.Sum(file => file.UncompressedSize) /2 + candidates.Select(file => file.UncompressedSize).DefaultIfEmpty().Max();
- }
- else
- {
- requiredBytes = candidates.Sum(file => file.CompressedSize) /2 + candidates.Select(file => file.CompressedSize).DefaultIfEmpty().Max();
- }
+ long largestCandidateSize = candidates.Select(file => file.UncompressedSize).DefaultIfEmpty().Max();
try
{
var root = Path.GetPathRoot(workingDirectory);
- return !string.IsNullOrWhiteSpace(root) && new DriveInfo(root).AvailableFreeSpace > requiredBytes;
+ return !string.IsNullOrWhiteSpace(root) && largestCandidateSize * 2 <= new DriveInfo(root).AvailableFreeSpace;
}
catch (IOException)
{
diff --git a/CompactGUI/Services/CompressableFolderService.vb b/CompactGUI/Services/CompressableFolderService.vb
index 22428f8b..ffa21d60 100644
--- a/CompactGUI/Services/CompressableFolderService.vb
+++ b/CompactGUI/Services/CompressableFolderService.vb
@@ -305,7 +305,7 @@ Public Class CompressableFolderService
End Function
Public Function HasSufficientFreeSpaceForUncompression(folder As CompressableFolder) As Boolean
- Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, WOFCompressionAlgorithm.NO_COMPRESSION, Array.Empty(Of String)(), reserveUncompressedSize:=True)
+ Return Core.SharedMethods.HasSufficientFreeSpaceForCompression(folder.FolderName, folder.AnalysisResults, WOFCompressionAlgorithm.NO_COMPRESSION, Array.Empty(Of String)())
End Function
Private Sub ReleaseToken(folder As CompressableFolder, cts As CancellationTokenSource)
diff --git a/CompactGUI/ViewModels/SteamMonitorViewModel.vb b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
index c530ba61..f7978b20 100644
--- a/CompactGUI/ViewModels/SteamMonitorViewModel.vb
+++ b/CompactGUI/ViewModels/SteamMonitorViewModel.vb
@@ -645,8 +645,7 @@ Public Class SteamMonitorViewModel : Inherits ObservableObject
game.HasInsufficientFreeSpaceForUncompression = Not Core.SharedMethods.HasSufficientFreeSpaceForCompression(game.GamePath,
analysedFiles,
Core.WOFCompressionAlgorithm.NO_COMPRESSION,
- Array.Empty(Of String)(),
- reserveUncompressedSize:=True)
+ Array.Empty(Of String)())
End Using
End Function
From 7cede702ddf4eae594c14c150611afd94cda8cae Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 17:47:10 +1000
Subject: [PATCH 117/134] Fix the animation on steam library page - no idea how
it was broken, but actually have no idea how it worked in the first place...
---
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index 667a8783..c3f15412 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -548,7 +548,7 @@
-
+
From 1b9032f8f4b55856e75f6bcbab963e757f148607 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 17:51:14 +1000
Subject: [PATCH 118/134] Add configfile-only toggle to disable hardware
rendering. Closes #658
---
CompactGUI.Core/Settings/Settings.cs | 2 ++
CompactGUI/Services/SettingsService.vb | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/CompactGUI.Core/Settings/Settings.cs b/CompactGUI.Core/Settings/Settings.cs
index 2f8edc75..7a88eb04 100644
--- a/CompactGUI.Core/Settings/Settings.cs
+++ b/CompactGUI.Core/Settings/Settings.cs
@@ -50,6 +50,8 @@ public partial class Settings : ObservableRecipient
[ObservableProperty] private bool bypassLowSpaceProtection = false;
+ [ObservableProperty] private bool disableHardwareRendering = false;
+
partial void OnScheduledBackgroundIntervalChanged(int value) => UpdateNextScheduledBackgroundRun();
partial void OnScheduledBackgroundHourChanged(int value) => UpdateNextScheduledBackgroundRun();
diff --git a/CompactGUI/Services/SettingsService.vb b/CompactGUI/Services/SettingsService.vb
index f9dd8147..fad8739b 100644
--- a/CompactGUI/Services/SettingsService.vb
+++ b/CompactGUI/Services/SettingsService.vb
@@ -44,6 +44,10 @@ Public Class SettingsService : Implements ISettingsService
End If
+ If AppSettings.DisableHardwareRendering Then RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly
+
+
+
Dim output = JsonSerializer.Serialize(AppSettings, Jsonoptions)
IO.File.WriteAllText(SettingsJSONFile.FullName, output)
End Sub
From 2d006dd9d912932681e29c6175ed373bbbb88283 Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 17:52:40 +1000
Subject: [PATCH 119/134] Version Bump
---
CompactGUI/Application.xaml.vb | 2 +-
CompactGUI/Resources/Localisation/en-AU.toml | 2 +-
CompactGUI/Resources/Localisation/es-ES.toml | 2 +-
CompactGUI/Resources/Localisation/id-ID.toml | 2 +-
CompactGUI/Resources/Localisation/it-IT.toml | 2 +-
CompactGUI/Resources/Localisation/ko-KR.toml | 2 +-
CompactGUI/Resources/Localisation/manifest.toml | 2 +-
CompactGUI/Resources/Localisation/ru-RU.toml | 2 +-
CompactGUI/Resources/Localisation/tr-TR.toml | 2 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 4 ++--
10 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/CompactGUI/Application.xaml.vb b/CompactGUI/Application.xaml.vb
index 2196de65..56727696 100644
--- a/CompactGUI/Application.xaml.vb
+++ b/CompactGUI/Application.xaml.vb
@@ -17,7 +17,7 @@ Imports Coravel.Scheduling.Schedule
Partial Public Class Application
- Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 11)
+ Public Shared ReadOnly AppVersion As New SemVersion(4, 0, 0, "beta", 12)
Public Shared ReadOnly Property AppVersionText As String
Get
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index 0a4c5aae..05461593 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 0c1427fb..8543c1fc 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
index 7f3612c2..17fa0339 100644
--- a/CompactGUI/Resources/Localisation/id-ID.toml
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index 5541084c..f8f135a4 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index 497437ff..6397053d 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 280abd9e..eda2ac95 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -17,7 +17,7 @@ version = 1
file = "ru-RU.toml"
[locales."zh-CN"]
-version = 2
+version = 1
file = "zh-CN.toml"
[locales."it-IT"]
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index d5c209fe..f7f459eb 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index 47df2501..188cf6a5 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
# @version 1
-# @programversion 4.0.0-beta.11
+# @programversion 4.0.0-beta.12
# ===================
# Translations
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index a003616b..26a37775 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -1,6 +1,6 @@
# CompactGUI Localisation
-# @version 2
-# @programversion 4.0.0-beta.11
+# @version 1
+# @programversion 4.0.0-beta.12
# ===================
# Translations
From 872877e590a431dfe7edd8aec3e8689efe6f9aff Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 18:01:27 +1000
Subject: [PATCH 120/134] Change "Compress n games" to "Compress n items" and
localise
---
CompactGUI/Resources/Localisation/en-AU.toml | 2 ++
CompactGUI/Resources/Localisation/es-ES.toml | 2 ++
CompactGUI/Resources/Localisation/id-ID.toml | 2 ++
CompactGUI/Resources/Localisation/it-IT.toml | 2 ++
CompactGUI/Resources/Localisation/ko-KR.toml | 2 ++
CompactGUI/Resources/Localisation/ru-RU.toml | 2 ++
CompactGUI/Resources/Localisation/tr-TR.toml | 2 ++
CompactGUI/Resources/Localisation/zh-CN.toml | 2 ++
CompactGUI/ViewModels/HomeViewModel.vb | 3 ++-
9 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index 05461593..af1b5ff1 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -178,6 +178,8 @@
"estimated savings" = "estimated savings"
"every" = "every"
"games" = "games"
+"item" = "item"
+"items" = "items"
"just now" = "just now"
"last compressed:" = "last compressed:"
"last modified:" = "last modified:"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 8543c1fc..c919ede4 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -178,6 +178,8 @@
"estimated savings" = "estimated savings" # LOC:TODO
"every" = "cada"
"games" = "games" # LOC:TODO
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "ahora mismo"
"last compressed:" = "última compresión:"
"last modified:" = "última modificación:"
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
index 17fa0339..892976ca 100644
--- a/CompactGUI/Resources/Localisation/id-ID.toml
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -178,6 +178,8 @@
"estimated savings" = "perkiraan penghematan"
"every" = "setiap"
"games" = "game"
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "baru saja"
"last compressed:" = "terakhir dikompresi:"
"last modified:" = "terakhir diubah:"
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index f8f135a4..322eaaf7 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -178,6 +178,8 @@
"estimated savings" = "estimated savings" # LOC:TODO
"every" = "ogni"
"games" = "giochi"
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "proprio ora"
"last compressed:" = "ultima compressione:"
"last modified:" = "ultima modifica:"
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index 6397053d..b40fec13 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -178,6 +178,8 @@
"estimated savings" = "estimated savings" # LOC:TODO
"every" = "매"
"games" = "개"
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "방금 전"
"last compressed:" = "마지막 압축:"
"last modified:" = "마지막 수정:"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index f7f459eb..c8867e37 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -178,6 +178,8 @@
"estimated savings" = "estimated savings" # LOC:TODO
"every" = "каждые"
"games" = "games" # LOC:TODO
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "только что"
"last compressed:" = "последнее сжатие:"
"last modified:" = "последнее изменение:"
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index 188cf6a5..f9303cbf 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -178,6 +178,8 @@
"estimated savings" = "tahmini tasarruf"
"every" = "her"
"games" = "oyunlar"
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "az ├Ânce"
"last compressed:" = "son s─▒k─▒┼şt─▒r─▒lma:"
"last modified:" = "son de─şi┼ştirilme:"
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 26a37775..e7b632ae 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -178,6 +178,8 @@
"estimated savings" = "预估节省"
"every" = "每"
"games" = "个游戏"
+"item" = "item" # LOC:TODO
+"items" = "items" # LOC:TODO
"just now" = "刚刚"
"last compressed:" = "上次压缩:"
"last modified:" = "上次修改:"
diff --git a/CompactGUI/ViewModels/HomeViewModel.vb b/CompactGUI/ViewModels/HomeViewModel.vb
index d271f26d..f42bfefa 100644
--- a/CompactGUI/ViewModels/HomeViewModel.vb
+++ b/CompactGUI/ViewModels/HomeViewModel.vb
@@ -138,7 +138,8 @@ Partial Public NotInheritable Class HomeViewModel : Inherits ObservableRecipient
Public ReadOnly Property CompressButtonText As String
Get
- Return $"Compress {AwaitingFolderCount} {If(AwaitingFolderCount = 1, "game", "games")}".LT()
+ Return "Compress".LT() & " " & AwaitingFolderCount & " " & If(AwaitingFolderCount = 1, "item".LT(), "items".LT())
+
End Get
End Property
From 85d2d951afb7eacb0bc02e274d1b485ede01de4d Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 18:12:11 +1000
Subject: [PATCH 121/134] Update warning labels for low disk space
---
CompactGUI/Resources/Localisation/en-AU.toml | 2 +-
CompactGUI/Resources/Localisation/es-ES.toml | 2 +-
CompactGUI/Resources/Localisation/id-ID.toml | 5 ++++-
CompactGUI/Resources/Localisation/it-IT.toml | 2 +-
CompactGUI/Resources/Localisation/ko-KR.toml | 2 +-
CompactGUI/Resources/Localisation/ru-RU.toml | 2 +-
CompactGUI/Resources/Localisation/tr-TR.toml | 5 ++++-
CompactGUI/Resources/Localisation/zh-CN.toml | 5 ++++-
CompactGUI/Views/Pages/FolderView.xaml | 16 ++++++++--------
CompactGUI/Views/Pages/QueueSidebar.xaml | 2 +-
CompactGUI/Views/Pages/SteamMonitorPage.xaml | 2 +-
11 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/en-AU.toml b/CompactGUI/Resources/Localisation/en-AU.toml
index af1b5ff1..f0b5ae12 100644
--- a/CompactGUI/Resources/Localisation/en-AU.toml
+++ b/CompactGUI/Resources/Localisation/en-AU.toml
@@ -140,7 +140,7 @@
"Success" = "Success"
"System Integration" = "System Integration"
"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues."
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "This game uses DirectStorage technology. If you are using this feature, you should not compress this game."
"Total Results" = "Total Results"
"UI Settings" = "UI Settings"
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index c919ede4..fb328f02 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -140,7 +140,7 @@
"Success" = "Éxito"
"System Integration" = "Integración del sistema"
"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" # LOC:TODO
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Este juego usa tecnología DirectStorage. Si usa esta función, no debería comprimir este juego."
"Total Results" = "Totales"
"UI Settings" = "Ajustes de interfaz"
diff --git a/CompactGUI/Resources/Localisation/id-ID.toml b/CompactGUI/Resources/Localisation/id-ID.toml
index 892976ca..4330ad35 100644
--- a/CompactGUI/Resources/Localisation/id-ID.toml
+++ b/CompactGUI/Resources/Localisation/id-ID.toml
@@ -140,7 +140,7 @@
"Success" = "Berhasil"
"System Integration" = "Integrasi Sistem"
"The SnackbarPresenter was never set" = "SnackbarPresenter belum pernah diatur"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Ruang kosong pada drive ini tidak cukup untuk mengompresi folder ini dengan aman. Anda memerlukan ruang kosong setidaknya 50% dari ukuran folder ini agar Windows tidak mengalami masalah."
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Game ini menggunakan teknologi DirectStorage. Jika Anda menggunakan fitur ini, sebaiknya jangan kompres game ini."
"Total Results" = "Total Hasil"
"UI Settings" = "Pengaturan UI"
@@ -253,3 +253,6 @@
[context."Storage savings"]
"saved" = "dihemat"
+
+[obsolete]
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Ruang kosong pada drive ini tidak cukup untuk mengompresi folder ini dengan aman. Anda memerlukan ruang kosong setidaknya 50% dari ukuran folder ini agar Windows tidak mengalami masalah."
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index 322eaaf7..bc7d3ebe 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -140,7 +140,7 @@
"Success" = "Successo"
"System Integration" = "Integrazione di sistema"
"The SnackbarPresenter was never set" = "The SnackbarPresenter non è stata mai settata"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Questo gioco utilizza la tecnologia DirectStorage. Se utilizzi questa funzione, non dovresti comprimere questo gioco."
"Total Results" = "Risultati totali"
"UI Settings" = "Impostazioni interfaccia"
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index b40fec13..bb28185a 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -140,7 +140,7 @@
"Success" = "성공"
"System Integration" = "시스템 연동"
"The SnackbarPresenter was never set" = "SnackbarPresenter가 설정되어 있지 않습니다"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "이 게임은 DirectStorage 기술을 사용합니다. 이 기능을 사용 중이라면 이 게임을 압축하지 않는 것이 좋습니다."
"Total Results" = "제출된 결과 수"
"UI Settings" = "UI 설정"
diff --git a/CompactGUI/Resources/Localisation/ru-RU.toml b/CompactGUI/Resources/Localisation/ru-RU.toml
index c8867e37..0944af22 100644
--- a/CompactGUI/Resources/Localisation/ru-RU.toml
+++ b/CompactGUI/Resources/Localisation/ru-RU.toml
@@ -140,7 +140,7 @@
"Success" = "Успешно"
"System Integration" = "Интеграция в систему"
"The SnackbarPresenter was never set" = "SnackbarPresenter не установлен"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Эта игра использует технологию DirectStorage. Если вы используете эту функцию, вам не следует сжимать эту игру."
"Total Results" = "Всего результатов"
"UI Settings" = "Настройки интерфейса"
diff --git a/CompactGUI/Resources/Localisation/tr-TR.toml b/CompactGUI/Resources/Localisation/tr-TR.toml
index f9303cbf..a2aae14a 100644
--- a/CompactGUI/Resources/Localisation/tr-TR.toml
+++ b/CompactGUI/Resources/Localisation/tr-TR.toml
@@ -140,7 +140,7 @@
"Success" = "Ba┼şar─▒l─▒"
"System Integration" = "Sistem Entegrasyonu"
"The SnackbarPresenter was never set" = "SnackbarPresenter ayarlanmad─▒"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Bu klasörü güvenle sıkıştırmak için sürücüde yeterli boş alan yok. Windows'un sorun çıkarmaması için klasör boyutunun en az %50'si kadar boş alan gereklidir."
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Bu oyun DirectStorage teknolojisini kullan─▒yor. E─şer bu ├Âzelli─şi kullan─▒yorsan─▒z, bu oyunu s─▒k─▒┼şt─▒rmamal─▒s─▒n─▒z."
"Total Results" = "Toplam Sonu├ğlar"
"UI Settings" = "Aray├╝z Ayarlar─▒"
@@ -253,3 +253,6 @@
[context."Storage savings"]
"saved" = "kaydedildi"
+
+[obsolete]
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "Bu klasörü güvenle sıkıştırmak için sürücüde yeterli boş alan yok. Windows'un sorun çıkarmaması için klasör boyutunun en az %50'si kadar boş alan gereklidir."
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index e7b632ae..62aa7f11 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -140,7 +140,7 @@
"Success" = "成功"
"System Integration" = "系统集成"
"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。"
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果你正在使用此功能,则不应压缩此游戏。"
"Total Results" = "结果总数"
"UI Settings" = "UI 设置"
@@ -253,3 +253,6 @@
[context."Storage savings"]
"saved" = "已节省"
+
+[obsolete]
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。"
diff --git a/CompactGUI/Views/Pages/FolderView.xaml b/CompactGUI/Views/Pages/FolderView.xaml
index 89e572bf..5ae1bfbc 100644
--- a/CompactGUI/Views/Pages/FolderView.xaml
+++ b/CompactGUI/Views/Pages/FolderView.xaml
@@ -46,14 +46,14 @@
-
+
-
+
@@ -120,17 +120,17 @@
-
-
+
-
+
diff --git a/CompactGUI/Views/Pages/QueueSidebar.xaml b/CompactGUI/Views/Pages/QueueSidebar.xaml
index fcac0e31..b941b30b 100644
--- a/CompactGUI/Views/Pages/QueueSidebar.xaml
+++ b/CompactGUI/Views/Pages/QueueSidebar.xaml
@@ -92,7 +92,7 @@
-
+
diff --git a/CompactGUI/Views/Pages/SteamMonitorPage.xaml b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
index c3f15412..bdfb8b13 100644
--- a/CompactGUI/Views/Pages/SteamMonitorPage.xaml
+++ b/CompactGUI/Views/Pages/SteamMonitorPage.xaml
@@ -638,7 +638,7 @@
-
+
From ae51186b42d787d30e9e8b8443e3f8606f6689dd Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 18:22:57 +1000
Subject: [PATCH 122/134] Add separate hassufficientspace check for
uncompression
---
CompactGUI.Core/SharedMethods.cs | 36 +++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 10 deletions(-)
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 4befaba8..8bf5fc63 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -208,21 +208,37 @@ public static unsafe uint GetClusterSize(string folderPath)
public static bool HasSufficientFreeSpaceForCompression(string workingDirectory, IEnumerable analysedFiles, WOFCompressionAlgorithm compressionAlgorithm, IEnumerable exclusionList)
{
- uint clusterSize = GetClusterSize(workingDirectory);
- var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList);
- var candidates = analysedFiles.Where(file =>
- file.CompressionMode != compressionAlgorithm &&
- file.UncompressedSize > clusterSize &&
- !file.Attributes.HasFlag(FileAttributes.SparseFile) &&
- !excludedFiles.Contains(file.FileName))
- .ToList();
+ long requiredBytes;
+ if (compressionAlgorithm == WOFCompressionAlgorithm.NO_COMPRESSION)
+ {
+ long largestCandidateSize = 0;
+ requiredBytes = 0;
+
+ foreach (AnalysedFileDetails file in analysedFiles)
+ {
+ if (file.CompressedSize >= file.UncompressedSize) continue;
+ requiredBytes += file.UncompressedSize - file.CompressedSize;
+ largestCandidateSize = Math.Max(largestCandidateSize, file.UncompressedSize);
+ }
- long largestCandidateSize = candidates.Select(file => file.UncompressedSize).DefaultIfEmpty().Max();
+ requiredBytes += largestCandidateSize;
+ }
+ else
+ {
+ uint clusterSize = GetClusterSize(workingDirectory);
+ var excludedFiles = SkipListMatcher.GetExcludedFiles(workingDirectory, analysedFiles.Select(file => file.FileName), exclusionList);
+ requiredBytes = analysedFiles.Where(file =>
+ file.CompressionMode != compressionAlgorithm &&
+ file.UncompressedSize > clusterSize &&
+ !file.Attributes.HasFlag(FileAttributes.SparseFile) &&
+ !excludedFiles.Contains(file.FileName))
+ .Select(file => file.UncompressedSize).DefaultIfEmpty().Max() * 2;
+ }
try
{
var root = Path.GetPathRoot(workingDirectory);
- return !string.IsNullOrWhiteSpace(root) && largestCandidateSize * 2 <= new DriveInfo(root).AvailableFreeSpace;
+ return !string.IsNullOrWhiteSpace(root) && requiredBytes <= new DriveInfo(root).AvailableFreeSpace;
}
catch (IOException)
{
From f275c4400ed1f947be73c34986ac60c2b8042dfb Mon Sep 17 00:00:00 2001
From: IridiumIO
Date: Mon, 21 Sep 2026 18:53:06 +1000
Subject: [PATCH 123/134] Add options to hide Steam Library + Compression DB
Tabs (professionalism mode). Close #671
---
CompactGUI.Core/Settings/Settings.cs | 3 +++
CompactGUI/MainWindow.xaml | 6 ++---
CompactGUI/Resources/Localisation/en-AU.toml | 2 ++
CompactGUI/Resources/Localisation/es-ES.toml | 2 ++
CompactGUI/Resources/Localisation/id-ID.toml | 2 ++
CompactGUI/Resources/Localisation/it-IT.toml | 2 ++
CompactGUI/Resources/Localisation/ko-KR.toml | 2 ++
CompactGUI/Resources/Localisation/ru-RU.toml | 2 ++
CompactGUI/Resources/Localisation/tr-TR.toml | 2 ++
CompactGUI/Resources/Localisation/zh-CN.toml | 2 ++
CompactGUI/ViewModels/MainWindowViewModel.vb | 25 ++++++++++++++++++++
CompactGUI/Views/SettingsPage.xaml | 15 ++++++++----
12 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/CompactGUI.Core/Settings/Settings.cs b/CompactGUI.Core/Settings/Settings.cs
index 7a88eb04..93ca02a4 100644
--- a/CompactGUI.Core/Settings/Settings.cs
+++ b/CompactGUI.Core/Settings/Settings.cs
@@ -52,6 +52,9 @@ public partial class Settings : ObservableRecipient
[ObservableProperty] private bool disableHardwareRendering = false;
+ [ObservableProperty] private bool hideSteamLibraryTab = false;
+ [ObservableProperty] private bool hideCompressionDbTab = false;
+
partial void OnScheduledBackgroundIntervalChanged(int value) => UpdateNextScheduledBackgroundRun();
partial void OnScheduledBackgroundHourChanged(int value) => UpdateNextScheduledBackgroundRun();
diff --git a/CompactGUI/MainWindow.xaml b/CompactGUI/MainWindow.xaml
index b352011d..0b711b85 100644
--- a/CompactGUI/MainWindow.xaml
+++ b/CompactGUI/MainWindow.xaml
@@ -57,7 +57,7 @@
-
@@ -83,7 +83,7 @@
-
@@ -344,7 +344,7 @@
-
-
-
+
+
-
+
@@ -463,6 +462,14 @@
Margin="0 -3"
loc:L.Value="Always show details on Compression Mode buttons"
IsChecked="{Binding AppSettings.AlwaysShowDetailedCompressionMode}" />
+
+
From 2659a57f5949fe08692cae03c258c8c2d9474f79 Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Tue, 22 Sep 2026 00:04:42 +1000
Subject: [PATCH 124/134] Fix links and formatting in README.md
Updated README.md to fix links and improve formatting.
---
README.md | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 8ec9040c..be342c95 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,14 @@
CompactGUI transparently compresses your games and programs reducing the space they use without affecting their functionality. It works directly with the Win32 API to achieve the same thing as the native compact.exe command-line tool available from Windows 10 onwards.
+
+
**How it works**:
@@ -115,3 +116,4 @@ Optional Compression Modes:
Please consider leaving a tip on Ko-Fi :)
+
From e233ac6c9f2cc5b411be8303fc17266f0f4763ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ra=C3=BAl?= <115171836+devparada@users.noreply.github.com>
Date: Tue, 22 Sep 2026 09:23:26 +0200
Subject: [PATCH 125/134] Add Spanish translations (#675)
* feat: Add Spanish translations
* Update version for Spanish locale to 2
---------
Co-authored-by: Iridium IO
---
CompactGUI/Resources/Localisation/es-ES.toml | 199 +++++++++---------
.../Resources/Localisation/manifest.toml | 2 +-
2 files changed, 98 insertions(+), 103 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 508f2ce8..71bfa0c1 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -7,8 +7,8 @@
"Add" = "Añadir "
"Add a custom folder to the watchlist" = "Añadir carpeta personalizada a la lista"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
-"Add to Compression Queue" = "Add to Compression Queue" # LOC:TODO
+"Add selected to queue" = "Añadir seleccionados a la cola"
+"Add to Compression Queue" = "Añadir a la cola de compresión"
"Add to compression queue" = "Añadir a la cola de compresión"
"Add to right-click context menu" = "Añadir al menú contextual"
"Add to start menu" = "Añadir al menú inicio"
@@ -17,75 +17,72 @@
"Aggression of online skiplist" = "Agresividad de la lista de omisión online"
"Always show details on Compression Mode buttons" = "Mostrar siempre detalles en botones de modo de compresión"
"Analysing" = "Analizando"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "Analizando..."
"Applied to all folders" = "Aplicado a todas las carpetas"
"Ascending" = "Ascendente"
"Awaiting Compression" = "Esperando compresión"
"Background Watcher Settings" = "Ajustes del Monitor en segundo plano"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
-"Cancel" = "Cancelar "
+"COMPARE METHODS" = "COMPARAR MÉTODOS"
+"COMPRESSION MODE " = "MODO DE COMPRESIÓN "
+"Cancel" = "Cancelar"
"Cancel Background Compressor" = "Cancelar compresor en segundo plano"
-"Cancel operation" = "Cancel operation" # LOC:TODO
+"Cancel operation" = "Cancelar operación"
"Cannot remove folder" = "No se puede eliminar la carpeta"
"Check for pre-release updates" = "Buscar actualizaciones preliminares"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
+"Choose Compression" = "Elegir compresión"
+"Clear filters" = "Borrar filtros"
"Click to download" = "Clic para descargar"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "Completo"
+"Compress" = "Comprimir"
"Compress Again" = "Comprimir de nuevo"
"Compress All Now" = "Comprimir todo ahora"
"Compress Selected" = "Comprimir seleccionados"
"Compress folders: " = "Comprimir carpetas:"
"Compressed" = "Comprimido"
-"Compressing..." = "Compressing..." # LOC:TODO
+"Compressing..." = "Comprimiendo..."
"Compression" = "Compresión"
"Compression DB" = "DB de Compresión"
"Compression Settings" = "Ajustes de compresión"
"Compression Summary" = "Resumen de compresión"
"Compression options have been applied to all folders" = "Las opciones de compresión se han aplicado a todas las carpetas"
-"Current Size" = "Current Size" # LOC:TODO
+"Current Size" = "Tamaño actual"
"Database Results" = "Resultados de la base de datos"
"Descending" = "Descendente"
-"Deselect all" = "Deselect all" # LOC:TODO
-"Direct Storage" = "Direct Storage" # LOC:TODO
-"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
-"Do not compress" = "Do not compress" # LOC:TODO
-"Drive unavailable" = "Drive unavailable" # LOC:TODO
-"Edit list" = "Edit list" # LOC:TODO
+"Deselect all" = "Deseleccionar todo"
+"Direct Storage" = "Direct Storage"
+"Do Not Compress" = "No comprimir"
+"Do not compress" = "No comprimir"
+"Drive unavailable" = "Unidad no disponible"
+"Edit list" = "Editar lista"
"Estimate Compression for non-Steam Folders (beta)" = "Estimar compresión para carpetas no-Steam (beta)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Estimated Size" = "Tamaño estimado"
"Estimated size" = "Tamaño estimado"
"Exit" = "Salir"
"Extensions in this folder" = "Extensiones en esta carpeta"
-"Failed" = "Failed" # LOC:TODO
+"Failed" = "Fallido"
"Failed to submit to wiki" = "Fallo al enviar a la wiki"
"Filetype Management" = "Gestión de tipos de archivo"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
+"Filter" = "Filtro"
+"Finishing {0} active file operations; do not power off." = "Se están completando {0} operaciones con archivos activos; no apagues el equipo."
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Para juegos de Steam, esto utiliza la base de datos para determinar los tipos a omitir. Para carpetas que no son de Steam, se basa en el analizador inteligente."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo para juegos de Steam.\nAl elegir omitir los tipos de archivo enviados por los usuarios, esta configuración determina cuántas solicitudes se requieren para cada tipo de archivo para considerar su omisión.\nGeneralmente, la opción \"baja\" es la mejor, ya que las opciones más altas conllevan el riesgo de omitir archivos que, de otro modo, se comprimirían correctamente."
"Game" = "Juego"
"Game Name" = "Nombre del juego"
"Games" = "Juegos"
-"Go to Database Results" = "Go to Database Results" # LOC:TODO
+"Go to Database Results" = "Ir a los resultados de la base de datos"
"HDDs only use 1 thread" = "Los HDD usan solo 1 hilo"
-"Hide Compression DB Tab" = "Hide Compression DB Tab" # LOC:TODO
-"Hide Steam Library Tab" = "Hide Steam Library Tab" # LOC:TODO
"Home" = "Inicio"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
+"Include global skiplist" = "Incluir la lista de omitidos global"
"Include global skipped file types" = "Incluir tipos de archivo omitidos globales"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
+"Include smart skiplist" = "Incluir la lista de omitidos smart"
"Include smart skipped file types" = "Incluir tipos de archivo inteligentes omitidos"
"Insufficient permission to access this folder" = "Permiso insuficiente para acceder a esta carpeta."
"LZX" = "LZX"
"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Última obtención: {0:dd MMM yyyy HH:mm:ss}"
"Last analysed {0}" = "Último análisis {0}"
"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Última ejecución: {0:dd MMM yyyy} a las {0:HH:mm:ss}"
-"Library location" = "Library location" # LOC:TODO
+"Library location" = "Ubicación de la librería"
"Manage local skipped filetypes" = "Gestionar tipos de archivo omitidos locales"
"Max Savings" = "Ahorro máx."
"Maximum Compression Threads" = "Hilos máximos de compresión"
@@ -93,100 +90,98 @@
"Monitor compressed folders for changes" = "Monitorizar cambios en carpetas comprimidas"
"Never" = "Nunca"
"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Próxima programada: {0:dd MMM yyyy} a las {0:HH:mm:ss}"
-"No installed Steam games were found." = "No installed Steam games were found." # LOC:TODO
-"No wiki data" = "No wiki data" # LOC:TODO
+"No installed Steam games were found." = "No se han encontrado juegos de Steam instalados."
+"No wiki data" = "No hay datos en la wiki"
"Not Compressed" = "No comprimido"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "No hay suficiente espacio"
"On Schedule" = "Programado"
"On Schedule if system is also idle" = "Programado (si el sistema está inactivo)"
"Open" = "Abrir"
"Open Settings Folder" = "Abrir Ajustes carpetas "
-"Operation cancelled." = "Operation cancelled." # LOC:TODO
-"Operation failed: {0}" = "Operation failed: {0}" # LOC:TODO
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
+"Operation cancelled." = "Operación cancelada."
+"Operation failed: {0}" = "Operación fallida: {0}"
+"Original Size" = "Tamaño original"
+"Paused" = "Pausado"
"Please check your internet connection and try again" = "Por favor verifique su conexión a internet e intente de nuevo"
"Please wait until the current operation is finished" = "Por favor espere hasta que la operación actual termine"
-"Preparing" = "Preparing" # LOC:TODO
-"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" # LOC:TODO
+"Preparing" = "Preparando"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Analiza rápidamente los archivos y estima su tasa de compresión sin escribir en disco. ¡Es muy probable que vaya muy lento en discos HDDs!"
"Re-analyse all watched folders" = "Reanalizar todas las carpetas monitorizadas"
"Re-analyse this folder" = "Reanalizar esta carpeta"
-"Recently Updated" = "Recently Updated" # LOC:TODO
-"Recommended Action" = "Recommended Action" # LOC:TODO
-"Reload Languages.\nChecks online for updated language definitions" = "Reload Languages.\nChecks online for updated language definitions" # LOC:TODO
-"Reload Steam Library list" = "Reload Steam Library list" # LOC:TODO
+"Recently Updated" = "Actualizado recientemente"
+"Recommended Action" = "Acción recomendada"
+"Reload Languages.\nChecks online for updated language definitions" = "Actualizar idiomas.\nComprueba en línea si hay definiciones de idiomas actualizadas"
+"Reload Steam Library list" = "Actualizar lista de la librería de Steam"
"Remove from Watchlist" = "Eliminar de la lista"
"Reset" = "Reiniciar"
"Restart as Admin" = "Reiniciar como Admin"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "MOSTRAR COLA"
+"SKIPLIST SELECTION" = "SELECCIÓN DE LA LISTA DE OMITIDOS"
+"Saved" = "Ahorrado"
"Savings" = "Ahorro"
-"Scanning installed Steam games..." = "Scanning installed Steam games..." # LOC:TODO
+"Scanning installed Steam games..." = "Escaneando juegos de Steam instalados..."
"Search by game name or SteamID..." = "Buscar por nombre o SteamID..."
-"Select" = "Select" # LOC:TODO
-"Select a folder to compress" = "Select a folder to compress" # LOC:TODO
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select" = "Seleccionado"
+"Select a folder to compress" = "Selecciona una carpeta para comprimir"
+"Select all" = "Seleccionar todo"
+"Select all compressable" = "Seleccionar todo lo comprimido"
+"Select all visible games" = "Seleccionar todo los juegos visibles"
"Settings" = "Ajustes"
"Show notification on completion" = "Mostrar notificación al finalizar"
-"Sort" = "Sort" # LOC:TODO
+"Sort" = "Ordenar"
"Sort By" = "Ordenar por"
"Start CompactGUI in system tray" = "Iniciar CompactGUI en la bandeja del sistema"
-"Status" = "Status" # LOC:TODO
-"Steam Library" = "Steam Library" # LOC:TODO
+"Status" = "Estado"
+"Steam Library" = "Librería de Steam"
"SteamID" = "SteamID"
"Submit Results" = "Enviar resultados"
"Submitted to wiki" = "Enviado a la wiki"
"Success" = "Éxito"
"System Integration" = "Integración del sistema"
-"The SnackbarPresenter was never set" = "The SnackbarPresenter was never set" # LOC:TODO
-"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
+"The SnackbarPresenter was never set" = "El SnackbarPresenter nunca se configuró"
+"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "No hay suficiente espacio libre en esta unidad para comprimir esta carpeta de forma segura. Necesitas al menos el 50 % del tamaño de esta carpeta libre para garantizar que Windows no cause problemas."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Este juego usa tecnología DirectStorage. Si usa esta función, no debería comprimir este juego."
"Total Results" = "Totales"
"UI Settings" = "Ajustes de interfaz"
-"UID" = "UID" # LOC:TODO
+"UID" = "UID"
"Uncompress" = "Descomprimir"
-"Uncompressed" = "Uncompressed" # LOC:TODO
-"Uncompressing..." = "Uncompressing..." # LOC:TODO
-"Unknown" = "Unknown" # LOC:TODO
-"Update Available" = "Update Available" # LOC:TODO
+"Uncompressed" = "Descomprimido"
+"Uncompressing..." = "Descomprimiendo..."
+"Unknown" = "Desconocido"
+"Update Available" = "Actualización disponible"
"Update Available ▸ Version {0}" = "Actualización disponible ▸ Versión {0}"
"Update Settings" = "Ajustes de actualización"
-"Update in Steam" = "Update in Steam" # LOC:TODO
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Update in Steam" = "Actualización en Steam"
+"Use exclusions" = "Usar exclusiones"
+"Use recommended mode" = "Usar el modo recomendado"
"Version" = "Versión"
-"Waiting" = "Waiting" # LOC:TODO
+"Waiting" = "Esperando"
"Watch folder for changes" = "Monitorizar cambios en carpeta"
"Watched Folders" = "Carpetas monitorizadas"
"Watcher" = "Monitor"
"WatcherPage" = "Monitor"
"When System is Idle" = "Cuando el sistema esté inactivo"
"Working" = "Trabajando"
-"XPRESS 16K" = "XPRESS 16K" # LOC:TODO
-"XPRESS 4K" = "XPRESS 4K" # LOC:TODO
-"XPRESS 8K" = "XPRESS 8K" # LOC:TODO
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
"Yes" = "Sí"
"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Actualmente tiene {0} carpetas siendo monitorizadas. Cerrar CompactGUI detendrá su monitorización.{1}{1}¿Está seguro de que desea salir?"
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
-"can be saved" = "can be saved" # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "Tu configuración se ha restablecido a los valores predeterminados para adaptarse a la actualización."
+"Your settings have been reset to their default." = "Tu configuración se ha restablecido a los valores predeterminados."
+"can be saved" = "se puede ahorrar"
"contained files" = "archivos contenidos"
"day(s)" = "día(s)"
"edit" = "editar"
"edit skipped filetypes" = "editar tipos de archivo omitidos"
-"estimated savings" = "estimated savings" # LOC:TODO
+"estimated savings" = "ahorro estimado"
"every" = "cada"
-"games" = "games" # LOC:TODO
-"item" = "item" # LOC:TODO
-"items" = "items" # LOC:TODO
+"games" = "juegos"
"just now" = "ahora mismo"
"last compressed:" = "última compresión:"
"last modified:" = "última modificación:"
-"recommended" = "recommended" # LOC:TODO
-"saved" = "saved" # LOC:TODO
+"recommended" = "recomendado"
+"saved" = "ahorrado"
"select a folder" = "seleccionar carpeta"
"uncompressed size" = "tamaño sin comprimir"
"{0:0} days ago" = "{0:0} hace días"
@@ -196,10 +191,10 @@
"{0}% decayed" = "{0}% degradado"
[context."Background Scheduler"]
-"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI is running a scheduled task and will compress monitored folders in the background" # LOC:TODO
-"Next scheduled task is on {0}" = "Next scheduled task is on {0}" # LOC:TODO
-"Scheduled Compression Completed" = "Scheduled Compression Completed" # LOC:TODO
-"Scheduled Compression Running" = "Scheduled Compression Running" # LOC:TODO
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI está ejecutando una tarea programada y comprimirá las carpetas supervisadas en segundo plano"
+"Next scheduled task is on {0}" = "La próxima tarea programada es el {0}"
+"Scheduled Compression Completed" = "Compresión programada completada"
+"Scheduled Compression Running" = "Compresión programada de la compresión"
[context."Compression estimate"]
"unknown" = "desconocido"
@@ -209,22 +204,22 @@
"Before" = "Antes"
[context."File size"]
-"B" = "B" # LOC:TODO
-"EB" = "EB" # LOC:TODO
-"GB" = "GB" # LOC:TODO
-"KB" = "KB" # LOC:TODO
-"MB" = "MB" # LOC:TODO
-"PB" = "PB" # LOC:TODO
-"TB" = "TB" # LOC:TODO
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "COMPLETADO"
+"Clear completed" = "Borrar completado"
+"Expected savings" = "Ahorro esperado"
+"PENDING" = "PENDIENTE"
+"Queue" = "Cola"
+"To process" = "Para procesar"
+"{0} of {1} completed" = "{0} de {1} completado"
[context."Folder status"]
"Unknown" = "Desconocido"
@@ -244,14 +239,14 @@
"Save" = "Ahorrar"
[context."Steam Library Compression Mode Button"]
-"Compress | {0}" = "Compress | {0}" # LOC:TODO
+"Compress | {0}" = "Comprimir | {0}"
[context."Steam Library Tab Headings"]
-"CURRENT SIZE" = "CURRENT SIZE" # LOC:TODO
-"GAME" = "GAME" # LOC:TODO
-"RECOMMENDED ACTION" = "RECOMMENDED ACTION" # LOC:TODO
-"SAVINGS" = "SAVINGS" # LOC:TODO
-"STATUS" = "STATUS" # LOC:TODO
+"CURRENT SIZE" = "TAMAÑO ACTUAL"
+"GAME" = "JUEGO"
+"RECOMMENDED ACTION" = "ACCIÓN RECOMENDADA"
+"SAVINGS" = "AHORRADOS"
+"STATUS" = "ESTADO"
[context."Storage savings"]
"saved" = "ahorrado"
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index eda2ac95..6534c373 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -5,7 +5,7 @@ version = 1
file = "en-AU.toml"
[locales."es-ES"]
-version = 1
+version = 2
file = "es-ES.toml"
[locales."ko-KR"]
From 7cd75c99ca73eb0248d2720c30bafd8b8f52cb74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?MC=E9=A3=8E=E6=9C=88=E6=97=A0=E8=BE=B9?=
Date: Wed, 23 Sep 2026 11:19:23 +0800
Subject: [PATCH 126/134] Update Chinese(Simplified) translation to match
version 4.0 beta 12 (#676)
* Add link to Bahasa Indonesia README
* Fix formatting in Chinese README links
* update README_cn
* Update Chinese(Simplified) translation to match version 4.0 beta 12
---
.../Resources/Localisation/manifest.toml | 2 +-
CompactGUI/Resources/Localisation/zh-CN.toml | 19 ++++++++-----------
README/README_cn.md | 12 ++++++++----
3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 6534c373..f7b5cdb6 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -17,7 +17,7 @@ version = 1
file = "ru-RU.toml"
[locales."zh-CN"]
-version = 1
+version = 2
file = "zh-CN.toml"
[locales."it-IT"]
diff --git a/CompactGUI/Resources/Localisation/zh-CN.toml b/CompactGUI/Resources/Localisation/zh-CN.toml
index 6e69a14d..787bb3f7 100644
--- a/CompactGUI/Resources/Localisation/zh-CN.toml
+++ b/CompactGUI/Resources/Localisation/zh-CN.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.12
# ===================
@@ -51,7 +51,7 @@
"Descending" = "递减"
"Deselect all" = "取消全选"
"Direct Storage" = "Direct Storage"
-"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
+"Disk space is low. Retrying affected files sequentially." = "磁盘空间不足。正在依次重试受影响的文件。"
"Do Not Compress" = "无需压缩"
"Do not compress" = "无需压缩"
"Drive unavailable" = "驱动器不可用"
@@ -73,8 +73,8 @@
"Games" = "个游戏"
"Go to Database Results" = "查看数据库结果"
"HDDs only use 1 thread" = "机械硬盘仅使用 1 个线程"
-"Hide Compression DB Tab" = "Hide Compression DB Tab" # LOC:TODO
-"Hide Steam Library Tab" = "Hide Steam Library Tab" # LOC:TODO
+"Hide Compression DB Tab" = "隐藏压缩数据库标签页"
+"Hide Steam Library Tab" = "隐藏 Steam 库标签页"
"Home" = "主页"
"Include global skiplist" = "使用全局跳过列表"
"Include global skipped file types" = "使用全局跳过的文件类型"
@@ -142,7 +142,7 @@
"Success" = "成功"
"System Integration" = "系统集成"
"The SnackbarPresenter was never set" = "SnackbarPresenter 从未被设置"
-"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留出此文件夹中最大文件的 2 倍大小的可用空间以确保 Windows 不会出现问题。"
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "此游戏使用 DirectStorage 技术。如果你正在使用此功能,则不应压缩此游戏。"
"Total Results" = "结果总数"
"UI Settings" = "UI 设置"
@@ -180,13 +180,13 @@
"estimated savings" = "预估节省"
"every" = "每"
"games" = "个游戏"
-"item" = "item" # LOC:TODO
-"items" = "items" # LOC:TODO
+"item" = "个项目"
+"items" = "个项目"
"just now" = "刚刚"
"last compressed:" = "上次压缩:"
"last modified:" = "上次修改:"
"recommended" = "推荐"
-"saved" = "已节省"
+"saved" = "可节省"
"select a folder" = "选择文件夹"
"uncompressed size" = "未压缩大小"
"{0:0} days ago" = "{0:0} 天前"
@@ -255,6 +255,3 @@
[context."Storage savings"]
"saved" = "已节省"
-
-[obsolete]
-"There is not enough free space on this drive to safely compress this folder. You need at least 50% of this folder's size free to ensure Windows does not cause issues." = "驱动器的可用空间不足以安全压缩此文件夹。你需要至少预留相当于此文件夹大小的 50% 的可用空间以确保 Windows 不会出现问题。"
diff --git a/README/README_cn.md b/README/README_cn.md
index 9c201c2e..79932122 100644
--- a/README/README_cn.md
+++ b/README/README_cn.md
@@ -2,12 +2,14 @@
From 98af86cf970eaa422fc07874d41cef1562a4c13c Mon Sep 17 00:00:00 2001
From: Iridium IO
Date: Wed, 23 Sep 2026 13:20:39 +1000
Subject: [PATCH 127/134] Update version number in Spanish localization file
---
CompactGUI/Resources/Localisation/es-ES.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CompactGUI/Resources/Localisation/es-ES.toml b/CompactGUI/Resources/Localisation/es-ES.toml
index 71bfa0c1..3f8c0a14 100644
--- a/CompactGUI/Resources/Localisation/es-ES.toml
+++ b/CompactGUI/Resources/Localisation/es-ES.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.12
# ===================
From 1a86910ba339c752b22d8d2c22bcefc80140e741 Mon Sep 17 00:00:00 2001
From: DosX
Date: Sun, 27 Sep 2026 07:36:47 +0300
Subject: [PATCH 128/134] Match protected folders at path boundaries (#679)
VerifyFolder previously treated a sibling such as C:\WindowsBackup as part of C:\Windows, and OneDrive - Personal Backup as part of OneDrive - Personal. Compare the complete directory name or its separator-delimited descendants instead. Add regression cases for both kinds of path.
---
CompactGUI.Core/SharedMethods.cs | 16 +++++++++++-----
CompactGUI.Tests/PathVerificationTests.cs | 17 +++++++++++++++++
2 files changed, 28 insertions(+), 5 deletions(-)
create mode 100644 CompactGUI.Tests/PathVerificationTests.cs
diff --git a/CompactGUI.Core/SharedMethods.cs b/CompactGUI.Core/SharedMethods.cs
index 8bf5fc63..6ebf1176 100644
--- a/CompactGUI.Core/SharedMethods.cs
+++ b/CompactGUI.Core/SharedMethods.cs
@@ -30,7 +30,7 @@ public static FolderVerificationResult VerifyFolder(string folder)
if (!Directory.Exists(folder))
return FolderVerificationResult.DirectoryDoesNotExist;
- else if (folder.ToLowerInvariant().Contains(Environment.GetFolderPath(Environment.SpecialFolder.Windows).ToLowerInvariant()))
+ else if (IsPathWithinDirectory(folder, Environment.GetFolderPath(Environment.SpecialFolder.Windows)))
return FolderVerificationResult.SystemDirectory;
else if (folder.EndsWith(":\\"))
return FolderVerificationResult.RootDirectory;
@@ -67,6 +67,15 @@ private static string NormalizeLocalDrivePath(string folder)
return char.ToUpperInvariant(folder[0]) + folder[1..];
}
+ internal static bool IsPathWithinDirectory(string path, string directory)
+ {
+ string normalizedPath = Path.GetFullPath(path).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ string normalizedDirectory = Path.GetFullPath(directory).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+
+ return normalizedPath.Equals(normalizedDirectory, StringComparison.OrdinalIgnoreCase)
+ || normalizedPath.StartsWith(normalizedDirectory + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
+ }
+
private static bool IsSupportedLocalNtfsDrive(string folder)
{
var drive = DriveInfo.GetDrives().FirstOrDefault(f => folder.StartsWith(f.Name, StringComparison.OrdinalIgnoreCase));
@@ -115,10 +124,7 @@ static bool IsOneDriveFolder(string folderPath)
Path.Combine(userProfile, "OneDrive - Business") // Alternative OneDrive for Business
};
- string normalizedFolderPath = Path.GetFullPath(folderPath).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar).ToLowerInvariant();
-
- return oneDrivePaths.Any(oneDrivePath =>
- normalizedFolderPath.StartsWith(Path.GetFullPath(oneDrivePath).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar).ToLowerInvariant()));
+ return oneDrivePaths.Any(oneDrivePath => IsPathWithinDirectory(folderPath, oneDrivePath));
}
diff --git a/CompactGUI.Tests/PathVerificationTests.cs b/CompactGUI.Tests/PathVerificationTests.cs
new file mode 100644
index 00000000..c70c5297
--- /dev/null
+++ b/CompactGUI.Tests/PathVerificationTests.cs
@@ -0,0 +1,17 @@
+using CompactGUI.Core;
+
+namespace CompactGUI.Tests;
+
+public class PathVerificationTests
+{
+ [Theory]
+ [InlineData(@"C:\Windows", @"C:\Windows", true)]
+ [InlineData(@"C:\Windows\System32", @"C:\Windows", true)]
+ [InlineData(@"C:\WindowsBackup", @"C:\Windows", false)]
+ [InlineData(@"C:\Users\Sam\OneDrive - Personal\Games", @"C:\Users\Sam\OneDrive - Personal", true)]
+ [InlineData(@"C:\Users\Sam\OneDrive - Personal Backup", @"C:\Users\Sam\OneDrive - Personal", false)]
+ public void DirectoryMatchRequiresPathBoundary(string path, string directory, bool expected)
+ {
+ Assert.Equal(expected, SharedMethods.IsPathWithinDirectory(path, directory));
+ }
+}
From b0585a65384b7407c21e2e5c448817b291f8e297 Mon Sep 17 00:00:00 2001
From: yesidodo73 <115897183+yesidodo73@users.noreply.github.com>
Date: Fri, 2 Oct 2026 16:34:01 +0900
Subject: [PATCH 129/134] Update Korean localization for 4.0 beta 12 (#684)
---
CompactGUI/Resources/Localisation/ko-KR.toml | 144 +++++++++---------
.../Resources/Localisation/manifest.toml | 2 +-
2 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/ko-KR.toml b/CompactGUI/Resources/Localisation/ko-KR.toml
index e2a6af53..b7811bc6 100644
--- a/CompactGUI/Resources/Localisation/ko-KR.toml
+++ b/CompactGUI/Resources/Localisation/ko-KR.toml
@@ -1,42 +1,42 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.12
# ===================
# Translations
-"Add" = "추가하기"
-"Add a custom folder to the watchlist" = "모니터링 리스트에 커스텀 폴더 추가"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
+"Add" = "추가"
+"Add a custom folder to the watchlist" = "모니터링할 폴더 추가"
+"Add selected to queue" = "선택한 항목을 대기열에 추가"
"Add to Compression Queue" = "압축 대기열에 추가"
"Add to compression queue" = "압축 대기열에 추가"
"Add to right-click context menu" = "우클릭 메뉴에 추가"
"Add to start menu" = "시작 메뉴에 추가"
"Added to Queue" = "대기열에 추가되었습니다"
"Admin" = "관리자"
-"Aggression of online skiplist" = "온라인 제외 리스트 적용 강도"
-"Always show details on Compression Mode buttons" = "압축 모드 버튼에 세부 정보 항상 표시"
+"Aggression of online skiplist" = "온라인 제외 목록 적용 강도"
+"Always show details on Compression Mode buttons" = "압축 방식 버튼에 세부 정보 항상 표시"
"Analysing" = "분석 중"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "분석 중..."
"Applied to all folders" = "모든 폴더에 적용되었습니다"
"Ascending" = "오름차순"
"Awaiting Compression" = "압축 대기 중"
"Background Watcher Settings" = "백그라운드 모니터링 설정"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
+"COMPARE METHODS" = "압축 방식 비교"
+"COMPRESSION MODE " = "압축 방식"
"Cancel" = "취소"
"Cancel Background Compressor" = "백그라운드 압축 취소"
"Cancel operation" = "작업 취소"
"Cannot remove folder" = "폴더를 대기열에서 제거할 수 없습니다"
"Check for pre-release updates" = "프리릴리스 업데이트까지 확인"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
-"Click to download" = "클릭해서 다운로드"
+"Choose Compression" = "압축 방식 선택"
+"Clear filters" = "필터 초기화"
+"Click to download" = "클릭하여 다운로드"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "완료"
+"Compress" = "압축"
"Compress Again" = "재압축"
-"Compress All Now" = "전부 압축"
+"Compress All Now" = "지금 모두 압축"
"Compress Selected" = "선택한 폴더 압축"
"Compress folders: " = "폴더 압축 시점: "
"Compressed" = "압축됨"
@@ -49,43 +49,43 @@
"Current Size" = "현재 크기"
"Database Results" = "압축 데이터 목록"
"Descending" = "내림차순"
-"Deselect all" = "Deselect all" # LOC:TODO
+"Deselect all" = "전체 선택 해제"
"Direct Storage" = "DirectStorage"
-"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
+"Disk space is low. Retrying affected files sequentially." = "디스크 여유 공간이 부족합니다. 영향을 받은 파일을 순차적으로 다시 처리하는 중입니다."
+"Do Not Compress" = "압축하지 않기"
"Do not compress" = "압축하지 않기"
"Drive unavailable" = "드라이브 사용 불가"
-"Edit list" = "Edit list" # LOC:TODO
-"Estimate Compression for non-Steam Folders (beta)" = "Steam 외의 폴더도 압축량 추정 (베타)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Edit list" = "목록 편집"
+"Estimate Compression for non-Steam Folders (beta)" = "Steam 외 폴더의 압축률 추정 (베타)"
+"Estimated Size" = "예상 크기"
"Estimated size" = "예상 크기"
"Exit" = "종료"
"Extensions in this folder" = "이 폴더의 파일 확장자"
-"Failed" = "Failed" # LOC:TODO
+"Failed" = "실패"
"Failed to submit to wiki" = "위키 제출에 실패했습니다"
"Filetype Management" = "파일 확장자 관리"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
-"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam 게임은 데이터베이스를, 그 외 폴더는 분석 결과를 바탕으로 제외할 파일 형식을 자동으로 정합니다."
-"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "다른 사용자들이 제출한 정보를 바탕으로 파일 형식을 얼마나 적극적으로 제외할지 설정합니다.\n\n일반적으로는 '약하게'가 적합하며, 더 강하게 설정하면 압축이 잘 되는 파일까지 제외할 수 있습니다.\n\nSteam 게임에서만 적용됩니다."
+"Filter" = "필터"
+"Finishing {0} active file operations; do not power off." = "진행 중인 파일 작업 {0}개를 마무리하는 중입니다. 컴퓨터 전원을 종료하지 마세요."
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam 게임은 데이터베이스를, Steam 외 폴더는 자동 분석 결과를 바탕으로 제외할 파일 형식을 정합니다."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Steam 게임에서만 적용됩니다.\\n사용자가 제출한 데이터를 바탕으로 파일 형식을 제외할 때, 각 파일 형식을 제외 대상으로 판단하는 데 필요한 제출 수를 설정합니다.\\n\\n일반적으로는 '약하게'가 적합하며, 강도를 높이면 압축이 잘 되는 파일까지 제외될 수 있습니다."
"Game" = "게임"
"Game Name" = "게임 이름"
"Games" = "개"
"Go to Database Results" = "압축 데이터 목록으로 이동"
"HDDs only use 1 thread" = "하드 디스크일 경우 하나의 스레드만 사용"
-"Hide Compression DB Tab" = "Hide Compression DB Tab" # LOC:TODO
-"Hide Steam Library Tab" = "Hide Steam Library Tab" # LOC:TODO
+"Hide Compression DB Tab" = "압축 데이터베이스 탭 숨기기"
+"Hide Steam Library Tab" = "Steam 라이브러리 탭 숨기기"
"Home" = "홈"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
+"Include global skiplist" = "공통 제외 목록 포함"
"Include global skipped file types" = "공통으로 제외할 파일 형식 포함"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
+"Include smart skiplist" = "자동 제외 목록 포함"
"Include smart skipped file types" = "자동으로 제외할 파일 형식 포함"
"Insufficient permission to access this folder" = "이 폴더에 접근할 권한이 부족합니다"
"LZX" = "LZX"
"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "마지막 확인: {0:yyyy년 M월 d일 HH:mm:ss}"
"Last analysed {0}" = "마지막 분석 시점: {0}"
"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "마지막 실행 시점: {0:yyyy년 M월 d일 HH:mm:ss}"
-"Library location" = "Library location" # LOC:TODO
+"Library location" = "라이브러리 위치"
"Manage local skipped filetypes" = "압축하지 않을 파일 확장자 관리"
"Max Savings" = "최대 절감률"
"Maximum Compression Threads" = "최대 압축 스레드 수"
@@ -93,47 +93,47 @@
"Monitor compressed folders for changes" = "압축된 폴더에 변경 사항이 있는지 모니터링"
"Never" = "사용 안 함"
"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "다음 예약 시점: {0:yyyy년 M월 d일 HH:mm:ss}"
-"No installed Steam games were found." = "설치된 Steam 게임을 발견하지 못했습니다."
+"No installed Steam games were found." = "설치된 Steam 게임을 찾을 수 없습니다."
"No wiki data" = "위키 데이터 없음"
"Not Compressed" = "압축되지 않음"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "여유 공간 부족"
"On Schedule" = "예약한 시점에 수행"
-"On Schedule if system is also idle" = "예약한 시점인 동시에 시스템이 유휴 상태일 때 수행"
+"On Schedule if system is also idle" = "예약 시점에 시스템이 유휴 상태인 경우에만 수행"
"Open" = "열기"
"Open Settings Folder" = "설정 폴더 열기"
"Operation cancelled." = "작업이 취소되었습니다."
"Operation failed: {0}" = "작업에 실패했습니다: {0}"
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
-"Please check your internet connection and try again" = "인터넷 연결을 확인한 후 다시 시도해주세요"
-"Please wait until the current operation is finished" = "현재 작업이 완료되기 전까지 기다려 주세요"
-"Preparing" = "Preparing" # LOC:TODO
+"Original Size" = "압축 전 크기"
+"Paused" = "일시 중지됨"
+"Please check your internet connection and try again" = "인터넷 연결을 확인한 후 다시 시도해 주세요"
+"Please wait until the current operation is finished" = "현재 작업이 완료될 때까지 기다려 주세요"
+"Preparing" = "준비 중"
"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "디스크에 쓰지 않고 파일을 빠르게 분석하여 압축률을 추정합니다. 하드 디스크를 사용하는 경우 매우 느려질 수 있습니다."
"Re-analyse all watched folders" = "모니터링 중인 모든 폴더 재분석"
"Re-analyse this folder" = "이 폴더 재분석"
"Recently Updated" = "최근 업데이트됨"
-"Recommended Action" = "Recommended Action" # LOC:TODO
+"Recommended Action" = "권장 작업"
"Reload Languages.\nChecks online for updated language definitions" = "언어 새로고침\n온라인에서 업데이트된 번역 파일을 확인합니다"
"Reload Steam Library list" = "Steam 라이브러리 목록 새로고침"
-"Remove from Watchlist" = "모니터링 리스트에서 제거"
+"Remove from Watchlist" = "모니터링 목록에서 제거"
"Reset" = "초기화"
"Restart as Admin" = "관리자 권한으로 재시작"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "대기열 표시"
+"SKIPLIST SELECTION" = "제외 목록 선택"
+"Saved" = "절약됨"
"Savings" = "절감률"
"Scanning installed Steam games..." = "설치된 Steam 게임 스캔 중..."
"Search by game name or SteamID..." = "게임 이름 또는 Steam ID로 검색..."
-"Select" = "Select" # LOC:TODO
+"Select" = "선택"
"Select a folder to compress" = "압축할 폴더 선택"
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select all" = "전체 선택"
+"Select all compressable" = "압축 가능한 게임 모두 선택"
+"Select all visible games" = "표시된 게임 모두 선택"
"Settings" = "설정"
"Show notification on completion" = "완료 시 알림"
-"Sort" = "Sort" # LOC:TODO
+"Sort" = "정렬"
"Sort By" = "정렬 기준"
-"Start CompactGUI in system tray" = "CompactGUI를 시스템 트레이에서 시작"
+"Start CompactGUI in system tray" = "CompactGUI를 시스템 트레이로 시작"
"Status" = "상태"
"Steam Library" = "Steam 라이브러리"
"SteamID" = "Steam ID"
@@ -142,7 +142,7 @@
"Success" = "성공"
"System Integration" = "시스템 연동"
"The SnackbarPresenter was never set" = "SnackbarPresenter가 설정되어 있지 않습니다"
-"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "이 폴더를 안전하게 압축할 수 있을 만큼 드라이브 여유 공간이 충분하지 않습니다. Windows에서 문제가 발생하지 않도록 이 폴더에서 가장 큰 항목 크기의 2배 이상의 여유 공간이 필요합니다."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "이 게임은 DirectStorage 기술을 사용합니다. 이 기능을 사용 중이라면 이 게임을 압축하지 않는 것이 좋습니다."
"Total Results" = "제출된 결과 수"
"UI Settings" = "UI 설정"
@@ -152,15 +152,15 @@
"Uncompressing..." = "압축 해제 중..."
"Unknown" = "알 수 없음"
"Update Available" = "업데이트 가능"
-"Update Available ▸ Version {0}" = "업데이트가 가능합니다 ▸ 버전: {0}"
+"Update Available ▸ Version {0}" = "업데이트 가능 ▸ 버전 {0}"
"Update Settings" = "업데이트 설정"
"Update in Steam" = "Steam에서 업데이트"
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Use exclusions" = "제외 목록 사용"
+"Use recommended mode" = "권장 압축 방식 사용"
"Version" = "버전"
-"Waiting" = "Waiting" # LOC:TODO
+"Waiting" = "대기 중"
"Watch folder for changes" = "폴더 변경 사항 모니터링"
-"Watched Folders" = "모니터링 리스트"
+"Watched Folders" = "모니터링 중인 폴더"
"Watcher" = "모니터링"
"WatcherPage" = "모니터링 페이지"
"When System is Idle" = "시스템이 유휴 상태일 때 수행"
@@ -170,24 +170,24 @@
"XPRESS 8K" = "XPRESS 8K"
"Yes" = "예"
"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "{0}개의 모니터링 중인 폴더가 있습니다. CompactGUI를 종료하면 모니터링이 중단됩니다.{1}{1}정말 종료할까요?"
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "업데이트 적용을 위해 설정이 기본값으로 초기화되었습니다."
+"Your settings have been reset to their default." = "설정이 기본값으로 초기화되었습니다."
"can be saved" = "절약 가능"
"contained files" = "파일 수"
"day(s)" = "일"
"edit" = "편집"
-"edit skipped filetypes" = "압축에서 제외할 파일 확장자"
-"estimated savings" = "estimated savings" # LOC:TODO
+"edit skipped filetypes" = "제외할 파일 확장자 편집"
+"estimated savings" = "예상 절감량"
"every" = "매"
"games" = "개"
-"item" = "item" # LOC:TODO
-"items" = "items" # LOC:TODO
+"item" = "개"
+"items" = "개"
"just now" = "방금 전"
"last compressed:" = "마지막 압축:"
"last modified:" = "마지막 수정:"
-"recommended" = "recommended" # LOC:TODO
-"saved" = "saved" # LOC:TODO
-"select a folder" = "폴더를 선택하세요"
+"recommended" = "권장"
+"saved" = "절약됨"
+"select a folder" = "폴더 선택"
"uncompressed size" = "압축 전 크기"
"{0:0} days ago" = "{0:0}일 전"
"{0:0} hours ago" = "{0:0}시간 전"
@@ -218,13 +218,13 @@
"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "완료"
+"Clear completed" = "완료 항목 제거"
+"Expected savings" = "예상 절감량"
+"PENDING" = "대기 중"
+"Queue" = "대기열"
+"To process" = "처리할 용량"
+"{0} of {1} completed" = "{1}개 중 {0}개 완료"
[context."Folder status"]
"Unknown" = "알 수 없음"
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index f7b5cdb6..973504ab 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -9,7 +9,7 @@ version = 2
file = "es-ES.toml"
[locales."ko-KR"]
-version = 1
+version = 2
file = "ko-KR.toml"
[locales."ru-RU"]
From 5522c8ad9ece20ad7a56e7d5127496625afafb56 Mon Sep 17 00:00:00 2001
From: DosX
Date: Fri, 2 Oct 2026 10:36:43 +0300
Subject: [PATCH 130/134] Keep watcher autostart in sync with watched folders
(#682)
Update the Run entry after watched-folder changes are saved, creating the key when needed and treating registry failures as non-fatal. Quote the executable path so installations under paths with spaces launch correctly. Extend the registry-backed test to cover missing keys, access-denied writes, and list transitions.
---
CompactGUI.Tests/CompactGUI.Tests.csproj | 1 +
CompactGUI.Tests/WatcherAutostartTests.cs | 44 ++++++++++++++++++++
CompactGUI.Watcher/CompactGUI.Watcher.vbproj | 4 ++
CompactGUI.Watcher/Watcher.vb | 34 ++++++++++++---
4 files changed, 77 insertions(+), 6 deletions(-)
create mode 100644 CompactGUI.Tests/WatcherAutostartTests.cs
diff --git a/CompactGUI.Tests/CompactGUI.Tests.csproj b/CompactGUI.Tests/CompactGUI.Tests.csproj
index 1a1ad968..f4aac735 100644
--- a/CompactGUI.Tests/CompactGUI.Tests.csproj
+++ b/CompactGUI.Tests/CompactGUI.Tests.csproj
@@ -21,6 +21,7 @@
+
diff --git a/CompactGUI.Tests/WatcherAutostartTests.cs b/CompactGUI.Tests/WatcherAutostartTests.cs
new file mode 100644
index 00000000..0b2dac38
--- /dev/null
+++ b/CompactGUI.Tests/WatcherAutostartTests.cs
@@ -0,0 +1,44 @@
+using Microsoft.Win32;
+
+namespace CompactGUI.Tests;
+
+public class WatcherAutostartTests
+{
+ [Fact]
+ public void RunEntryFollowsWatchedFolderCountAndQuotesExecutablePath()
+ {
+ var subkeyPath = $@"Software\CompactGUI.WatcherTests.{Guid.NewGuid():N}";
+ try
+ {
+ using var testRoot = Registry.CurrentUser.CreateSubKey(subkeyPath);
+ Assert.NotNull(testRoot);
+ const string executablePath = @"C:\Program Files\CompactGUI\CompactGUI.exe";
+
+ Assert.True(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(testRoot, "Run", 0, executablePath));
+ Assert.Null(testRoot.OpenSubKey("Run"));
+
+ Assert.True(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(testRoot, "Run", 1, executablePath));
+ using var testKey = testRoot.OpenSubKey("Run");
+ Assert.NotNull(testKey);
+ Assert.Equal(@"""C:\Program Files\CompactGUI\CompactGUI.exe"" -tray", testKey.GetValue("CompactGUI"));
+
+ Assert.True(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(testRoot, "Run", 2, executablePath));
+ Assert.Equal(@"""C:\Program Files\CompactGUI\CompactGUI.exe"" -tray", testKey.GetValue("CompactGUI"));
+
+ Assert.True(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(testRoot, "Run", 1, executablePath));
+ Assert.Equal(@"""C:\Program Files\CompactGUI\CompactGUI.exe"" -tray", testKey.GetValue("CompactGUI"));
+
+ Assert.True(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(testRoot, "Run", 0, executablePath));
+ Assert.Null(testKey.GetValue("CompactGUI"));
+
+ using var readOnlyRoot = Registry.CurrentUser.OpenSubKey(subkeyPath, writable: false);
+ Assert.NotNull(readOnlyRoot);
+ Assert.False(CompactGUI.Watcher.Watcher.UpdateRegistryBasedOnWatchedFolders(readOnlyRoot, "Denied", 1, executablePath));
+ Assert.Null(testRoot.OpenSubKey("Denied"));
+ }
+ finally
+ {
+ Registry.CurrentUser.DeleteSubKeyTree(subkeyPath, throwOnMissingSubKey: false);
+ }
+ }
+}
diff --git a/CompactGUI.Watcher/CompactGUI.Watcher.vbproj b/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
index f55d1b27..04e44528 100644
--- a/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
+++ b/CompactGUI.Watcher/CompactGUI.Watcher.vbproj
@@ -20,4 +20,8 @@
+
+
+
+
diff --git a/CompactGUI.Watcher/Watcher.vb b/CompactGUI.Watcher/Watcher.vb
index e9bdb256..27d20480 100644
--- a/CompactGUI.Watcher/Watcher.vb
+++ b/CompactGUI.Watcher/Watcher.vb
@@ -211,15 +211,35 @@ Partial Public Class Watcher : Inherits ObservableRecipient : Implements IRecipi
End Function
Private Sub UpdateRegistryBasedOnWatchedFolders()
- Dim registryKey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
-
- If WatchedFolders.Count > 0 Then
- registryKey.SetValue("CompactGUI", Environment.ProcessPath & " -tray")
- Else
- registryKey.DeleteValue("CompactGUI", False)
+ 'Autostart is best-effort; registry access should not break folder management.
+ If Not UpdateRegistryBasedOnWatchedFolders(Registry.CurrentUser, "Software\Microsoft\Windows\CurrentVersion\Run", WatchedFolders.Count, Environment.ProcessPath) Then
+ _logger.LogWarning("Could not update CompactGUI watcher autostart.")
End If
End Sub
+ Friend Shared Function UpdateRegistryBasedOnWatchedFolders(rootKey As RegistryKey, subKeyPath As String, watchedFolderCount As Integer, processPath As String) As Boolean
+ Try
+ 'Don't create the Run key just to remove an entry that may not exist.
+ Dim registryKey = If(watchedFolderCount > 0,
+ rootKey.CreateSubKey(subKeyPath),
+ rootKey.OpenSubKey(subKeyPath, True))
+ If registryKey Is Nothing Then Return watchedFolderCount = 0
+
+ Using registryKey
+ If watchedFolderCount > 0 Then
+ registryKey.SetValue("CompactGUI", """" & processPath & """" & " -tray")
+ Else
+ registryKey.DeleteValue("CompactGUI", False)
+ End If
+ End Using
+ Return True
+ Catch ex As Exception When TypeOf ex Is UnauthorizedAccessException OrElse
+ TypeOf ex Is Security.SecurityException OrElse
+ TypeOf ex Is IO.IOException
+ Return False
+ End Try
+ End Function
+
Public Sub AddOrUpdateWatched(item As WatchedFolder, Optional immediateFlushToDisk As Boolean = True)
@@ -232,6 +252,7 @@ Partial Public Class Watcher : Inherits ObservableRecipient : Implements IRecipi
End If
OnPropertyChanged(NameOf(TotalSaved))
If immediateFlushToDisk Then WriteToFile()
+ If existingItem Is Nothing Then UpdateRegistryBasedOnWatchedFolders()
End Sub
@@ -287,6 +308,7 @@ Partial Public Class Watcher : Inherits ObservableRecipient : Implements IRecipi
item.Dispose()
WatchedFolders.Remove(item)
If writeToFile Then Await WriteToFileAsync()
+ UpdateRegistryBasedOnWatchedFolders()
End Function
From e6e68d4014bcc6b2760d74f72e9986cf8f8f3fdc Mon Sep 17 00:00:00 2001
From: DosX
Date: Fri, 2 Oct 2026 10:37:22 +0300
Subject: [PATCH 131/134] Preserve results cache when database updates fail
(#681)
Download database updates to a temporary file and validate the JSON before replacing databasev2.json. A truncated transfer or invalid response now leaves the existing cache available instead of corrupting or deleting it.
---
CompactGUI/Services/WikiService.vb | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/CompactGUI/Services/WikiService.vb b/CompactGUI/Services/WikiService.vb
index 78f6cefa..b5e26b37 100644
--- a/CompactGUI/Services/WikiService.vb
+++ b/CompactGUI/Services/WikiService.vb
@@ -40,19 +40,25 @@ Public Class WikiService : Implements IWikiService
Return
End If
- Using httpClient As New HttpClient()
- Using responseStream = Await httpClient.GetStreamAsync(dlPath).ConfigureAwait(False)
- Using fs As New IO.FileStream(JSONFile.FullName, IO.FileMode.Create)
- Await responseStream.CopyToAsync(fs).ConfigureAwait(False)
+ Dim tempPath = JSONFile.FullName & "." & Guid.NewGuid().ToString("N") & ".tmp"
+ Try
+ Using httpClient As New HttpClient()
+ Using responseStream = Await httpClient.GetStreamAsync(dlPath).ConfigureAwait(False)
+ Using fs As New IO.FileStream(tempPath, IO.FileMode.CreateNew)
+ Await responseStream.CopyToAsync(fs).ConfigureAwait(False)
+ End Using
End Using
End Using
- End Using
- If Not Await IsDatabaseJsonValidAsync(JSONFile.FullName).ConfigureAwait(False) Then
- Debug.WriteLine("Downloaded database JSON is invalid.")
- IO.File.Delete(JSONFile.FullName)
- Return
- End If
+ If Not Await IsDatabaseJsonValidAsync(tempPath).ConfigureAwait(False) Then
+ Debug.WriteLine("Downloaded database JSON is invalid.")
+ Return
+ End If
+
+ IO.File.Move(tempPath, JSONFile.FullName, True)
+ Finally
+ If IO.File.Exists(tempPath) Then IO.File.Delete(tempPath)
+ End Try
_settingsService.AppSettings.ResultsDBLastUpdated = DateTime.Now
_settingsService.SaveSettings()
From 1e207929ac95e757673f8de7ef5f8e0b0b3a925c Mon Sep 17 00:00:00 2001
From: Magnetar Man <40738529+Magnetarman@users.noreply.github.com>
Date: Wed, 14 Oct 2026 01:54:20 +0200
Subject: [PATCH 132/134] Update Italian localization for 4.0 beta 12 (#686)
* Update it-IT.toml
* Update it-IT.toml
* Update version number in Italian localisation file
* Update Italian locale version to 2
---------
Co-authored-by: Iridium IO
---
CompactGUI/Resources/Localisation/it-IT.toml | 106 +++++++++---------
.../Resources/Localisation/manifest.toml | 2 +-
2 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/CompactGUI/Resources/Localisation/it-IT.toml b/CompactGUI/Resources/Localisation/it-IT.toml
index 459e5d6c..5a8c68bf 100644
--- a/CompactGUI/Resources/Localisation/it-IT.toml
+++ b/CompactGUI/Resources/Localisation/it-IT.toml
@@ -1,5 +1,5 @@
# CompactGUI Localisation
-# @version 1
+# @version 2
# @programversion 4.0.0-beta.12
# ===================
@@ -7,7 +7,7 @@
"Add" = "Aggiungi"
"Add a custom folder to the watchlist" = "Aggiungi una cartella personalizzata alla lista di monitoraggio"
-"Add selected to queue" = "Add selected to queue" # LOC:TODO
+"Add selected to queue" = "Aggiungi gli elementi selezionati alla coda"
"Add to Compression Queue" = "Aggiungi alla coda di compressione"
"Add to compression queue" = "Aggiungi alla coda di compressione"
"Add to right-click context menu" = "Aggiungi al menu contestuale"
@@ -17,24 +17,24 @@
"Aggression of online skiplist" = "Aggressività della skiplist online"
"Always show details on Compression Mode buttons" = "Mostra sempre dettagli sui pulsanti della modalità di compressione"
"Analysing" = "Analizzando"
-"Analysing..." = "Analysing..." # LOC:TODO
+"Analysing..." = "Analizzando..."
"Applied to all folders" = "Applicato a tutte le cartelle"
"Ascending" = "Crescente"
"Awaiting Compression" = "In attesa di compressione"
"Background Watcher Settings" = "Impostazioni monitoraggio in background"
-"COMPARE METHODS" = "COMPARE METHODS" # LOC:TODO
-"COMPRESSION MODE " = "COMPRESSION MODE " # LOC:TODO
+"COMPARE METHODS" = "CONFRONTA I METODI"
+"COMPRESSION MODE " = "MODALITA DI COMPRESSIONE "
"Cancel" = "Annulla"
"Cancel Background Compressor" = "Annulla compressione in background"
"Cancel operation" = "Annulla operazione"
"Cannot remove folder" = "Impossibile rimuovere la cartella"
"Check for pre-release updates" = "Verifica aggiornamenti pre-release"
-"Choose Compression" = "Choose Compression" # LOC:TODO
-"Clear filters" = "Clear filters" # LOC:TODO
+"Choose Compression" = "Scegli la compressione"
+"Clear filters" = "Cancella i filtri"
"Click to download" = "Clicca per scaricare"
"CompactGUI" = "CompactGUI"
-"Complete" = "Complete" # LOC:TODO
-"Compress" = "Compress" # LOC:TODO
+"Complete" = "Completa"
+"Compress" = "Comprimi"
"Compress Again" = "Comprimi di nuovo"
"Compress All Now" = "Comprimi tutto ora"
"Compress Selected" = "Comprimi selezionati"
@@ -49,23 +49,23 @@
"Current Size" = "Dimensione attuale"
"Database Results" = "Risultati database"
"Descending" = "Decrescente"
-"Deselect all" = "Deselect all" # LOC:TODO
+"Deselect all" = "Deseleziona tutto"
"Direct Storage" = "Direct Storage"
-"Disk space is low. Retrying affected files sequentially." = "Disk space is low. Retrying affected files sequentially." # LOC:TODO
-"Do Not Compress" = "Do Not Compress" # LOC:TODO
+"Disk space is low. Retrying affected files sequentially." = "Spazio su disco insufficiente. Sto elaborando i file interessati in ordine sequenziale."
+"Do Not Compress" = "Non comprimere"
"Do not compress" = "Non comprimere"
"Drive unavailable" = "Unità non disponibile"
-"Edit list" = "Edit list" # LOC:TODO
+"Edit list" = "Modifica elenco"
"Estimate Compression for non-Steam Folders (beta)" = "Stima compressione per cartelle non-Steam (beta)"
-"Estimated Size" = "Estimated Size" # LOC:TODO
+"Estimated Size" = "Dimensioni stimate"
"Estimated size" = "Dimensione stimata"
"Exit" = "Esci"
"Extensions in this folder" = "Estensioni in questa cartella"
-"Failed" = "Failed" # LOC:TODO
+"Failed" = "Non riuscito"
"Failed to submit to wiki" = "Invio al wiki fallito"
"Filetype Management" = "Gestione tipi di file"
-"Filter" = "Filter" # LOC:TODO
-"Finishing {0} active file operations; do not power off." = "Finishing {0} active file operations; do not power off." # LOC:TODO
+"Filter" = "Filtro"
+"Finishing {0} active file operations; do not power off." = "Completando {0} operazioni sui file attive; non spegnere il sistema"
"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Per i giochi Steam, usa il database per determinare i tipi da escludere. Per le cartelle non-Steam si basa sull'analizzatore intelligente."
"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Solo per giochi Steam.\nQuando si sceglie di escludere i tipi di file inviati dagli utenti, questa impostazione determina quanti invii sono necessari per ogni tipo di file per considerarlo da escludere. \n'low' è generalmente la scelta migliore, poiché opzioni più alte comportano il rischio di escludere file che altrimenti si comprimerebbero bene."
"Game" = "Gioco"
@@ -73,19 +73,19 @@
"Games" = "Giochi"
"Go to Database Results" = "Vai al database dei risultati"
"HDDs only use 1 thread" = "Gli HDD usano solo 1 thread"
-"Hide Compression DB Tab" = "Hide Compression DB Tab" # LOC:TODO
-"Hide Steam Library Tab" = "Hide Steam Library Tab" # LOC:TODO
+"Hide Compression DB Tab" = "Nascondi la scheda Compressione DB"
+"Hide Steam Library Tab" = "Nascondi la scheda Libreria di Steam"
"Home" = "Home"
-"Include global skiplist" = "Include global skiplist" # LOC:TODO
+"Include global skiplist" = "Includi skiplist globale"
"Include global skipped file types" = "Includi tutti i tipi di file esclusi globalmente"
-"Include smart skiplist" = "Include smart skiplist" # LOC:TODO
+"Include smart skiplist" = "Includi smart skiplist"
"Include smart skipped file types" = "Includi tipi di file esclusi intelligentemente"
"Insufficient permission to access this folder" = "Permessi insufficienti per accedere a questa cartella"
"LZX" = "LZX"
"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Ultimo aggiornamento: {0:dd MMM yyyy HH:mm:ss}"
"Last analysed {0}" = "Ultima analisi {0}"
"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Ultima esecuzione: {0:dd MMM yyyy} alle {0:HH:mm:ss}"
-"Library location" = "Library location" # LOC:TODO
+"Library location" = "Percorso Libreria"
"Manage local skipped filetypes" = "Gestisci tipi di file esclusi localmente"
"Max Savings" = "Risparmio massimo"
"Maximum Compression Threads" = "Thread massimi di compressione"
@@ -96,42 +96,42 @@
"No installed Steam games were found." = "Nessun gioco Steam installato trovato."
"No wiki data" = "Nessun dato wiki"
"Not Compressed" = "Non compresso"
-"Not enough space" = "Not enough space" # LOC:TODO
+"Not enough space" = "Spazio insufficiente"
"On Schedule" = "Programmato"
"On Schedule if system is also idle" = "Programmato se il sistema è inattivo"
"Open" = "Apri"
"Open Settings Folder" = "Apri cartella impostazioni"
"Operation cancelled." = "Operazione annullata."
"Operation failed: {0}" = "Operazione fallita: {0}"
-"Original Size" = "Original Size" # LOC:TODO
-"Paused" = "Paused" # LOC:TODO
+"Original Size" = "Dimensioni originali"
+"Paused" = "In pausa"
"Please check your internet connection and try again" = "Controlla la connessione internet e riprova"
"Please wait until the current operation is finished" = "Attendi il termine dell'operazione corrente"
-"Preparing" = "Preparing" # LOC:TODO
+"Preparing" = "Preparazione"
"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Analizza rapidamente i file e stima il loro rapporto di compressione senza scrivere su disco. Su HDD sarà molto lento!"
"Re-analyse all watched folders" = "Rianalizza tutte le cartelle monitorate"
"Re-analyse this folder" = "Rianalizza questa cartella"
"Recently Updated" = "Aggiornato di recente"
-"Recommended Action" = "Recommended Action" # LOC:TODO
+"Recommended Action" = "Azione consigliata"
"Reload Languages.\nChecks online for updated language definitions" = "Ricarica lingue.\nControlla online definizioni di lingua aggiornate"
"Reload Steam Library list" = "Ricarica lista libreria Steam"
"Remove from Watchlist" = "Rimuovi dalla lista di monitoraggio"
"Reset" = "Reimposta"
"Restart as Admin" = "Riavvia come Admin"
-"SHOW QUEUE" = "SHOW QUEUE" # LOC:TODO
-"SKIPLIST SELECTION" = "SKIPLIST SELECTION" # LOC:TODO
-"Saved" = "Saved" # LOC:TODO
+"SHOW QUEUE" = "MOSTRA CODA"
+"SKIPLIST SELECTION" = "SELEZIONE DELLA SKIPLIST"
+"Saved" = "Salvato"
"Savings" = "Risparmio"
"Scanning installed Steam games..." = "Scansione giochi Steam installati..."
"Search by game name or SteamID..." = "Cerca per nome gioco o SteamID..."
-"Select" = "Select" # LOC:TODO
+"Select" = "Seleziona"
"Select a folder to compress" = "Seleziona una cartella da comprimere"
-"Select all" = "Select all" # LOC:TODO
-"Select all compressable" = "Select all compressable" # LOC:TODO
-"Select all visible games" = "Select all visible games" # LOC:TODO
+"Select all" = "Seleziona tutto"
+"Select all compressable" = "Seleziona tutti i file comprimibili"
+"Select all visible games" = "Seleziona tutti i giochi visibili"
"Settings" = "Impostazioni"
"Show notification on completion" = "Mostra notifica al completamento"
-"Sort" = "Sort" # LOC:TODO
+"Sort" = "Ordina"
"Sort By" = "Ordina per"
"Start CompactGUI in system tray" = "Avvia CompactGUI nella barra delle applicazioni"
"Status" = "Stato"
@@ -142,7 +142,7 @@
"Success" = "Successo"
"System Integration" = "Integrazione di sistema"
"The SnackbarPresenter was never set" = "The SnackbarPresenter non è stata mai settata"
-"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." # LOC:TODO
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "Lo spazio libero su questa unità non è sufficiente per comprimere questa cartella in modo sicuro. È necessario disporre di almeno il doppio dello spazio occupato dal file più grande presente in questa cartella per garantire che Windows non causi problemi."
"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Questo gioco utilizza la tecnologia DirectStorage. Se utilizzi questa funzione, non dovresti comprimere questo gioco."
"Total Results" = "Risultati totali"
"UI Settings" = "Impostazioni interfaccia"
@@ -155,10 +155,10 @@
"Update Available ▸ Version {0}" = "Aggiornamento disponibile ▸ Versione {0}"
"Update Settings" = "Impostazioni aggiornamento"
"Update in Steam" = "Aggiorna in Steam"
-"Use exclusions" = "Use exclusions" # LOC:TODO
-"Use recommended mode" = "Use recommended mode" # LOC:TODO
+"Use exclusions" = "Utilizza Esclusioni"
+"Use recommended mode" = "Utilizza modalità consigliata"
"Version" = "Versione"
-"Waiting" = "Waiting" # LOC:TODO
+"Waiting" = "In attesa"
"Watch folder for changes" = "Monitora modifiche nella cartella"
"Watched Folders" = "Cartelle monitorate"
"Watcher" = "Monitoraggio"
@@ -170,23 +170,23 @@
"XPRESS 8K" = "XPRESS 8K"
"Yes" = "Sì"
"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Attualmente hai {0} cartelle monitorate. Chiudendo CompactGUI verranno interrotte.{1}{1}Sei sicuro di voler uscire?"
-"Your settings have been reset to their default to accommodate the update" = "Your settings have been reset to their default to accommodate the update" # LOC:TODO
-"Your settings have been reset to their default." = "Your settings have been reset to their default." # LOC:TODO
+"Your settings have been reset to their default to accommodate the update" = "Le impostazioni sono state ripristinate ai valori predefiniti per consentire l'aggiornamento"
+"Your settings have been reset to their default." = "Le tue impostazioni sono state ripristinate ai valori predefiniti."
"can be saved" = "possono essere risparmiati"
"contained files" = "file contenuti"
"day(s)" = "giorno(i)"
"edit" = "modifica"
"edit skipped filetypes" = "modifica tipi di file esclusi"
-"estimated savings" = "estimated savings" # LOC:TODO
+"estimated savings" = "risparmio stimato"
"every" = "ogni"
"games" = "giochi"
-"item" = "item" # LOC:TODO
-"items" = "items" # LOC:TODO
+"item" = "articolo"
+"items" = "articoli"
"just now" = "proprio ora"
"last compressed:" = "ultima compressione:"
"last modified:" = "ultima modifica:"
-"recommended" = "recommended" # LOC:TODO
-"saved" = "saved" # LOC:TODO
+"recommended" = "consigliato"
+"saved" = "salvato"
"select a folder" = "seleziona una cartella"
"uncompressed size" = "dimensione non compressa"
"{0:0} days ago" = "{0:0} giorni fa"
@@ -218,13 +218,13 @@
"TB" = "TB"
[context."Folder Compression Queue"]
-"COMPLETED" = "COMPLETED" # LOC:TODO
-"Clear completed" = "Clear completed" # LOC:TODO
-"Expected savings" = "Expected savings" # LOC:TODO
-"PENDING" = "PENDING" # LOC:TODO
-"Queue" = "Queue" # LOC:TODO
-"To process" = "To process" # LOC:TODO
-"{0} of {1} completed" = "{0} of {1} completed" # LOC:TODO
+"COMPLETED" = "COMPLETATO"
+"Clear completed" = "Pulisci Completati"
+"Expected savings" = "Risparmi previsti"
+"PENDING" = "IN SOSPESO"
+"Queue" = "Coda"
+"To process" = "Da Elaborare"
+"{0} of {1} completed" = "{0} di {1} completati"
[context."Folder status"]
"Unknown" = "Sconosciuto"
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 973504ab..38fdaab9 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -21,7 +21,7 @@ version = 2
file = "zh-CN.toml"
[locales."it-IT"]
-version = 1
+version = 2
file = "it-IT.toml"
[locales."tr-TR"]
From 1c35bf102f83ecc04af25632ec36f96204d0e5ec Mon Sep 17 00:00:00 2001
From: "Re*Index. (ot_inc)" <32851879+reindex-ot@users.noreply.github.com>
Date: Wed, 14 Oct 2026 08:56:07 +0900
Subject: [PATCH 133/134] Add Japanese Translate & Update README. (#690)
* Add Japanese localization for CompactGUI
* Delete CompactGUI/i18n directory
* Add Japanese localization file for CompactGUI
Added Japanese localization for CompactGUI with 257 translations.
* Create Japanese README for CompactGUI
Added Japanese README file with detailed information about CompactGUI, its features, installation instructions, and compression modes.
* Update Japanese README with new images and links
* Add Japanese link to README_cn.md
* Add Japanese language link to README in Italian
* Fix image path and add Japanese language link
Updated image source path and added Japanese link.
* Fix image path in Russian README file
* Update language links in README_id.md
* Fix Italian language link in README_it.md
* Fix Russian link in README_ru.md
* Update language links in README_id.md
* Refactor Japanese README for clarity
* Fix phrasing in README_ja.md
Corrected phrasing for clarity in Japanese README.
* Update images in README_ja.md
* Add Japanese localization support
---
CompactGUI/Resources/Localisation/ja-JP.toml | 257 ++++++++++++++++++
.../Resources/Localisation/manifest.toml | 4 +
README/README_cn.md | 3 +-
README/README_id.md | 3 +-
README/README_it.md | 5 +-
README/README_ja.md | 129 +++++++++
README/README_ru.md | 9 +-
7 files changed, 402 insertions(+), 8 deletions(-)
create mode 100644 CompactGUI/Resources/Localisation/ja-JP.toml
create mode 100644 README/README_ja.md
diff --git a/CompactGUI/Resources/Localisation/ja-JP.toml b/CompactGUI/Resources/Localisation/ja-JP.toml
new file mode 100644
index 00000000..97a35884
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/ja-JP.toml
@@ -0,0 +1,257 @@
+# CompactGUI Localisation
+# @version 1
+# @programversion 4.0.0-beta.12
+
+# ===================
+# Translations
+
+"Add" = "追加"
+"Add a custom folder to the watchlist" = "カスタムフォルダーを監視リストに追加"
+"Add selected to queue" = "選択項目をキューに追加"
+"Add to Compression Queue" = "圧縮キューに追加"
+"Add to compression queue" = "圧縮キューに追加"
+"Add to right-click context menu" = "右クリックメニューに追加"
+"Add to start menu" = "スタートメニューに追加"
+"Added to Queue" = "キューに追加済み"
+"Admin" = "管理者"
+"Aggression of online skiplist" = "オンライン除外リストの適用強度"
+"Always show details on Compression Mode buttons" = "圧縮モードボタンに常に詳細を表示"
+"Analysing" = "解析中"
+"Analysing..." = "解析中..."
+"Applied to all folders" = "すべてのフォルダーに適用済み"
+"Ascending" = "昇順"
+"Awaiting Compression" = "圧縮待機中"
+"Background Watcher Settings" = "バックグラウンド監視の設定"
+"COMPARE METHODS" = "圧縮方式を比較"
+"COMPRESSION MODE " = "圧縮モード "
+"Cancel" = "キャンセル"
+"Cancel Background Compressor" = "バックグラウンド圧縮をキャンセル"
+"Cancel operation" = "操作をキャンセル"
+"Cannot remove folder" = "フォルダーを削除できません"
+"Check for pre-release updates" = "プレリリース版のアップデートを確認"
+"Choose Compression" = "圧縮を選択"
+"Clear filters" = "フィルターを消去"
+"Click to download" = "クリックでダウンロード"
+"CompactGUI" = "CompactGUI"
+"Complete" = "完了"
+"Compress" = "圧縮"
+"Compress Again" = "再圧縮"
+"Compress All Now" = "今すぐすべて圧縮"
+"Compress Selected" = "選択済みを圧縮"
+"Compress folders: " = "圧縮フォルダー: "
+"Compressed" = "圧縮済み"
+"Compressing..." = "圧縮中..."
+"Compression" = "圧縮"
+"Compression DB" = "圧縮 DB"
+"Compression Settings" = "圧縮の設定"
+"Compression Summary" = "圧縮の概要"
+"Compression options have been applied to all folders" = "すべてのフォルダーに圧縮オプションが適用されました"
+"Current Size" = "現在のサイズ"
+"Database Results" = "データベースの結果"
+"Descending" = "降順"
+"Deselect all" = "すべて選択解除"
+"Direct Storage" = "DirectStorage"
+"Disk space is low. Retrying affected files sequentially." = "ディスク容量が不足しています。影響を受けるファイルを 1 つずつ再試行しています。"
+"Do Not Compress" = "圧縮しない"
+"Do not compress" = "圧縮しない"
+"Drive unavailable" = "ドライブを利用できません"
+"Edit list" = "リストを編集"
+"Estimate Compression for non-Steam Folders (beta)" = "Steam 以外のフォルダーの圧縮率を見積もる (ベータ)"
+"Estimated Size" = "推定サイズ"
+"Estimated size" = "推定サイズ"
+"Exit" = "終了"
+"Extensions in this folder" = "このフォルダー内の拡張子"
+"Failed" = "失敗"
+"Failed to submit to wiki" = "Wiki への送信に失敗しました"
+"Filetype Management" = "ファイルタイプの管理"
+"Filter" = "フィルター"
+"Finishing {0} active file operations; do not power off." = "実行中のファイル処理 ({0} 件) を完了しています。電源を切らないでください。"
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Steam ゲームではデータベースを使用して除外するファイル形式を決定します。Steam 以外のフォルダーではスマートアナライザーに基づきます。"
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Steam ゲーム専用。\nユーザーが投稿した除外ファイル形式をスキップする場合、その形式を除外対象と判定するために必要な報告数を設定します。\n通常は「低」が推奨されます。高く設定すると、本来十分に圧縮できるファイルまで除外されるリスクがあります。"
+"Game" = "ゲーム"
+"Game Name" = "ゲーム名"
+"Games" = "ゲーム"
+"Go to Database Results" = "データベースの結果へ移動"
+"HDDs only use 1 thread" = "HDD は 1 スレッドのみ使用"
+"Hide Compression DB Tab" = "「圧縮 DB」タブを非表示"
+"Hide Steam Library Tab" = "「Steam ライブラリ」タブを非表示"
+"Home" = "ホーム"
+"Include global skiplist" = "グローバル除外リストを含める"
+"Include global skipped file types" = "グローバル除外ファイル形式を含める"
+"Include smart skiplist" = "スマート除外リストを含める"
+"Include smart skipped file types" = "スマート除外ファイル形式を含める"
+"Insufficient permission to access this folder" = "このフォルダーへのアクセス権限が不足しています"
+"LZX" = "LZX"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "最終取得: {0:dd MMM yyyy HH:mm:ss}"
+"Last analysed {0}" = "最終解析 {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "最終実行: {0:dd MMM yyyy} {0:HH:mm:ss}"
+"Library location" = "ライブラリの場所"
+"Manage local skipped filetypes" = "ローカルの除外ファイル形式を管理"
+"Max Savings" = "最大削減量"
+"Maximum Compression Threads" = "最大の圧縮スレッド"
+"Mode" = "モード"
+"Monitor compressed folders for changes" = "圧縮済みフォルダーの変更を監視"
+"Never" = "実行しない"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "次回の予定: {0:dd MMM yyyy} {0:HH:mm:ss}"
+"No installed Steam games were found." = "インストール済みの Steam ゲームが見つかりませんでした。"
+"No wiki data" = "Wiki のデータがありません"
+"Not Compressed" = "未圧縮"
+"Not enough space" = "空き容量が不足しています"
+"On Schedule" = "スケジュール時"
+"On Schedule if system is also idle" = "スケジュール時(システムアイドル時のみ)"
+"Open" = "開く"
+"Open Settings Folder" = "設定フォルダーを開く"
+"Operation cancelled." = "操作がキャンセルされました。"
+"Operation failed: {0}" = "操作に失敗しました: {0}"
+"Original Size" = "元のサイズ"
+"Paused" = "一時停止"
+"Please check your internet connection and try again" = "インターネット接続を確認して再試行してください"
+"Please wait until the current operation is finished" = "現在の処理が完了するまでお待ちください"
+"Preparing" = "準備中"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "ディスクに書き込まずにファイルをすばやく解析し、圧縮率を見積もります。HDD では非常に動作が重くなる可能性があります!"
+"Re-analyse all watched folders" = "すべての監視フォルダーを再解析"
+"Re-analyse this folder" = "このフォルダーを再解析"
+"Recently Updated" = "最近更新された項目"
+"Recommended Action" = "推奨アクション"
+"Reload Languages.\nChecks online for updated language definitions" = "言語を再読み込み。\nオンラインで言語定義の更新を確認します"
+"Reload Steam Library list" = "Steam ライブラリの一覧を再読み込み"
+"Remove from Watchlist" = "監視リストから削除"
+"Reset" = "リセット"
+"Restart as Admin" = "管理者で再起動"
+"SHOW QUEUE" = "キューを表示"
+"SKIPLIST SELECTION" = "除外リストの選択"
+"Saved" = "削減済み"
+"Savings" = "削減量"
+"Scanning installed Steam games..." = "インストール済みの Steam ゲームをスキャン中..."
+"Search by game name or SteamID..." = "ゲーム名または SteamID で検索..."
+"Select" = "選択"
+"Select a folder to compress" = "圧縮するフォルダーを選択"
+"Select all" = "すべて選択"
+"Select all compressable" = "圧縮可能な項目をすべて選択"
+"Select all visible games" = "表示中のゲームをすべて選択"
+"Settings" = "設定"
+"Show notification on completion" = "完了時に通知を表示"
+"Sort" = "並び替え"
+"Sort By" = "並び替え基準"
+"Start CompactGUI in system tray" = "CompactGUI をシステムトレイで起動"
+"Status" = "ステータス"
+"Steam Library" = "Steam ライブラリ"
+"SteamID" = "SteamID"
+"Submit Results" = "結果を送信"
+"Submitted to wiki" = "Wiki に送信しました"
+"Success" = "成功"
+"System Integration" = "システムの統合"
+"The SnackbarPresenter was never set" = "SnackbarPresenter が設定されていません"
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "このドライブには、フォルダーを安全に圧縮するための十分な空き容量がありません。Windows で不具合が生じないようにするため、フォルダー内で最大のファイルサイズの 2 倍以上の空き容量が必要です。"
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "このゲームは DirectStorage テクノロジーを使用しています。この機能を使用している場合、圧縮しないでください。"
+"Total Results" = "結果の合計"
+"UI Settings" = "UI の設定"
+"UID" = "UID"
+"Uncompress" = "圧縮を解除"
+"Uncompressed" = "圧縮を解除済み"
+"Uncompressing..." = "圧縮を解除中..."
+"Unknown" = "不明"
+"Update Available" = "アップデートが利用可能です"
+"Update Available ▸ Version {0}" = "アップデートが利用可能です ▸ バージョン {0}"
+"Update Settings" = "アップデートの設定"
+"Update in Steam" = "Steam で更新"
+"Use exclusions" = "除外設定を使用"
+"Use recommended mode" = "推奨モードを使用する"
+"Version" = "バージョン"
+"Waiting" = "待機中"
+"Watch folder for changes" = "フォルダーの変更を監視"
+"Watched Folders" = "監視フォルダー"
+"Watcher" = "フォルダー監視"
+"WatcherPage" = "監視ページ"
+"When System is Idle" = "システムのアイドル時"
+"Working" = "実行中"
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
+"Yes" = "はい"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "現在 {0} 個のフォルダーが監視されています。CompactGUI を終了すると監視が停止します。{1}{1}本当に終了しますか?"
+"Your settings have been reset to their default to accommodate the update" = "アップデートの適用に伴い、設定が初期値にリセットされました"
+"Your settings have been reset to their default." = "設定が初期値にリセットされました。"
+"can be saved" = "削減可能"
+"contained files" = "含まれるファイル"
+"day(s)" = "日"
+"edit" = "編集"
+"edit skipped filetypes" = "除外ファイル形式を編集"
+"estimated savings" = "推定削減量"
+"every" = "間隔:"
+"games" = "ゲーム"
+"item" = "項目"
+"items" = "項目"
+"just now" = "たった今"
+"last compressed:" = "最終圧縮:"
+"last modified:" = "最終更新:"
+"recommended" = "推奨"
+"saved" = "削減"
+"select a folder" = "フォルダーを選択"
+"uncompressed size" = "非圧縮サイズ"
+"{0:0} days ago" = "{0:0} 日前"
+"{0:0} hours ago" = "{0:0} 時間前"
+"{0:0} minutes ago" = "{0:0} 分前"
+"{0} saved" = "{0} 削減"
+"{0}% decayed" = "{0}% 圧縮解除済み"
+
+[context."Background Scheduler"]
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI はスケジュールタスクを実行中であり、監視フォルダーをバックグラウンドで圧縮します"
+"Next scheduled task is on {0}" = "次回のスケジュールタスク: {0}"
+"Scheduled Compression Completed" = "スケジュール圧縮が完了しました"
+"Scheduled Compression Running" = "スケジュール圧縮を実行中"
+
+[context."Compression estimate"]
+"unknown" = "不明"
+
+[context."Compression size"]
+"After" = "圧縮後"
+"Before" = "圧縮前"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder Compression Queue"]
+"COMPLETED" = "完了"
+"Clear completed" = "完了した項目を消去"
+"Expected savings" = "予想削減量"
+"PENDING" = "待機中"
+"Queue" = "キュー"
+"To process" = "処理待ち"
+"{0} of {1} completed" = "{0} / {1} 完了"
+
+[context."Folder status"]
+"Unknown" = "不明"
+
+[context."Relative date"]
+"Unknown" = "不明"
+
+[context."Schedule"]
+"at" = "時刻:"
+
+[context."Skiplist aggression"]
+"high" = "高"
+"low" = "低"
+"medium" = "中"
+
+[context."Skiplist editor"]
+"Save" = "保存"
+
+[context."Steam Library Compression Mode Button"]
+"Compress | {0}" = "圧縮 | {0}"
+
+[context."Steam Library Tab Headings"]
+"CURRENT SIZE" = "現在のサイズ"
+"GAME" = "ゲーム"
+"RECOMMENDED ACTION" = "推奨のアクション"
+"SAVINGS" = "削減量"
+"STATUS" = "ステータス"
+
+[context."Storage savings"]
+"saved" = "削減"
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 38fdaab9..05637139 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -31,3 +31,7 @@ file = "tr-TR.toml"
[locales."id-ID"]
version = 1
file = "id-ID.toml"
+
+[locales."ja-JP"]
+version = 1
+file = "ja-JP.toml"
diff --git a/README/README_cn.md b/README/README_cn.md
index 79932122..2654a5c2 100644
--- a/README/README_cn.md
+++ b/README/README_cn.md
@@ -30,7 +30,8 @@
Русский -
简体中文 -
Italian -
- Bahasa Indonesia
+ Bahasa Indonesia -
+ 日本語
diff --git a/README/README_id.md b/README/README_id.md
index 43394053..47bebdff 100644
--- a/README/README_id.md
+++ b/README/README_id.md
@@ -27,7 +27,8 @@
Русский -
简体中文 -
Italian -
- Bahasa Indonesia
+ Bahasa Indonesia -
+ 日本語
diff --git a/README/README_it.md b/README/README_it.md
index 5d200a8e..e461f014 100644
--- a/README/README_it.md
+++ b/README/README_it.md
@@ -19,8 +19,9 @@
English -
Русский -
简体中文 -
- Italian -
- Bahasa Indonesia
+ Italian -
+ Bahasa Indonesia -
+ 日本語
diff --git a/README/README_ja.md b/README/README_ja.md
new file mode 100644
index 00000000..8d65cce4
--- /dev/null
+++ b/README/README_ja.md
@@ -0,0 +1,129 @@
+
Смотрите Вики со списком , протестированных на основе отчётов
-
+
## Важное замечание
From a71142fdc7945b51153862b7d2ba2ce4f46b5f03 Mon Sep 17 00:00:00 2001
From: Flo The Bara
Date: Sat, 24 Oct 2026 02:05:21 +0200
Subject: [PATCH 134/134] Add German de_DE Localisation (#692)
* Add files via upload
Some German translations have been shortened to fit the available UI space and prevent text truncation while preserving their meaning in context.
---
CompactGUI/Resources/Localisation/de-DE.toml | 258 ++++++++++++++++++
.../Resources/Localisation/manifest.toml | 4 +
README/README_de.md | 117 ++++++++
3 files changed, 379 insertions(+)
create mode 100644 CompactGUI/Resources/Localisation/de-DE.toml
create mode 100644 README/README_de.md
diff --git a/CompactGUI/Resources/Localisation/de-DE.toml b/CompactGUI/Resources/Localisation/de-DE.toml
new file mode 100644
index 00000000..8ea9d832
--- /dev/null
+++ b/CompactGUI/Resources/Localisation/de-DE.toml
@@ -0,0 +1,258 @@
+# CompactGUI Localisation
+# @version 1
+# @programversion 4.0.0-beta.12
+
+# ===================
+# Translations
+
+"Add" = "Hinzufügen"
+"Add a custom folder to the watchlist" = "Einen eigenen Ordner zur Überwachung hinzufügen"
+"Add selected to queue" = "Auswahl zur Warteschlange hinzufügen"
+"Add to Compression Queue" = "Zur Komprimierungswarteschlange hinzufügen"
+"Add to compression queue" = "Zur Komprimierungswarteschlange hinzufügen"
+"Add to right-click context menu" = "Zum Kontextmenü hinzufügen"
+"Add to start menu" = "Zum Startmenü hinzufügen"
+"Added to Queue" = "Zur Warteschlange hinzugefügt"
+"Admin" = "Administrator"
+"Aggression of online skiplist" = "Stärke der online Ausschlussliste"
+"Always show details on Compression Mode buttons" = "Details auf den Schaltflächen für den Komprimierungsmodus immer anzeigen"
+"Analysing" = "Analyse läuft"
+"Analysing..." = "Analyse läuft …"
+"Applied to all folders" = "Auf alle Ordner angewendet"
+"Ascending" = "Aufsteigend"
+"Awaiting Compression" = "Wartet auf Komprimierung"
+"Background Watcher Settings" = "Einstellungen zur Hintergrundüberwachung"
+"COMPARE METHODS" = "VERFAHREN VERGLEICHEN"
+"COMPRESSION MODE " = "KOMPRIMIERUNGSMODUS "
+"Cancel" = "Abbrechen"
+"Cancel Background Compressor" = "Hintergrundkomprimierung abbrechen"
+"Cancel operation" = "Vorgang abbrechen"
+"Cannot remove folder" = "Ordner kann nicht entfernt werden"
+"Check for pre-release updates" = "Auch nach Vorabversionen suchen"
+"Choose Compression" = "Komprimierungsmodus auswählen"
+"Clear filters" = "Filter zurücksetzen"
+"Click to download" = "Zum Herunterladen klicken"
+"CompactGUI" = "CompactGUI"
+"Complete" = "Abgeschlossen"
+"Compress" = "Komprimieren"
+"Compress Again" = "Erneut komprimieren"
+"Compress All Now" = "Jetzt alle komprimieren"
+"Compress Selected" = "Auswahl komprimieren"
+"Compress folders: " = "Ordner komprimieren: "
+"Compressed" = "Komprimiert"
+"Compressing..." = "Komprimierung läuft …"
+"Compression" = "Komprimierung"
+"Compression DB" = "Komprimierungsdatenbank"
+"Compression Settings" = "Komprimierungseinstellungen"
+"Compression Summary" = "Zusammenfassung der Komprimierung"
+"Compression options have been applied to all folders" = "Die Komprimierungseinstellungen wurden auf alle Ordner angewendet"
+"Current Size" = "Aktuelle Größe"
+"Database Results" = "Datenbankergebnisse"
+"Descending" = "Absteigend"
+"Deselect all" = "Auswahl aufheben"
+"Direct Storage" = "Direct Storage"
+"Disk space is low. Retrying affected files sequentially." = "Der Speicherplatz wird knapp. Die betroffenen Dateien werden erneut einzeln nacheinander verarbeitet."
+"Do Not Compress" = "Nicht komprimieren"
+"Do not compress" = "Nicht komprimieren"
+"Drive unavailable" = "Laufwerk nicht verfügbar"
+"Edit list" = "Liste bearbeiten"
+"Estimate Compression for non-Steam Folders (beta)" = "Komprimierung für Ordner außerhalb von Steam schätzen (Beta)"
+"Estimated Size" = "Geschätzte Größe"
+"Estimated size" = "Geschätzte Größe"
+"Exit" = "Beenden"
+"Extensions in this folder" = "Dateiendungen in diesem Ordner"
+"Failed" = "Fehlgeschlagen"
+"Failed to submit to wiki" = "Übermittlung an das Wiki fehlgeschlagen"
+"Filetype Management" = "Dateitypen verwalten"
+"Filter" = "Filter"
+"Finishing {0} active file operations; do not power off." = "Noch laufende Dateivorgänge werden abgeschlossen: {0}. Den Computer nicht ausschalten."
+"For Steam Games, this uses the database to determine types to skip. For non-Steam folders this is based on the smart analyser." = "Bei Steam-Spielen wird anhand der Datenbank ermittelt, welche Dateitypen übersprungen werden sollen. Bei Ordnern außerhalb von Steam übernimmt dies die intelligente Analyse."
+"For Steam games only.\nWhen choosing to skip user-submitted filetypes, this setting determines how many submissions are required for each filetype to consider skipping it. \n'low' is generally best, as higher options run the risk of skipping files that would otherwise compress well." = "Nur für Steam-Spiele.\nWenn Dateitypen anhand von Nutzermeldungen übersprungen werden sollen, legt diese Einstellung fest, wie viele Meldungen je Dateityp dafür erforderlich sind.\nDie Einstellung „niedrig“ ist in der Regel am besten geeignet. Bei höheren Einstellungen besteht das Risiko, dass auch gut komprimierbare Dateien übersprungen werden."
+"Game" = "Spiel"
+"Game Name" = "Spielname"
+"Games" = "Spiele"
+"Go to Database Results" = "Zu den Datenbankergebnissen"
+"HDDs only use 1 thread" = "Bei HDDs nur einen Thread verwenden"
+"Hide Compression DB Tab" = "Registerkarte „Komprimierungsdatenbank“ ausblenden"
+"Hide Steam Library Tab" = "Registerkarte „Steam-Bibliothek“ ausblenden"
+"Home" = "Startseite"
+"Include global skiplist" = "Globale Ausschlussliste berücksichtigen"
+"Include global skipped file types" = "Global ausgeschlossene Dateitypen berücksichtigen"
+"Include smart skiplist" = "Intelligente Ausschlussliste berücksichtigen"
+"Include smart skipped file types" = "Durch die intelligente Analyse ausgeschlossene Dateitypen berücksichtigen"
+"Insufficient permission to access this folder" = "Keine ausreichenden Berechtigungen für den Zugriff auf diesen Ordner"
+"LZX" = "LZX"
+"Last Fetched: {0:dd MMM yyyy HH:mm:ss}" = "Zuletzt abgerufen: {0:dd.MM.yyyy HH:mm:ss}"
+"Last analysed {0}" = "Zuletzt analysiert: {0}"
+"Last ran: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Zuletzt ausgeführt: {0:dd.MM.yyyy} um {0:HH:mm:ss}"
+"Library location" = "Speicherort der Bibliothek"
+"Manage local skipped filetypes" = "Für diesen Ordner ausgeschlossene Dateitypen verwalten"
+"Max Savings" = "Maximale Einsparung"
+# Maximum Compression Threads" = "Maximale Anzahl an Komprimierungsthreads"
+"Maximum Compression Threads" = "Maximale Anzahl an Threads"
+"Mode" = "Modus"
+"Monitor compressed folders for changes" = "Komprimierte Ordner auf Änderungen überwachen"
+"Never" = "Nie"
+"Next scheduled: {0:dd MMM yyyy} at {0:HH:mm:ss}" = "Nächste Ausführung: {0:dd.MM.yyyy} um {0:HH:mm:ss}"
+"No installed Steam games were found." = "Es wurden keine installierten Steam-Spiele gefunden."
+"No wiki data" = "Keine Wiki-Daten vorhanden"
+"Not Compressed" = "Nicht komprimiert"
+"Not enough space" = "Nicht genügend Speicherplatz"
+"On Schedule" = "Nach Zeitplan"
+"On Schedule if system is also idle" = "Nach Zeitplan, sofern sich das System im Leerlauf befindet"
+"Open" = "Öffnen"
+"Open Settings Folder" = "Einstellungsordner öffnen"
+"Operation cancelled." = "Vorgang abgebrochen."
+"Operation failed: {0}" = "Vorgang fehlgeschlagen: {0}"
+"Original Size" = "Ursprüngliche Größe"
+"Paused" = "Pausiert"
+"Please check your internet connection and try again" = "Bitte prüfen Sie Ihre Internetverbindung und versuchen Sie es erneut"
+"Please wait until the current operation is finished" = "Bitte warten Sie, bis der aktuelle Vorgang abgeschlossen ist"
+"Preparing" = "Vorbereitung läuft"
+"Quickly parses over files and estimates their compression ratio without writing to disk. This will likely be super laggy on HDDs!" = "Durchsucht die Dateien und schätzt ihren Komprimierungsgrad, ohne Daten auf den Datenträger zu schreiben. Auf HDDs kann dies zu erheblichen Verzögerungen führen!"
+"Re-analyse all watched folders" = "Alle überwachten Ordner erneut analysieren"
+"Re-analyse this folder" = "Diesen Ordner erneut analysieren"
+"Recently Updated" = "Kürzlich aktualisiert"
+"Recommended Action" = "Empfohlene Aktion"
+"Reload Languages.\nChecks online for updated language definitions" = "Sprachdateien neu laden.\nSucht online nach aktualisierten Übersetzungen"
+"Reload Steam Library list" = "Liste der Steam-Bibliothek neu laden"
+"Remove from Watchlist" = "Aus der Überwachung entfernen"
+"Reset" = "Zurücksetzen"
+"Restart as Admin" = "Als Administrator neu starten"
+"SHOW QUEUE" = "WARTESCHLANGE ANZEIGEN"
+"SKIPLIST SELECTION" = "AUSSCHLUSSLISTEN AUSWÄHLEN"
+"Saved" = "Eingespart"
+"Savings" = "Ersparnis"
+"Scanning installed Steam games..." = "Installierte Steam-Spiele werden gesucht …"
+"Search by game name or SteamID..." = "Nach Spielnamen oder SteamID suchen …"
+"Select" = "Auswählen"
+"Select a folder to compress" = "Ordner zum Komprimieren auswählen"
+"Select all" = "Alle auswählen"
+"Select all compressable" = "Alle komprimierbaren auswählen"
+"Select all visible games" = "Alle sichtbaren Spiele auswählen"
+"Settings" = "Einstellungen"
+"Show notification on completion" = "Nach Abschluss eine Benachrichtigung anzeigen"
+"Sort" = "Sortieren"
+"Sort By" = "Sortieren nach"
+"Start CompactGUI in system tray" = "CompactGUI im Infobereich der Taskleiste starten"
+"Status" = "Status"
+"Steam Library" = "Steam-Bibliothek"
+"SteamID" = "SteamID"
+"Submit Results" = "Ergebnisse übermitteln"
+"Submitted to wiki" = "An das Wiki übermittelt"
+"Success" = "Erfolgreich"
+"System Integration" = "Systemintegration"
+"The SnackbarPresenter was never set" = "Der SnackbarPresenter wurde nicht festgelegt"
+"There is not enough free space on this drive to safely compress this folder. You need at least 2x the space of the largest item in this folder free to ensure Windows does not cause issues." = "Auf diesem Laufwerk ist nicht genügend freier Speicherplatz vorhanden, um diesen Ordner sicher zu komprimieren. Damit unter Windows keine Probleme auftreten, muss mindestens das Doppelte der Größe der größten Datei in diesem Ordner als freier Speicherplatz verfügbar sein."
+"This game uses DirectStorage technology. If you are using this feature, you should not compress this game." = "Dieses Spiel verwendet Direct Storage. Wenn Sie diese Funktion nutzen, sollten Sie das Spiel nicht komprimieren."
+"Total Results" = "Ergebnisse insgesamt"
+"UI Settings" = "Einstellungen zur Benutzeroberfläche"
+"UID" = "UID"
+"Uncompress" = "Dekomprimieren"
+"Uncompressed" = "Unkomprimiert"
+"Uncompressing..." = "Dekomprimierung läuft …"
+"Unknown" = "Unbekannt"
+"Update Available" = "Update verfügbar"
+"Update Available ▸ Version {0}" = "Update verfügbar ▸ Version {0}"
+"Update Settings" = "Update-Einstellungen"
+"Update in Steam" = "In Steam aktualisieren"
+"Use exclusions" = "Ausschlüsse berücksichtigen"
+"Use recommended mode" = "Empfohlenen Modus verwenden"
+"Version" = "Version"
+"Waiting" = "Wartet"
+"Watch folder for changes" = "Ordner auf Änderungen überwachen"
+"Watched Folders" = "Überwachte Ordner"
+"Watcher" = "Ordnerüberwachung"
+"WatcherPage" = "Ordnerüberwachung"
+"When System is Idle" = "Bei Systemleerlauf"
+"Working" = "In Bearbeitung"
+"XPRESS 16K" = "XPRESS 16K"
+"XPRESS 4K" = "XPRESS 4K"
+"XPRESS 8K" = "XPRESS 8K"
+"Yes" = "Ja"
+"You currently have {0} folders being watched. Closing CompactGUI will stop them from being monitored.{1}{1}Are you sure you want to exit?" = "Aktuell überwachte Ordner: {0}. Beim Beenden von CompactGUI wird die Überwachung eingestellt.{1}{1}Möchten Sie das Programm wirklich beenden?"
+"Your settings have been reset to their default to accommodate the update" = "Ihre Einstellungen wurden auf die Standardwerte zurückgesetzt, um die Kompatibilität mit dem Update sicherzustellen"
+"Your settings have been reset to their default." = "Ihre Einstellungen wurden auf die Standardwerte zurückgesetzt."
+"can be saved" = "können eingespart werden"
+"contained files" = "Enthaltene Dateien"
+"day(s)" = "Tag(e)"
+"edit" = "Bearbeiten"
+"edit skipped filetypes" = "Ausgeschlossene Dateitypen bearbeiten"
+"estimated savings" = "Geschätzte Einsparung"
+"every" = "Intervall:"
+"games" = "Spiele"
+"item" = "Element"
+"items" = "Elemente"
+"just now" = "gerade eben"
+"last compressed:" = "Zuletzt komprimiert:"
+"last modified:" = "Zuletzt geändert:"
+"recommended" = "empfohlen"
+"saved" = "eingespart"
+"select a folder" = "Ordner auswählen"
+"uncompressed size" = "Unkomprimierte Größe"
+"{0:0} days ago" = "vor {0:0} Tag(en)"
+"{0:0} hours ago" = "vor {0:0} Stunde(n)"
+"{0:0} minutes ago" = "vor {0:0} Minute(n)"
+"{0} saved" = "{0} eingespart"
+"{0}% decayed" = "{0} % der Einsparung verloren"
+
+[context."Background Scheduler"]
+"CompactGUI is running a scheduled task and will compress monitored folders in the background" = "CompactGUI führt eine geplante Aufgabe aus und komprimiert überwachte Ordner im Hintergrund"
+"Next scheduled task is on {0}" = "Die nächste geplante Aufgabe wird am {0} ausgeführt"
+"Scheduled Compression Completed" = "Geplante Komprimierung abgeschlossen"
+"Scheduled Compression Running" = "Geplante Komprimierung läuft"
+
+[context."Compression estimate"]
+"unknown" = "unbekannt"
+
+[context."Compression size"]
+"After" = "Nachher"
+"Before" = "Vorher"
+
+[context."File size"]
+"B" = "B"
+"EB" = "EB"
+"GB" = "GB"
+"KB" = "KB"
+"MB" = "MB"
+"PB" = "PB"
+"TB" = "TB"
+
+[context."Folder Compression Queue"]
+"COMPLETED" = "ABGESCHLOSSEN"
+"Clear completed" = "Abgeschlossene Einträge entfernen"
+"Expected savings" = "Erwartete Einsparung"
+"PENDING" = "AUSSTEHEND"
+"Queue" = "Warteschlange"
+"To process" = "Zu verarbeiten"
+"{0} of {1} completed" = "{0} von {1} abgeschlossen"
+
+[context."Folder status"]
+"Unknown" = "Unbekannt"
+
+[context."Relative date"]
+"Unknown" = "Unbekannt"
+
+[context."Schedule"]
+"at" = "um"
+
+[context."Skiplist aggression"]
+"high" = "hoch"
+"low" = "niedrig"
+"medium" = "mittel"
+
+[context."Skiplist editor"]
+"Save" = "Speichern"
+
+[context."Steam Library Compression Mode Button"]
+"Compress | {0}" = "Komprimieren | {0}"
+
+[context."Steam Library Tab Headings"]
+"CURRENT SIZE" = "AKTUELLE GRÖSSE"
+"GAME" = "SPIEL"
+"RECOMMENDED ACTION" = "EMPFOHLENE AKTION"
+"SAVINGS" = "EINSPARUNG"
+"STATUS" = "STATUS"
+
+[context."Storage savings"]
+"saved" = "eingespart"
\ No newline at end of file
diff --git a/CompactGUI/Resources/Localisation/manifest.toml b/CompactGUI/Resources/Localisation/manifest.toml
index 05637139..7fd9f8d0 100644
--- a/CompactGUI/Resources/Localisation/manifest.toml
+++ b/CompactGUI/Resources/Localisation/manifest.toml
@@ -35,3 +35,7 @@ file = "id-ID.toml"
[locales."ja-JP"]
version = 1
file = "ja-JP.toml"
+
+[locales."de-DE"]
+version = 1
+file = "de-DE.toml"
diff --git a/README/README_de.md b/README/README_de.md
new file mode 100644
index 00000000..d2d77960
--- /dev/null
+++ b/README/README_de.md
@@ -0,0 +1,117 @@
+
CompactGUI komprimiert deine Spiele und Programme transparent: Sie benötigen weniger Speicherplatz und lassen sich weiterhin wie gewohnt nutzen. Dazu greift CompactGUI direkt auf die Win32-API zu und nutzt dieselben Komprimierungsfunktionen wie das in Windows integrierte Befehlszeilenprogramm compact.exe ab Windows 10.
+
+
+
+
+
+
+
+
+
+
+
+---
+
+
+
+
+
+
+
+
+
+**So funktioniert es:**
+
+CompactGUI ist eine benutzerfreundliche Oberfläche für die Dateisystemkomprimierung über den Windows Overlay Filter (WOF). Der zugehörige Treiber stellt leistungsfähige Komprimierungsalgorithmen bereit, die mit Windows 10 eingeführt wurden. Damit lassen sich Dateien und Ordner – insbesondere Spiele – transparent komprimieren. So kannst du viel Speicherplatz sparen und die Inhalte weiterhin ohne Leistungseinbußen nutzen.
+
+**Transparente Komprimierung – was bedeutet das?**
+
+Transparente Komprimierung bedeutet, dass du Dateien auf deinem Computer weiterhin ganz normal verwenden kannst – so, als hätte sich nichts geändert. Sie werden nicht wie bei ZIP oder RAR in separate Archive gepackt. Du kannst deine Dateien wie gewohnt durchsuchen und Spiele sowie Programme direkt starten. Sie benötigen lediglich weniger Speicherplatz.
+
+**Was ist der Unterschied zur integrierten Komprimierung älterer Windows-Versionen?**
+
+Das Verfahren ähnelt der bisherigen Windows-Komprimierung (Rechtsklick > Eigenschaften > Erweitert > Inhalt komprimieren, um Speicherplatz zu sparen). Die ab Windows 10 verfügbaren neueren Algorithmen sind jedoch deutlich leistungsfähiger: Sie erzielen eine höhere Komprimierungsrate und wirken sich kaum auf die Leistung aus. [Weitere Informationen findest du hier.]()
+
+## Installation
+
+
+
+Alternativ kannst du CompactGUI mit WinGet installieren:
+
+```powershell
+winget install CompactGUI
+```
+
+## Einsatzmöglichkeiten
+
+Mit CompactGUI kannst du Ordner komprimieren und die enthaltenen Dateien, Spiele und Programme weiterhin wie gewohnt nutzen:
+
+- Den Speicherbedarf von Spielen reduzieren (z. B. ARK: Survival Evolved: von 169 GB auf 91,2 GB)
+- Den Speicherbedarf von Programmen reduzieren (z. B. Adobe Photoshop: von 1,71 GB auf 886 MB)
+- Andere Ordner auf deinem Computer komprimieren
+
+## Weitere Funktionen
+
+- Grafische Anzeige des Komprimierungsfortschritts und der zugehörigen Statistiken
+- Konfigurierbare Liste mit Dateitypen, die sich nur schlecht komprimieren lassen und deshalb übersprungen werden können; für jeden Ordner individuell anpassbar
+- Schätzung der möglichen Speicherplatzersparnis anhand von über 100.000 Einsendungen aus der Community mit aussagekräftigen Daten zu zahlreichen Steam-Spielen
+ - Tatsächlich waren es deutlich mehr Einsendungen. Der Entwickler bemerkte jedoch erst später, dass Google Forms ab 100.000 Antworten nicht mehr funktionierte, wodurch viele Einsendungen verloren gingen.
+ - Für Spiele außerhalb von Steam steht eine algorithmische Schätzung zur Verfügung, die ebenfalls einen brauchbaren Anhaltspunkt für die mögliche Komprimierung liefert.
+ - Wenn du einen Beitrag leisten möchtest, kannst du die Komprimierungsergebnisse deiner Steam-Spiele direkt aus CompactGUI an die Online-Datenbank übermitteln.
+- Integration in das Kontextmenü des Windows-Explorers für einen einfacheren Zugriff
+- Analyse des Komprimierungsstatus vorhandener Ordner
+- Hintergrundüberwachung: Überwacht ausgewählte Ordner auf Änderungen, etwa durch Steam-Updates, und komprimiert geänderte Inhalte automatisch erneut im Hintergrund
+
+
Im Wiki findest du eine Liste mit , deren Komprimierungsergebnisse auf über 100.000 Einsendungen beruhen.
+
+
+## Wichtiger Hinweis
+
+**Dieses Programm sollte nicht für Spiele verwendet werden, die unter Windows 11 DirectStorage nutzen.**
+
+DirectStorage ist eine API, mit der Spiele ihre Ressourcen direkt von der SSD laden können, ohne den Umweg über die CPU zu nehmen. Komprimierte Dateien müssen zunächst dekomprimiert werden, bevor sie an die GPU übertragen werden können. Dadurch gehen die Leistungsvorteile verloren.
+
+## Hintergrund
+
+Seit Windows 10 unterstützt das integrierte Befehlszeilenprogramm `compact.exe` zusätzliche Verfahren, mit denen sich Dateien und Ordner auf dem Datenträger komprimieren und während der Nutzung automatisch dekomprimieren lassen. Bei modernen Prozessoren fällt die zusätzliche Last kaum ins Gewicht. Selbst bei Tests des Entwicklers mit einem Intel Core i3-370M aus dem Jahr 2010 waren die Auswirkungen vernachlässigbar. Besonders auf kleineren SSDs ist der gewonnene Speicherplatz hilfreich.
+
+Da sich der Speicherbedarf von Programm- und Spieleordnern um bis zu 60 % reduzieren lässt, können sich außerdem die Ladezeiten verkürzen – insbesondere auf langsameren HDDs.
+
+Weitere Informationen zur integrierten Windows-Funktion findest du [hier](https://technet.microsoft.com/library/bb490884.aspx) und [hier](). Mit `compact /q` kannst du in der Befehlszeile den Komprimierungsstatus abfragen.
+
+CompactGUI ist bewusst auf die Komprimierung von Dateien und Ordnern beschränkt. Ganze Laufwerke oder vollständige Windows-Installationen lassen sich damit nicht bearbeiten. Für die Komprimierung der Windows-Installation steht in der Befehlszeile `compact /compactOS` zur Verfügung.
+
+Die Komprimierung ist vollständig transparent: Programme, Spiele und Dateien bleiben wie gewohnt zugänglich und werden im Explorer unverändert angezeigt. Bei der Nutzung werden sie im Arbeitsspeicher dekomprimiert; auf dem Datenträger bleiben sie komprimiert.
+
+## Komprimierungsverfahren
+
+Standardmäßig verwendet CompactGUI den Algorithmus `XPRESS8K`. Dieser bietet ein ausgewogenes Verhältnis zwischen Komprimierungsgeschwindigkeit und Speicherplatzersparnis. Windows verwendet standardmäßig `XPRESS4K`, das schneller arbeitet, aber weniger stark komprimiert.
+
+Folgende Komprimierungsverfahren stehen zur Auswahl:
+
+| Algorithmus | Wesentliche Vorteile | Beschreibung |
+| :---------- | :------------------- | :----------- |
+| XPRESS4K | Am schnellsten, aber geringste Komprimierung | Geeignet für Spieldateien mit besonders hohen Anforderungen an die Lesegeschwindigkeit. Der Schwerpunkt liegt auf hoher Leistung bei gleichzeitiger Speicherplatzersparnis. |
+| XPRESS8K | Ausgewogenes Verhältnis zwischen Geschwindigkeit und Komprimierung | Bietet einen guten Kompromiss zwischen Komprimierungsgeschwindigkeit und Komprimierungsrate. |
+| XPRESS16K | Langsamer, aber stärkere Komprimierung | Geeignet bei knappem Speicherplatz, wenn schnelle Ladezeiten weniger wichtig sind. |
+| LZX | Am langsamsten, aber stärkste Komprimierung | Geeignet für archivierte Dateien, Sicherungskopien und andere Daten, auf die nur selten zugegriffen wird. |
+
+---
+
+### Gefällt dir das Projekt?
+
+Wenn du möchtest, kannst du die Entwicklung mit einem kleinen Beitrag auf Ko-fi unterstützen. :)
+
+