mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Merge pull request #2529 from xRushG/v1.77.3-dev
Pre-build event powershell code update #2524
This commit is contained in:
@@ -490,7 +490,7 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||||
<Exec Command="echo $(ConfigurationName) > buildenv.tmp
powershell.exe -WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -Command "& { $Env:DevEnvDir = ($(SolutionDir)Tools/find_vstool.ps1 devenv.exe); $Env:DevEnvDir = ($Env:DevEnvDir.Replace('devenv.exe','')).replace('`',''); $Env:DevEnvDir; if ($Env:APPVEYOR) {&'$(DevEnvDir)TextTransform.exe' -a !!BuildConfiguration!'$(Configuration)' '$(ProjectDir)Properties\AssemblyInfo.tt'} }"" />
|
<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;}"" />
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
<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 "PuTTYNG.exe"" />
|
<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 "PuTTYNG.exe"" />
|
||||||
|
|||||||
Reference in New Issue
Block a user