From a88b32e2375d90dfa92b952d70623486547f7c35 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 18 Dec 2016 22:15:56 +0000 Subject: WinGui: Update the VersionUtility class to work for official releases that are not from subversion. --- .../Properties/AssemblyInfo.cs | 2 +- .../Utilities/VersionHelper.cs | 12 ++-- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 2 - win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs.Nightly.tmpl | 65 ---------------------- .../HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl | 65 ---------------------- win/CS/build.xml | 19 +------ 7 files changed, 9 insertions(+), 158 deletions(-) delete mode 100644 win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.Nightly.tmpl delete mode 100644 win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl (limited to 'win/CS') 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 /// 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); } /// @@ -43,10 +41,10 @@ namespace HandBrake.ApplicationServices.Utilities /// 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"); } /// @@ -57,7 +55,7 @@ namespace HandBrake.ApplicationServices.Utilities /// public static string GetPlatformBitnessVersion() { - return System.Environment.Is64BitProcess ? "64bit Version" : "32bit Version"; + return System.Environment.Is64BitProcess ? "64bit" : "32bit"; } /// diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 71584b1b0..5537b4045 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -475,8 +475,6 @@ - - diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs index f3a0d749e..66b7716db 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs @@ -61,5 +61,5 @@ using System.Windows; // 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("")] \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.Nightly.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.Nightly.tmpl deleted file mode 100644 index 389c15de3..000000000 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.Nightly.tmpl +++ /dev/null @@ -1,65 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// Assembly Info -// -// -// -------------------------------------------------------------------------------------------------------------------- - -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HandBrake")] -[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("HandBrake")] -[assembly: AssemblyProduct("HandBrake")] -[assembly: AssemblyCopyright("Copyright © 2003-2016 HandBrake Team")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.*")] $WCREV$ -[assembly: AssemblyVersion("0.0.0.0")] -[assembly: NeutralResourcesLanguage("")] \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl deleted file mode 100644 index 2b1808d40..000000000 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl +++ /dev/null @@ -1,65 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// Assembly Info -// -// -// -------------------------------------------------------------------------------------------------------------------- - -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HandBrake")] -[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("HandBrake")] -[assembly: AssemblyProduct("HandBrake")] -[assembly: AssemblyCopyright("Copyright © 2003-2016 HandBrake Team")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.*")] $WCREV$ -[assembly: AssemblyVersion("0.1.0.0")] -[assembly: NeutralResourcesLanguage("")] \ No newline at end of file diff --git a/win/CS/build.xml b/win/CS/build.xml index 60205971c..6333f6b2a 100644 --- a/win/CS/build.xml +++ b/win/CS/build.xml @@ -26,11 +26,11 @@ - NightlyPreBuild;BuildRelease;NightlyPostBuild + BuildRelease;NightlyPostBuild - PreBuild;BuildRelease;ReleasePostBuild + BuildRelease;ReleasePostBuild @@ -46,21 +46,6 @@ - - - - - - - - - -- cgit v1.2.3