1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-29 22:53:13 +00:00

More internalization work.

This commit is contained in:
Ylian Saint-Hilaire
2021-06-01 16:37:00 -07:00
parent 74c9deaca7
commit b17045a457
14 changed files with 1001 additions and 133 deletions

View File

@@ -132,10 +132,10 @@ namespace MeshCentralRouter
using (var sha384 = SHA384Managed.Create()) { using (var stream = File.OpenRead(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe")) { downloadHash = sha384.ComputeHash(stream); } }
string downloadHashHex = BitConverter.ToString(downloadHash).Replace("-", string.Empty).ToLower();
if (downloadHashHex != hash) {
updateMessage("Invalid download.", 2);
updateMessage(Translate.T(Properties.Resources.InvalidDownload), 2);
File.Delete(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe");
} else {
updateMessage("Updating...", 0);
updateMessage(Translate.T(Properties.Resources.Updating), 0);
Process.Start(System.Reflection.Assembly.GetEntryAssembly().Location + ".update.exe", "-update:" + System.Reflection.Assembly.GetEntryAssembly().Location + " " + string.Join(" ", args));
Application.Exit();
}