mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #2391 from BlueBlock/add_set_devenvdir_to_prebuild
Update mRemoteNG.csproj
This commit is contained in:
@@ -480,7 +480,7 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="echo $(ConfigurationName) > buildenv.tmp
"$(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 }"
"$(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