Skip to content

Portable Tool for an Ideal Windows Setup

add new tools & split URL resolvers into separate methods

Greedeks122d5e4727fe
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/CapFrameX.png b/.Source/GTweak/Assets/Images/DownloadToolset/CapFrameX.png
new file mode 100644
index 00000000..16abb99b
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/CapFrameX.png differ
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/Cinebench.png b/.Source/GTweak/Assets/Images/DownloadToolset/Cinebench.png
new file mode 100644
index 00000000..b0ce3052
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/Cinebench.png differ
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/FurMark.png b/.Source/GTweak/Assets/Images/DownloadToolset/FurMark.png
new file mode 100644
index 00000000..263e7de0
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/FurMark.png differ
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/Hidusbf.png b/.Source/GTweak/Assets/Images/DownloadToolset/Hidusbf.png
new file mode 100644
index 00000000..9a85dd82
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/Hidusbf.png differ
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/RawAccel.png b/.Source/GTweak/Assets/Images/DownloadToolset/RawAccel.png
new file mode 100644
index 00000000..15ef9830
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/RawAccel.png differ
diff --git a/.Source/GTweak/Assets/Images/DownloadToolset/ZenTimings.png b/.Source/GTweak/Assets/Images/DownloadToolset/ZenTimings.png
new file mode 100644
index 00000000..de972e75
Binary files /dev/null and b/.Source/GTweak/Assets/Images/DownloadToolset/ZenTimings.png differ
diff --git a/.Source/GTweak/Assets/Images/ImageResources.xaml b/.Source/GTweak/Assets/Images/ImageResources.xaml
index 6a034f95..94638f88 100644
--- a/.Source/GTweak/Assets/Images/ImageResources.xaml
+++ b/.Source/GTweak/Assets/Images/ImageResources.xaml
@@ -11,20 +11,26 @@
<!--#region DownloadToolset -->
<BitmapImage x:Key="Img_Amd" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Amd.png"/>
<BitmapImage x:Key="Img_Autoruns" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Autoruns.png"/>
+ <BitmapImage x:Key="Img_CapFrameX" UriSource="/GTweak;component/Assets/Images/DownloadToolset/CapFrameX.png"/>
+ <BitmapImage x:Key="Img_Cinebench" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Cinebench.png"/>
<BitmapImage x:Key="Img_CPUz" UriSource="/GTweak;component/Assets/Images/DownloadToolset/CPUz.png"/>
<BitmapImage x:Key="Img_DeviceTweaker" UriSource="/GTweak;component/Assets/Images/DownloadToolset/DeviceTweaker.png"/>
<BitmapImage x:Key="Img_DiskInfo" UriSource="/GTweak;component/Assets/Images/DownloadToolset/DiskInfo.png"/>
<BitmapImage x:Key="Img_DiskMark" UriSource="/GTweak;component/Assets/Images/DownloadToolset/DiskMark.png"/>
<BitmapImage x:Key="Img_FirstEverTech" UriSource="/GTweak;component/Assets/Images/DownloadToolset/FirstEverTech.png"/>
+ <BitmapImage x:Key="Img_FurMark" UriSource="/GTweak;component/Assets/Images/DownloadToolset/FurMark.png"/>
<BitmapImage x:Key="Img_GPUz" UriSource="/GTweak;component/Assets/Images/DownloadToolset/GPUz.png"/>
+ <BitmapImage x:Key="Img_Hidusbf" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Hidusbf.png"/>
<BitmapImage x:Key="Img_Nvidia" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Nvidia.png"/>
<BitmapImage x:Key="Img_NvidiaPI" UriSource="/GTweak;component/Assets/Images/DownloadToolset/NvidiaPI.png"/>
<BitmapImage x:Key="Img_Occt" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Occt.png"/>
<BitmapImage x:Key="Img_PCIz" UriSource="/GTweak;component/Assets/Images/DownloadToolset/PCIz.png"/>
<BitmapImage x:Key="Img_Rapr" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Rapr.png"/>
+ <BitmapImage x:Key="Img_RawAccel" UriSource="/GTweak;component/Assets/Images/DownloadToolset/RawAccel.png"/>
<BitmapImage x:Key="Img_Rufus" UriSource="/GTweak;component/Assets/Images/DownloadToolset/Rufus.png"/>
<BitmapImage x:Key="Img_SystemInfo" UriSource="/GTweak;component/Assets/Images/DownloadToolset/SystemInfo.png"/>
<BitmapImage x:Key="Img_ThrottleStop" UriSource="/GTweak;component/Assets/Images/DownloadToolset/ThrottleStop.png"/>
+ <BitmapImage x:Key="Img_ZenTimings" UriSource="/GTweak;component/Assets/Images/DownloadToolset/ZenTimings.png"/>
<!--#endregion -->
<!--#region PreinstalledApps -->
diff --git a/.Source/GTweak/Core/Services/ToolsetDownloadService.cs b/.Source/GTweak/Core/Services/ToolsetDownloadService.cs
index f6a97ace..b24799a3 100644
--- a/.Source/GTweak/Core/Services/ToolsetDownloadService.cs
+++ b/.Source/GTweak/Core/Services/ToolsetDownloadService.cs
@@ -19,6 +19,7 @@ namespace GTweak.Core.Services
internal static class ToolsetDownloadService
{
private static readonly HttpClient _httpClient;
+ private static readonly HashSet<string> _excludedAssetExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".sig", ".sha256", ".asc", ".txt" };
private static readonly ConcurrentDictionary<string, DownloadSession> _sessions = new ConcurrentDictionary<string, DownloadSession>();
static ToolsetDownloadService()
@@ -29,195 +30,20 @@ namespace GTweak.Core.Services
internal static DownloadSession GetOrCreateSession(ToolsetModel model) => _sessions.GetOrAdd(!string.IsNullOrWhiteSpace(model.SourceUrl) ? model.SourceUrl : model.AppName, _ => new DownloadSession(model));
- internal static async Task<string> GetResolvedDownloadUrl(ToolsetModel model, CancellationToken token = default)
+ private static readonly Dictionary<string, Func<ToolsetModel, CancellationToken, Task<string>>> _resolvers = new Dictionary<string, Func<ToolsetModel, CancellationToken, Task<string>>>(StringComparer.OrdinalIgnoreCase)
{
- if (model.Group.Equals("web", StringComparison.OrdinalIgnoreCase))
- {
- if (string.IsNullOrEmpty(model.UrlPattern))
- {
- return model.DownloadPath;
- }
-
- using HttpResponseMessage response = await _httpClient.GetAsync(model.DownloadPath, token);
- response.EnsureSuccessStatusCode();
- string htmlCode = await response.Content.ReadAsStringAsync();
- Match match = Regex.Match(htmlCode, model.UrlPattern, RegexOptions.IgnoreCase);
-
- if (match.Success)
- {
- string url = match.Value;
- if (Uri.TryCreate(url, UriKind.Relative, out _))
- {
- if (Uri.TryCreate(new Uri(model.DownloadPath), url, out Uri absoluteUri))
- {
- return absoluteUri.ToString();
- }
- }
- return url;
- }
-
- throw new HttpRequestException();
- }
-
- if (model.Group.Equals("github", StringComparison.OrdinalIgnoreCase))
- {
- string apiUrl = PathTargets.Links.DownloadSources.GitHubLatest(model.DownloadPath);
- using HttpResponseMessage response = await _httpClient.GetAsync(apiUrl, token);
-
- if (!response.IsSuccessStatusCode)
- {
- if (response.StatusCode == HttpStatusCode.Forbidden || (int)response.StatusCode == 429)
- {
- throw new Exception("GitHubRateLimit");
- }
-
- throw new HttpRequestException();
- }
-
- string content = await response.Content.ReadAsStringAsync();
- JObject json = JObject.Parse(content);
-
- if (json["assets"] is JArray assets && assets.Count > 0)
- {
- List<string> urls = assets.Select(a => a["browser_download_url"]?.ToString()).Where(u => !string.IsNullOrEmpty(u)).ToList();
-
- if (!string.IsNullOrEmpty(model.FilePattern))
- {
- string matchedUrl = urls.FirstOrDefault(u => Regex.IsMatch(u, model.FilePattern, RegexOptions.IgnoreCase));
- if (matchedUrl != null)
- {
- return matchedUrl;
- }
- }
-
- string fallbackUrl = urls.FirstOrDefault(u => !u.EndsWith(".sig", StringComparison.OrdinalIgnoreCase) && !u.EndsWith(".sha256", StringComparison.OrdinalIgnoreCase) && !u.EndsWith(".asc", StringComparison.OrdinalIgnoreCase) && !u.EndsWith(".txt", StringComparison.OrdinalIgnoreCase));
-
- return fallbackUrl ?? urls.FirstOrDefault();
- }
- throw new HttpRequestException();
- }
-
- if (model.Group.Equals("sourceforge", StringComparison.OrdinalIgnoreCase))
- {
- string projectName = model.DownloadPath;
- Match match = Regex.Match(projectName, @"projects/([^/]+)");
- projectName = match.Success ? match.Groups[1].Value : projectName.Trim('/');
-
- string bestReleaseUrl = PathTargets.Links.DownloadSources.SourceForgeBest(projectName);
- try
- {
- using HttpResponseMessage response = await _httpClient.GetAsync(bestReleaseUrl, token);
- if (response.IsSuccessStatusCode)
- {
- string content = await response.Content.ReadAsStringAsync();
- JObject json = JObject.Parse(content);
- string filename = json["release"]?["filename"]?.ToString();
-
- if (!string.IsNullOrEmpty(filename))
- {
- if (string.IsNullOrEmpty(model.FilePattern) || Regex.IsMatch(filename, model.FilePattern, RegexOptions.IgnoreCase))
- {
- return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, filename.TrimStart('/'));
- }
- }
- }
- }
- catch (Exception ex)
- {
- ErrorLogger.LogDebug(ex);
- }
-
- try
- {
- string rssUrl = PathTargets.Links.DownloadSources.SourceForgeRss(projectName);
- using HttpResponseMessage rssResponse = await _httpClient.GetAsync(rssUrl, token);
- rssResponse.EnsureSuccessStatusCode();
- string rssContent = await rssResponse.Content.ReadAsStringAsync();
-
- MatchCollection rssMatches = Regex.Matches(rssContent, PathTargets.Links.DownloadSources.SourceForgeRssRegex(projectName), RegexOptions.IgnoreCase);
-
- if (rssMatches.Count > 0)
- {
- if (!string.IsNullOrEmpty(model.FilePattern))
- {
- foreach (Match rssMatch in rssMatches)
- {
- string filePath = rssMatch.Groups[1].Value;
- if (Regex.IsMatch(filePath, model.FilePattern, RegexOptions.IgnoreCase))
- {
-
- return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, filePath.TrimStart('/'));
- }
- }
- }
+ ["web"] = ResolveDirectUrl,
+ ["github"] = ResolveGitHubUrl,
+ ["sourceforge"] = ResolveSourceForgeUrl,
+ ["techpowerup"] = ResolveTechPowerUpUrl,
+ ["maxon"] = ResolveMaxonUrl,
+ };
- string firstFilePath = rssMatches[0].Groups[1].Value;
- return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, firstFilePath.TrimStart('/'));
- }
- }
- catch (Exception ex)
- {
- ErrorLogger.LogDebug(ex);
- }
-
- throw new HttpRequestException();
- }
-
- if (model.Group.Equals("techpowerup", StringComparison.OrdinalIgnoreCase))
+ internal static async Task<string> GetResolvedDownloadUrl(ToolsetModel model, CancellationToken token = default)
+ {
+ if (_resolvers.TryGetValue(model.Group, out var resolver))
{
- using HttpResponseMessage initialResponse = await _httpClient.GetAsync(model.DownloadPath, token);
- initialResponse.EnsureSuccessStatusCode();
- string initialHtml = await initialResponse.Content.ReadAsStringAsync();
-
- Match idMatch = Regex.Match(initialHtml, @"name=""id""\s+value=""(?<id>\d+)""", RegexOptions.IgnoreCase);
-
- if (!idMatch.Success)
- {
- throw new HttpRequestException();
- }
-
- string fileId = idMatch.Groups["id"].Value;
-
- FormUrlEncodedContent firstStepPayload = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("id", fileId) });
-
- using HttpResponseMessage firstResponse = await _httpClient.PostAsync(model.DownloadPath, firstStepPayload, token);
- string serverSelectionHtml = await firstResponse.Content.ReadAsStringAsync();
-
- MatchCollection serverMatches = Regex.Matches(serverSelectionHtml, @"(?is)<button[^>]+?name=""server_id""[^>]+?value=""(?<sid>\d+)""[^>]*>(?<content>.*?)</button>");
-
- string closestId = null, lowLoadId = null, firstId = null;
-
- foreach (Match m in serverMatches)
- {
- string sid = m.Groups["sid"].Value;
- string content = m.Groups["content"].Value;
-
- firstId ??= sid;
-
- if (content.IndexOf("closest", StringComparison.OrdinalIgnoreCase) >= 0)
- {
- closestId = sid;
- break;
- }
-
- if (lowLoadId == null && content.IndexOf("server-load low", StringComparison.OrdinalIgnoreCase) >= 0)
- {
- lowLoadId = sid;
- }
- }
-
- FormUrlEncodedContent finalPayload = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("id", fileId), new KeyValuePair<string, string>("server_id", closestId ?? lowLoadId ?? firstId ?? throw new HttpRequestException()) });
-
- using HttpRequestMessage finalRequest = new HttpRequestMessage(HttpMethod.Post, model.DownloadPath)
- {
- Content = finalPayload
- };
-
- finalRequest.Headers.Referrer = new Uri(model.DownloadPath);
-
- using HttpResponseMessage finalResponse = await _httpClient.SendAsync(finalRequest, HttpCompletionOption.ResponseHeadersRead, token);
-
- return finalResponse.RequestMessage.RequestUri.ToString();
+ return await resolver(model, token);
}
throw new HttpRequestException();
@@ -326,5 +152,246 @@ namespace GTweak.Core.Services
throw;
}
}
+
+ private static async Task<string> ResolveDirectUrl(ToolsetModel model, CancellationToken token)
+ {
+ if (string.IsNullOrEmpty(model.UrlPattern))
+ {
+ return model.DownloadPath;
+ }
+
+ using HttpResponseMessage response = await _httpClient.GetAsync(model.DownloadPath, token);
+ response.EnsureSuccessStatusCode();
+ string htmlCode = await response.Content.ReadAsStringAsync();
+ Match match = Regex.Match(htmlCode, model.UrlPattern, RegexOptions.IgnoreCase);
+
+ if (match.Success)
+ {
+ string url = match.Value;
+ if (Uri.TryCreate(url, UriKind.Relative, out _))
+ {
+ if (Uri.TryCreate(new Uri(model.DownloadPath), url, out Uri absoluteUri))
+ {
+ return absoluteUri.ToString();
+ }
+ }
+ return url;
+ }
+
+ throw new HttpRequestException();
+ }
+
+ private static async Task<string> ResolveGitHubUrl(ToolsetModel model, CancellationToken token)
+ {
+ if (!string.IsNullOrEmpty(model.FilePattern) && model.FilePattern.StartsWith("raw:", StringComparison.OrdinalIgnoreCase))
+ {
+ return $"https://raw.githubusercontent.com/{model.DownloadPath}/master/{model.FilePattern.Substring(4)}";
+ }
+
+ string apiUrl = PathTargets.Links.DownloadSources.GitHubLatest(model.DownloadPath);
+ using HttpResponseMessage response = await _httpClient.GetAsync(apiUrl, token);
+
+ if (!response.IsSuccessStatusCode)
+ {
+ if (response.StatusCode == HttpStatusCode.Forbidden || (int)response.StatusCode == 429)
+ {
+ throw new Exception("GitHubRateLimit");
+ }
+
+ throw new HttpRequestException();
+ }
+
+ string content = await response.Content.ReadAsStringAsync();
+ JObject json = JObject.Parse(content);
+
+ if (json["assets"] is JArray assets && assets.Count > 0)
+ {
+ List<string> urls = assets.Select(a => a["browser_download_url"]?.ToString()).Where(u => !string.IsNullOrEmpty(u)).ToList();
+
+ if (!string.IsNullOrEmpty(model.FilePattern))
+ {
+ string matchedUrl = urls.FirstOrDefault(u => Regex.IsMatch(u, model.FilePattern, RegexOptions.IgnoreCase));
+ if (matchedUrl != null)
+ {
+ return matchedUrl;
+ }
+ }
+
+ string fallbackUrl = urls.FirstOrDefault(u => !_excludedAssetExtensions.Contains(Path.GetExtension(u)));
+
+ return fallbackUrl ?? urls.FirstOrDefault();
+ }
+ throw new HttpRequestException();
+ }
+
+ private static async Task<string> ResolveSourceForgeUrl(ToolsetModel model, CancellationToken token)
+ {
+ string projectName = model.DownloadPath;
+ Match match = Regex.Match(projectName, @"projects/([^/]+)");
+ projectName = match.Success ? match.Groups[1].Value : projectName.Trim('/');
+
+ string bestReleaseUrl = PathTargets.Links.DownloadSources.SourceForgeBest(projectName);
+ try
+ {
+ using HttpResponseMessage response = await _httpClient.GetAsync(bestReleaseUrl, token);
+ if (response.IsSuccessStatusCode)
+ {
+ string content = await response.Content.ReadAsStringAsync();
+ JObject json = JObject.Parse(content);
+ string filename = json["release"]?["filename"]?.ToString();
+
+ if (!string.IsNullOrEmpty(filename))
+ {
+ if (string.IsNullOrEmpty(model.FilePattern) || Regex.IsMatch(filename, model.FilePattern, RegexOptions.IgnoreCase))
+ {
+ return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, filename.TrimStart('/'));
+ }
+ }
+ }
+ }
+ catch (Exception ex) { ErrorLogger.LogDebug(ex); }
+
+ try
+ {
+ string rssUrl = PathTargets.Links.DownloadSources.SourceForgeRss(projectName);
+ using HttpResponseMessage rssResponse = await _httpClient.GetAsync(rssUrl, token);
+ rssResponse.EnsureSuccessStatusCode();
+ string rssContent = await rssResponse.Content.ReadAsStringAsync();
+
+ MatchCollection rssMatches = Regex.Matches(rssContent, PathTargets.Links.DownloadSources.SourceForgeRssRegex(projectName), RegexOptions.IgnoreCase);
+
+ if (rssMatches.Count > 0)
+ {
+ if (!string.IsNullOrEmpty(model.FilePattern))
+ {
+ foreach (Match rssMatch in rssMatches)
+ {
+ string filePath = rssMatch.Groups[1].Value;
+ if (Regex.IsMatch(filePath, model.FilePattern, RegexOptions.IgnoreCase))
+ {
+ return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, filePath.TrimStart('/'));
+ }
+ }
+ }
+
+ string firstFilePath = rssMatches[0].Groups[1].Value;
+ return PathTargets.Links.DownloadSources.SourceForgeFile(projectName, firstFilePath.TrimStart('/'));
+ }
+ }
+ catch (Exception ex) { ErrorLogger.LogDebug(ex); }
+
+ throw new HttpRequestException();
+ }
+
+ private static async Task<string> ResolveTechPowerUpUrl(ToolsetModel model, CancellationToken token)
+ {
+ using HttpResponseMessage initialResponse = await _httpClient.GetAsync(model.DownloadPath, token);
+ initialResponse.EnsureSuccessStatusCode();
+ string initialHtml = await initialResponse.Content.ReadAsStringAsync();
+
+ string fileId = null;
+
+ MatchCollection fileMatches = Regex.Matches(initialHtml, @"(?is)<div class=""filename""[^>]*>\s*(?<filename>[^<]+?)\s*</div>.*?name=""id""\s+value=""(?<id>\d+)""");
+
+ if (fileMatches.Count == 0)
+ {
+ throw new HttpRequestException();
+ }
+
+ if (!string.IsNullOrEmpty(model.FilePattern))
+ {
+ foreach (Match m in fileMatches)
+ {
+ string filename = m.Groups["filename"].Value.Trim();
+ if (Regex.IsMatch(filename, model.FilePattern, RegexOptions.IgnoreCase))
+ {
+ fileId = m.Groups["id"].Value;
+ break;
+ }
+ }
+ }
+
+ if (string.IsNullOrEmpty(fileId))
+ {
+ fileId = fileMatches[0].Groups["id"].Value;
+ }
+
+ FormUrlEncodedContent firstStepPayload = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("id", fileId) });
+
+ using HttpResponseMessage firstResponse = await _httpClient.PostAsync(model.DownloadPath, firstStepPayload, token);
+ string serverSelectionHtml = await firstResponse.Content.ReadAsStringAsync();
+
+ MatchCollection serverMatches = Regex.Matches(serverSelectionHtml, @"(?is)<button[^>]+?name=""server_id""[^>]+?value=""(?<sid>\d+)""[^>]*>(?<content>.*?)</button>");
+
+ string closestId = null, lowLoadId = null, firstId = null;
+
+ foreach (Match m in serverMatches)
+ {
+ string sid = m.Groups["sid"].Value;
+ string content = m.Groups["content"].Value;
+
+ firstId ??= sid;
+
+ if (content.IndexOf("closest", StringComparison.OrdinalIgnoreCase) >= 0)
+ {
+ closestId = sid;
+ break;
+ }
+
+ if (lowLoadId == null && content.IndexOf("server-load low", StringComparison.OrdinalIgnoreCase) >= 0)
+ {
+ lowLoadId = sid;
+ }
+ }
+
+ FormUrlEncodedContent finalPayload = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("id", fileId), new KeyValuePair<string, string>("server_id", closestId ?? lowLoadId ?? firstId ?? throw new HttpRequestException()) });
+
+ using HttpRequestMessage finalRequest = new HttpRequestMessage(HttpMethod.Post, model.DownloadPath)
+ {
+ Content = finalPayload
+ };
+
+ finalRequest.Headers.Referrer = new Uri(model.DownloadPath);
+
+ using HttpResponseMessage finalResponse = await _httpClient.SendAsync(finalRequest, HttpCompletionOption.ResponseHeadersRead, token);
+
+ return finalResponse.RequestMessage.RequestUri.ToString();
+ }
+
+ private static async Task<string> ResolveMaxonUrl(ToolsetModel model, CancellationToken token)
+ {
+ using HttpResponseMessage response = await _httpClient.GetAsync(model.DownloadPath, token);
+ response.EnsureSuccessStatusCode();
+ string html = await response.Content.ReadAsStringAsync();
+
+ MatchCollection matches = Regex.Matches(html, @"href=""(?<url>https://[^""]+)""", RegexOptions.IgnoreCase);
+
+ if (matches.Count == 0)
+ {
+ throw new HttpRequestException();
+ }
+
+ string matchedUrl = null;
+
+ if (!string.IsNullOrEmpty(model.FilePattern))
+ {
+ foreach (Match m in matches)
+ {
+ string url = m.Groups["url"].Value;
+ if (Regex.IsMatch(url, model.FilePattern, RegexOptions.IgnoreCase))
+ {
+ matchedUrl = url;
+ break;
+ }
+ }
+ }
+
+ if (string.IsNullOrEmpty(matchedUrl))
+ {
+ matchedUrl = matches.Cast<Match>().FirstOrDefault(m => m.Groups["url"].Value.IndexOf("win_x86_64", StringComparison.OrdinalIgnoreCase) >= 0)?.Groups["url"].Value ?? matches[0].Groups["url"].Value;
+ }
+
+ return matchedUrl;
+ }
}
}
\ No newline at end of file
diff --git a/.Source/GTweak/Resources/ToolsetStore.json b/.Source/GTweak/Resources/ToolsetStore.json
index c992377d..bd9cc5fe 100644
--- a/.Source/GTweak/Resources/ToolsetStore.json
+++ b/.Source/GTweak/Resources/ToolsetStore.json
@@ -1,182 +1,248 @@
[
- {
- "icon": "Img_Nvidia",
- "name": "NVIDIA App",
- "group": "web",
- "placeholderIcon": "Icon_Website",
- "author": "(C) NVIDIA Corporation",
- "authorIcon": "nvidia.com",
- "source": "https://www.nvidia.com/en-eu/software/nvidia-app/",
- "downloadPath": "https://www.nvidia.com/en-us/software/nvidia-app/",
- "urlPattern": "https://.*?download\\.nvidia\\.com/nvapp/client/.*?/NVIDIA_app_.*?\\.exe"
- },
- {
- "icon": "Img_Amd",
- "name": "AMD Software: Adrenalin Edition™",
- "group": "web",
- "placeholderIcon": "Icon_Website",
- "author": "Advanced Micro Devices, Inc",
- "authorIcon": "amd.com",
- "source": "https://www.amd.com/en/support/download/drivers.html",
- "downloadPath": "https://www.amd.com/en/support/download/drivers.html",
- "urlPattern": "https://drivers\\.amd\\.com/drivers/installer/.*?/whql/.*?minimalsetup.*?\\.exe"
- },
- {
- "icon": "Img_FirstEverTech",
- "name": "Universal Intel Chipset Device Updater",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "FirstEverTech",
- "authorIcon": "https://github.com/FirstEverTech.png",
- "source": "https://github.com/FirstEverTech/Universal-Intel-Chipset-Updater",
- "downloadPath": "FirstEverTech/Universal-Intel-Chipset-Updater",
- "filePattern": ".*\\.exe$"
- },
- {
- "icon": "Img_FirstEverTech",
- "name": "Universal Intel Wi-Fi and Bluetooth Drivers Updater",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "FirstEverTech",
- "authorIcon": "https://github.com/FirstEverTech.png",
- "source": "https://github.com/FirstEverTech/Universal-Intel-WiFi-BT-Updater",
- "downloadPath": "FirstEverTech/Universal-Intel-WiFi-BT-Updater",
- "filePattern": ".*\\.exe$"
- },
- {
- "icon": "Img_Rapr",
- "name": "Driver Store Explorer",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "lostindark",
- "authorIcon": "https://github.com/lostindark.png",
- "source": "https://github.com/lostindark/DriverStoreExplorer",
- "downloadPath": "lostindark/DriverStoreExplorer",
- "filePattern": "(?i)DriverStoreExplorer.*\\.zip$"
- },
- {
- "icon": "Img_NvidiaPI",
- "name": "NVIDIA Profile Inspector",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "Orbmu2k",
- "authorIcon": "https://github.com/Orbmu2k.png",
- "source": "https://github.com/Orbmu2k/nvidiaProfileInspector",
- "downloadPath": "Orbmu2k/nvidiaProfileInspector",
- "filePattern": "(?i)nvidiaProfileInspector.*\\.zip$"
- },
- {
- "icon": "Img_DeviceTweaker",
- "name": "DEVICE TWEAKER",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "arsenzaaa",
- "authorIcon": "https://github.com/arsenzaaa.png",
- "source": "https://github.com/arsenzaaa/DEVICE-TWEAKER",
- "downloadPath": "arsenzaaa/DEVICE-TWEAKER",
- "filePattern": "(?i)DEVICE.*NET.*FRAMEWORK.*\\.exe$"
- },
- {
- "icon": "Img_Autoruns",
- "name": "Autoruns",
- "group": "web",
- "placeholderIcon": "Icon_Website",
- "author": "Mark Russinovich",
- "authorIcon": "microsoft.com",
- "source": "https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns",
- "downloadPath": "https://download.sysinternals.com/files/Autoruns.zip"
- },
- {
- "icon": "Img_Rufus",
- "name": "Rufus",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "pbatard",
- "authorIcon": "https://github.com/pbatard.png",
- "source": "https://github.com/pbatard/rufus",
- "downloadPath": "pbatard/rufus",
- "filePattern": "(?i)rufus-.*?p\\.exe$"
- },
- {
- "icon": "Img_SystemInfo",
- "name": "SystemInformer",
- "group": "github",
- "placeholderIcon": "Icon_Git",
- "author": "Winsider Seminars & Solutions, Inc",
- "authorIcon": "https://github.com/winsiderss.png",
- "source": "https://github.com/winsiderss/systeminformer",
- "downloadPath": "winsiderss/systeminformer",
- "filePattern": "(?i)systeminformer.*bin.*\\.zip"
- },
- {
- "icon": "Img_CPUz",
- "name": "CPU-Z",
- "group": "sourceforge",
- "placeholderIcon": "Icon_Website",
- "author": "CPUID",
- "authorIcon": "cpuid.com",
- "source": "https://sourceforge.net/projects/cpu-z/",
- "downloadPath": "https://sourceforge.net/projects/cpu-z/files/latest/download"
- },
- {
- "icon": "Img_GPUz",
- "name": "GPU-Z",
- "group": "techpowerup",
- "placeholderIcon": "Icon_Website",
- "author": "TechPowerUp",
- "authorIcon": "techpowerup.com",
- "source": "https://www.techpowerup.com/download/techpowerup-gpu-z/",
- "downloadPath": "https://www.techpowerup.com/download/techpowerup-gpu-z/"
- },
- {
- "icon": "Img_PCIz",
- "name": "PCI-Z",
- "group": "web",
- "placeholderIcon": "Icon_Website",
- "author": "Bruno Banelli",
- "authorIcon": "pci-z.com",
- "source": "https://www.pci-z.com/#download",
- "downloadPath": "https://www.pci-z.com/current/PCI-Z.zip"
- },
- {
- "icon": "Img_DiskInfo",
- "name": "Crystal Disk Info",
- "group": "sourceforge",
- "placeholderIcon": "Icon_Website",
- "author": "hiyohiyo",
- "authorIcon": "crystalmark.info",
- "source": "https://sourceforge.net/projects/crystaldiskinfo/",
- "downloadPath": "https://sourceforge.net/projects/crystaldiskinfo/files/latest/download"
- },
- {
- "icon": "Img_DiskMark",
- "name": "Crystal Disk Mark",
- "group": "sourceforge",
- "placeholderIcon": "Icon_Website",
- "author": "hiyohiyo",
- "authorIcon": "crystalmark.info",
- "source": "https://sourceforge.net/projects/crystaldiskmark/",
- "downloadPath": "https://sourceforge.net/projects/crystaldiskmark/files/latest/download"
- },
- {
- "icon": "Img_ThrottleStop",
- "name": "ThrottleStop",
- "group": "techpowerup",
- "placeholderIcon": "Icon_Website",
- "author": "TechPowerUp",
- "authorIcon": "techpowerup.com",
- "source": "https://www.techpowerup.com/download/techpowerup-throttlestop/",
- "downloadPath": "https://www.techpowerup.com/download/techpowerup-throttlestop/"
- },
- {
- "icon": "Img_Occt",
- "name": "OCCT",
- "group": "web",
- "placeholderIcon": "Icon_Website",
- "author": "OCCT/OCBASE",
- "authorIcon": "ocbase.com",
- "source": "https://www.ocbase.com/download",
- "downloadPath": "https://www.ocbase.com/download/edition:Personal/os:Windows",
- "fileName": "OCCT.exe"
- }
-]
+ {
+ "icon": "Img_Nvidia",
+ "name": "NVIDIA App",
+ "group": "web",
+ "placeholderIcon": "Icon_Website",
+ "author": "NVIDIA Corporation",
+ "authorIcon": "nvidia.com",
+ "source": "https://www.nvidia.com/en-eu/software/nvidia-app/",
+ "downloadPath": "https://www.nvidia.com/en-us/software/nvidia-app/",
+ "urlPattern": "https://.*?download\\.nvidia\\.com/nvapp/client/.*?/NVIDIA_app_.*?\\.exe"
+ },
+ {
+ "icon": "Img_Amd",
+ "name": "AMD Software: Adrenalin Edition™",
+ "group": "web",
+ "placeholderIcon": "Icon_Website",
+ "author": "Advanced Micro Devices, Inc",
+ "authorIcon": "amd.com",
+ "source": "https://www.amd.com/en/support/download/drivers.html",
+ "downloadPath": "https://www.amd.com/en/support/download/drivers.html",
+ "urlPattern": "https://drivers\\.amd\\.com/drivers/installer/.*?/whql/.*?minimalsetup.*?\\.exe"
+ },
+ {
+ "icon": "Img_FirstEverTech",
+ "name": "Universal Intel Chipset Device Updater",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "FirstEverTech",
+ "authorIcon": "https://github.com/FirstEverTech.png",
+ "source": "https://github.com/FirstEverTech/Universal-Intel-Chipset-Updater",
+ "downloadPath": "FirstEverTech/Universal-Intel-Chipset-Updater",
+ "filePattern": ".*\\.exe$"
+ },
+ {
+ "icon": "Img_FirstEverTech",
+ "name": "Universal Intel Wi-Fi and Bluetooth Drivers Updater",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "FirstEverTech",
+ "authorIcon": "https://github.com/FirstEverTech.png",
+ "source": "https://github.com/FirstEverTech/Universal-Intel-WiFi-BT-Updater",
+ "downloadPath": "FirstEverTech/Universal-Intel-WiFi-BT-Updater",
+ "filePattern": ".*\\.exe$"
+ },
+ {
+ "icon": "Img_Hidusbf",
+ "name": "HIDUSBF",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "LordOfMice",
+ "authorIcon": "https://github.com/LordOfMice.png",
+ "source": "https://github.com/LordOfMice/hidusbf",
+ "downloadPath": "LordOfMice/hidusbf",
+ "filePattern": "raw:hidusbf.zip"
+ },
+ {
+ "icon": "Img_Rapr",
+ "name": "Driver Store Explorer",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "lostindark",
+ "authorIcon": "https://github.com/lostindark.png",
+ "source": "https://github.com/lostindark/DriverStoreExplorer",
+ "downloadPath": "lostindark/DriverStoreExplorer",
+ "filePattern": "(?i)DriverStoreExplorer.*\\.zip$"
+ },
+ {
+ "icon": "Img_NvidiaPI",
+ "name": "NVIDIA Profile Inspector",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "Orbmu2k",
+ "authorIcon": "https://github.com/Orbmu2k.png",
+ "source": "https://github.com/Orbmu2k/nvidiaProfileInspector",
+ "downloadPath": "Orbmu2k/nvidiaProfileInspector",
+ "filePattern": "(?i)nvidiaProfileInspector.*\\.zip$"
+ },
+ {
+ "icon": "Img_DeviceTweaker",
+ "name": "DEVICE TWEAKER",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "arsenzaaa",
+ "authorIcon": "https://github.com/arsenzaaa.png",
+ "source": "https://github.com/arsenzaaa/DEVICE-TWEAKER",
+ "downloadPath": "arsenzaaa/DEVICE-TWEAKER",
+ "filePattern": "(?i)DEVICE.*NET.*FRAMEWORK.*\\.exe$"
+ },
+ {
+ "icon": "Img_Autoruns",
+ "name": "Autoruns",
+ "group": "web",
+ "placeholderIcon": "Icon_Website",
+ "author": "Mark Russinovich",
+ "authorIcon": "microsoft.com",
+ "source": "https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns",
+ "downloadPath": "https://download.sysinternals.com/files/Autoruns.zip"
+ },
+ {
+ "icon": "Img_Rufus",
+ "name": "Rufus",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "pbatard",
+ "authorIcon": "https://github.com/pbatard.png",
+ "source": "https://github.com/pbatard/rufus",
+ "downloadPath": "pbatard/rufus",
+ "filePattern": "(?i)rufus-.*?p\\.exe$"
+ },
+ {
+ "icon": "Img_RawAccel",
+ "name": "RawAccel",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "a1xd",
+ "authorIcon": "https://github.com/a1xd.png",
+ "source": "https://github.com/a1xd/rawaccel",
+ "downloadPath": "a1xd/rawaccel",
+ "filePattern": "(?i)RawAccel_v[\\d\\.]+\\.zip$"
+ },
+ {
+ "icon": "Img_SystemInfo",
+ "name": "SystemInformer",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "Winsider Seminars & Solutions, Inc",
+ "authorIcon": "https://github.com/winsiderss.png",
+ "source": "https://github.com/winsiderss/systeminformer",
+ "downloadPath": "winsiderss/systeminformer",
+ "filePattern": "(?i)systeminformer.*bin.*\\.zip"
+ },
+ {
+ "icon": "Img_ThrottleStop",
+ "name": "ThrottleStop",
+ "group": "techpowerup",
+ "placeholderIcon": "Icon_Website",
+ "author": "TechPowerUp",
+ "authorIcon": "techpowerup.com",
+ "source": "https://www.techpowerup.com/download/techpowerup-throttlestop/",
+ "downloadPath": "https://www.techpowerup.com/download/techpowerup-throttlestop/"
+ },
+ {
+ "icon": "Img_CPUz",
+ "name": "CPU-Z",
+ "group": "sourceforge",
+ "placeholderIcon": "Icon_Website",
+ "author": "CPUID",
+ "authorIcon": "cpuid.com",
+ "source": "https://sourceforge.net/projects/cpu-z/",
+ "downloadPath": "https://sourceforge.net/projects/cpu-z/files/latest/download"
+ },
+ {
+ "icon": "Img_GPUz",
+ "name": "GPU-Z",
+ "group": "techpowerup",
+ "placeholderIcon": "Icon_Website",
+ "author": "TechPowerUp",
+ "authorIcon": "techpowerup.com",
+ "source": "https://www.techpowerup.com/download/techpowerup-gpu-z/",
+ "downloadPath": "https://www.techpowerup.com/download/techpowerup-gpu-z/"
+ },
+ {
+ "icon": "Img_PCIz",
+ "name": "PCI-Z",
+ "group": "web",
+ "placeholderIcon": "Icon_Website",
+ "author": "Bruno Banelli",
+ "authorIcon": "pci-z.com",
+ "source": "https://www.pci-z.com/#download",
+ "downloadPath": "https://www.pci-z.com/current/PCI-Z.zip"
+ },
+ {
+ "icon": "Img_ZenTimings",
+ "name": "ZenTimings",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "irusanov",
+ "authorIcon": "https://github.com/irusanov.png",
+ "source": "https://github.com/irusanov/ZenTimings",
+ "downloadPath": "irusanov/ZenTimings",
+ "filePattern": "(?i)ZenTimings_v[\\d\\.]+\\.zip$"
+ },
+ {
+ "icon": "Img_DiskInfo",
+ "name": "Crystal Disk Info",
+ "group": "sourceforge",
+ "placeholderIcon": "Icon_Website",
+ "author": "hiyohiyo",
+ "authorIcon": "crystalmark.info",
+ "source": "https://sourceforge.net/projects/crystaldiskinfo/",
+ "downloadPath": "https://sourceforge.net/projects/crystaldiskinfo/files/latest/download"
+ },
+ {
+ "icon": "Img_DiskMark",
+ "name": "Crystal Disk Mark",
+ "group": "sourceforge",
+ "placeholderIcon": "Icon_Website",
+ "author": "hiyohiyo",
+ "authorIcon": "crystalmark.info",
+ "source": "https://sourceforge.net/projects/crystaldiskmark/",
+ "downloadPath": "https://sourceforge.net/projects/crystaldiskmark/files/latest/download"
+ },
+ {
+ "icon": "Img_CapFrameX",
+ "name": "CapFrameX",
+ "group": "github",
+ "placeholderIcon": "Icon_Git",
+ "author": "CXWorld",
+ "authorIcon": "https://github.com/CXWorld.png",
+ "source": "https://github.com/CXWorld/CapFrameX",
+ "downloadPath": "CXWorld/CapFrameX",
+ "filePattern": "(?i)release_[\\d\\.]+_portable\\.zip$"
+ },
+ {
+ "icon": "Img_Cinebench",
+ "name": "Cinebench",
+ "group": "maxon",
+ "placeholderIcon": "Icon_Website",
+ "author": "Maxon Computer GmbH",
+ "authorIcon": "maxon.net",
+ "source": "https://www.maxon.net/en/downloads/cinebench-downloads",
+ "downloadPath": "https://www.maxon.net/en/downloads/cinebench-downloads",
+ "filePattern": "(?i)Cinebench.*win_x86_64"
+ },
+ {
+ "icon": "Img_Occt",
+ "name": "OCCT",
+ "group": "web",
+ "placeholderIcon": "Icon_Website",
+ "author": "OCCT/OCBASE",
+ "authorIcon": "ocbase.com",
+ "source": "https://www.ocbase.com/download",
+ "downloadPath": "https://www.ocbase.com/download/edition:Personal/os:Windows",
+ "fileName": "OCCT.exe"
+ },
+ {
+ "icon": "Img_FurMark",
+ "name": "FurMark 2",
+ "group": "techpowerup",
+ "placeholderIcon": "Icon_Website",
+ "author": "Geeks3D",
+ "authorIcon": "geeks3d.com",
+ "source": "https://www.techpowerup.com/download/furmark/",
+ "downloadPath": "https://www.techpowerup.com/download/furmark/",
+ "filePattern": "(?i)FurMark_.*\\.zip$"
+ }
+]
\ No newline at end of file