mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-24 01:10:25 +01:00
Improve reported versions
This commit is contained in:
parent
036743df26
commit
82dcbd7d36
|
|
@ -220,16 +220,20 @@ namespace CommonHelpers
|
|||
}
|
||||
}
|
||||
|
||||
public static Version? ApplicationVersion
|
||||
{
|
||||
get => System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
public static String ProductVersion
|
||||
{
|
||||
get => Application.ProductVersion;
|
||||
}
|
||||
|
||||
public static String ProductVersionWithSha
|
||||
{
|
||||
get
|
||||
{
|
||||
var releaseVersion = typeof(Instance).Assembly.GetCustomAttributes<AssemblyInformationalVersionAttribute>().FirstOrDefault();
|
||||
return releaseVersion?.InformationalVersion ?? ProductVersion;
|
||||
}
|
||||
}
|
||||
|
||||
private static System.Timers.Timer? updateTimer;
|
||||
|
||||
public static void RunUpdater(string Title, bool user = false, int recheckIntervalHours = 24)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ namespace Updater
|
|||
AutoUpdater.RemindLaterTimeSpan = RemindLaterFormat.Days;
|
||||
AutoUpdater.LetUserSelectRemindLater = true;
|
||||
AutoUpdater.ShowRemindLaterButton = true;
|
||||
AutoUpdater.HttpUserAgent = String.Format("AutoUpdater/{0}/{1}", Instance.MachineID, Instance.ProductVersion);
|
||||
AutoUpdater.HttpUserAgent = String.Format("AutoUpdater/{0}/{1}/{2}",
|
||||
Instance.MachineID,
|
||||
Instance.ProductVersionWithSha,
|
||||
Instance.IsProductionBuild ? "prod" : "dev");
|
||||
AutoUpdater.PersistenceProvider = persistence;
|
||||
AutoUpdater.ReportErrors = userCheck || cmdLine;
|
||||
AutoUpdater.UpdateFormSize = new Size(800, 300);
|
||||
|
|
@ -89,7 +92,7 @@ namespace Updater
|
|||
"https://steam-deck-tools.ayufan.dev/docs/updates/{0}_{1}.xml?version={2}&machineID={3}&env={4}",
|
||||
Instance.IsDEBUG ? "debug" : "release",
|
||||
IsUsingInstaller ? "setup" : "zip",
|
||||
HttpUtility.UrlEncode(Instance.ProductVersion),
|
||||
HttpUtility.UrlEncode(Instance.ProductVersionWithSha),
|
||||
HttpUtility.UrlEncode(Instance.MachineID),
|
||||
Instance.IsProductionBuild ? "prod" : "dev"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue