mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch 'v1.78.2-dev' into v1.78.2-dev
This commit is contained in:
110
.github/workflows/Build mR-NB.yml
vendored
Normal file
110
.github/workflows/Build mR-NB.yml
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
name: Build mR-NB
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v1.78.2-dev
|
||||
|
||||
jobs:
|
||||
Build-Release:
|
||||
runs-on: windows-2022
|
||||
outputs:
|
||||
zipname: ${{ steps.version.outputs.zipname }}
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
build: ${{ steps.version.outputs.build }}
|
||||
steps:
|
||||
- name: 01. Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
with:
|
||||
vs-version: '17.14.11'
|
||||
|
||||
- name: Install and run dotnet-t4 to transform T4 templates
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet tool install --global dotnet-t4
|
||||
$ttFile = "$env:GITHUB_WORKSPACE\mRemoteNG\Properties\AssemblyInfo.tt"
|
||||
t4 $ttFile
|
||||
|
||||
- name: 04. Cache NuGet Packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget-
|
||||
|
||||
- name: 05. Restore NuGet Packages
|
||||
shell: pwsh
|
||||
run: dotnet restore
|
||||
|
||||
- name: 06. Build Release
|
||||
shell: pwsh
|
||||
run: msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Release" -p:Platform=x64 /verbosity:minimal
|
||||
|
||||
- name: 07. Generate Version Info
|
||||
id: version
|
||||
shell: pwsh
|
||||
run: |
|
||||
$assemblyInfoPath = "${{ github.workspace }}\mRemoteNG\Properties\AssemblyInfo.cs"
|
||||
$line = Get-Content $assemblyInfoPath | Where-Object { $_ -match 'AssemblyVersion\("(.+?)"\)' }
|
||||
if ($line -match 'AssemblyVersion\("(?<ver>\d+\.\d+\.\d+)\.(?<build>\d+)"\)') {
|
||||
$version = $matches['ver']
|
||||
$build = $matches['build']
|
||||
} else {
|
||||
throw "Could not extract version and build number"
|
||||
}
|
||||
$date = Get-Date -Format "ddMMyyyy"
|
||||
$zipName = "mRemoteNG-$version-(NB_$build)_$date.zip"
|
||||
echo "zipname=$zipName" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: 08. Upload Release Output as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.version.outputs.zipname }}
|
||||
path: ${{ github.workspace }}\mRemoteNG\bin\x64\Release\win-x64\*
|
||||
|
||||
Create-Release:
|
||||
needs: [Build-Release]
|
||||
runs-on: ubuntu-22.04
|
||||
# Add explicit permissions for this job
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: 01. Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Download Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.Build-Release.outputs.zipname }}
|
||||
path: ./
|
||||
|
||||
- name: !!!. Debug Info
|
||||
run: |
|
||||
echo "=== DEBUG: Job Outputs ==="
|
||||
echo "Zipname: ${{ needs.Build-Release.outputs.zipname }}"
|
||||
echo "Version: ${{ needs.Build-Release.outputs.version }}"
|
||||
echo "Build: ${{ needs.Build-Release.outputs.build }}"
|
||||
echo "=== DEBUG: Files ==="
|
||||
ls -la
|
||||
|
||||
|
||||
- name: 03. Create Release and Upload Asset
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Create tag name
|
||||
TAG="v${{ needs.Build-Release.outputs.version }}-${{ needs.Build-Release.outputs.build }}-${GITHUB_RUN_NUMBER}"
|
||||
echo "Tag: "v${{ needs.Build-Release.outputs.version }}-${{ needs.Build-Release.outputs.build }}-${GITHUB_RUN_NUMBER}""
|
||||
|
||||
# Create release with tag and attach artifact
|
||||
gh release create "$TAG" \
|
||||
--title "mRemoteNG ${{ needs.Build-Release.outputs.version }} Build ${{ needs.Build-Release.outputs.build }}" \
|
||||
--notes "Development build of mRemoteNG version ${{ needs.Build-Release.outputs.version }}" \
|
||||
--prerelease \
|
||||
"${{ needs.Build-Release.outputs.zipname }}"
|
||||
130
.github/workflows/build-x86_64.yml
vendored
130
.github/workflows/build-x86_64.yml
vendored
@@ -1,130 +0,0 @@
|
||||
name: Build x86_64
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v1.77.3-dev
|
||||
|
||||
jobs:
|
||||
Build-Debug-MSI:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.12.4'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Debug Installer" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish MSI as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-msi-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNGInstaller\Installer\bin\x64\Debug\en-US\
|
||||
if-no-files-found: error
|
||||
|
||||
Build-Debug-Portable:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.8.3'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Debug Portable" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish Portable Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-portable-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNG\bin\x64\Debug Portable\
|
||||
if-no-files-found: error
|
||||
|
||||
Build-Release:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||
with:
|
||||
vs-version: '17.12.4'
|
||||
|
||||
- name: 03. Restore nuget packages for solution
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: 04. Compile mRemoteNG
|
||||
shell: pwsh
|
||||
run: |
|
||||
msbuild "$Env:GITHUB_WORKSPACE\mRemoteNG.sln" -p:Configuration="Release Installer and Portable" -p:Platform=x64 /verbosity:normal
|
||||
|
||||
- name: 05. Publish MSI Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-msi-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNGInstaller\Installer\bin\x64\Release\en-US\
|
||||
if-no-files-found: error
|
||||
|
||||
- name: 06. Publish Portable Binary as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-portable-x86_64
|
||||
path: ${{ github.workspace }}\mRemoteNG\bin\x64\Release
|
||||
if-no-files-found: error
|
||||
|
||||
Create-Release:
|
||||
needs: [Build-Debug-MSI, Build-Debug-Portable, Build-Release]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: 01. Copy repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 02. Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: 03. Create compressed archives # Needs to be done because "actions/download-artifact@v4" is extracting the zipped Artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
zip -r debug-msi-x86_64.zip debug-msi-x86_64/
|
||||
zip -r debug-portable-x86_64.zip debug-portable-x86_64/
|
||||
zip -r release-msi-x86_64.zip release-msi-x86_64/
|
||||
zip -r release-portable-x86_64.zip release-portable-x86_64/
|
||||
|
||||
- name: 04. Create Release
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release create "v1.77.3-dev-${GITHUB_RUN_NUMBER}" \
|
||||
--title "v1.77.3-dev-${GITHUB_RUN_NUMBER}" \
|
||||
--prerelease \
|
||||
--generate-notes \
|
||||
$GITHUB_WORKSPACE/debug-msi-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/debug-portable-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/release-msi-x86_64.zip \
|
||||
$GITHUB_WORKSPACE/release-portable-x86_64.zip
|
||||
@@ -5,8 +5,8 @@
|
||||
<NoWarn>$(NoWarn);NU1507</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="AWSSDK.Core" Version="4.0.0.20" />
|
||||
<PackageVersion Include="AWSSDK.EC2" Version="4.0.26.1" />
|
||||
<PackageVersion Include="AWSSDK.Core" Version="4.0.0.21" />
|
||||
<PackageVersion Include="AWSSDK.EC2" Version="4.0.27" />
|
||||
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
|
||||
<PackageVersion Include="Castle.Core" Version="5.2.1" />
|
||||
<PackageVersion Include="ConsoleControl" Version="1.3.0" />
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
//
|
||||
// This code was generated by a script. Any changes made manually will be lost
|
||||
// the next time this code is regenerated.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
|
||||
// Compute version values
|
||||
|
||||
// General Information
|
||||
[assembly: AssemblyTitle("mRemoteNG")]
|
||||
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
|
||||
@@ -18,11 +18,10 @@ using System.Resources;
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information
|
||||
[assembly: AssemblyVersion("1.78.2.3118")]
|
||||
[assembly: AssemblyFileVersion("1.78.2.3118")]
|
||||
[assembly: AssemblyVersion("1.78.2.3120")]
|
||||
[assembly: AssemblyFileVersion("1.78.2.3120")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyInformationalVersion("1.78.2 (Nightly Build 3118)")]
|
||||
[assembly: AssemblyInformationalVersion("1.78.2 (Nightly Build 3120)")]
|
||||
|
||||
// Logging
|
||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||
|
||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||
@@ -1,50 +1,38 @@
|
||||
<#@ template debug="true" hostspecific="true" language="C#" #>
|
||||
|
||||
<#@ output extension=".cs" #>
|
||||
//
|
||||
|
||||
// This code was generated by a script. Any changes made manually will be lost
|
||||
// the next time this code is regenerated.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
|
||||
// Compute version values
|
||||
<#
|
||||
int major = 1;
|
||||
int minor = 78;
|
||||
int revision = 2;
|
||||
string channel = "Nightly Build";
|
||||
DateTime lastReleaseDate = new DateTime(2019, 9, 2);
|
||||
TimeSpan elapsed = DateTime.UtcNow - lastReleaseDate;
|
||||
int build = (int)(elapsed.TotalMinutes / 1000);
|
||||
#>
|
||||
|
||||
// General Information
|
||||
[assembly: AssemblyTitle("mRemoteNG")]
|
||||
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Profi-KOM Ltd.")]
|
||||
[assembly: AssemblyProduct("mRemoteNG Connection Manager")]
|
||||
[assembly: AssemblyCopyright("(c) 2025 mRemoteNG")]
|
||||
[assembly: AssemblyCopyright("(c) <#= DateTime.UtcNow.Year #> 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: AssemblyVersion("<#= major #>.<#= minor #>.<#= revision #>.<#= build #>")]
|
||||
[assembly: AssemblyFileVersion("<#= major #>.<#= minor #>.<#= revision #>.<#= build #>")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyInformationalVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #> (<#= this.channel #> <#= this.build #>)")]
|
||||
[assembly: AssemblyInformationalVersion("<#= major #>.<#= minor #>.<#= revision #> (<#= channel #> <#= build #>)")]
|
||||
|
||||
// Logging
|
||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||
|
||||
<#+
|
||||
//build is a number of days from date of last release + curent hour + curent minute of build
|
||||
int major = 1;
|
||||
int minor = 78;
|
||||
int revision = 2;
|
||||
string channel = "Nightly Build";
|
||||
DateTime lastReleaseDate = new DateTime(2019, 9, 2);
|
||||
DateTime CurrentDate = DateTime.UtcNow;
|
||||
TimeSpan elapsedTime;
|
||||
double TotalMinutes;
|
||||
int build;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
elapsedTime = CurrentDate.Subtract(lastReleaseDate);
|
||||
TotalMinutes = elapsedTime.TotalMinutes;
|
||||
build = (int)(TotalMinutes / 1000);
|
||||
base.Initialize();
|
||||
}
|
||||
#>
|
||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||
@@ -533,12 +533,6 @@
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="echo $(ConfigurationName) > buildenv.tmp
powershell.exe -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command "$InfoText='[Pre-Build-Event-Info]';'{0} PowerShell Version: {1}' -f $InfoText,$PSVersionTable.PSVersion.toString(); $VSToolsDir=(. '$(SolutionDir)Tools\find_vstool.ps1' -FileName 'devenv.exe'); $Env:DevEnvDir = Split-Path -Path $VSToolsDir -Parent; '{0} VS tools dir found: {1}' -f $InfoText,$Env:DevEnvDir;if ($Env:APPVEYOR) {'{0} AppVeyor (cloud based CI/CD) environment detected' -f $InfoText; &'$(DevEnvDir)TextTransform.exe' -a !!BuildConfiguration!'$(Configuration)' '$(ProjectDir)Properties\AssemblyInfo.tt'} else {'{0} None AppVeyor (cloud based CI/CD) environment detected, continue' -f $InfoText; &'$(DevEnvDir)TextTransform.exe' -a !!BuildConfiguration!'$(Configuration)' '$(ProjectDir)Properties\AssemblyInfo.tt'}"" />
|
||||
</Target>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command=":: When passing paths to powershell scripts, check if the path ends with a backslash "\"
:: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one.

powershell -noprofile -command "sleep 2"

set /p buildenv=<buildenv.tmp

:: Manual builds, set the cert password and uncomment below.
:: IF "%25APPVEYOR_BUILD_FOLDER"=="" ( set cert_pwd= )

:: Call the post build powershell script
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "$(TargetDir)\" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "putty.exe"" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ExternalConnectors\ExternalConnectors.csproj" />
|
||||
<ProjectReference Include="..\ObjectListView\ObjectListView.NetCore.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user