void TickFetchTask() { if (fetchTask == null) { return; } fetchTask.Tick(); UpdateFetchProgress(); if (!fetchTask.Completed) { return; } if (!fetchTask.Success) { view.statusText = "&cFailed to fetch update"; UpdateStatus(); } else { Applier.ExtractUpdate(fetchTask.ZipFile); game.ShouldExit = true; game.ShouldUpdate = true; } fetchTask = null; }
void ApplyUpdate() { Applier.ExtractUpdate(csZip); game.ShouldExit = true; game.ShouldUpdate = true; if (cExe == null) { return; } string path = Client.GetCExeName(); // TODO: Set last-modified time to actual time of dev build Platform.WriteAllBytes(path, cExe); }