Skip to content
代码片段 群组 项目
提交 c2ef8fc1 编辑于 作者: Faryan Rezagholi's avatar Faryan Rezagholi
浏览文件

fixed powershell scripts

上级 8ea8c411
未找到相关分支
未找到相关标签
无相关合并请求
......@@ -16,23 +16,23 @@ $SEVENZIP="Tools\7zip\7za.exe"
if ($ConfigurationName -eq "Release Portable") {
Write-Output "Packaging Release Portable ZIP"
$version = & $SIGCHECK /accepteula -q -n "mRemoteV1\bin\$($ConfigurationName)\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe"
Write-Output "Version is $($version)"
$PortableZip="Release\mRemoteNG-Portable-$($version).zip"
Remove-Item -Recurse "mRemoteV1\bin\package" -ErrorAction SilentlyContinue | Out-Null
New-Item "mRemoteV1\bin\package" -ItemType "directory" | Out-Null
Remove-Item -Recurse "mRemoteNG\bin\package" -ErrorAction SilentlyContinue | Out-Null
New-Item "mRemoteNG\bin\package" -ItemType "directory" | Out-Null
Copy-Item "mRemoteV1\Resources\PuTTYNG.exe" -Destination "mRemoteV1\bin\package"
Copy-Item "mRemoteNG\Resources\PuTTYNG.exe" -Destination "mRemoteNG\bin\package"
Copy-Item "mRemoteV1\bin\$ConfigurationName\*" -Destination "mRemoteV1\bin\package" -Recurse -Force -Exclude *.pdb
Copy-Item "*.txt" -Destination "mRemoteV1\bin\package"
Copy-Item "mRemoteNG\bin\$ConfigurationName\*" -Destination "mRemoteNG\bin\package" -Recurse -Force -Exclude *.pdb
Copy-Item "*.txt" -Destination "mRemoteNG\bin\package"
Write-Output "Creating portable ZIP file $($PortableZip)"
Remove-Item -Force $PortableZip -ErrorAction SilentlyContinue
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip ".\mRemoteV1\bin\package\*.*"
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip ".\mRemoteNG\bin\package\*.*"
}
else {
Write-Output "We will not zip anything - this isnt a portable release build."
......@@ -44,7 +44,7 @@ Write-Output ""
if ($ConfigurationName -match "Release" -And $ConfigurationName -ne "Release Installer") {
Write-Output "Packaging debug symbols"
$version = & $SIGCHECK /accepteula -q -n "mRemoteV1\bin\$($ConfigurationName)\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe"
Write-Output "Version is $($version)"
......@@ -58,7 +58,7 @@ if ($ConfigurationName -match "Release" -And $ConfigurationName -ne "Release Ins
Write-Output "Creating debug symbols ZIP file $($outputZipPath)"
Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue
$SymPath = (Join-Path -Path mRemoteV1\bin\$($ConfigurationName) -ChildPath "*.pdb")
$SymPath = (Join-Path -Path mRemoteNG\bin\$($ConfigurationName) -ChildPath "*.pdb")
if(Test-Path "$SymPath") {
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath "$SymPath"
} else {
......
......@@ -23,11 +23,11 @@ Write-Output "Restoring NuGets"
Write-Output "Build Release Installer"
& msbuild "$($appvDir)\mRemoteV1.sln" /nologo /t:Clean,Build /p:Configuration="Release Installer" /p:Platform=x86 /p:CertPath="$($Env:cert_path)" /p:CertPassword="$Env:cert_pwd" /m /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
& msbuild "$($appvDir)\mRemoteNG.sln" /nologo /t:Clean,Build /p:Configuration="Release Installer" /p:Platform=x86 /p:CertPath="$($Env:cert_path)" /p:CertPassword="$Env:cert_pwd" /m /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Write-Output "Packaging debug symbols"
$version = & $SIGCHECK /accepteula -q -n "mRemoteV1\bin\Release\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "mRemoteNG\bin\Release\mRemoteNG.exe"
Write-Output "Version is $($version)"
......@@ -38,7 +38,7 @@ $outputZipPath="Release\$zipFilePrefix-$($version).zip"
Write-Output "Creating debug symbols ZIP file $($outputZipPath)"
Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue
$SymPath = (Join-Path -Path "mRemoteV1\bin\Release" -ChildPath "*.pdb")
$SymPath = (Join-Path -Path "mRemoteNG\bin\Release" -ChildPath "*.pdb")
if(Test-Path "$SymPath") {
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath "$SymPath"
} else {
......@@ -47,12 +47,12 @@ if(Test-Path "$SymPath") {
Write-Output "Build Release Portable"
& msbuild "$($appvDir)\mRemoteV1.sln" /nologo /t:Clean,Build /p:Configuration="Release Portable" /p:Platform=x86 /p:CertPath="$($Env:cert_path)" /p:CertPassword="$Env:cert_pwd" /m /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
& msbuild "$($appvDir)\mRemoteNG.sln" /nologo /t:Clean,Build /p:Configuration="Release Portable" /p:Platform=x86 /p:CertPath="$($Env:cert_path)" /p:CertPassword="$Env:cert_pwd" /m /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Write-Output "Packaging Release Portable ZIP"
$version = & $SIGCHECK /accepteula -q -n "mRemoteV1\bin\Release Portable\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "mRemoteNG\bin\Release Portable\mRemoteNG.exe"
Write-Output "Version is $($version)"
......@@ -61,7 +61,7 @@ $outputZipPath="Release\$zipFilePrefix-$($version).zip"
Write-Output "Creating debug symbols ZIP file $($outputZipPath)"
Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue
$SymPath = (Join-Path -Path "mRemoteV1\bin\Release Portable" -ChildPath "*.pdb")
$SymPath = (Join-Path -Path "mRemoteNG\bin\Release Portable" -ChildPath "*.pdb")
if(Test-Path "$SymPath") {
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath "$SymPath"
} else {
......@@ -70,14 +70,14 @@ if(Test-Path "$SymPath") {
$PortableZip="Release\mRemoteNG-Portable-$($version).zip"
Remove-Item -Recurse "mRemoteV1\bin\package" -ErrorAction SilentlyContinue | Out-Null
New-Item "mRemoteV1\bin\package" -ItemType "directory" | Out-Null
Remove-Item -Recurse "mRemoteNG\bin\package" -ErrorAction SilentlyContinue | Out-Null
New-Item "mRemoteNG\bin\package" -ItemType "directory" | Out-Null
Copy-Item "mRemoteV1\Resources\PuTTYNG.exe" -Destination "mRemoteV1\bin\package"
Copy-Item "mRemoteNG\Resources\PuTTYNG.exe" -Destination "mRemoteNG\bin\package"
Copy-Item "mRemoteV1\bin\Release Portable\*" -Destination "mRemoteV1\bin\package" -Recurse -Force
Copy-Item "*.txt" -Destination "mRemoteV1\bin\package"
Copy-Item "mRemoteNG\bin\Release Portable\*" -Destination "mRemoteNG\bin\package" -Recurse -Force
Copy-Item "*.txt" -Destination "mRemoteNG\bin\package"
Write-Output "Creating portable ZIP file $($PortableZip)"
Remove-Item -Force $PortableZip -ErrorAction SilentlyContinue
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip ".\mRemoteV1\bin\package\*.*"
& $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip ".\mRemoteNG\bin\package\*.*"
......@@ -13,15 +13,15 @@ call %VCVARSALL% x86
IF NOT "%~1"=="build" goto skipbuild
echo Building...
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "%SOLUTIONDIR%\mRemoteV1.sln" /Rebuild "Release Portable"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "%SOLUTIONDIR%\mRemoteNG.sln" /Rebuild "Release Portable"
:skipbuild
IF NOT EXIST "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe" echo Did you forget to build? && goto end
IF NOT EXIST "%SOLUTIONDIR%\mRemoteNG\bin\Release Portable\mRemoteNG.exe" echo Did you forget to build? && goto end
set SIGCHECK=!SIGCHECK:"=^"!
set SIGCHECK=!SIGCHECK: =^^ !
set SIGCHECK=!SIGCHECK:(=^^(!
set SIGCHECK=!SIGCHECK:)=^^)!
for /F "usebackq delims=. tokens=1-4" %%i in (`!SIGCHECK! /accepteula -q -n "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe"`) do (
for /F "usebackq delims=. tokens=1-4" %%i in (`!SIGCHECK! /accepteula -q -n "%SOLUTIONDIR%\mRemoteNG\bin\Release Portable\mRemoteNG.exe"`) do (
set PRODUCT_VERSION_SHORT=%%i.%%j
set PRODUCT_VERSION=%%i.%%j.%%k.%%l
)
......@@ -29,17 +29,17 @@ echo Version is %PRODUCT_VERSION%
set PORTABLEZIP="%SOLUTIONDIR%\Release\mRemoteNG-Portable-%PRODUCT_VERSION%.zip"
rmdir /S /Q "%SOLUTIONDIR%\mRemoteV1\bin\package"
mkdir "%SOLUTIONDIR%\mRemoteV1\bin\package"
copy "%SOLUTIONDIR%\*.txt" "%SOLUTIONDIR%\mRemoteV1\bin\package"
copy "%SOLUTIONDIR%\Installer Projects\Installer\Dependencies\PuTTYNG.exe" "%SOLUTIONDIR%\mRemoteV1\bin\package"
rmdir /S /Q "%SOLUTIONDIR%\mRemoteNG\bin\package"
mkdir "%SOLUTIONDIR%\mRemoteNG\bin\package"
copy "%SOLUTIONDIR%\*.txt" "%SOLUTIONDIR%\mRemoteNG\bin\package"
copy "%SOLUTIONDIR%\Installer Projects\Installer\Dependencies\PuTTYNG.exe" "%SOLUTIONDIR%\mRemoteNG\bin\package"
xcopy /S /Y "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable" "%SOLUTIONDIR%\mRemoteV1\bin\package"
xcopy /S /Y "%SOLUTIONDIR%\mRemoteNG\bin\Release Portable" "%SOLUTIONDIR%\mRemoteNG\bin\package"
echo Creating portable ZIP file...
echo %PORTABLEZIP%
del /f /q %PORTABLEZIP% > nul 2>&1
%SEVENZIP% a -bt -mx=9 -tzip -y -r %PORTABLEZIP% "%SOLUTIONDIR%\mRemoteV1\bin\package\*.*"
%SEVENZIP% a -bt -mx=9 -tzip -y -r %PORTABLEZIP% "%SOLUTIONDIR%\mRemoteNG\bin\package\*.*"
%SEVENZIP% a -bt -mx=9 -tzip -y %PORTABLEZIP% "%SOLUTIONDIR%\*.TXT"
:end
\ No newline at end of file
......@@ -10,6 +10,6 @@ param (
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Copying PUTTYNG to correct directory"
Copy-Item -Path (Join-Path -Path $SolutionDir -ChildPath "mRemoteV1\Resources\PuTTYNG.exe") -Destination $TargetDir -Force
Copy-Item -Path (Join-Path -Path $SolutionDir -ChildPath "mRemoteNG\Resources\PuTTYNG.exe") -Destination $TargetDir -Force
Write-Output ""
\ No newline at end of file
......@@ -11,7 +11,7 @@ param (
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Copying THEMES folder to output"
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteV1\Resources\Themes' )
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteNG\Resources\Themes' )
$DestinationDir = [io.path]::combine($TargetDir , 'Themes')
robocopy $sourceFiles $DestinationDir *.vstheme /s
......
......@@ -11,7 +11,7 @@ param (
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Copying TILES folder to output"
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteV1\Resources\Tiles' )
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteNG\Resources\Tiles' )
robocopy $sourceFiles $TargetDir *.*
Write-Output ""
\ No newline at end of file
......@@ -26,7 +26,7 @@ param (
)
Write-Output "+=================================================================+"
Write-Output "| Beginning mRemoteV1 Post Build |"
Write-Output "| Beginning mRemoteNG Post Build |"
Write-Output "+=================================================================+"
Format-Table -AutoSize -Wrap -InputObject @{
"SolutionDir" = $SolutionDir
......
......@@ -8,7 +8,7 @@ $renameTarget = $SolutionDir + "InstallerProjects\Installer\bin\Release\en-US\mR
Write-Host $SolutionDir
Write-Host $renameTarget
$targetVersionedFile = "$SolutionDir\mRemoteV1\bin\Release\mRemoteNG.exe"
$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\Release\mRemoteNG.exe"
$version = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile
......
......@@ -13,7 +13,7 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Building HTML-Documentation with Sphinx"
$path_HelpFilesDir = Join-Path -Path $TargetDir -ChildPath "Help"
$path_SphinxSourceDir = Join-Path -Path $SolutionDir -ChildPath "mremoteV1\Documentation"
$path_SphinxSourceDir = Join-Path -Path $SolutionDir -ChildPath "mRemoteNG\Documentation"
# Remove stale Help files, if they exist
if (Test-Path -Path $path_HelpFilesDir) {
Remove-Item -Path $path_HelpFilesDir -Recurse -Force
......
......@@ -33,21 +33,21 @@ $SEVENZIP="$($SolutionDir)Tools\7zip\7za.exe"
if ($ConfigurationName -eq "Release Portable") {
Write-Output "Packaging Release Portable ZIP"
$version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteV1\bin\$($ConfigurationName)\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe"
Write-Output "Version is $($version)"
$PortableZip="$($SolutionDir)Release\mRemoteNG-Portable-$($version).zip"
$tempFolderPath = Join-Path -Path $SolutionDir -ChildPath "mRemoteV1\bin\package"
$tempFolderPath = Join-Path -Path $SolutionDir -ChildPath "mRemoteNG\bin\package"
Remove-Item -Recurse $tempFolderPath -ErrorAction SilentlyContinue | Out-Null
New-Item $tempFolderPath -ItemType "directory" | Out-Null
Copy-Item "$($SolutionDir)mRemoteV1\Resources\PuTTYNG.exe" -Destination $tempFolderPath
Copy-Item "$($SolutionDir)mRemoteNG\Resources\PuTTYNG.exe" -Destination $tempFolderPath
#Write-Output "$($SolutionDir)mRemoteV1\bin\$ConfigurationName"
#Write-Output "$($SolutionDir)mRemoteV1\bin\package"
Copy-Item "$($SolutionDir)mRemoteV1\bin\$ConfigurationName\*" -Destination $tempFolderPath -Recurse -Force
#Write-Output "$($SolutionDir)mRemoteNG\bin\$ConfigurationName"
#Write-Output "$($SolutionDir)mRemoteNG\bin\package"
Copy-Item "$($SolutionDir)mRemoteNG\bin\$ConfigurationName\*" -Destination $tempFolderPath -Recurse -Force
# Delete any PDB files that accidentally get copied into the temp folder
Get-ChildItem -Path $tempFolderPath -Filter "*.pdb" | Remove-Item
Copy-Item "$($SolutionDir)*.txt" -Destination $tempFolderPath
......
......@@ -33,7 +33,7 @@ $SEVENZIP="$($SolutionDir)Tools\7zip\7za.exe"
if ($ConfigurationName -match "Release") {
Write-Output "Packaging debug symbols"
$version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteV1\bin\$($ConfigurationName)\mRemoteNG.exe"
$version = & $SIGCHECK /accepteula -q -n "$($SolutionDir)mRemoteNG\bin\$($ConfigurationName)\mRemoteNG.exe"
Write-Output "Version is $($version)"
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
想要评论请 注册