diff --git a/EnvyUpdate/App.config b/EnvyUpdate/App.config
index 56efbc7..b505ff8 100644
--- a/EnvyUpdate/App.config
+++ b/EnvyUpdate/App.config
@@ -1,6 +1,34 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/EnvyUpdate/App.xaml b/EnvyUpdate/App.xaml
index 414c0d4..fa5b264 100644
--- a/EnvyUpdate/App.xaml
+++ b/EnvyUpdate/App.xaml
@@ -2,7 +2,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EnvyUpdate"
- StartupUri="MainWindow.xaml">
+ StartupUri="MainWindow.xaml"
+ DispatcherUnhandledException="Application_DispatcherUnhandledException">
diff --git a/EnvyUpdate/App.xaml.cs b/EnvyUpdate/App.xaml.cs
index 3e57067..957513d 100644
--- a/EnvyUpdate/App.xaml.cs
+++ b/EnvyUpdate/App.xaml.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Configuration;
using System.Data;
+using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
@@ -13,5 +14,10 @@ namespace EnvyUpdate
///
public partial class App : Application
{
+ public bool DoHandle { get; set; }
+ private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+ {
+ MessageBox.Show(e.Exception.ToString());
+ }
}
}
diff --git a/EnvyUpdate/EnvyUpdate.csproj b/EnvyUpdate/EnvyUpdate.csproj
index 93f42f7..85f90d3 100644
--- a/EnvyUpdate/EnvyUpdate.csproj
+++ b/EnvyUpdate/EnvyUpdate.csproj
@@ -80,15 +80,46 @@
..\packages\Hardcodet.NotifyIcon.Wpf.1.1.0\lib\net472\Hardcodet.NotifyIcon.Wpf.dll
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
+
..\packages\Notifications.Wpf.0.1.1\lib\net461\Notifications.Wpf.dll
+
+ ..\packages\Onova.2.6.2\lib\net461\Onova.dll
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll
+
+
+ ..\packages\System.Text.Json.5.0.2\lib\net461\System.Text.Json.dll
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
@@ -205,7 +236,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/EnvyUpdate/InfoWindow.xaml b/EnvyUpdate/InfoWindow.xaml
index 18fb94b..b90f4d3 100644
--- a/EnvyUpdate/InfoWindow.xaml
+++ b/EnvyUpdate/InfoWindow.xaml
@@ -11,6 +11,6 @@
-
+
diff --git a/EnvyUpdate/MainWindow.xaml b/EnvyUpdate/MainWindow.xaml
index 87ba0ab..a650bcb 100644
--- a/EnvyUpdate/MainWindow.xaml
+++ b/EnvyUpdate/MainWindow.xaml
@@ -7,7 +7,7 @@
xmlns:p="clr-namespace:EnvyUpdate.Properties"
xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d"
- Title="EnvyUpdate" Height="250" Width="300" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize">
+ Title="EnvyUpdate" Height="270" Width="300" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize">
@@ -19,11 +19,12 @@
-
+
+
diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs
index 3ec6363..6e9e62b 100644
--- a/EnvyUpdate/MainWindow.xaml.cs
+++ b/EnvyUpdate/MainWindow.xaml.cs
@@ -94,13 +94,16 @@ namespace EnvyUpdate
infoWin.ShowDialog();
}
- private void Load()
+ private async void Load()
{
+ await Util.DoUpdateAsync();
+
int psid = 0;
int pfid = 0;
int osid = 0;
int dtcid = 0;
int dtid = 0;
+ //TODO: Make a list of languages and match OS language to driver
//int langid;
if (File.Exists(GlobalVars.exepath + "sd.envy"))
@@ -127,7 +130,7 @@ namespace EnvyUpdate
textblockGPUName.Text = Debug.GPUname();
}
- //Temporary Studio Driver override logic
+ //Temporary Studio Driver override logic until I have figured out how to detect it automatically
try
{
if (radioSD.IsChecked == true)
@@ -230,5 +233,10 @@ namespace EnvyUpdate
Load();
}
}
+
+ private void chkAutostart_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("TEST");
+ }
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/Properties/AssemblyInfo.cs b/EnvyUpdate/Properties/AssemblyInfo.cs
index 1847b65..ebf3fc5 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.9.0")]
-[assembly: AssemblyFileVersion("2.9.0")]
+[assembly: AssemblyVersion("2.9")]
+[assembly: AssemblyFileVersion("2.9")]
diff --git a/EnvyUpdate/Properties/Resources.Designer.cs b/EnvyUpdate/Properties/Resources.Designer.cs
index 9996ebe..9235b05 100644
--- a/EnvyUpdate/Properties/Resources.Designer.cs
+++ b/EnvyUpdate/Properties/Resources.Designer.cs
@@ -124,7 +124,7 @@ namespace EnvyUpdate.Properties {
}
///
- /// Looks up a localized string similar to Autostart.
+ /// Looks up a localized string similar to Run at Windows startup.
///
public static string ui_autostart {
get {
diff --git a/EnvyUpdate/Properties/Resources.de.resx b/EnvyUpdate/Properties/Resources.de.resx
index b0786cf..a5c5945 100644
--- a/EnvyUpdate/Properties/Resources.de.resx
+++ b/EnvyUpdate/Properties/Resources.de.resx
@@ -139,7 +139,7 @@
Keine NVIDIA GPU gefunden. EnvyUpdate wird sich nun schließen.
- Autostart
+ Beim Start von Windows ausführen
DCH Treiber
diff --git a/EnvyUpdate/Properties/Resources.resx b/EnvyUpdate/Properties/Resources.resx
index c6943c4..f16f450 100644
--- a/EnvyUpdate/Properties/Resources.resx
+++ b/EnvyUpdate/Properties/Resources.resx
@@ -139,7 +139,7 @@
No NVIDIA GPU found. Application will exit.
- Autostart
+ Run at Windows startup
DCH driver
diff --git a/EnvyUpdate/Util.cs b/EnvyUpdate/Util.cs
index 2d143c8..70fc013 100644
--- a/EnvyUpdate/Util.cs
+++ b/EnvyUpdate/Util.cs
@@ -1,5 +1,7 @@
using IWshRuntimeLibrary;
using Microsoft.Win32;
+using Onova;
+using Onova.Services;
using System;
using System.Diagnostics;
using System.IO;
@@ -7,6 +9,7 @@ using System.Linq;
using System.Management;
using System.Net;
using System.Text.RegularExpressions;
+using System.Threading.Tasks;
using System.Windows;
using System.Xml.Linq;
@@ -325,6 +328,7 @@ namespace EnvyUpdate
}
///
/// Checks Windows registry for Nvidia DCH Key. If it is present, returns true.
+ /// Can also check file system for existance of DLL if registry access fails
///
///
public static bool IsDCH()
@@ -380,5 +384,14 @@ namespace EnvyUpdate
return 1;
}
+
+ public static async Task DoUpdateAsync()
+ {
+ using (var manager = new UpdateManager(new GithubPackageResolver("fyr77", "EnvyUpdate", "EnvyUpdate*.zip"), new ZipPackageExtractor()))
+ {
+ // Check for new version and, if available, perform full update and restart
+ await manager.CheckPerformUpdateAsync();
+ }
+ }
}
}
\ No newline at end of file
diff --git a/EnvyUpdate/packages.config b/EnvyUpdate/packages.config
index 5a70662..c31fc18 100644
--- a/EnvyUpdate/packages.config
+++ b/EnvyUpdate/packages.config
@@ -1,8 +1,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 789e59e..028757a 100644
--- a/README.md
+++ b/README.md
@@ -43,4 +43,5 @@ EnvyUpdate is not a replacement for any of these tools. I will still try to impl
* wpf-notifyicon (for showing an icon in the system tray): [CPOL](https://github.com/hardcodet/wpf-notifyicon/blob/master/LICENSE)
* Notifications.Wpf: [MIT](https://github.com/Federerer/Notifications.Wpf/blob/master/LICENSE)
* Resource Embedder: [MIT](https://github.com/MarcStan/resource-embedder/blob/master/LICENSE)
+* Onova: [LGPL v3](https://github.com/Tyrrrz/Onova/blob/master/License.txt)
* Icon made by Freepik from www.flaticon.com
\ No newline at end of file