diff --git a/EnvyUpdate/DashboardPage.xaml.cs b/EnvyUpdate/DashboardPage.xaml.cs
index 78258b7..f53ef42 100644
--- a/EnvyUpdate/DashboardPage.xaml.cs
+++ b/EnvyUpdate/DashboardPage.xaml.cs
@@ -210,6 +210,15 @@ namespace EnvyUpdate
if (skippedVer != onlineDriv)
{
+ if (GlobalVars.autoDownload)
+ {
+ if (buttonDownload.IsVisible)
+ {
+ Debug.LogToFile("INFO Auto-Downloading driver.");
+ buttonDownload_Click(null, null);
+ }
+ }
+
Debug.LogToFile("INFO Showing update popup notification.");
Notify.ShowDrivUpdatePopup();
}
@@ -340,25 +349,34 @@ namespace EnvyUpdate
private void buttonDownload_Click(object sender, RoutedEventArgs e)
{
- progressbarDownload.Visibility = Visibility.Visible;
- buttonDownload.IsEnabled = false;
-
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading")))
+ if (GlobalVars.isDownloading)
{
- Debug.LogToFile("WARN Found previous unfinished download, retrying.");
- File.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
+ Debug.LogToFile("WARN A download is already running.");
+ ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Danger, Wpf.Ui.Common.SymbolRegular.ErrorCircle24, Properties.Resources.info_download_running, Properties.Resources.info_download_running_title);
}
- Thread thread = new Thread(() => {
- using (WebClient client = new WebClient())
+ else
+ {
+ progressbarDownload.Visibility = Visibility.Visible;
+ buttonDownload.IsEnabled = false;
+ GlobalVars.isDownloading = true;
+
+ if (File.Exists(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading")))
{
- client.Headers["User-Agent"] = GlobalVars.useragent;
- client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
- client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
- client.DownloadFileAsync(new Uri(Util.GetDirectDownload(gpuURL)), Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
+ Debug.LogToFile("WARN Found previous unfinished download, retrying.");
+ File.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
}
- });
- thread.Start();
- Debug.LogToFile("INFO Started installer download.");
+ Thread thread = new Thread(() => {
+ using (WebClient client = new WebClient())
+ {
+ client.Headers["User-Agent"] = GlobalVars.useragent;
+ client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
+ client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
+ client.DownloadFileAsync(new Uri(Util.GetDirectDownload(gpuURL)), Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
+ }
+ });
+ thread.Start();
+ Debug.LogToFile("INFO Started installer download.");
+ }
}
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
@@ -376,6 +394,7 @@ namespace EnvyUpdate
Application.Current.Dispatcher.Invoke(new Action(() => {
buttonDownload.IsEnabled = true;
progressbarDownload.Visibility = Visibility.Collapsed;
+ GlobalVars.isDownloading = false;
}));
if (e.Error == null)
{
@@ -420,7 +439,7 @@ namespace EnvyUpdate
WindowStyle = ProcessWindowStyle.Minimized,
WorkingDirectory = destinationDir,
FileName = sevenZipPath,
- Arguments = "x -aoa -y " + filePath + " Display.Driver Display.Nview Display.Optimus HDAudio MSVCR NVI2 NVPCF PhysX PPC ShieldWirelessController EULA.txt ListDevices.txt setup.cfg setup.exe"
+ Arguments = "x -aoa -y \"" + filePath + "\" Display.Driver Display.Nview Display.Optimus HDAudio MSVCR NVI2 NVPCF PhysX PPC ShieldWirelessController EULA.txt ListDevices.txt setup.cfg setup.exe"
};
process.EnableRaisingEvents = true;
process.StartInfo = startInfo;
diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj
index 4dd0c93..cc7331b 100644
--- a/EnvyUpdate/EnvyUpdate.csproj
+++ b/EnvyUpdate/EnvyUpdate.csproj
@@ -271,7 +271,7 @@
5.7.0
- 6.8.0
+ 6.8.1runtime; build; native; contentfiles; analyzers; buildtransitiveall
@@ -282,7 +282,7 @@
2.2.0
- 7.0.3
+ 8.0.42.1.0
diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs
index e830039..f52b4af 100644
--- a/EnvyUpdate/GlobalVars.cs
+++ b/EnvyUpdate/GlobalVars.cs
@@ -19,5 +19,7 @@ namespace EnvyUpdate
public static readonly string useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Firefox/115.0";
public static bool useAppdata = false;
public static bool hasWrite = true;
+ public static bool autoDownload = false;
+ public static bool isDownloading = false;
}
}
diff --git a/EnvyUpdate/MainWindow.xaml b/EnvyUpdate/MainWindow.xaml
index af4f6a7..5015f14 100644
--- a/EnvyUpdate/MainWindow.xaml
+++ b/EnvyUpdate/MainWindow.xaml
@@ -11,7 +11,7 @@
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica"
- Title="EnvyUpdate" MinHeight="500" Height="500" MinWidth="600" Width="600" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize" WindowStyle="None">
+ Title="EnvyUpdate" MinHeight="500" Height="550" MinWidth="700" Width="750" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize" WindowStyle="None">
diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs
index 51fc08c..6522ee3 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -102,8 +102,25 @@ namespace EnvyUpdate
GlobalVars.startMinimized = true;
}
+ //Check for old unfinished downloads
+ string[] leftovers = Directory.GetFiles(GlobalVars.directoryOfExe, "*-nvidia-installer.exe.downloading");
+ if (leftovers.Length > 0)
+ {
+ foreach (string leftover in leftovers)
+ {
+ Debug.LogToFile("INFO Deleting leftover download " + leftover);
+ File.Delete(leftover);
+ }
+ }
+
GlobalVars.isMobile = Util.IsMobile();
Debug.LogToFile("INFO Mobile: " + GlobalVars.isMobile);
+
+ if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy")))
+ {
+ Debug.LogToFile("INFO Auto-download is enabled.");
+ GlobalVars.autoDownload = true;
+ }
}
private void Window_StateChanged(object sender, EventArgs e)
{
diff --git a/EnvyUpdate/Notify.cs b/EnvyUpdate/Notify.cs
index ac317c1..d889163 100644
--- a/EnvyUpdate/Notify.cs
+++ b/EnvyUpdate/Notify.cs
@@ -6,9 +6,16 @@ namespace EnvyUpdate
{
public static void ShowDrivUpdatePopup()
{
- var toast = new ToastContentBuilder();
- toast.AddText(Properties.Resources.update_popup_message);
- toast.Show();
+ try
+ {
+ var toast = new ToastContentBuilder();
+ toast.AddText(Properties.Resources.update_popup_message);
+ toast.Show();
+ }
+ catch (System.Exception ex)
+ {
+ Debug.LogToFile("WARN Could not show notification. Error: " + ex.Message);
+ }
}
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs
index 620e972..b9441b1 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("3.2")]
-[assembly: AssemblyFileVersion("3.2")]
+[assembly: AssemblyVersion("3.6")]
+[assembly: AssemblyFileVersion("3.6")]
diff --git a/EnvyUpdate/Properties/Resources.Designer.cs b/EnvyUpdate/Properties/Resources.Designer.cs
index 4f80cf9..466a9c0 100644
--- a/EnvyUpdate/Properties/Resources.Designer.cs
+++ b/EnvyUpdate/Properties/Resources.Designer.cs
@@ -105,6 +105,24 @@ namespace EnvyUpdate.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to A download process is already running!.
+ ///
+ public static string info_download_running {
+ get {
+ return ResourceManager.GetString("info_download_running", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Download running.
+ ///
+ public static string info_download_running_title {
+ get {
+ return ResourceManager.GetString("info_download_running_title", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Driver installer successfully downloaded..
///
@@ -267,6 +285,15 @@ namespace EnvyUpdate.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Download updates automatically.
+ ///
+ public static string ui_enable_autodownload {
+ get {
+ return ResourceManager.GetString("ui_enable_autodownload", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Enable logging to file.
///
diff --git a/EnvyUpdate/Properties/Resources.de.resx b/EnvyUpdate/Properties/Resources.de.resx
index 40102a4..b5a18f5 100644
--- a/EnvyUpdate/Properties/Resources.de.resx
+++ b/EnvyUpdate/Properties/Resources.de.resx
@@ -132,6 +132,12 @@
Fehler beim Herunterladen
+
+ Ein Downloadvorgang läuft bereits!
+
+
+ Download läuft
+
Treiber-Installationsdatei erfolgreich heruntergeladen.
@@ -186,6 +192,9 @@
Programmdaten in AppData speichern
+
+ Updates automatisch herunterladen
+
Programm-Log in Datei schreiben
diff --git a/EnvyUpdate/Properties/Resources.resx b/EnvyUpdate/Properties/Resources.resx
index 3780249..2623dae 100644
--- a/EnvyUpdate/Properties/Resources.resx
+++ b/EnvyUpdate/Properties/Resources.resx
@@ -132,6 +132,12 @@
Error while downloading
+
+ A download process is already running!
+
+
+ Download running
+
Driver installer successfully downloaded.
@@ -186,6 +192,9 @@
Save files to AppData
+
+ Download updates automatically
+
Enable logging to file
diff --git a/EnvyUpdate/SettingsPage.xaml b/EnvyUpdate/SettingsPage.xaml
index f00cd4b..ab6f973 100644
--- a/EnvyUpdate/SettingsPage.xaml
+++ b/EnvyUpdate/SettingsPage.xaml
@@ -35,9 +35,19 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EnvyUpdate/SettingsPage.xaml.cs b/EnvyUpdate/SettingsPage.xaml.cs
index 35e33f1..e65aa94 100644
--- a/EnvyUpdate/SettingsPage.xaml.cs
+++ b/EnvyUpdate/SettingsPage.xaml.cs
@@ -30,6 +30,16 @@ namespace EnvyUpdate
if (!GlobalVars.hasWrite)
chkAppdata.IsEnabled = false;
+ if (GlobalVars.autoDownload)
+ chkAutodl.IsChecked = true;
+
+ if (GlobalVars.isDownloading)
+ {
+ chkAppdata.IsEnabled = false;
+ }
+ else
+ chkAppdata.IsEnabled = true;
+
textBoxLicEnvyupdate.Text = Properties.Licenses.EnvyUpdate;
textBoxLicFody.Text = Properties.Licenses.Fody;
textBoxLicCostura.Text = Properties.Licenses.CosturaFody;
@@ -91,5 +101,23 @@ namespace EnvyUpdate
Debug.LogToFile("INFO Switched to EXE directory.");
}
+
+ private void chkAutodl_Checked(object sender, RoutedEventArgs e)
+ {
+ GlobalVars.autoDownload = true;
+ if (!File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy")))
+ {
+ File.Create(Path.Combine(GlobalVars.saveDirectory, "autodl.envy"));
+ }
+ }
+
+ private void chkAutodl_Unchecked(object sender, RoutedEventArgs e)
+ {
+ GlobalVars.autoDownload = false;
+ if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy")))
+ {
+ File.Delete(Path.Combine(GlobalVars.saveDirectory, "autodl.envy"));
+ }
+ }
}
}
diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs
index df99ebb..8a504cd 100644
--- a/EnvyUpdate/Util.cs
+++ b/EnvyUpdate/Util.cs
@@ -337,7 +337,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.Match(GPUName, "(geforce )((.tx )|(mx))?\\w*\\d*( ti)?").Value;
+ GPUName = Regex.Match(GPUName, "(geforce )((.t.? )|(mx ))?\\w*\\d*( ti)?").Value;
}
else
GPUName = obj["VideoProcessor"].ToString();
diff --git a/LICENSE b/LICENSE
index 3051eea..d6dacc4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019-2023 Jakob Senkl
+Copyright (c) 2019-2024 fyr77
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index b908cbf..cd44814 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,18 @@
-
+# Important Information
+## I am no longer working on this project and I am looking for a new maintainer. Please see [the corresponding issue](https://vcs.diluvian.cc/fyr77/EnvyUpdate/issues/53) for more details.
+
+
# EnvyUpdate
- A small portable update checker application for Nvidia GPUs
-
- 
- 
- 
+A small portable update checker application for Nvidia GPUs
## How to use
-Download the [latest release](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.exe) (or as a [.zip](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.zip)) and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
-
-Legacy 2.x versions (old UI, no automatic driver installation) will continue to be supported and fixed for the time being. Please see [the v2 branch](https://github.com/fyr77/EnvyUpdate/tree/v2) for these.
+Download the latest release and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
The application itself does not update itself. If you notice any bugs or issues, be sure to check for a new version on GitHub!
-Enabling Autostart will create a shortcut of EnvyUpdate in the Windows startup folder.
+Enabling Autostart will create a shortcut of EnvyUpdate in the Windows startup folder (shell:startup).
### Virus warnings
@@ -33,11 +30,11 @@ If EnvyUpdate fails to write to the folder containing the exe file, this option
The application should be compatible with all Nvidia GeForce GPUs that have their drivers available on the nvidia.com download page and runs on Windows 10 and up.
-It is tested with GeForce Series GPUs. Generally others might work, but they are (currently) untested.
+It is tested with GeForce Series GPUs. Other series (e.g. Quadro) are unlikely to work and are not supported - if you have a Quadro card and are willing to implement support for them, feel free to reach out or create a PR.
## Development
-This application is currently maintained and developed by me (fyr77) alone in my free time.
+This application is currently unmaintained and developed by me (fyr77) alone in my free time.
I always try to implement critical fixes as fast as I can, but other features and minor bug fixes may take a few days or weeks to implement.
@@ -54,7 +51,7 @@ EnvyUpdate is not a replacement for any of these tools. I will still try to impl
## Licenses
-* This project: [MIT](https://github.com/fyr77/EnvyUpdate/blob/master/LICENSE)
+* This project: [MIT](https://https://vcs.diluvian.cc/fyr77/EnvyUpdate/blob/master/LICENSE)
* Fody (dependency of Costura.Fody): [MIT](https://github.com/Fody/Fody/blob/master/License.txt)
* Costura.Fody (for embedding DLLs into the main executable): [MIT](https://github.com/Fody/Costura/blob/develop/LICENSE)
* Resource Embedder: [MIT](https://www.nuget.org/packages/Resource.Embedder/)