mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
add template for build versioning
This commit is contained in:
@@ -18,12 +18,7 @@ namespace mRemoteNG.App.Info
|
||||
public const string UrlDocumentation = "https://mremoteng.readthedocs.io/en/latest/";
|
||||
public static string ApplicationVersion = Application.ProductVersion;
|
||||
public static readonly string ProductName = Application.ProductName;
|
||||
|
||||
public static readonly string Copyright =
|
||||
((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
|
||||
typeof(AssemblyCopyrightAttribute), false))
|
||||
.Copyright;
|
||||
|
||||
public static readonly string Copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright;
|
||||
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||
|
||||
//public static string ReportingFilePath = "";
|
||||
|
||||
22
mRemoteNG/Properties/AssemblyInfo.cs
Normal file
22
mRemoteNG/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// General Information
|
||||
[assembly: AssemblyTitle("mRemoteNG")]
|
||||
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("mRemoteNG")]
|
||||
[assembly: AssemblyProduct("mRemoteNG")]
|
||||
[assembly: AssemblyCopyright("<22> 2023 mRemoteNG")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("1.77.3.1754")]
|
||||
[assembly: AssemblyFileVersion("1.77.3.1754")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1754)")]
|
||||
|
||||
47
mRemoteNG/Properties/AssemblyInfo.tt
Normal file
47
mRemoteNG/Properties/AssemblyInfo.tt
Normal file
@@ -0,0 +1,47 @@
|
||||
<#@ template debug="true" hostspecific="true" language="C#" #>
|
||||
<#@ output extension=".cs" #>
|
||||
<#@ import namespace="System.IO" #>
|
||||
<#@ import namespace="System.Text.RegularExpressions" #>
|
||||
<#
|
||||
string output = File.ReadAllText(this.Host.ResolvePath("AssemblyInfo.cs"));
|
||||
Regex pattern = new Regex("AssemblyVersion\\(\"(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<revision>\\d+)\\.(?<build>\\d+)\"\\)");
|
||||
MatchCollection matches = pattern.Matches(output);
|
||||
if( matches.Count == 1 )
|
||||
{
|
||||
major = Convert.ToInt32(matches[0].Groups["major"].Value);
|
||||
minor = Convert.ToInt32(matches[0].Groups["minor"].Value);
|
||||
build = Convert.ToInt32(matches[0].Groups["build"].Value) + 1;
|
||||
revision = Convert.ToInt32(matches[0].Groups["revision"].Value);
|
||||
if( this.Host.ResolveParameterValue("-","-","BuildConfiguration") == "Release" )
|
||||
revision++;
|
||||
}
|
||||
#>
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// General Information
|
||||
[assembly: AssemblyTitle("mRemoteNG")]
|
||||
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("mRemoteNG")]
|
||||
[assembly: AssemblyProduct("mRemoteNG")]
|
||||
[assembly: AssemblyCopyright("<22> 2023 mRemoteNG")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #>.<#= this.build #>")]
|
||||
[assembly: AssemblyFileVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #>.<#= this.build #>")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyInformationalVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #> (<#= this.channel #>: <#= this.build #>)")]
|
||||
|
||||
<#+
|
||||
int major = 1;
|
||||
int minor = 77;
|
||||
int revision = 3;
|
||||
int build = 1754;
|
||||
string channel = "Nightly Build";
|
||||
#>
|
||||
@@ -2,10 +2,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows7.0</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ApplicationIcon>Icons\mRemoteNG.ico</ApplicationIcon>
|
||||
<Version>1.77.3</Version>
|
||||
<Version>1.77.3-dev</Version>
|
||||
<Description>Multi-protocol remote connections manager</Description>
|
||||
<Copyright>$([System.DateTime]::Now.Year) mRemoteNG Dev Team, 2010-2013 Riley McArdle, 2007-2009 Felix Deimel</Copyright>
|
||||
<PackageLicenseFile>COPYING.TXT</PackageLicenseFile>
|
||||
@@ -17,33 +17,52 @@
|
||||
<PackageIcon>Header_dark.png</PackageIcon>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<UseWPF>True</UseWPF>
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
<Title>Multi-Remote Next Generation Connection Manager</Title>
|
||||
<RepositoryUrl>https://github.com/mRemoteNG/mRemoteNG.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<Optimize>False</Optimize>
|
||||
<WarningLevel>7</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<DefineConstants />
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<WarningLevel>7</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Portable|x64'">
|
||||
<DefineConstants>DEBUG;PORTABLE</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>bin\x64\Debug Portable\</OutputPath>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<WarningLevel>7</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Portable|x64'">
|
||||
<DefineConstants>PORTABLE</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\x64\Release Portable\</OutputPath>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningsAsErrors />
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<WarningLevel>7</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Installer|x64'">
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<Optimize>True</Optimize>
|
||||
<WarningLevel>7</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="buildenv.tmp" />
|
||||
@@ -96,6 +115,11 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Language.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\AssemblyInfo.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>AssemblyInfo.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\OptionsBackupPage.Designer.cs">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -215,6 +239,10 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Properties\AssemblyInfo.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Update="Icons\Admin.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -478,4 +506,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Update="chromiumembeddedframework.runtime.win-x86" Version="92.0.25" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user