From 19ba425e79b0c6638e375fd790b047a2ebe297ba Mon Sep 17 00:00:00 2001 From: Phil-icyou <70935362+Phil-icyou@users.noreply.github.com> Date: Sun, 8 Mar 2026 17:34:45 +0100 Subject: [PATCH] Initial commit: SpdUp Windows Gaming Booster v1.0.0 - .NET 8 WPF app with full MVVM architecture - One-click boost: CPU, RAM, GPU, network, services, timer resolution - Real-time system monitor (LibreHardwareMonitor) - Auto game detection (30+ games) - RAM optimizer with kernel-level cleanup - Network optimizer (TCP registry tweaks) - Service manager, process manager, shader cache cleaner - Desktop widget overlay - Debug log viewer - Custom dark gaming theme with trans pride colors - 84 unit tests (xUnit) - Inno Setup installer script - Landing page website --- .gitignore | 28 + App.xaml | 13 + App.xaml.cs | 49 ++ AssemblyInfo.cs | 10 + Converters/Converters.cs | 86 +++ Core/Logger.cs | 71 ++ Core/NativeMethods.cs | 153 ++++ Core/ObservableObject.cs | 23 + Core/RelayCommand.cs | 56 ++ Installer/SpdUpSetup.iss | 60 ++ LICENSE | 21 + MainWindow.xaml | 254 +++++++ MainWindow.xaml.cs | 81 +++ Models/AppSettings.cs | 77 +++ Models/GameEntry.cs | 33 + Models/ProcessEntry.cs | 15 + Models/ServiceEntry.cs | 13 + Models/SystemMetrics.cs | 18 + README.md | 130 ++++ Services/GameDetectionService.cs | 157 +++++ Services/MonitoringService.cs | 157 +++++ Services/NetworkService.cs | 107 +++ Services/OptimizationService.cs | 208 ++++++ Services/RamOptimizationService.cs | 111 +++ Services/ServiceManagementService.cs | 96 +++ Services/ShaderCacheCleanerService.cs | 110 +++ SpdUp.Tests/ConverterTests.cs | 175 +++++ SpdUp.Tests/GlobalUsings.cs | 1 + SpdUp.Tests/LoggerTests.cs | 117 ++++ SpdUp.Tests/ModelTests.cs | 224 ++++++ SpdUp.Tests/ObservableObjectTests.cs | 93 +++ SpdUp.Tests/RelayCommandTests.cs | 99 +++ SpdUp.Tests/ServiceTests.cs | 150 ++++ SpdUp.Tests/SpdUp.Tests.csproj | 30 + SpdUp.Tests/ViewModelTests.cs | 157 +++++ SpdUp.csproj | 25 + SpdUp.sln | 51 ++ Themes/DarkTheme.xaml | 254 +++++++ ViewModels/BoostViewModel.cs | 46 ++ ViewModels/DashboardViewModel.cs | 16 + ViewModels/DebugLogViewModel.cs | 74 ++ ViewModels/GameLibraryViewModel.cs | 72 ++ ViewModels/MainViewModel.cs | 264 +++++++ ViewModels/MonitorViewModel.cs | 16 + ViewModels/ProcessManagerViewModel.cs | 100 +++ ViewModels/ServiceManagerViewModel.cs | 67 ++ ViewModels/SettingsViewModel.cs | 91 +++ Views/BoostView.xaml | 55 ++ Views/BoostView.xaml.cs | 8 + Views/DashboardView.xaml | 147 ++++ Views/DashboardView.xaml.cs | 8 + Views/DebugLogView.xaml | 69 ++ Views/DebugLogView.xaml.cs | 38 + Views/GameLibraryView.xaml | 26 + Views/GameLibraryView.xaml.cs | 8 + Views/MonitorView.xaml | 114 +++ Views/MonitorView.xaml.cs | 8 + Views/ProcessManagerView.xaml | 31 + Views/ProcessManagerView.xaml.cs | 8 + Views/ServiceManagerView.xaml | 28 + Views/ServiceManagerView.xaml.cs | 8 + Views/SettingsView.xaml | 83 +++ Views/SettingsView.xaml.cs | 8 + Views/WidgetWindow.xaml | 122 ++++ Views/WidgetWindow.xaml.cs | 83 +++ app.manifest | 19 + build-installer.ps1 | 86 +++ website/index.html | 960 ++++++++++++++++++++++++++ 68 files changed, 6176 insertions(+) create mode 100644 .gitignore create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 AssemblyInfo.cs create mode 100644 Converters/Converters.cs create mode 100644 Core/Logger.cs create mode 100644 Core/NativeMethods.cs create mode 100644 Core/ObservableObject.cs create mode 100644 Core/RelayCommand.cs create mode 100644 Installer/SpdUpSetup.iss create mode 100644 LICENSE create mode 100644 MainWindow.xaml create mode 100644 MainWindow.xaml.cs create mode 100644 Models/AppSettings.cs create mode 100644 Models/GameEntry.cs create mode 100644 Models/ProcessEntry.cs create mode 100644 Models/ServiceEntry.cs create mode 100644 Models/SystemMetrics.cs create mode 100644 README.md create mode 100644 Services/GameDetectionService.cs create mode 100644 Services/MonitoringService.cs create mode 100644 Services/NetworkService.cs create mode 100644 Services/OptimizationService.cs create mode 100644 Services/RamOptimizationService.cs create mode 100644 Services/ServiceManagementService.cs create mode 100644 Services/ShaderCacheCleanerService.cs create mode 100644 SpdUp.Tests/ConverterTests.cs create mode 100644 SpdUp.Tests/GlobalUsings.cs create mode 100644 SpdUp.Tests/LoggerTests.cs create mode 100644 SpdUp.Tests/ModelTests.cs create mode 100644 SpdUp.Tests/ObservableObjectTests.cs create mode 100644 SpdUp.Tests/RelayCommandTests.cs create mode 100644 SpdUp.Tests/ServiceTests.cs create mode 100644 SpdUp.Tests/SpdUp.Tests.csproj create mode 100644 SpdUp.Tests/ViewModelTests.cs create mode 100644 SpdUp.csproj create mode 100644 SpdUp.sln create mode 100644 Themes/DarkTheme.xaml create mode 100644 ViewModels/BoostViewModel.cs create mode 100644 ViewModels/DashboardViewModel.cs create mode 100644 ViewModels/DebugLogViewModel.cs create mode 100644 ViewModels/GameLibraryViewModel.cs create mode 100644 ViewModels/MainViewModel.cs create mode 100644 ViewModels/MonitorViewModel.cs create mode 100644 ViewModels/ProcessManagerViewModel.cs create mode 100644 ViewModels/ServiceManagerViewModel.cs create mode 100644 ViewModels/SettingsViewModel.cs create mode 100644 Views/BoostView.xaml create mode 100644 Views/BoostView.xaml.cs create mode 100644 Views/DashboardView.xaml create mode 100644 Views/DashboardView.xaml.cs create mode 100644 Views/DebugLogView.xaml create mode 100644 Views/DebugLogView.xaml.cs create mode 100644 Views/GameLibraryView.xaml create mode 100644 Views/GameLibraryView.xaml.cs create mode 100644 Views/MonitorView.xaml create mode 100644 Views/MonitorView.xaml.cs create mode 100644 Views/ProcessManagerView.xaml create mode 100644 Views/ProcessManagerView.xaml.cs create mode 100644 Views/ServiceManagerView.xaml create mode 100644 Views/ServiceManagerView.xaml.cs create mode 100644 Views/SettingsView.xaml create mode 100644 Views/SettingsView.xaml.cs create mode 100644 Views/WidgetWindow.xaml create mode 100644 Views/WidgetWindow.xaml.cs create mode 100644 app.manifest create mode 100644 build-installer.ps1 create mode 100644 website/index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a7046cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Compiled output +bin/ +obj/ +publish/ + +# IDE +.vs/ +*.user +*.suo + +# Temp files +*_wpftmp.csproj +*.rsuser + +# NuGet +*.nupkg +packages/ + +# Build +*.dll +*.exe +*.pdb + +# Test results +TestResults/ + +# Inno Setup output +Installer/Output/ diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..2f78a3e --- /dev/null +++ b/App.xaml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..145ee86 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,49 @@ +using System.Windows; +using System.Windows.Threading; +using SpdUp.Core; + +namespace SpdUp; + +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + // Global exception handlers + DispatcherUnhandledException += OnDispatcherUnhandledException; + AppDomain.CurrentDomain.UnhandledException += OnDomainUnhandledException; + TaskScheduler.UnobservedTaskException += OnUnobservedTaskException; + + // Enable required privileges early + NativeMethods.EnablePrivilege(NativeMethods.SE_DEBUG_NAME); + NativeMethods.EnablePrivilege(NativeMethods.SE_PROF_SINGLE_PROCESS_NAME); + NativeMethods.EnablePrivilege(NativeMethods.SE_INC_BASE_PRIORITY_NAME); + + Logger.Info("SpdUp application starting."); + } + + private void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) + { + Logger.Error("Unhandled UI exception", e.Exception); + MessageBox.Show($"An unexpected error occurred:\n{e.Exception.Message}", + "SpdUp Error", MessageBoxButton.OK, MessageBoxImage.Error); + e.Handled = true; + } + + private static void OnDomainUnhandledException(object sender, UnhandledExceptionEventArgs e) + { + if (e.ExceptionObject is Exception ex) + Logger.Error("Unhandled domain exception", ex); + } + + private static void OnUnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e) + { + Logger.Error("Unobserved task exception", e.Exception); + e.SetObserved(); + } +} + diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..cc29e7f --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Converters/Converters.cs b/Converters/Converters.cs new file mode 100644 index 0000000..1773f6f --- /dev/null +++ b/Converters/Converters.cs @@ -0,0 +1,86 @@ +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Media; + +namespace SpdUp.Converters; + +/// Bool → Visibility converter. +public sealed class BoolToVisibilityConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => value is true ? Visibility.Visible : Visibility.Collapsed; + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => value is Visibility.Visible; +} + +/// Inverted Bool → Visibility converter. +public sealed class InverseBoolToVisibilityConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => value is true ? Visibility.Collapsed : Visibility.Visible; + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => value is Visibility.Collapsed; +} + +/// Float percentage (0–100) to a progress bar width or colour. +public sealed class PercentToColorConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var pct = System.Convert.ToSingle(value); + if (pct > 90) return new SolidColorBrush(Color.FromRgb(255, 69, 58)); // red + if (pct > 70) return new SolidColorBrush(Color.FromRgb(255, 159, 10)); // orange + return new SolidColorBrush(Color.FromRgb(48, 209, 88)); // green + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); +} + +/// Null → Visibility (collapsed when null). +public sealed class NullToVisibilityConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => value is null ? Visibility.Collapsed : Visibility.Visible; + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); +} + +/// Format float to one decimal. +public sealed class FloatFormatConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var fmt = parameter as string ?? "F1"; + return System.Convert.ToSingle(value).ToString(fmt); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); +} + +/// Bool to boost button text. +public sealed class BoostButtonTextConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => value is true ? "⏹ STOP BOOST" : "🚀 BOOST GAME"; + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); +} + +/// Bool to brush (boost active colour). +public sealed class BoostButtonColorConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + => value is true + ? new SolidColorBrush(Color.FromRgb(255, 69, 58)) + : new SolidColorBrush(Color.FromRgb(48, 209, 88)); + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + => throw new NotSupportedException(); +} diff --git a/Core/Logger.cs b/Core/Logger.cs new file mode 100644 index 0000000..cc45dfe --- /dev/null +++ b/Core/Logger.cs @@ -0,0 +1,71 @@ +using System.IO; + +namespace SpdUp.Core; + +/// +/// Application-wide logging service with live event for UI consumption. +/// +public static class Logger +{ + private static readonly object _lock = new(); + private static readonly string _logDir = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "SpdUp", "Logs"); + + /// Fired on every log write – subscribers receive the formatted line. + public static event Action? LogWritten; + + static Logger() + { + Directory.CreateDirectory(_logDir); + } + + private static string LogFile => Path.Combine(_logDir, $"SpdUp_{DateTime.Now:yyyy-MM-dd}.log"); + + public static void Info(string message) => Write("INFO", message); + public static void Warn(string message) => Write("WARN", message); + public static void Error(string message, Exception? ex = null) + { + var msg = ex is null ? message : $"{message} | {ex.GetType().Name}: {ex.Message}\n{ex.StackTrace}"; + Write("ERROR", msg); + } + + private static void Write(string level, string message) + { + var line = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] [{level}] {message}"; + lock (_lock) + { + try + { + File.AppendAllText(LogFile, line + Environment.NewLine); + } + catch + { + // Swallow – logging must never crash the app. + } + } + + // Notify UI subscribers + try { LogWritten?.Invoke(line); } catch { } + +#if DEBUG + System.Diagnostics.Debug.WriteLine(line); +#endif + } + + /// + /// Removes log files older than the specified number of days. + /// + public static void PurgeOldLogs(int keepDays = 14) + { + try + { + var cutoff = DateTime.Now.AddDays(-keepDays); + foreach (var file in Directory.GetFiles(_logDir, "SpdUp_*.log")) + { + if (File.GetCreationTime(file) < cutoff) + File.Delete(file); + } + } + catch { /* best-effort */ } + } +} diff --git a/Core/NativeMethods.cs b/Core/NativeMethods.cs new file mode 100644 index 0000000..b510776 --- /dev/null +++ b/Core/NativeMethods.cs @@ -0,0 +1,153 @@ +using System.Runtime.InteropServices; + +namespace SpdUp.Core; + +/// +/// P/Invoke declarations used across the application. +/// +public static class NativeMethods +{ + // ── Memory management ────────────────────────────────────────────── + [DllImport("psapi.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool EmptyWorkingSet(IntPtr hProcess); + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId); + + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool CloseHandle(IntPtr hObject); + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern bool SetProcessWorkingSetSizeEx( + IntPtr hProcess, IntPtr dwMinimumWorkingSetSize, IntPtr dwMaximumWorkingSetSize, uint flags); + + // ── Timer resolution ─────────────────────────────────────────────── + [DllImport("ntdll.dll", SetLastError = true)] + public static extern int NtSetTimerResolution(uint DesiredResolution, bool SetResolution, out uint CurrentResolution); + + [DllImport("ntdll.dll", SetLastError = true)] + public static extern int NtQueryTimerResolution(out uint MinimumResolution, out uint MaximumResolution, out uint CurrentResolution); + + // ── System memory info ───────────────────────────────────────────── + [StructLayout(LayoutKind.Sequential)] + public struct MEMORYSTATUSEX + { + public uint dwLength; + public uint dwMemoryLoad; + public ulong ullTotalPhys; + public ulong ullAvailPhys; + public ulong ullTotalPageFile; + public ulong ullAvailPageFile; + public ulong ullTotalVirtual; + public ulong ullAvailVirtual; + public ulong ullAvailExtendedVirtual; + } + + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer); + + // ── System cache / standby list purge ────────────────────────────── + public enum SYSTEM_MEMORY_LIST_COMMAND + { + MemoryCaptureAccessedBits = 0, + MemoryCaptureAndResetAccessedBits = 1, + MemoryEmptyWorkingSets = 2, + MemoryFlushModifiedList = 3, + MemoryPurgeStandbyList = 4, + MemoryPurgeLowPriorityStandbyList = 5, + MemoryCommandMax = 6 + } + + [DllImport("ntdll.dll")] + public static extern int NtSetSystemInformation( + int SystemInformationClass, ref int SystemInformation, int SystemInformationLength); + + // SystemMemoryListInformation = 0x0050 + public const int SystemMemoryListInformation = 0x0050; + + // ── Privilege ────────────────────────────────────────────────────── + [DllImport("advapi32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle); + + [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool LookupPrivilegeValue(string? lpSystemName, string lpName, out LUID lpLuid); + + [DllImport("advapi32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool AdjustTokenPrivileges( + IntPtr TokenHandle, bool DisableAllPrivileges, + ref TOKEN_PRIVILEGES NewState, uint BufferLength, + IntPtr PreviousState, IntPtr ReturnLength); + + [StructLayout(LayoutKind.Sequential)] + public struct LUID + { + public uint LowPart; + public int HighPart; + } + + [StructLayout(LayoutKind.Sequential)] + public struct LUID_AND_ATTRIBUTES + { + public LUID Luid; + public uint Attributes; + } + + [StructLayout(LayoutKind.Sequential)] + public struct TOKEN_PRIVILEGES + { + public uint PrivilegeCount; + public LUID_AND_ATTRIBUTES Privileges; + } + + public const uint TOKEN_ADJUST_PRIVILEGES = 0x0020; + public const uint TOKEN_QUERY = 0x0008; + public const uint SE_PRIVILEGE_ENABLED = 0x00000002; + public const string SE_DEBUG_NAME = "SeDebugPrivilege"; + public const string SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"; + public const string SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"; + + public const uint PROCESS_ALL_ACCESS = 0x001F0FFF; + public const uint PROCESS_SET_INFORMATION = 0x0200; + public const uint PROCESS_QUERY_INFORMATION = 0x0400; + + /// + /// Enable a privilege on the current process token. + /// + public static bool EnablePrivilege(string privilege) + { + try + { + if (!OpenProcessToken(System.Diagnostics.Process.GetCurrentProcess().Handle, + TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, out var tokenHandle)) + return false; + + try + { + if (!LookupPrivilegeValue(null, privilege, out var luid)) + return false; + + var tp = new TOKEN_PRIVILEGES + { + PrivilegeCount = 1, + Privileges = new LUID_AND_ATTRIBUTES { Luid = luid, Attributes = SE_PRIVILEGE_ENABLED } + }; + + return AdjustTokenPrivileges(tokenHandle, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero); + } + finally + { + CloseHandle(tokenHandle); + } + } + catch + { + return false; + } + } +} diff --git a/Core/ObservableObject.cs b/Core/ObservableObject.cs new file mode 100644 index 0000000..402fd6c --- /dev/null +++ b/Core/ObservableObject.cs @@ -0,0 +1,23 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace SpdUp.Core; + +/// +/// Base class for ViewModels implementing INotifyPropertyChanged. +/// +public abstract class ObservableObject : INotifyPropertyChanged +{ + public event PropertyChangedEventHandler? PropertyChanged; + + protected void OnPropertyChanged([CallerMemberName] string? propertyName = null) + => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + + protected bool SetProperty(ref T field, T value, [CallerMemberName] string? propertyName = null) + { + if (EqualityComparer.Default.Equals(field, value)) return false; + field = value; + OnPropertyChanged(propertyName); + return true; + } +} diff --git a/Core/RelayCommand.cs b/Core/RelayCommand.cs new file mode 100644 index 0000000..4b19060 --- /dev/null +++ b/Core/RelayCommand.cs @@ -0,0 +1,56 @@ +using System.Windows.Input; + +namespace SpdUp.Core; + +/// +/// A basic ICommand implementation that delegates to Action/Func. +/// +public sealed class RelayCommand : ICommand +{ + private readonly Action _execute; + private readonly Func? _canExecute; + + public RelayCommand(Action execute, Func? canExecute = null) + { + _execute = execute ?? throw new ArgumentNullException(nameof(execute)); + _canExecute = canExecute; + } + + public RelayCommand(Action execute, Func? canExecute = null) + : this(_ => execute(), canExecute is null ? null : _ => canExecute()) { } + + public event EventHandler? CanExecuteChanged + { + add => CommandManager.RequerySuggested += value; + remove => CommandManager.RequerySuggested -= value; + } + + public bool CanExecute(object? parameter) => _canExecute?.Invoke(parameter) ?? true; + public void Execute(object? parameter) => _execute(parameter); + + public void RaiseCanExecuteChanged() => CommandManager.InvalidateRequerySuggested(); +} + +/// +/// Typed relay command. +/// +public sealed class RelayCommand : ICommand +{ + private readonly Action _execute; + private readonly Func? _canExecute; + + public RelayCommand(Action execute, Func? canExecute = null) + { + _execute = execute ?? throw new ArgumentNullException(nameof(execute)); + _canExecute = canExecute; + } + + public event EventHandler? CanExecuteChanged + { + add => CommandManager.RequerySuggested += value; + remove => CommandManager.RequerySuggested -= value; + } + + public bool CanExecute(object? parameter) => _canExecute?.Invoke((T?)parameter) ?? true; + public void Execute(object? parameter) => _execute((T?)parameter); +} diff --git a/Installer/SpdUpSetup.iss b/Installer/SpdUpSetup.iss new file mode 100644 index 0000000..7600c04 --- /dev/null +++ b/Installer/SpdUpSetup.iss @@ -0,0 +1,60 @@ +; ══════════════════════════════════════════════════════════════ +; SpdUp – Gaming Booster · Inno Setup Installer Script +; Compile with Inno Setup 6+ (https://jrsoftware.org/isinfo.php) +; ══════════════════════════════════════════════════════════════ + +#define MyAppName "SpdUp" +#define MyAppVersion "1.0.0" +#define MyAppPublisher "Mandy" +#define MyAppExeName "SpdUp.exe" +#define PublishDir "..\publish\SpdUp" + +[Setup] +AppId={{E7A3F2C1-8D4B-4F6A-9C2E-1B5D7F3A8E4C} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +OutputDir=..\publish +OutputBaseFilename=SpdUp_Setup_{#MyAppVersion} +Compression=lzma2/ultra64 +SolidCompression=yes +LZMANumBlockThreads=4 +SetupIconFile= +UninstallDisplayIcon={app}\{#MyAppExeName} +PrivilegesRequired=admin +WizardStyle=modern +WizardSizePercent=110 +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +MinVersion=10.0.17763 +DisableWelcomePage=no +AllowNoIcons=yes +ShowLanguageDialog=auto + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "german"; MessagesFile: "compiler:Languages\German.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "startmenu"; Description: "Create Start Menu shortcut"; GroupDescription: "{cm:AdditionalIcons}" + +[Files] +; Include all published files recursively +Source: "{#PublishDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startmenu +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{group}\Uninstall {#MyAppName}"; Filename: "{uninstallexe}"; Tasks: startmenu + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runascurrentuser + +[UninstallDelete] +; Clean up log files and settings on uninstall +Type: filesandordirs; Name: "{app}\logs" +Type: files; Name: "{app}\settings.json" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..91c0caa --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Mandy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..2084f0c --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Free & Open Source +

+ Boost Your
Gaming Performance +

+

+ SpdUp optimizes your Windows PC for gaming — CPU priority, RAM cleanup, GPU tweaks, network tuning, and service management. All in one click. +

+ +
+
+
8+
+
Optimization Steps
+
+
+
0ms
+
Timer Resolution
+
+
+
1‑Click
+
Boost Activation
+
+
+
100%
+
Free Forever
+
+
+
+
+ + +
+
+
+
+
SpdUp – Gaming Booster
+
+
+
+
+
+
+
+
+
⚡ SpdUp Gaming Booster
+
Main
+
📊 Dashboard
+
🚀 Game Boost
+
📈 System Monitor
+
Manage
+
🎮 Game Library
+
📋 Processes
+
Services
+
Other
+
🖥 Widget
+
🐛 Debug Log
+
Settings
+
+
+
+
+
+
+
+
Made with ❤️ by Mandy
+
+
+
+
+
Dashboard
+
+ CPU 12% + RAM 54% + GPU 3% + Ping 14ms +
+
+
+
+
CPU Usage
+
12%
+
+
+
RAM Usage
+
8.7 GB
+
+
+
GPU Temp
+
42°C
+
+
+
Network
+
14ms
+
+
+
+
🚀
+
+
Game Boost Ready
+
Click to optimize CPU, RAM, GPU, network, and services for peak gaming performance.
+
+ CPU Priority + RAM Cleanup + Timer Res + GPU Tweaks + Network + Services +
+
+
+
+
+
+
+
+ + +
+
+ Features +

+ Everything You Need to Win +

+

+ SpdUp packs powerful optimization tools into a beautiful dark UI — designed for gamers who want every last frame. +

+
+
+
🚀
+

One-Click Boost

+

Activate Game Boost to set CPU priority, flush RAM, lower timer resolution, tweak GPU power profiles, optimize network settings, and stop unnecessary services — all with a single click.

+
+
+
🧹
+

RAM Optimizer

+

Deep RAM cleanup that goes beyond simple cache clearing: trims working sets of all processes and purges the Windows Standby List using kernel-level calls for maximum free memory.

+
+
+
📈
+

Real-Time Monitor

+

Live system metrics including CPU, GPU, RAM utilization, temperatures, fan speeds, and network latency — powered by LibreHardwareMonitor for accurate hardware readings.

+
+
+
🌐
+

Network Optimizer

+

Applies TCP registry tweaks (Nagle's algorithm, receive window auto-tuning) and monitors ping latency in real-time. Designed for low-latency competitive gaming.

+
+
+
⚙️
+

Service Manager

+

Smart service detection identifies non-essential Windows services that consume resources. Safely disable them during gaming and restore them afterward.

+
+
+
🎮
+

Game Detection

+

Automatically detects when you launch a game and applies boost optimizations. Detects 30+ popular games including Steam, Epic, Riot, Blizzard, and EA titles.

+
+
+
🗑️
+

Shader Cache Cleaner

+

Clears DirectX, NVIDIA, AMD, and Intel shader caches to free disk space and fix rendering issues. Scans all known cache locations automatically.

+
+
+
📋
+

Process Manager

+

View and manage running processes with the ability to set CPU priority and affinity. Kill resource-hungry background processes to reclaim performance.

+
+
+
🖥️
+

Desktop Widget

+

Always-on-top floating widget shows CPU, RAM, GPU, and ping at a glance while you game — with a one-click boost button right on your desktop.

+
+
+
+
+ + +
+
+ Preview +

+ See It In Action +

+

+ A dark, modern UI designed for gamers who appreciate clean aesthetics. +

+
+ + + + + + +
+
+
+ +
📊
+
Dashboard View
+
Place your screenshot in website/screenshots/dashboard.png
+
+
+
+
+ + +
+
+ How it Works +

+ Three Steps to Peak Performance +

+
+
+
1
+

Install & Launch

+

Run the installer and launch SpdUp. It automatically requests administrator privileges for deep system optimizations.

+
+
+
2
+

Hit Boost

+

Click the Boost button — SpdUp instantly optimizes CPU, RAM, GPU, network, timer resolution, and disables unnecessary services.

+
+
+
3
+

Game On

+

Play with maximum performance. When you're done, click Restore to bring everything back to normal. That's it.

+
+
+
+
+ + +
+
+ Under the Hood +

+ Built with Modern Technology +

+
+
+
🏗️
+
+

.NET 8 + WPF

+

Built on the latest .NET runtime. Self-contained — no framework install needed.

+
+
+
+
🧠
+
+

MVVM Architecture

+

Clean separation of concerns with full data binding and reactive UI updates.

+
+
+
+
🔧
+
+

Kernel-Level Tuning

+

P/Invoke calls to NtSetTimerResolution, EmptyWorkingSet, and standby list purge.

+
+
+
+
🌡️
+
+

Hardware Monitoring

+

LibreHardwareMonitor integration for real CPU/GPU temps, fan speeds, and clocks.

+
+
+
+
🛡️
+
+

Admin Privileges

+

Runs elevated with proper manifest for safe access to protected system APIs.

+
+
+
+
🎨
+
+

Custom Dark Theme

+

Full custom chrome, styled scrollbars, buttons, and data grids. No Windows chrome.

+
+
+
+
📦
+
+

Single Installer

+

Inno Setup packages everything into one .exe — install, run, done.

+
+
+
+
📝
+
+

Debug Logging

+

Built-in debug log with live filtering, copy, and file logging for troubleshooting.

+
+
+
+
+
+ + +
+
+

System Requirements

+
+
+
💻
+
+

Windows 10/11

+

64-bit, version 1809 or later

+
+
+
+
🧮
+
+

4 GB RAM

+

8 GB or more recommended

+
+
+
+
💾
+
+

200 MB Disk Space

+

For the installed application

+
+
+
+
+
+ + +
+
+
+

Ready to Boost?

+

Download SpdUp for free and unlock your PC's full gaming potential.

+ + ⬇ Download SpdUp v1.0.0 + +
+ 📦 ~60 MB + 🪟 Windows 10/11 + 🔓 No account needed + 💚 Free forever +
+
+
+
+ + +
+
+ + +
+
+ + + + +