]> granicus.if.org Git - handbrake/commitdiff
WinGui: Update the VersionUtility class to work for official releases that are not...
authorsr55 <sr55.hb@outlook.com>
Sun, 18 Dec 2016 22:15:56 +0000 (22:15 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 18 Dec 2016 22:15:56 +0000 (22:15 +0000)
win/CS/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
win/CS/HandBrake.ApplicationServices/Utilities/VersionHelper.cs
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs
win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.Nightly.tmpl [deleted file]
win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl [deleted file]
win/CS/build.xml

index 98317d1f16a51e28a6dfcb32fe8224127c8b0afc..3d0461627bf080a0e70d63aa9ba79114ea0e6e13 100644 (file)
@@ -43,5 +43,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers \r
 // by using the '*' as shown below:\r
 // [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("0.0.0.0")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
 [assembly: NeutralResourcesLanguage("")]\r
index 47673c112f434ca9c958f6a4cb1c4cf5b914141d..209e3ddc8f467cfaed50746ca1633c84cdbc66e2 100644 (file)
@@ -28,11 +28,9 @@ namespace HandBrake.ApplicationServices.Utilities
         /// </returns>\r
         public static string GetVersion()\r
         {\r
-            Version version = Assembly.GetEntryAssembly().GetName().Version;\r
-\r
             IHandBrakeInstance instance = HandBrakeInstanceManager.GetScanInstance(1);\r
        \r
-            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);\r
+            return IsNightly() ? string.Format("Nightly {0} ({1})", instance.Version, instance.Build) : string.Format("{0} ({1})", instance.Version, instance.Build);\r
         }\r
 \r
         /// <summary>\r
@@ -43,10 +41,10 @@ namespace HandBrake.ApplicationServices.Utilities
         /// </returns>\r
         public static bool IsNightly()\r
         {\r
-            Version version = Assembly.GetEntryAssembly().GetName().Version;\r
+            IHandBrakeInstance instance = HandBrakeInstanceManager.GetScanInstance(1);\r
 \r
-            // The MSBuild.xml script sets 0.0.0 for nightly builds.\r
-            return version.Major == 0 && version.Minor == 0 && version.Build == 0;\r
+            // 01 = Unofficial Builds.  00 = Official Tagged Releases.\r
+            return instance.Build.ToString().EndsWith("01");\r
         }\r
 \r
         /// <summary>\r
@@ -57,7 +55,7 @@ namespace HandBrake.ApplicationServices.Utilities
         /// </returns>\r
         public static string GetPlatformBitnessVersion()\r
         {\r
-            return System.Environment.Is64BitProcess ? "64bit Version" : "32bit Version";\r
+            return System.Environment.Is64BitProcess ? "64bit" : "32bit";\r
         }\r
 \r
         /// <summary>\r
index 71584b1b07da533b0d304c1b0cec87c3aa89a57b..5537b404514666bce0514ea7008de7348733e08c 100644 (file)
     <None Include="Installer\Installer64.nsi" />\r
     <None Include="Installer\MakeNightly.nsi" />\r
     <None Include="Installer\MakeNightly64.nsi" />\r
-    <None Include="Properties\AssemblyInfo.cs.Nightly.tmpl" />\r
-    <None Include="Properties\AssemblyInfo.cs.tmpl" />\r
     <AppDesigner Include="Properties\" />\r
     <EmbeddedResource Include="public.key" />\r
   </ItemGroup>\r
index f3a0d749ed26c156ea455838b0ffdd51dd9d27f1..66b7716db2c3c238483862ca330603442fb52300 100644 (file)
@@ -61,5 +61,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers \r
 // by using the '*' as shown below:\r
 // [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("0.0.0.0")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
 [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 (file)
index 389c15d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ListBoxHelper.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Assembly Info\r
-// </summary>\r
-// <auto-generated/>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-using System.Reflection;\r
-using System.Resources;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-using System.Windows;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("HandBrake")]\r
-[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("HandBrake")]\r
-[assembly: AssemblyProduct("HandBrake")]\r
-[assembly: AssemblyCopyright("Copyright © 2003-2016 HandBrake Team")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components.  If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-//In order to begin building localizable applications, set \r
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r
-//inside a <PropertyGroup>.  For example, if you are using US english\r
-//in your source files, set the <UICulture> to en-US.  Then uncomment\r
-//the NeutralResourceLanguage attribute below.  Update the "en-US" in\r
-//the line below to match the UICulture setting in the project file.\r
-\r
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]\r
-\r
-\r
-[assembly: ThemeInfo(\r
-    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located\r
-    //(used if a resource is not found in the page, \r
-    // or application resource dictionaries)\r
-    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located\r
-    //(used if a resource is not found in the page, \r
-    // app, or any theme specific resource dictionaries)\r
-)]\r
-\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-//      Major Version\r
-//      Minor Version \r
-//      Build Number\r
-//      Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")]  $WCREV$\r
-[assembly: AssemblyVersion("0.0.0.0")]\r
-[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 (file)
index 2b1808d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ListBoxHelper.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Assembly Info\r
-// </summary>\r
-// <auto-generated/>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-using System.Reflection;\r
-using System.Resources;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-using System.Windows;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("HandBrake")]\r
-[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("HandBrake")]\r
-[assembly: AssemblyProduct("HandBrake")]\r
-[assembly: AssemblyCopyright("Copyright © 2003-2016 HandBrake Team")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components.  If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-//In order to begin building localizable applications, set \r
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r
-//inside a <PropertyGroup>.  For example, if you are using US english\r
-//in your source files, set the <UICulture> to en-US.  Then uncomment\r
-//the NeutralResourceLanguage attribute below.  Update the "en-US" in\r
-//the line below to match the UICulture setting in the project file.\r
-\r
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]\r
-\r
-\r
-[assembly: ThemeInfo(\r
-    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located\r
-    //(used if a resource is not found in the page, \r
-    // or application resource dictionaries)\r
-    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located\r
-    //(used if a resource is not found in the page, \r
-    // app, or any theme specific resource dictionaries)\r
-)]\r
-\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-//      Major Version\r
-//      Minor Version \r
-//      Build Number\r
-//      Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")] $WCREV$\r
-[assembly: AssemblyVersion("0.1.0.0")]\r
-[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file
index 60205971c59682a5421b8ceb7d7e946199399d74..6333f6b2a88a4066c1b90268cd8b9524a8b05ef2 100644 (file)
 \r
   <!-- Dependencies -->\r
   <PropertyGroup>\r
-    <NightlyDependsOn>NightlyPreBuild;BuildRelease;NightlyPostBuild</NightlyDependsOn>\r
+    <NightlyDependsOn>BuildRelease;NightlyPostBuild</NightlyDependsOn>\r
   </PropertyGroup>\r
 \r
   <PropertyGroup>\r
-    <InstallDependsOn>PreBuild;BuildRelease;ReleasePostBuild</InstallDependsOn>\r
+    <InstallDependsOn>BuildRelease;ReleasePostBuild</InstallDependsOn>\r
   </PropertyGroup>\r
 \r
   <!-- Builds /t: -->\r
     </MSBuild>\r
   </Target>\r
 \r
-  <!-- Pre Build Events. You must do a full checkout as it takes the svn from the main directory.  $(MSBuildProjectDirectory)\. is not used. -->\r
-    <Target Name="NightlyPreBuild">\r
-    <!--<Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Properties\AssemblyInfo.cs.Nightly.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Properties\AssemblyInfo.cs" />\r
-    <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly.nsi.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly.nsi" Condition="$(Platform) == 'x86'" />\r
-    <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly64.nsi.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly64.nsi" Condition="$(Platform) == 'x64'" />\r
-    <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrake.ApplicationServices\Properties\AssemblyInfo.cs.Nightly.tmpl $(MSBuildProjectDirectory)\HandBrake.ApplicationServices\Properties\AssemblyInfo.cs" />-->\r
-    </Target>\r
-\r
-    <Target Name="PreBuild">\r
-      <!-- <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Properties\AssemblyInfo.cs.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Properties\AssemblyInfo.cs" />\r
-      <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly.nsi.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly.nsi" Condition="$(Platform) == 'x86'" />\r
-      <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly64.nsi.tmpl $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly64.nsi" Condition="$(Platform) == 'x64'" />\r
-      <Exec Command="subwcrev.exe ../../ $(MSBuildProjectDirectory)\HandBrake.ApplicationServices\Properties\AssemblyInfo.cs.tmpl $(MSBuildProjectDirectory)\HandBrake.ApplicationServices\Properties\AssemblyInfo.cs" />-->\r
-    </Target>\r
-\r
   <!-- Post Build Events -->\r
   <Target Name="NightlyPostBuild">\r
     <Exec Command="copy $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly.nsi $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x86\Release /Y" Condition="$(Platform) == 'x86'" />\r