diff options
author | sr55 <[email protected]> | 2016-12-18 22:15:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-12-18 22:15:56 +0000 |
commit | a88b32e2375d90dfa92b952d70623486547f7c35 (patch) | |
tree | 7ef317dffd7813f2d5ed632a3e52b6d7f733f100 /win/CS/HandBrake.ApplicationServices/Utilities | |
parent | e2f915885842057d429954990d52da311f5c9582 (diff) |
WinGui: Update the VersionUtility class to work for official releases that are not from subversion.
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs index 47673c112..209e3ddc8 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs @@ -28,11 +28,9 @@ namespace HandBrake.ApplicationServices.Utilities /// </returns>
public static string GetVersion()
{
- Version version = Assembly.GetEntryAssembly().GetName().Version;
-
IHandBrakeInstance instance = HandBrakeInstanceManager.GetScanInstance(1);
- return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);
+ return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0} ({1})", instance.Version, instance.Build);
}
/// <summary>
@@ -43,10 +41,10 @@ namespace HandBrake.ApplicationServices.Utilities /// </returns>
public static bool IsNightly()
{
- Version version = Assembly.GetEntryAssembly().GetName().Version;
+ IHandBrakeInstance instance = HandBrakeInstanceManager.GetScanInstance(1);
- // The MSBuild.xml script sets 0.0.0 for nightly builds.
- return version.Major == 0 && version.Minor == 0 && version.Build == 0;
+ // 01 = Unofficial Builds. 00 = Official Tagged Releases.
+ return instance.Build.ToString().EndsWith("01");
}
/// <summary>
@@ -57,7 +55,7 @@ namespace HandBrake.ApplicationServices.Utilities /// </returns>
public static string GetPlatformBitnessVersion()
{
- return System.Environment.Is64BitProcess ? "64bit Version" : "32bit Version";
+ return System.Environment.Is64BitProcess ? "64bit" : "32bit";
}
/// <summary>
|