summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-12-18 22:15:56 +0000
committersr55 <[email protected]>2016-12-18 22:15:56 +0000
commita88b32e2375d90dfa92b952d70623486547f7c35 (patch)
tree7ef317dffd7813f2d5ed632a3e52b6d7f733f100 /win/CS/HandBrake.ApplicationServices
parente2f915885842057d429954990d52da311f5c9582 (diff)
WinGui: Update the VersionUtility class to work for official releases that are not from subversion.
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs12
2 files changed, 6 insertions, 8 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
index 98317d1f1..3d0461627 100644
--- a/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
+++ b/win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
@@ -43,5 +43,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("")]
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>