mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
run string as a command
This commit is contained in:
@@ -483,7 +483,7 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<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 "& { $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'} }"" />
|
||||
</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_portable.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