[NF] First try to create an Autoupdater

This commit is contained in:
BlubbFish 2017-04-20 15:09:37 +00:00
parent 7003a44d29
commit 424e120265

View File

@ -17,7 +17,9 @@ namespace svnsync
[STAThread]
static void Main(String[] args)
{
Update();
if (!Cmd(args)) {
Updater.Instance.WaitForExit();
return;
}
FileMutex.Instance.SetName(CmdArgs.Instance.GetArgumentData("-d"));
@ -62,6 +64,17 @@ namespace svnsync
}*/
}
private static void Update() {
Updater.Instance.SetPath("https://svn.blubbfish.net:18082/");
Updater.Instance.UpdateResult += Instance_UpdateResult;
}
private static void Instance_UpdateResult(Boolean hasUpdates, String message) {
if(hasUpdates) {
Updater.Instance.Update("SvnSync.exe", "https://");
}
}
static void T_StartLoop()
{
if (!LoopStarted) {