diff --git a/Program.cs b/Program.cs index 1360e7f6..870ad829 100644 --- a/Program.cs +++ b/Program.cs @@ -22,7 +22,7 @@ namespace TweetDuck{ static class Program{ public const string BrandName = Lib.BrandName; - public const string VersionTag = Lib.VersionTag; + public const string VersionTag = Version.Tag; public const string Website = "https://tweetduck.chylex.com"; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index e0e2a8f0..1df8aaf0 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ // 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("TweetDeck client for Windows")] -[assembly: AssemblyDescription("TweetDeck client for Windows")] +[assembly: AssemblyTitle("TweetDeck Client for Windows")] +[assembly: AssemblyDescription("TweetDeck Client for Windows")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct(Program.BrandName)] @@ -24,19 +24,6 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7f09373d-8beb-416f-a48d-45d8aaeb8caf")] -// 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.*")] -[assembly: AssemblyVersion(Program.VersionTag)] -[assembly: AssemblyFileVersion(Program.VersionTag)] - [assembly: NeutralResourcesLanguage("en")] [assembly: CLSCompliant(true)] diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 3876be54..b8294839 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -53,6 +53,7 @@ <Reference Include="System.Windows.Forms" /> </ItemGroup> <ItemGroup> + <Compile Include="Version.cs" /> <Compile Include="Configuration\Arguments.cs" /> <Compile Include="Configuration\ConfigManager.cs" /> <Compile Include="Configuration\SystemConfig.cs" /> diff --git a/Utils/WindowsUtils.cs b/Utils/WindowsUtils.cs index 97a8d154..574c8d2c 100644 --- a/Utils/WindowsUtils.cs +++ b/Utils/WindowsUtils.cs @@ -14,7 +14,7 @@ static class WindowsUtils{ public static bool IsAeroEnabled => IsWindows8OrNewer || (NativeMethods.DwmIsCompositionEnabled(out bool isCompositionEnabled) == 0 && isCompositionEnabled); private static bool OSVersionEquals(int major, int minor){ - Version ver = Environment.OSVersion.Version; + System.Version ver = Environment.OSVersion.Version; return ver.Major == major && ver.Minor == minor; } diff --git a/Version.cs b/Version.cs new file mode 100644 index 00000000..a3db5897 --- /dev/null +++ b/Version.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using Version = TweetDuck.Version; + +[assembly: AssemblyVersion(Version.Tag)] +[assembly: AssemblyFileVersion(Version.Tag)] + +namespace TweetDuck{ + internal static class Version{ + public const string Tag = "1.18.3"; + } +} diff --git a/lib/TweetLib.Communication/Properties/AssemblyInfo.cs b/lib/TweetLib.Communication/Properties/AssemblyInfo.cs index 1d970413..412609c6 100644 --- a/lib/TweetLib.Communication/Properties/AssemblyInfo.cs +++ b/lib/TweetLib.Communication/Properties/AssemblyInfo.cs @@ -20,16 +20,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("72473763-4b9d-4fb6-a923-9364b2680f06")] - -// 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.*")] -[assembly: AssemblyVersion("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] diff --git a/lib/TweetLib.Communication/TweetLib.Communication.csproj b/lib/TweetLib.Communication/TweetLib.Communication.csproj index 8b965807..31bb09a1 100644 --- a/lib/TweetLib.Communication/TweetLib.Communication.csproj +++ b/lib/TweetLib.Communication/TweetLib.Communication.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> @@ -40,6 +40,9 @@ <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> + <Compile Include="..\..\Version.cs"> + <Link>Version.cs</Link> + </Compile> <Compile Include="DuplexPipe.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> diff --git a/lib/TweetLib.Core/Features/Plugins/Plugin.cs b/lib/TweetLib.Core/Features/Plugins/Plugin.cs index 3b2895d7..5ce8d64d 100644 --- a/lib/TweetLib.Core/Features/Plugins/Plugin.cs +++ b/lib/TweetLib.Core/Features/Plugins/Plugin.cs @@ -6,7 +6,7 @@ namespace TweetLib.Core.Features.Plugins{ public sealed class Plugin{ - private static readonly Version AppVersion = new Version(Lib.VersionTag); + private static readonly Version AppVersion = new Version(TweetDuck.Version.Tag); public string Identifier { get; } public PluginGroup Group { get; } diff --git a/lib/TweetLib.Core/Features/Updates/UpdateInfo.cs b/lib/TweetLib.Core/Features/Updates/UpdateInfo.cs index b55a9d5d..6423495d 100644 --- a/lib/TweetLib.Core/Features/Updates/UpdateInfo.cs +++ b/lib/TweetLib.Core/Features/Updates/UpdateInfo.cs @@ -48,7 +48,7 @@ public void BeginSilentDownload(){ return; } - WebClient client = WebUtils.NewClient($"{Lib.BrandName} {Lib.VersionTag}"); + WebClient client = WebUtils.NewClient($"{Lib.BrandName} {TweetDuck.Version.Tag}"); client.DownloadFileCompleted += WebUtils.FileDownloadCallback(InstallerPath, () => { DownloadStatus = UpdateDownloadStatus.Done; diff --git a/lib/TweetLib.Core/Lib.cs b/lib/TweetLib.Core/Lib.cs index 55c0b568..a626886d 100644 --- a/lib/TweetLib.Core/Lib.cs +++ b/lib/TweetLib.Core/Lib.cs @@ -1,10 +1,14 @@ using System.Globalization; +using System.Reflection; using System.Threading; +[assembly: AssemblyTitle("TweetDuck Core Library")] +[assembly: AssemblyDescription("TweetDuck Core Library")] +[assembly: AssemblyProduct("TweetCore.Lib")] + namespace TweetLib.Core{ public static class Lib{ public const string BrandName = "TweetDuck"; - public const string VersionTag = "1.18.3"; #pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable. public static CultureInfo Culture { get; private set; } diff --git a/lib/TweetLib.Core/TweetLib.Core.csproj b/lib/TweetLib.Core/TweetLib.Core.csproj index 5d144f10..89f168c2 100644 --- a/lib/TweetLib.Core/TweetLib.Core.csproj +++ b/lib/TweetLib.Core/TweetLib.Core.csproj @@ -1,10 +1,15 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <Platforms>x86</Platforms> <LangVersion>8.0</LangVersion> <Nullable>enable</Nullable> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> + <ItemGroup> + <Compile Include="..\..\Version.cs" Link="Version.cs" /> + </ItemGroup> + </Project> diff --git a/subprocess/Program.cs b/subprocess/Program.cs index 3f22fffc..f6e8f287 100644 --- a/subprocess/Program.cs +++ b/subprocess/Program.cs @@ -5,8 +5,6 @@ namespace TweetDuck.Browser{ static class Program{ - internal const string Version = "1.4.2"; - private static int Main(string[] args){ SubProcess.EnableHighDPISupport(); diff --git a/subprocess/Properties/AssemblyInfo.cs b/subprocess/Properties/AssemblyInfo.cs index c6c7c2b2..ff3287a7 100644 --- a/subprocess/Properties/AssemblyInfo.cs +++ b/subprocess/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ using System.Reflection; using System.Runtime.InteropServices; -using TweetDuck.Browser; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -21,16 +20,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b10b0017-819e-4f71-870f-8256b36a26aa")] - -// 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.*")] -[assembly: AssemblyVersion(Program.Version)] -[assembly: AssemblyFileVersion(Program.Version)] diff --git a/subprocess/TweetDuck.Browser.csproj b/subprocess/TweetDuck.Browser.csproj index 56ad4286..332c07b9 100644 --- a/subprocess/TweetDuck.Browser.csproj +++ b/subprocess/TweetDuck.Browser.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> @@ -36,6 +36,9 @@ <Reference Include="System" /> </ItemGroup> <ItemGroup> + <Compile Include="..\Version.cs"> + <Link>Version.cs</Link> + </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> diff --git a/video/Program.cs b/video/Program.cs index f8a628d1..b51b4dc3 100644 --- a/video/Program.cs +++ b/video/Program.cs @@ -5,8 +5,6 @@ namespace TweetDuck.Video{ static class Program{ - internal const string Version = "1.4.2"; - // referenced in VideoPlayer // set by task manager -- public const int CODE_PROCESS_KILLED = 1; public const int CODE_INVALID_ARGS = 2; diff --git a/video/Properties/AssemblyInfo.cs b/video/Properties/AssemblyInfo.cs index 791b0f07..52dca5da 100644 --- a/video/Properties/AssemblyInfo.cs +++ b/video/Properties/AssemblyInfo.cs @@ -1,6 +1,5 @@ using System.Reflection; using System.Runtime.InteropServices; -using TweetDuck.Video; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -21,16 +20,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("278b2d11-402d-44b6-b6a1-8fa67db65565")] - -// 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.*")] -[assembly: AssemblyVersion(Program.Version)] -[assembly: AssemblyFileVersion(Program.Version)] diff --git a/video/TweetDuck.Video.csproj b/video/TweetDuck.Video.csproj index fb55251e..643d209d 100644 --- a/video/TweetDuck.Video.csproj +++ b/video/TweetDuck.Video.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> @@ -49,6 +49,9 @@ <Reference Include="System.Windows.Forms" /> </ItemGroup> <ItemGroup> + <Compile Include="..\Version.cs"> + <Link>Version.cs</Link> + </Compile> <Compile Include="Controls\ControlWMP.cs"> <SubType>Component</SubType> </Compile>