UpdateData.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using InABox.Core;
  2. using NPOI.HPSF;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace InABox.Server
  9. {
  10. public static class UpdateData
  11. {
  12. public static string GetUpdateVersionFile()
  13. {
  14. return Path.Combine(CoreUtils.GetCommonAppData(), "update/version.txt");
  15. }
  16. public static string GetUpdateInstallerFile()
  17. {
  18. return Path.Combine(CoreUtils.GetCommonAppData(), "update/PRSDesktopSetup.exe");
  19. }
  20. public static string GetReleaseNotesFile()
  21. {
  22. return Path.Combine(CoreUtils.GetCommonAppData(), "update/Release Notes.txt");
  23. }
  24. public static string GetUpdateVersion()
  25. {
  26. return File.ReadAllText(GetUpdateVersionFile());
  27. }
  28. public static byte[] GetUpdateInstaller()
  29. {
  30. return File.ReadAllBytes(GetUpdateInstallerFile());
  31. }
  32. public static string GetReleaseNotes()
  33. {
  34. return File.ReadAllText(GetReleaseNotesFile());
  35. }
  36. }
  37. }