diff --git a/EnvyUpdate/DashboardPage.xaml b/EnvyUpdate/DashboardPage.xaml
index 546b018..3761bf6 100644
--- a/EnvyUpdate/DashboardPage.xaml
+++ b/EnvyUpdate/DashboardPage.xaml
@@ -77,11 +77,11 @@
-
+
-
+
diff --git a/EnvyUpdate/DashboardPage.xaml.cs b/EnvyUpdate/DashboardPage.xaml.cs
index f53ef42..a676e4d 100644
--- a/EnvyUpdate/DashboardPage.xaml.cs
+++ b/EnvyUpdate/DashboardPage.xaml.cs
@@ -112,10 +112,10 @@ namespace EnvyUpdate
switchStudioDriver.IsChecked = false;
}
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory,"skip.envy")))
+ if (File.Exists(GlobalVars.exedirectory + "skip.envy"))
{
Debug.LogToFile("INFO Found version skip config.");
- skippedVer = File.ReadLines(Path.Combine(GlobalVars.saveDirectory, "skip.envy")).First();
+ skippedVer = File.ReadLines(GlobalVars.exedirectory + "skip.envy").First();
}
// This little bool check is necessary for debug fake mode.
@@ -137,9 +137,9 @@ namespace EnvyUpdate
try
{
// disable SD and try with GRD
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "sd.envy")))
+ if (File.Exists(GlobalVars.exedirectory + "sd.envy"))
{
- File.Delete(Path.Combine(GlobalVars.saveDirectory, "sd.envy"));
+ File.Delete(GlobalVars.exedirectory + "sd.envy");
}
gpuURL = Util.GetGpuUrl(); //try again with GRD
@@ -210,15 +210,6 @@ 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();
}
@@ -235,15 +226,15 @@ namespace EnvyUpdate
{
Debug.LogToFile("INFO Skipped version is surpassed, deleting setting.");
skippedVer = null;
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "skip.envy")))
- File.Delete(Path.Combine(GlobalVars.saveDirectory, "skip.envy"));
+ if (File.Exists(GlobalVars.exedirectory + "skip.envy"))
+ File.Delete(GlobalVars.exedirectory + "skip.envy");
buttonSkipVersion.ToolTip = Properties.Resources.ui_skipversion;
buttonSkipVersion.IsEnabled = true;
buttonSkipVersion.Visibility = Visibility.Visible;
}
// Check if update file already exists and display install button instead
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe")))
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe")))
{
Debug.LogToFile("INFO Found downloaded driver installer, no need to redownload.");
buttonDownload.Visibility = Visibility.Collapsed;
@@ -253,20 +244,20 @@ namespace EnvyUpdate
private void switchStudioDriver_Unchecked(object sender, RoutedEventArgs e)
{
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "sd.envy")))
+ if (File.Exists(GlobalVars.exedirectory + "sd.envy"))
{
Debug.LogToFile("INFO Switching to game ready driver.");
- File.Delete(Path.Combine(GlobalVars.saveDirectory, "sd.envy"));
+ File.Delete(GlobalVars.exedirectory + "sd.envy");
Load();
}
}
private void switchStudioDriver_Checked(object sender, RoutedEventArgs e)
{
- if (!File.Exists(Path.Combine(GlobalVars.saveDirectory, "sd.envy")))
+ if (!File.Exists(GlobalVars.exedirectory + "sd.envy"))
{
Debug.LogToFile("INFO Switching to studio driver.");
- File.Create(Path.Combine(GlobalVars.saveDirectory, "sd.envy")).Close();
+ File.Create(GlobalVars.exedirectory + "sd.envy").Close();
Load();
}
}
@@ -281,7 +272,7 @@ namespace EnvyUpdate
if (switchAutostart.IsChecked == true)
{
Debug.LogToFile("INFO Creating autostart entry.");
- Util.CreateShortcut("EnvyUpdate", Environment.GetFolderPath(Environment.SpecialFolder.Startup), GlobalVars.pathToAppExe, "NVidia Update Checker", "/minimize");
+ Util.CreateShortcut("EnvyUpdate", Environment.GetFolderPath(Environment.SpecialFolder.Startup), GlobalVars.exeloc, "NVidia Update Checker", "/minimize");
}
}
@@ -289,7 +280,7 @@ namespace EnvyUpdate
{
Debug.LogToFile("INFO Skipping version.");
skippedVer = onlineDriv;
- File.WriteAllText(Path.Combine(GlobalVars.saveDirectory, "skip.envy"), onlineDriv);
+ File.WriteAllText(GlobalVars.exedirectory + "skip.envy", onlineDriv);
buttonSkipVersion.IsEnabled = false;
buttonSkipVersion.ToolTip = Properties.Resources.ui_skipped;
MessageBox.Show(Properties.Resources.skip_confirm);
@@ -349,34 +340,25 @@ namespace EnvyUpdate
private void buttonDownload_Click(object sender, RoutedEventArgs e)
{
- if (GlobalVars.isDownloading)
- {
- 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);
- }
- else
- {
- progressbarDownload.Visibility = Visibility.Visible;
- buttonDownload.IsEnabled = false;
- GlobalVars.isDownloading = true;
+ progressbarDownload.Visibility = Visibility.Visible;
+ buttonDownload.IsEnabled = false;
- if (File.Exists(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 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.");
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe.downloading")))
+ {
+ Debug.LogToFile("WARN Found previous unfinished download, retrying.");
+ File.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
}
+ 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.exedirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
+ }
+ });
+ thread.Start();
+ Debug.LogToFile("INFO Started installer download.");
}
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
@@ -394,7 +376,6 @@ namespace EnvyUpdate
Application.Current.Dispatcher.Invoke(new Action(() => {
buttonDownload.IsEnabled = true;
progressbarDownload.Visibility = Visibility.Collapsed;
- GlobalVars.isDownloading = false;
}));
if (e.Error == null)
{
@@ -404,13 +385,13 @@ namespace EnvyUpdate
buttonInstall.Visibility = Visibility.Visible;
Debug.LogToFile("INFO Download successful.");
}));
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe")))
- File.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe"));
- File.Move(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"), Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe"));
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe")))
+ File.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe"));
+ File.Move(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe.downloading"), Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe"));
}
else
{
- File.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
+ File.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe.downloading"));
Application.Current.Dispatcher.Invoke(new Action(() => {
ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Danger, Wpf.Ui.Common.SymbolRegular.ErrorCircle24, Properties.Resources.info_download_error, Properties.Resources.info_download_error_title);
Debug.LogToFile("INFO Download NOT successful. Error: " + e.Error.ToString());
@@ -425,8 +406,8 @@ namespace EnvyUpdate
ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Info, Wpf.Ui.Common.SymbolRegular.FolderZip24, Properties.Resources.info_extracting, Properties.Resources.info_extracting_title);
- string filePath = Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe");
- string destinationDir = Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-extracted");
+ string filePath = Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe");
+ string destinationDir = Path.Combine(GlobalVars.exedirectory, onlineDriv + "-extracted");
if (!Directory.Exists(destinationDir))
Directory.CreateDirectory(destinationDir);
@@ -439,7 +420,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;
@@ -449,13 +430,13 @@ namespace EnvyUpdate
private void ExtractionFinished(object sender, EventArgs e)
{
- string extractedPath = Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-extracted");
+ string extractedPath = Path.Combine(GlobalVars.exedirectory, onlineDriv + "-extracted");
Application.Current.Dispatcher.Invoke(new Action(() => {
ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Success, Wpf.Ui.Common.SymbolRegular.FolderZip24, Properties.Resources.info_extract_complete, Properties.Resources.info_extract_complete_title);
}));
Debug.LogToFile("INFO Extraction exited, deleting 7-zip executable.");
- File.Delete(Path.Combine(GlobalVars.saveDirectory, "7zr.exe"));
+ File.Delete(Path.Combine(GlobalVars.exedirectory, "7zr.exe"));
Util.CleanInstallConfig(Path.Combine(extractedPath, "setup.cfg"));
@@ -481,14 +462,13 @@ namespace EnvyUpdate
ShowSnackbar(Wpf.Ui.Common.ControlAppearance.Success, Wpf.Ui.Common.SymbolRegular.CheckmarkCircle24, Properties.Resources.info_install_complete, Properties.Resources.info_install_complete_title);
buttonInstall.IsEnabled = true;
buttonInstall.Visibility = Visibility.Collapsed;
- buttonDownload.IsEnabled = true;
- buttonDownload.Visibility = Visibility.Collapsed;
+ buttonDownload.Visibility = Visibility.Visible;
}));
Debug.LogToFile("INFO Driver setup complete. Cleaning up setup files.");
- File.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-nvidia-installer.exe"));
- Directory.Delete(Path.Combine(GlobalVars.saveDirectory, onlineDriv + "-extracted"), true);
+ File.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-nvidia-installer.exe"));
+ Directory.Delete(Path.Combine(GlobalVars.exedirectory, onlineDriv + "-extracted"), true);
GlobalVars.isInstalling = false;
Application.Current.Dispatcher.Invoke(delegate
{
diff --git a/EnvyUpdate/Debug.cs b/EnvyUpdate/Debug.cs
index 35e6e04..43e54b9 100644
--- a/EnvyUpdate/Debug.cs
+++ b/EnvyUpdate/Debug.cs
@@ -15,6 +15,9 @@ namespace EnvyUpdate
public static bool isVerbose = false;
#endif
+
+ public static string debugFile = Path.Combine(GlobalVars.exedirectory, "envyupdate.log");
+
public static int LoadFakeIDs(string idType)
{
/*
@@ -49,12 +52,7 @@ namespace EnvyUpdate
public static void LogToFile(string content)
{
if (isVerbose)
- {
- if (GlobalVars.useAppdata)
- File.AppendAllText(Path.Combine(GlobalVars.appdata, "envyupdate.log"), content + "\n");
- else
- File.AppendAllText(Path.Combine(GlobalVars.directoryOfExe, "envyupdate.log"), content + "\n");
- }
+ System.IO.File.AppendAllText(Debug.debugFile, content + "\n");
}
}
}
diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj
index cc7331b..4dd0c93 100644
--- a/EnvyUpdate/EnvyUpdate.csproj
+++ b/EnvyUpdate/EnvyUpdate.csproj
@@ -271,7 +271,7 @@
5.7.0
- 6.8.1
+ 6.8.0
runtime; build; native; contentfiles; analyzers; buildtransitive
all
@@ -282,7 +282,7 @@
2.2.0
- 8.0.4
+ 7.0.3
2.1.0
diff --git a/EnvyUpdate/GlobalVars.cs b/EnvyUpdate/GlobalVars.cs
index f52b4af..e9dfd32 100644
--- a/EnvyUpdate/GlobalVars.cs
+++ b/EnvyUpdate/GlobalVars.cs
@@ -6,20 +6,14 @@ namespace EnvyUpdate
class GlobalVars
{
public static bool isMobile = false;
- public static readonly string pathToAppExe = System.Reflection.Assembly.GetEntryAssembly().Location;
- public static readonly string directoryOfExe = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
- public static string saveDirectory = directoryOfExe;
+ public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
+ public static readonly string exedirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\";
public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
- public static readonly string legacyAppdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
- public static readonly string appdata = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EnvyUpdate_Data");
+ public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
public static bool monitoringInstall = false;
public static bool startMinimized = false;
public static bool isInstalling = false;
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 5015f14..af4f6a7 100644
--- a/EnvyUpdate/MainWindow.xaml
+++ b/EnvyUpdate/MainWindow.xaml
@@ -11,7 +11,7 @@
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica"
- Title="EnvyUpdate" MinHeight="500" Height="550" MinWidth="700" Width="750" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize" WindowStyle="None">
+ Title="EnvyUpdate" MinHeight="500" Height="500" MinWidth="600" Width="600" 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 6522ee3..44b8a6d 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -28,22 +28,8 @@ namespace EnvyUpdate
// This is necessary, since .NET throws an exception if you check for a non-existant arg.
}
- if (!Util.HasWritePermissions())
- {
- if (!Directory.Exists(GlobalVars.appdata))
- Directory.CreateDirectory(GlobalVars.appdata);
-
- GlobalVars.hasWrite = false;
- }
-
- if (Directory.Exists(GlobalVars.appdata))
- {
- GlobalVars.useAppdata = true;
- GlobalVars.saveDirectory = GlobalVars.appdata;
- }
-
// Check if Debug file exists
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "envyupdate.log")))
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, "envyupdate.log")))
{
Debug.isVerbose = true;
Debug.LogToFile("------");
@@ -51,7 +37,6 @@ namespace EnvyUpdate
}
Debug.LogToFile("INFO Starting EnvyUpdate, version " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion);
- Debug.LogToFile("INFO Save directory: " + GlobalVars.saveDirectory);
// Check if running on supported Windows version.
if (Environment.OSVersion.Version.Major < 10)
@@ -75,9 +60,9 @@ namespace EnvyUpdate
SystemEvents.UserPreferenceChanged += AdjustTheme;
// Delete installed legacy versions, required for people upgrading from very old versions.
- if (Directory.Exists(GlobalVars.legacyAppdata))
+ if (Directory.Exists(GlobalVars.appdata))
{
- Debug.LogToFile("INFO Found legacy appdata installation, uninstalling.");
+ Debug.LogToFile("INFO Found old appdata installation, uninstalling.");
Util.UninstallAll();
}
@@ -102,25 +87,8 @@ 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 d889163..ac317c1 100644
--- a/EnvyUpdate/Notify.cs
+++ b/EnvyUpdate/Notify.cs
@@ -6,16 +6,9 @@ namespace EnvyUpdate
{
public static void ShowDrivUpdatePopup()
{
- 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);
- }
+ var toast = new ToastContentBuilder();
+ toast.AddText(Properties.Resources.update_popup_message);
+ toast.Show();
}
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs
index b9441b1..09110e5 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.6")]
-[assembly: AssemblyFileVersion("3.6")]
+[assembly: AssemblyVersion("3.1")]
+[assembly: AssemblyFileVersion("3.1")]
diff --git a/EnvyUpdate/Properties/Resources.Designer.cs b/EnvyUpdate/Properties/Resources.Designer.cs
index 466a9c0..a22ae7c 100644
--- a/EnvyUpdate/Properties/Resources.Designer.cs
+++ b/EnvyUpdate/Properties/Resources.Designer.cs
@@ -105,24 +105,6 @@ 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..
///
@@ -276,24 +258,6 @@ namespace EnvyUpdate.Properties {
}
}
- ///
- /// Looks up a localized string similar to Save files to AppData.
- ///
- public static string ui_enable_appdata {
- get {
- return ResourceManager.GetString("ui_enable_appdata", resourceCulture);
- }
- }
-
- ///
- /// 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 b5a18f5..cb58d0d 100644
--- a/EnvyUpdate/Properties/Resources.de.resx
+++ b/EnvyUpdate/Properties/Resources.de.resx
@@ -132,12 +132,6 @@
Fehler beim Herunterladen
-
- Ein Downloadvorgang läuft bereits!
-
-
- Download läuft
-
Treiber-Installationsdatei erfolgreich heruntergeladen.
@@ -189,12 +183,6 @@
Herunterladen
-
- 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 2623dae..f9f99e7 100644
--- a/EnvyUpdate/Properties/Resources.resx
+++ b/EnvyUpdate/Properties/Resources.resx
@@ -132,12 +132,6 @@
Error while downloading
-
- A download process is already running!
-
-
- Download running
-
Driver installer successfully downloaded.
@@ -189,12 +183,6 @@
Download
-
- Save files to AppData
-
-
- Download updates automatically
-
Enable logging to file
diff --git a/EnvyUpdate/SettingsPage.xaml b/EnvyUpdate/SettingsPage.xaml
index ab6f973..527bd97 100644
--- a/EnvyUpdate/SettingsPage.xaml
+++ b/EnvyUpdate/SettingsPage.xaml
@@ -15,8 +15,7 @@
-
-
+
@@ -35,22 +34,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/EnvyUpdate/SettingsPage.xaml.cs b/EnvyUpdate/SettingsPage.xaml.cs
index e65aa94..da4b482 100644
--- a/EnvyUpdate/SettingsPage.xaml.cs
+++ b/EnvyUpdate/SettingsPage.xaml.cs
@@ -21,25 +21,9 @@ namespace EnvyUpdate
if (GlobalVars.monitoringInstall)
textBlockVer.FontStyle = FontStyles.Italic;
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "envyupdate.log")) || File.Exists(Path.Combine(GlobalVars.appdata, "envyupdate.log")))
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, "envyupdate.log")))
chkLog.IsChecked = true;
- if (GlobalVars.useAppdata)
- chkAppdata.IsChecked = true;
-
- 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;
@@ -70,54 +54,10 @@ namespace EnvyUpdate
if (Debug.isVerbose)
{
Debug.LogToFile("INFO Disabled logging to file.");
- if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "envyupdate.log")))
- File.Move(Path.Combine(GlobalVars.saveDirectory, "envyupdate.log"), Path.Combine(GlobalVars.saveDirectory, "envyupdate." + DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".log"));
+ if (File.Exists(Path.Combine(GlobalVars.exedirectory, "envyupdate.log")))
+ File.Move(Path.Combine(GlobalVars.exedirectory, "envyupdate.log"), Path.Combine(GlobalVars.exedirectory, "envyupdate." + DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".log"));
Debug.isVerbose = false;
}
}
-
- private void chkAppdata_Checked(object sender, RoutedEventArgs e)
- {
- if (!Directory.Exists(GlobalVars.appdata))
- Directory.CreateDirectory(GlobalVars.appdata);
-
- GlobalVars.useAppdata = true;
- GlobalVars.saveDirectory = GlobalVars.appdata;
- Util.MoveFilesToAppdata();
-
- Debug.LogToFile("INFO Switched to AppData directory.");
- }
-
- private void chkAppdata_Unchecked(object sender, RoutedEventArgs e)
- {
- GlobalVars.useAppdata = false;
- GlobalVars.saveDirectory = GlobalVars.directoryOfExe;
-
- if (Directory.Exists(GlobalVars.appdata))
- {
- Util.MoveFilesToExe();
- Directory.Delete(GlobalVars.appdata, true);
- }
-
- 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 8a504cd..ced5548 100644
--- a/EnvyUpdate/Util.cs
+++ b/EnvyUpdate/Util.cs
@@ -1,5 +1,4 @@
using IWshRuntimeLibrary;
-using Microsoft.Build.Framework.XamlTypes;
using Microsoft.Win32;
using System;
using System.Diagnostics;
@@ -131,11 +130,13 @@ namespace EnvyUpdate
///
public static void SelfDelete()
{
+ string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
+
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Hidden,
- WorkingDirectory = GlobalVars.legacyAppdata,
+ WorkingDirectory = appdata,
FileName = "cmd.exe",
Arguments = "/C timeout 5 && del EnvyUpdate.exe"
};
@@ -337,7 +338,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 )((.t.? )|(mx ))?\\w*\\d*( ti)?").Value;
+ GPUName = Regex.Match(GPUName, "(geforce )((.tx )|(mx))?\\w*\\d*( ti)?").Value;
}
else
GPUName = obj["VideoProcessor"].ToString();
@@ -432,7 +433,7 @@ namespace EnvyUpdate
*/
//TODO: find way to differentiate between driver types
- if (System.IO.File.Exists(Path.Combine(GlobalVars.saveDirectory, "sd.envy")))
+ if (System.IO.File.Exists(GlobalVars.exedirectory + "sd.envy"))
return 18;
else
return 1;
@@ -509,27 +510,27 @@ namespace EnvyUpdate
public static void UninstallAll()
{
- if (System.IO.File.Exists(Path.Combine(GlobalVars.startup, "\\EnvyUpdate.lnk")))
+ if (System.IO.File.Exists(GlobalVars.startup + "\\EnvyUpdate.lnk"))
{
Debug.LogToFile("INFO Deleted startup entry.");
- System.IO.File.Delete(Path.Combine(GlobalVars.startup, "\\EnvyUpdate.lnk"));
+ System.IO.File.Delete(GlobalVars.startup + "\\EnvyUpdate.lnk");
}
- if (System.IO.File.Exists(Path.Combine(GlobalVars.startmenu, "\\EnvyUpdate.lnk")))
+ if (System.IO.File.Exists(GlobalVars.startmenu + "\\EnvyUpdate.lnk"))
{
Debug.LogToFile("INFO Deleted start menu entry.");
- System.IO.File.Delete(Path.Combine(GlobalVars.startmenu, "\\EnvyUpdate.lnk"));
+ System.IO.File.Delete(GlobalVars.startmenu + "\\EnvyUpdate.lnk");
}
- if ((GlobalVars.saveDirectory == GlobalVars.legacyAppdata) && System.IO.File.Exists(Path.Combine(GlobalVars.legacyAppdata, "EnvyUpdate.exe")))
+ if ((GlobalVars.exedirectory == GlobalVars.appdata) && System.IO.File.Exists(GlobalVars.appdata + "EnvyUpdate.exe"))
{
Debug.LogToFile("INFO Deleting EnvyUpdate appdata and self.");
MessageBox.Show(Properties.Resources.uninstall_legacy_message);
Util.SelfDelete();
}
- else if (Directory.Exists(GlobalVars.legacyAppdata))
+ else if (Directory.Exists(GlobalVars.appdata))
{
Debug.LogToFile("INFO Deleting EnvyUpdate appdata folder");
- Directory.Delete(GlobalVars.legacyAppdata, true);
+ Directory.Delete(GlobalVars.appdata, true);
}
}
@@ -578,7 +579,7 @@ namespace EnvyUpdate
}
else
{
- path = Path.Combine(GlobalVars.saveDirectory, "7zr.exe");
+ path = Path.Combine(GlobalVars.exedirectory, "7zr.exe");
using (WebClient client = new WebClient())
{
client.Headers["User-Agent"] = GlobalVars.useragent;
@@ -663,37 +664,5 @@ namespace EnvyUpdate
}
return null;
}
-
- public static bool HasWritePermissions()
- {
- try
- {
- System.IO.File.Create(Path.Combine(GlobalVars.saveDirectory, "writeable.envy")).Close();
- System.IO.File.Delete(Path.Combine(GlobalVars.saveDirectory, "writeable.envy"));
- return true;
- }
- catch (Exception)
- {
- return false;
- }
- }
-
- public static void MoveFilesToAppdata()
- {
- string[] envyFiles = Directory.GetFiles(GlobalVars.directoryOfExe, "*.envy");
- foreach (var item in envyFiles)
- System.IO.File.Move(item, Path.Combine(GlobalVars.appdata, Path.GetFileName(item)));
- if (System.IO.File.Exists(Path.Combine(GlobalVars.directoryOfExe, "envyupdate.log")))
- System.IO.File.Move(Path.Combine(GlobalVars.directoryOfExe, "envyupdate.log"), Path.Combine(GlobalVars.appdata, "envyupdate.log"));
- }
-
- public static void MoveFilesToExe()
- {
- string[] envyFiles = Directory.GetFiles(GlobalVars.appdata, "*.envy");
- foreach (var item in envyFiles)
- System.IO.File.Move(item, Path.Combine(GlobalVars.directoryOfExe, Path.GetFileName(item)));
- if (System.IO.File.Exists(Path.Combine(GlobalVars.appdata, "envyupdate.log")))
- System.IO.File.Move(Path.Combine(GlobalVars.appdata, "envyupdate.log"), Path.Combine(GlobalVars.directoryOfExe, "envyupdate.log"));
- }
}
}
diff --git a/LICENSE b/LICENSE
index d6dacc4..3051eea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019-2024 fyr77
+Copyright (c) 2019-2023 Jakob Senkl
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 cd44814..b343963 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,21 @@
-# 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 and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
+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.
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 (shell:startup).
+Enabling Autostart will create a shortcut of EnvyUpdate in the Windows startup folder.
### Virus warnings
@@ -20,21 +23,15 @@ Sometimes EnvyUpdate is flagged as a virus by Windows Defender or other antiviru
For extracting the driver installer 7-Zip is downloaded if it cannot be found on the user's system. This may also trigger antivirus warnings, but is necessary for the automatic driver installation to work.
-### Using AppData for configuration files
-
-Starting with 3.2, EnvyUpdate supports saving its configuration files to AppData/Roaming instead of saving it next to the main exe file. You can enable it in the settings of the application.
-
-If EnvyUpdate fails to write to the folder containing the exe file, this option will be enabled automatically.
-
## Compatibility
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. 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.
+It is tested with GeForce Series GPUs. Generally others might work, but they are (currently) untested.
## Development
-This application is currently unmaintained and developed by me (fyr77) alone in my free time.
+This application is currently maintained 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.
@@ -51,7 +48,7 @@ EnvyUpdate is not a replacement for any of these tools. I will still try to impl
## Licenses
-* This project: [MIT](https://https://vcs.diluvian.cc/fyr77/EnvyUpdate/blob/master/LICENSE)
+* This project: [MIT](https://github.com/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/)