_manifestUrl = json.manifestUrl; return true; }
public async Task DownloadAndApplyUpdateAsync(IProgress<DownloadProgress> progress) { var manifest = await GetManifestAsync(); string tempFile = Path.GetTempFileName() + ".exe"; Download OmniGlyph V 6 Updaterar
// Launch updater Process.Start(new ProcessStartInfo { FileName = tempFile, Arguments = string.Join(" ", manifest.updaterFile.arguments), UseShellExecute = true }); _manifestUrl = json
Response:
{ "updateAvailable": true, "manifestUrl": "https://updates.omniglyph.com/v6/manifest.json" } public class OmniGlyphUpdater { private HttpClient _http = new HttpClient(); private string _manifestUrl; public async Task<bool> CheckForUpdateAsync(string currentVersion) { var response = await _http.GetStringAsync("https://api.omniglyph.com/updater/latest"); var json = JsonSerializer.Deserialize<UpdateCheckResponse>(response); if (!json.updateAvailable) return false; _manifestUrl = json.manifestUrl