From 25bd864e76857a8d129135bf8648dd4907e47762 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 14 Mar 2023 20:32:17 +0100 Subject: [PATCH 01/82] Add check for MAX-Q --- EnvyUpdate/Util.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index c8842f6..d729681 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -299,6 +299,7 @@ namespace EnvyUpdate GPUName = obj["VideoProcessor"].ToString().ToLower(); // Remove any 3GB, 6GB or similar from name. We don't need to know the VRAM to get results. GPUName = Regex.Replace(GPUName, " \\d+gb", ""); + GPUName = Regex.Replace(GPUName, " max-q", ""); GPUName = Regex.Replace(GPUName, "nvidia ", ""); } else @@ -453,4 +454,4 @@ namespace EnvyUpdate //TODO implement progress bar } } -} \ No newline at end of file +} From 2e4fa930ff5e1fb89d96c451f24e1e36eee6ec10 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 14 Mar 2023 20:59:44 +0100 Subject: [PATCH 02/82] add check for cards not supporting studio drivers --- EnvyUpdate/MainWindow.xaml.cs | 26 ++++++++++++++++++++- EnvyUpdate/Properties/Resources.Designer.cs | 9 +++++++ EnvyUpdate/Properties/Resources.de.resx | 3 +++ EnvyUpdate/Properties/Resources.resx | 3 +++ EnvyUpdate/Util.cs | 7 ++++-- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index d17226a..25c49dd 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -146,7 +146,31 @@ namespace EnvyUpdate textblockGPUName.Text = Debug.GPUname(); } - gpuURL = Util.GetGpuUrl(); + try + { + gpuURL = Util.GetGpuUrl(); + } + catch (ArgumentException) + { + try + { + // disable SD and try with GRD + if (File.Exists(GlobalVars.exepath + "sd.envy")) + { + File.Delete(GlobalVars.exepath + "sd.envy"); + } + + gpuURL = Util.GetGpuUrl(); //try again with GRD + MessageBox.Show(Properties.Resources.ui_studionotsupported); + radioGRD.IsChecked = true; + } + catch (ArgumentException) + { + // Now we have a problem. + MessageBox.Show("ERROR: Invalid API response from Nvidia. Please file an issue on GitHub."); + Environment.Exit(10); + } + } using (var c = new WebClient()) { diff --git a/EnvyUpdate/Properties/Resources.Designer.cs b/EnvyUpdate/Properties/Resources.Designer.cs index c102a9a..cd696e7 100644 --- a/EnvyUpdate/Properties/Resources.Designer.cs +++ b/EnvyUpdate/Properties/Resources.Designer.cs @@ -222,6 +222,15 @@ namespace EnvyUpdate.Properties { } } + /// + /// Looks up a localized string similar to Studio Driver is not supported by this graphics card.. + /// + public static string ui_studionotsupported { + get { + return ResourceManager.GetString("ui_studionotsupported", resourceCulture); + } + } + /// /// Looks up a localized string similar to Are you sure you want to uninstall EnvyUpdate?. /// diff --git a/EnvyUpdate/Properties/Resources.de.resx b/EnvyUpdate/Properties/Resources.de.resx index 8457d37..1329401 100644 --- a/EnvyUpdate/Properties/Resources.de.resx +++ b/EnvyUpdate/Properties/Resources.de.resx @@ -171,6 +171,9 @@ Diese Version überspringen + + Studio Treiber wird von dieser Grafikkarte nicht unterstützt. + Sind Sie sich sicher, dass Sie EnvyUpdate deinstallieren wollen? diff --git a/EnvyUpdate/Properties/Resources.resx b/EnvyUpdate/Properties/Resources.resx index 12997c9..abdfedd 100644 --- a/EnvyUpdate/Properties/Resources.resx +++ b/EnvyUpdate/Properties/Resources.resx @@ -171,6 +171,9 @@ Skip this version + + Studio Driver is not supported by this graphics card. + Are you sure you want to uninstall EnvyUpdate? diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs index d729681..26df59f 100644 --- a/EnvyUpdate/Util.cs +++ b/EnvyUpdate/Util.cs @@ -394,8 +394,6 @@ namespace EnvyUpdate public static string GetGpuUrl() { - //TODO: Make a list of languages and match OS language to driver - //int langid; int psid; int pfid; int osid; @@ -437,6 +435,11 @@ namespace EnvyUpdate //relative url gpuURL = "https://www.nvidia.com/Download/" + gpuURL; } + else if (gpuURL.Contains("No certified downloads were found")) + { + //configuration not supported + throw new ArgumentException(); + } else { //panic. From 01c6f81da6b3987f372e73894d9fca3545ba3783 Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 14 Mar 2023 21:01:39 +0100 Subject: [PATCH 03/82] bump version --- EnvyUpdate/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs index 95fc8c2..f9c82c1 100644 --- a/EnvyUpdate/Properties/AssemblyInfo.cs +++ b/EnvyUpdate/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.16")] -[assembly: AssemblyFileVersion("2.16")] +[assembly: AssemblyVersion("2.17")] +[assembly: AssemblyFileVersion("2.17")] From 7173f2ec5e15f27c49398b7c88e77207e90370b0 Mon Sep 17 00:00:00 2001 From: Jakob Date: Sat, 1 Apr 2023 18:04:34 +0200 Subject: [PATCH 04/82] replace gpu detection regex --- EnvyUpdate/MainWindow.xaml | 2 +- EnvyUpdate/Properties/AssemblyInfo.cs | 4 ++-- EnvyUpdate/Util.cs | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/EnvyUpdate/MainWindow.xaml b/EnvyUpdate/MainWindow.xaml index 4074828..81f4d3d 100644 --- a/EnvyUpdate/MainWindow.xaml +++ b/EnvyUpdate/MainWindow.xaml @@ -23,7 +23,7 @@ - +