From 628d352de02351827c39ceb9031bf6470e51f9cd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 7 Dec 2017 17:56:37 -0800 Subject: [PATCH 1/8] update signing subjects (#5650) fixes #5642 Update the signing subject for the windows package and windows files --- tools/releaseBuild/packagesigning.xml | 2 +- tools/releaseBuild/signing.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/releaseBuild/packagesigning.xml b/tools/releaseBuild/packagesigning.xml index 8dd67835c9c..a243e5fbd98 100644 --- a/tools/releaseBuild/packagesigning.xml +++ b/tools/releaseBuild/packagesigning.xml @@ -1,6 +1,6 @@ - + diff --git a/tools/releaseBuild/signing.xml b/tools/releaseBuild/signing.xml index dab6785735c..8a4070d69cd 100644 --- a/tools/releaseBuild/signing.xml +++ b/tools/releaseBuild/signing.xml @@ -1,7 +1,7 @@ - + @@ -14,17 +14,17 @@ - + --> - + - - + + From 1eda43131ac44011960990f05947d9e445b97708 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 8 Dec 2017 10:55:34 -0800 Subject: [PATCH 2/8] Packaging: make mac package require 10.12 or newer (#5649) Fixes #4290 Make mac package require 10.12 or newer. Required that the package is installed to a disk with macOS installed. The Apple example XML had a background image added as well, so I added a background image: https://user-images.githubusercontent.com/10873629/33738943-014c9d00-db50-11e7-9628-310ce6427438.png --- assets/macDialog.png | Bin 0 -> 22422 bytes tools/packaging/packaging.psm1 | 112 ++++++++++++++++++++----- tools/packaging/packaging.strings.psd1 | 25 ++++++ 3 files changed, 115 insertions(+), 22 deletions(-) create mode 100644 assets/macDialog.png diff --git a/assets/macDialog.png b/assets/macDialog.png new file mode 100644 index 0000000000000000000000000000000000000000..e2610971a0654ca7a738ea1a7435f410625da49a GIT binary patch literal 22422 zcmeEu^;Z;J)Gpm2(yfA|w3L)ciIjknk^>?P-Q6iA-3+4AL(kA%(jq!ELnAQ^IrMOc z_q+FhxIcWX#bN=AbN1P1$Fui-4sma_)yPShNU*T5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@Df@yc zz{fgN0X+xBM()-Gvafu^$1fGf|9Fh{SgdIvgQlHtbj?q|mbTw_7_W?<%Pk6cW@zOB zsKaRuwF|Am9#<|qeTa&!)5)0sH-59`B!{i@xD{ado!g`-PTIGRKIQTJK#UBQvM)Nc zE@Z~|2sA{h@L_KNMMjdQfJjnG2sgwt9@e*iKA(++0(}Y=XwO0ds zVA%Ie_%chI7+v3UOW?+QScbG|S@j!P+?Ln2MQnG|mcDkslo z;&wFQfrw}EqP4gktQlh+7^YqVOVT4v4LZY}_(D7vT;PQbq@!8e)-W~Flvy<{vVqf% zjd2h~a*bKDZ3Vb?S3&W@0A>+O5}&${wJEE)7_Cb?2{5;65Pg?V3{Jb~DUKOrK`?I2 nrO$d>G3!nLKYyj-hbpFAk0QW$ls3>qmj!b5hIy^2=cE4ta9QT3 literal 0 HcmV?d00001 diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 60cd317875d..439759e8891 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -582,7 +582,7 @@ function New-UnixPackage { } } - # Verify depenecies are installed and in the path + # Verify dependencies are installed and in the path Test-Dependencies $Description = $packagingStrings.Description @@ -653,8 +653,7 @@ function New-UnixPackage { if($pscmdlet.ShouldProcess("Add macOS launch application")) { # Generate launcher app folder - $appsfolder = New-MacOSLauncher -Version $Version - $Arguments += "$appsfolder=/" + $AppsFolder = New-MacOSLauncher -Version $Version } } @@ -681,7 +680,9 @@ function New-UnixPackage { -ManGzipFile $ManGzipInfo.GzipFile ` -ManDestination $ManGzipInfo.ManFile ` -LinkSource $LinkSource ` - -LinkDestination $Link + -LinkDestination $Link ` + -AppsFolder $AppsFolder ` + -ErrorAction Stop # Build package try { @@ -702,10 +703,10 @@ function New-UnixPackage { } } if ($AfterScriptInfo.AfterInstallScript) { - Remove-Item -erroraction 'silentlycontinue' $AfterScriptInfo.AfterInstallScript + Remove-Item -erroraction 'silentlycontinue' $AfterScriptInfo.AfterInstallScript -Force } if ($AfterScriptInfo.AfterRemoveScript) { - Remove-Item -erroraction 'silentlycontinue' $AfterScriptInfo.AfterRemoveScript + Remove-Item -erroraction 'silentlycontinue' $AfterScriptInfo.AfterRemoveScript -Force } Remove-Item -Path $ManGzipInfo.GzipFile -Force -ErrorAction SilentlyContinue } @@ -714,22 +715,9 @@ function New-UnixPackage { $createdPackage = Get-Item (Join-Path $PWD (($Output[-1] -split ":path=>")[-1] -replace '["{}]')) if ($Environment.IsMacOS) { - if ($pscmdlet.ShouldProcess("Fix package name")) + if ($pscmdlet.ShouldProcess("Add distribution information and Fix PackageName")) { - # Add the OS information to the macOS package file name. - $packageExt = [System.IO.Path]::GetExtension($createdPackage.Name) - $packageNameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($createdPackage.Name) - - $newPackageName = "{0}-{1}{2}" -f $packageNameWithoutExt, $script:Options.Runtime, $packageExt - $newPackagePath = Join-Path $createdPackage.DirectoryName $newPackageName - - # -Force is not deleting the NewName if it exists, so delete it if it does - if ($Force -and (Test-Path -Path $newPackagePath)) - { - Remove-Item -Force $newPackagePath - } - - $createdPackage = Rename-Item -Path $createdPackage.FullName -NewName $newPackagePath -PassThru -ErrorAction Stop + $createdPackage = New-MacOsDistributionPackage -FpmPackage $createdPackage } } @@ -745,7 +733,70 @@ function New-UnixPackage { } } +function New-MacOsDistributionPackage +{ + param( + [Parameter(Mandatory,HelpMessage='The FileInfo of the file created by FPM')] + [System.IO.FileInfo]$FpmPackage + ) + + if(!$Environment.IsMacOS) + { + throw 'New-MacOsDistributionPackage is only supported on macOS!' + } + + $packageName = Split-Path -leaf -Path $FpmPackage + + # Create a temp directory to store the needed files + $tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()) + New-Item -ItemType Directory -Path $tempDir -Force > $null + + $resourcesDir = Join-Path -path $tempDir -childPath 'resources' + New-Item -ItemType Directory -Path $resourcesDir -Force > $null + #Copy background file to temp directory + $backgroundFile = Join-Path $PSScriptRoot "/../../assets/macDialog.png" + Copy-Item -Path $backgroundFile -Destination $resourcesDir + # Move the current package to the temp directory + $tempPackagePath = Join-Path -path $tempDir -ChildPath $packageName + Move-Item -Path $FpmPackage -Destination $tempPackagePath -Force + + # Add the OS information to the macOS package file name. + $packageExt = [System.IO.Path]::GetExtension($FpmPackage.Name) + $packageNameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($FpmPackage.Name) + + $newPackageName = "{0}-{1}{2}" -f $packageNameWithoutExt, $script:Options.Runtime, $packageExt + $newPackagePath = Join-Path $FpmPackage.DirectoryName $newPackageName + + # -Force is not deleting the NewName if it exists, so delete it if it does + if ($Force -and (Test-Path -Path $newPackagePath)) + { + Remove-Item -Force $newPackagePath + } + + # Create the distribution xml + $distributionXmlPath = Join-Path -Path $tempDir -ChildPath 'powershellDistribution.xml' + # format distribution template with: + # 0 - title + # 1 - version + # 2 - package path + # 2 - minimum os version + $PackagingStrings.OsxDistributionTemplate -f "PowerShell - $Version", $Version, $packageName, '10.12' | Out-File -Encoding ascii -FilePath $distributionXmlPath -Force + + log "Applying distribution.xml to package..." + Push-Location $tempDir + try + { + Start-NativeExecution -sb {productbuild --distribution $distributionXmlPath --resources $resourcesDir $newPackagePath} + } + finally + { + Pop-Location + Remove-item -Path $tempDir -Recurse -Force + } + + return $newPackagePath +} function Get-FpmArguments { param( @@ -814,7 +865,18 @@ function Get-FpmArguments } return $true })] - [String]$AfterRemoveScript + [String]$AfterRemoveScript, + + [Parameter(HelpMessage='AppsFolder used to add macOS launcher')] + [AllowNull()] + [ValidateScript({ + if ($Environment.IsMacOS -and !$_) + { + throw "Must not be null on this environment." + } + return $true + })] + [String]$AppsFolder ) $Arguments = @( @@ -858,6 +920,12 @@ function Get-FpmArguments "$LinkSource=$LinkDestination" ) + if($AppsFolder) + { + $Arguments += "$AppsFolder=/" + } + + return $Arguments } diff --git a/tools/packaging/packaging.strings.psd1 b/tools/packaging/packaging.strings.psd1 index ac94321c0d6..ffec1a6cba3 100644 --- a/tools/packaging/packaging.strings.psd1 +++ b/tools/packaging/packaging.strings.psd1 @@ -48,4 +48,29 @@ case "$1" in ;; esac '@ +# see https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html +OsxDistributionTemplate = @' + + + {0} + + + + + + + + + + + + + + + + + + {2} + +'@ } From 1eba02fbc5d852e54576393dd9e210a42bdae7bb Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 8 Dec 2017 11:37:29 -0800 Subject: [PATCH 3/8] Get GitCommitId using the ProductVersion from Assembly (#5651) --- .../tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 index 086b92ac116..bd3fd21eae4 100644 --- a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 +++ b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 @@ -241,8 +241,11 @@ try } # grab the commitID, we need this to grab the right sources - $gitCommitId = & "$psBinPath\pwsh.exe" -noprofile -command { $PSVersiontable.GitCommitId } - $commitId = $gitCommitId.substring($gitCommitId.LastIndexOf('-g') + 2) + $assemblyLocation = & "$psBinPath\pwsh.exe" -noprofile -command { Get-Item ([psobject].Assembly.Location) } + $productVersion = $assemblyLocation.VersionInfo.productVersion + $commitId = $productVersion.split(" ")[-1] + + Write-LogPassThru -Message "Using GitCommitId: $commitId" # download the src directory try From 5f71bba4c6c4d5f9128045ddaa781a899ee545ca Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 8 Dec 2017 12:14:00 -0800 Subject: [PATCH 4/8] contribution guidelines: Add work in progress guidance (#5655) Add guidance for submitting PR which are not ready to merge, or work in progress (WIP) --- .github/CONTRIBUTING.md | 4 ++++ .github/PULL_REQUEST_TEMPLATE.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5d5786259dc..8b5a7ffba21 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -148,6 +148,10 @@ Additional references: Even better, all contributors are free to contribute the documentation themselves. (See [Contributing to documentation related to PowerShell](#contributing-to-documentation-related-to-powershell) for more info.) +### Pull Request - Work in Progress + +* If your pull request is not ready to merge, please add the prefix `WIP:` to the beginning of the title and remove the prefix when the PR is ready. + #### Pull Request - Automatic Checks * If this is your first contribution to PowerShell, diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 40a2a1fcc02..a97cbf433a4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,3 +13,5 @@ Note: Please mark anything not applicable to this PR `NA`. - [ ] [Change is not breaking](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes) - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting) - [ ] [Add `[feature]` if the change is significant or affectes feature tests](https://github.com/PowerShell/PowerShell/blob/master/docs/testing-guidelines/testing-guidelines.md#requesting-additional-tests-for-a-pr) +- [ ] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress). + - If the PR is work in progress, please add the prefix `WIP:` to the beginning of the title and remove the prefix when the PR is ready. From 55007114f3ba9232e68f898dbaa999475b3a5a04 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 8 Dec 2017 13:47:54 -0800 Subject: [PATCH 5/8] Add comment about 'productbuild' used in packaging script (#5654) --- tools/packaging/packaging.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 439759e8891..080617ae9e3 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -787,6 +787,7 @@ function New-MacOsDistributionPackage Push-Location $tempDir try { + # productbuild is an xcode command line tool, and those tools are installed when you install brew Start-NativeExecution -sb {productbuild --distribution $distributionXmlPath --resources $resourcesDir $newPackagePath} } finally @@ -925,7 +926,6 @@ function Get-FpmArguments $Arguments += "$AppsFolder=/" } - return $Arguments } From e661bfd462feef0baba752d62dbbb58cb261ffc6 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Fri, 8 Dec 2017 14:17:52 -0800 Subject: [PATCH 6/8] Add linux-arm tarball package to release build (#5652) Create linux-arm tarball package in our release build. Also moved the Linux-x64 tarball creation to Ubutntu 14.04, because Start-PSBuild adds additional symbolic link files when running on Red Hat Family distros. Note that linux-arm can only be built on Ubuntu, so the tar-arm package will also be generated from the Ubuntu 14.04. --- .../Images/GenericLinuxFiles/PowerShellPackage.ps1 | 9 ++++++++- tools/releaseBuild/build.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 index 9b18349222f..80f6a92f869 100644 --- a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 +++ b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 @@ -12,7 +12,7 @@ param ( [ValidateNotNullOrEmpty()] [string]$ReleaseTag, - [ValidateSet("AppImage", "tar")] + [ValidateSet("AppImage", "tar", "tar-arm")] [string[]]$ExtraPackage ) @@ -37,6 +37,13 @@ try { "AppImage" { Start-PSPackage -Type AppImage @releaseTagParam } "tar" { Start-PSPackage -Type tar @releaseTagParam } } + + if ($ExtraPackage -contains "tar-arm") { + ## Build 'linux-arm' and create 'tar.gz' package for it. + ## Note that 'linux-arm' can only be built on Ubuntu environment. + Start-PSBuild -Runtime linux-arm -PSModuleRestore @releaseTagParam + Start-PSPackage -Type tar-arm @releaseTagParam + } } finally { diff --git a/tools/releaseBuild/build.json b/tools/releaseBuild/build.json index cdeddbc0e37..a7ee5c9fd3d 100644 --- a/tools/releaseBuild/build.json +++ b/tools/releaseBuild/build.json @@ -113,7 +113,7 @@ { "Name": "ubuntu.14.04", "RepoDestinationPath": "/PowerShell", - "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage AppImage", + "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage AppImage,tar,tar-arm", "BuildDockerOptions": [ "--cap-add", "SYS_ADMIN", @@ -140,7 +140,7 @@ { "Name": "centos.7", "RepoDestinationPath": "/PowerShell", - "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage tar", + "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_", "AdditionalContextFiles" :[ "./tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1"], "DockerFile": "./tools/releaseBuild/Images/microsoft_powershell_centos7/Dockerfile", "DockerImageName": "ps-centos-7", From a76ba75ee2ca63b0419bb1b3606ca9adcac4acdc Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Fri, 8 Dec 2017 15:43:53 -0800 Subject: [PATCH 7/8] build: Enable building for win-arm and win-arm64 (#5524) * enable win-arm and win-arm64 builds * fix using arm64 tools for build fix finding vs2017 dynamically * change install-powershellremoting.ps1 script to use reg provider rather than reg.exe so that error doesn't show on success fix formatting issue in cmake.defs * add check that path being read from config file is valid address PR feedback * fix copying of PowerShell.Core.Instrumentation as VS2017 puts it in $HOME/source address PR feedback --- build.psm1 | 91 ++++++++++++++----- src/powershell-native/CMakeLists.txt | 14 ++- .../Install-PowerShellRemoting.ps1 | 61 ++++++------- src/powershell-native/coreclr_defs.cmake | 8 +- .../pwrshcommon/ConfigFileReader.cpp | 14 ++- 5 files changed, 124 insertions(+), 64 deletions(-) diff --git a/build.psm1 b/build.psm1 index a5f4a1c540d..ae3e4dfc6fd 100644 --- a/build.psm1 +++ b/build.psm1 @@ -172,8 +172,12 @@ function Start-BuildNativeWindowsBinaries { [ValidateSet('Debug', 'Release')] [string]$Configuration = 'Release', - [ValidateSet('x64', 'x86')] - [string]$Arch = 'x64' + # The `x64_arm` syntax is the build environment for VS2017, `x64` means the host is an x64 machine and will use + # the x64 built tool. The `arm` refers to the target architecture when doing cross compilation. + [ValidateSet('x64', 'x86', 'x64_arm64', 'x64_arm')] + [string]$Arch = 'x64', + + [switch]$Clean ) if (-not $Environment.IsWindows) { @@ -193,8 +197,16 @@ function Start-BuildNativeWindowsBinaries { throw 'Win 10 SDK not found. Run "Start-PSBootstrap -BuildWindowsNative" or install Microsoft Windows 10 SDK from https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk' } - $vcPath = (Get-Item(Join-Path -Path "$env:VS140COMNTOOLS" -ChildPath '../../vc')).FullName + if ($env:VS140COMNTOOLS -ne $null) { + $vcPath = (Get-Item(Join-Path -Path "$env:VS140COMNTOOLS" -ChildPath '../../vc')).FullName + } else { + $vcPath = (Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017" -Filter "VC" -Directory -Recurse | Select-Object -First 1).FullName + } + $atlMfcIncludePath = Join-Path -Path $vcPath -ChildPath 'atlmfc/include' + if (!(Test-Path $atlMfcIncludePath)) { # for VS2017, need to search for it + $atlMfcIncludePath = (Get-ChildItem $vcPath -Filter AtlBase.h -Recurse -File | Select-Object -First 1).DirectoryName + } # atlbase.h is included in the pwrshplugin project if ((Test-Path -Path $atlMfcIncludePath\atlbase.h) -eq $false) { @@ -202,42 +214,62 @@ function Start-BuildNativeWindowsBinaries { } # vcvarsall.bat is used to setup environment variables - if ((Test-Path -Path $vcPath\vcvarsall.bat) -eq $false) { - throw "Could not find Visual Studio vcvarsall.bat at $vcPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed." + $vcvarsallbatPath = "$vcPath\vcvarsall.bat" + if (!(Test-Path -Path $vcvarsallbatPath)) { # for VS2017, need to search for it + $vcvarsallbatPath = (Get-ChildItem $vcPath -Filter vcvarsall.bat -Recurse -File | Select-Object -First 1).FullName + } + + if ((Test-Path -Path $vcvarsallbatPath) -eq $false) { + throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed." } log "Start building native Windows binaries" + if ($Clean) { + git clean -fdx + Remove-Item $HOME\source\cmakecache.txt -ErrorAction SilentlyContinue + } + try { Push-Location "$PSScriptRoot\src\powershell-native" # setup cmakeGenerator + $cmakeGeneratorPlatform = "" if ($Arch -eq 'x86') { - $cmakeGenerator = 'Visual Studio 14 2015' + $cmakeGenerator = 'Visual Studio 15 2017' + $cmakeArch = 'x86' + } elseif ($Arch -eq 'x64_arm') { + $cmakeGenerator = 'Visual Studio 15 2017 ARM' + $cmakeArch = 'arm' + } elseif ($Arch -eq 'x64_arm64') { + $cmakeGenerator = 'Visual Studio 15 2017' + $cmakeArch = 'arm64' + $cmakeGeneratorPlatform = "-A ARM64" } else { - $cmakeGenerator = 'Visual Studio 14 2015 Win64' + $cmakeGenerator = 'Visual Studio 15 2017 Win64' + $cmakeArch = 'x64' } # Compile native resources $currentLocation = Get-Location - @("nativemsh/pwrshplugin") | ForEach-Object { + @("nativemsh\pwrshplugin") | ForEach-Object { $nativeResourcesFolder = $_ Get-ChildItem $nativeResourcesFolder -Filter "*.mc" | ForEach-Object { $command = @" -cmd.exe /C cd /d "$currentLocation" "&" "$($vcPath)\vcvarsall.bat" "$Arch" "&" mc.exe -o -d -c -U "$($_.FullName)" -h "$nativeResourcesFolder" -r "$nativeResourcesFolder" +cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" mc.exe -o -d -c -U "$($_.FullName)" -h "$currentLocation\$nativeResourcesFolder" -r "$currentLocation\$nativeResourcesFolder" "@ log " Executing mc.exe Command: $command" - Start-NativeExecution { Invoke-Expression -Command:$command 2>&1 } + Start-NativeExecution { Invoke-Expression -Command:$command } } } + # make sure we use version we installed and not from VS + $cmakePath = (Get-Command cmake).Source # Disabling until I figure out if it is necessary # $overrideFlags = "-DCMAKE_USER_MAKE_RULES_OVERRIDE=$PSScriptRoot\src\powershell-native\windows-compiler-override.txt" $overrideFlags = "" - $location = Get-Location - $command = @" -cmd.exe /C cd /d "$location" "&" "$($vcPath)\vcvarsall.bat" "$Arch" "&" cmake "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$Arch -G "$cmakeGenerator" . "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" +cmd.exe /C cd /d "$currentLocation" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakePath" "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$cmakeArch -G "$cmakeGenerator" $cmakeGeneratorPlatform "$currentLocation" "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" "@ log " Executing Build Command: $command" Start-NativeExecution { Invoke-Expression -Command:$command } @@ -258,15 +290,18 @@ cmd.exe /C cd /d "$location" "&" "$($vcPath)\vcvarsall.bat" "$Arch" "&" cmake "$ $location = "$PSScriptRoot\src\PowerShell.Core.Instrumentation" Set-Location -Path $location + Remove-Item $HOME\source\cmakecache.txt -ErrorAction SilentlyContinue + $command = @" -cmd.exe /C cd /d "$location" "&" "$($vcPath)\vcvarsall.bat" "$Arch" "&" cmake "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$Arch -G "$cmakeGenerator" . "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" +cmd.exe /C cd /d "$location" "&" "$vcvarsallbatPath" "$Arch" "&" "$cmakePath" "$overrideFlags" -DBUILD_ONECORE=ON -DBUILD_TARGET_ARCH=$cmakeArch -G "$cmakeGenerator" $cmakeGeneratorPlatform "$location" "&" msbuild ALL_BUILD.vcxproj "/p:Configuration=$Configuration" "@ log " Executing Build Command for PowerShell.Core.Instrumentation: $command" Start-NativeExecution { Invoke-Expression -Command:$command } # Copy the binary to the packaging directory # NOTE: No PDB file; it's a resource-only DLL. - $srcPath = [IO.Path]::Combine($location, $Configuration, 'PowerShell.Core.Instrumentation.dll') + # VS2017 puts this in $HOME\source + $srcPath = [IO.Path]::Combine($HOME, "source", $Configuration, 'PowerShell.Core.Instrumentation.dll') Copy-Item -Path $srcPath -Destination $dstPath } finally { @@ -364,7 +399,9 @@ function Start-PSBuild { "win7-x86", "osx.10.12-x64", "linux-x64", - "linux-arm")] + "linux-arm", + "win-arm", + "win-arm64")] [string]$Runtime, [ValidateSet('Linux', 'Debug', 'Release', 'CodeCoverage', '')] # We might need "Checked" as well @@ -381,6 +418,10 @@ function Start-PSBuild { throw "Cross compiling for linux-arm is only supported on Ubuntu environment" } + if ("win-arm","win-arm64" -contains $Runtime -and -not $Environment.IsWindows) { + throw "Cross compiling for win-arm or win-arm64 is only supported on Windows environment" + } + function Stop-DevPowerShell { Get-Process pwsh* | Where-Object { @@ -652,7 +693,9 @@ function New-PSOptions { "win7-x64", "osx.10.12-x64", "linux-x64", - "linux-arm")] + "linux-arm", + "win-arm", + "win-arm64")] [string]$Runtime, [switch]$CrossGen, @@ -1631,11 +1674,11 @@ function Start-PSBootstrap { # Install cmake $cmakePath = "${env:ProgramFiles}\CMake\bin" - if($cmakePresent) { + if($cmakePresent -and !($force.IsPresent)) { log "Cmake is already installed. Skipping installation." } else { - log "Cmake not present. Installing cmake." - Start-NativeExecution { choco install cmake -y --version 3.6.0 } + log "Cmake not present or -Force used. Installing cmake." + Start-NativeExecution { choco install cmake -y --version 3.10.0 } if (-not ($machinePath.ToLower().Contains($cmakePath.ToLower()))) { log "Adding $cmakePath to Path environment variable" $env:Path += ";$cmakePath" @@ -2132,7 +2175,9 @@ function Start-CrossGen { "win7-x64", "osx.10.12-x64", "linux-x64", - "linux-arm")] + "linux-arm", + "win-arm", + "win-arm64")] [string] $Runtime ) @@ -2186,8 +2231,10 @@ function Start-CrossGen { $crossGenRuntime = if ($Environment.IsWindows) { if ($Runtime -match "-x86") { "win-x86" - } else { + } elseif ($Runtime -match "-x64") { "win-x64" + } elseif (!($env:PROCESSOR_ARCHITECTURE -match "arm")) { + throw "crossgen for 'win-arm' and 'win-arm64' must be run on that platform" } } elseif ($Runtime -eq "linux-arm") { throw "crossgen is not available for 'linux-arm'" diff --git a/src/powershell-native/CMakeLists.txt b/src/powershell-native/CMakeLists.txt index 4889c163f42..051d880ca58 100644 --- a/src/powershell-native/CMakeLists.txt +++ b/src/powershell-native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.0) project(PowerShellNative) @@ -11,9 +11,6 @@ endif () # # Normalize the platform name -# -# TODO: Only x64 and x86 are supported right now. This needs to be expanded to arm and arm64 to match CoreCLR -# SET(BUILD_ARCH_ARM 0) SET(BUILD_ARCH_ARM64 0) SET(BUILD_ARCH_X86 0) @@ -21,8 +18,9 @@ SET(BUILD_ARCH_AMD64 0) if (BUILD_TARGET_ARCH) SET(WindowsSDKPlatform ${BUILD_TARGET_ARCH}) + message(STATUS "Building for " ${BUILD_TARGET_ARCH}) else () - message(FATAL_ERROR "Target architecture value should be specified through BUILD_TARGET_ARCH. Supported values are x64 or x86.") + message(FATAL_ERROR "Target architecture value should be specified through BUILD_TARGET_ARCH. Supported values are x64, x86, arm, or arm64") endif (BUILD_TARGET_ARCH) if (WindowsSDKPlatform STREQUAL "x64" OR WindowsSDKPlatform STREQUAL "X64" OR WindowsSDKPlatform STREQUAL "amd64" OR WindowsSDKPlatform STREQUAL "AMD64") @@ -31,6 +29,12 @@ if (WindowsSDKPlatform STREQUAL "x64" OR WindowsSDKPlatform STREQUAL "X64" OR Wi elseif (WindowsSDKPlatform STREQUAL "x86" OR WindowsSDKPlatform STREQUAL "X86") SET(WindowsSDKPlatform "x86") SET(BUILD_ARCH_X86 1) +elseif (WindowsSDKPlatform STREQUAL "arm" OR WindowsSDKPlatform STREQUAL "ARM") + SET(WindowsSDKPlatform "arm") + SET(BUILD_ARCH_ARM 1) +elseif (WindowsSDKPlatform STREQUAL "arm64" OR WindowsSDKPlatform STREQUAL "ARM64") + SET(WindowsSDKPlatform "arm64") + SET(BUILD_ARCH_ARM64 1) else() message(FATAL_ERROR "Unsupported WindowsSDKPlatform: " ${WindowsSDKPlatform}) endif () diff --git a/src/powershell-native/Install-PowerShellRemoting.ps1 b/src/powershell-native/Install-PowerShellRemoting.ps1 index dbada625e8a..5bfbf0e6b99 100644 --- a/src/powershell-native/Install-PowerShellRemoting.ps1 +++ b/src/powershell-native/Install-PowerShellRemoting.ps1 @@ -44,38 +44,37 @@ function Register-WinRmPlugin $pluginEndpointName ) - $header = "Windows Registry Editor Version 5.00`n`n" - - $regKeyFormatString = "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Plugin\{0}]`n" + $regKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Plugin\$pluginEndpointName" $regKeyName = '"ConfigXML"="{0}"' - # - # Example Values: - # - # Filename = %windir%\\system32\\PowerShell\\6.0.0\\pwrshplugin.dll - # Name = PowerShell.6.0.0 - # $pluginArchitecture = "64" - if ($env:PROCESSOR_ARCHITECTURE -match "x86") + if ($env:PROCESSOR_ARCHITECTURE -match "x86" -or $env:PROCESSOR_ARCHITECTURE -eq "ARM") { $pluginArchitecture = "32" } - $regKeyValueFormatString = '' + $regKeyValueFormatString = @" + + + + + + + + + + + + +"@ $valueString = $regKeyValueFormatString -f $pluginEndpointName, $pluginAbsolutePath, $pluginArchitecture - $keyValuePair = $regKeyName -f $valueString - - $regKey = $regKeyFormatString -f $pluginEndpointName - - $fileName = "$pluginEndpointName.reg" - - Set-Content -path .\$fileName "$header$regKey$keyValuePair`n" - - Write-Verbose "Performing WinRM registration with: $fileName" - reg.exe import .\$fileName - # Clean up - Remove-Item .\$fileName + New-Item $regKey -Force > $null + New-ItemProperty -Path $regKey -Name ConfigXML -Value $valueString > $null } function Generate-PluginConfigFile @@ -98,7 +97,7 @@ function Generate-PluginConfigFile Set-Content -Path $pluginFile -Value "PSHOMEDIR=$targetPsHomeDir" Add-Content -Path $pluginFile -Value "CORECLRDIR=$targetPsHomeDir" - Write-Verbose "Created Plugin Config File: $pluginFile" + Write-Verbose "Created Plugin Config File: $pluginFile" -Verbose } ###################### @@ -140,20 +139,18 @@ else $resolvedPluginAbsolutePath = Resolve-Path $pluginBasePath } -# The registration reg file requires "\\" instead of "\" in its path so it is properly escaped in the XML -$pluginRawPath = Join-Path $resolvedPluginAbsolutePath "pwrshplugin.dll" -$fixedPluginPath = $pluginRawPath -replace '\\','\\' +$pluginPath = Join-Path $resolvedPluginAbsolutePath "pwrshplugin.dll" # This is forced to ensure the the file is placed correctly Copy-Item $targetPsHome\pwrshplugin.dll $resolvedPluginAbsolutePath -Force -Verbose $pluginFile = Join-Path $resolvedPluginAbsolutePath "RemotePowerShellConfig.txt" -Generate-PluginConfigFile $pluginFile $targetPsHome +Generate-PluginConfigFile $pluginFile (Resolve-Path $targetPsHome) $pluginEndpointName = "powershell.$targetPsVersion" # Register the plugin -Register-WinRmPlugin $fixedPluginPath $pluginEndpointName +Register-WinRmPlugin $pluginPath $pluginEndpointName #################################################################### # # @@ -174,13 +171,13 @@ if (! (Test-Path $resolvedPluginAbsolutePath\pwrshplugin.dll)) try { Write-Host "`nGet-PSSessionConfiguration $pluginEndpointName" -foregroundcolor "green" - Get-PSSessionConfiguration $pluginEndpointName + Get-PSSessionConfiguration $pluginEndpointName -ErrorAction Stop } catch [Microsoft.PowerShell.Commands.WriteErrorException] { - Write-Error "No remoting session configuration matches the name $pluginEndpointName." + throw "No remoting session configuration matches the name $pluginEndpointName." } -Write-Host "Restarting WinRM to ensure that the plugin configuration change takes effect.`nThis is required for WinRM running on Windows SKUs prior to Windows 10." -foregroundcolor "green" +Write-Host "Restarting WinRM to ensure that the plugin configuration change takes effect.`nThis is required for WinRM running on Windows SKUs prior to Windows 10." -foregroundcolor Magenta Restart-Service winrm diff --git a/src/powershell-native/coreclr_defs.cmake b/src/powershell-native/coreclr_defs.cmake index b0d26adc1eb..1b6ea3eeb5e 100644 --- a/src/powershell-native/coreclr_defs.cmake +++ b/src/powershell-native/coreclr_defs.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.10.0) set(CMAKE_CXX_STANDARD_LIBRARIES "") # do not link against standard win32 libs i.e. kernel32, uuid, user32, etc. @@ -61,16 +61,20 @@ if (BUILD_ARCH_AMD64) add_definitions(-D_WIN64) add_definitions(-DAMD64) add_definitions(-DBIT64=1) + add_definitions(-D_M_AMD64) elseif (BUILD_ARCH_X86) add_definitions(-D_X86_) elseif (BUILD_ARCH_ARM) add_definitions(-D_ARM_) + add_definitions(-D_WIN32) + add_definitions(-D_M_ARM) add_definitions(-DARM) elseif (BUILD_ARCH_ARM64) add_definitions(-D_ARM64_) add_definitions(-DARM64) add_definitions(-D_WIN64) add_definitions(-DBIT64=1) + add_definitions(-D_M_ARM64) endif () # Define the CRT lib references that link into Desktop imports @@ -146,6 +150,8 @@ if (BUILD_ARCH_AMD64) add_definitions(-D_TARGET_AMD64_=1) elseif (BUILD_ARCH_ARM) add_definitions(-D_TARGET_ARM_=1) +elseif (BUILD_ARCH_ARM64) + add_definitions(-D_TARGET_ARM64_=1) elseif (BUILD_ARCH_X86) add_definitions(-D_TARGET_X86_=1) endif (BUILD_ARCH_AMD64) diff --git a/src/powershell-native/nativemsh/pwrshcommon/ConfigFileReader.cpp b/src/powershell-native/nativemsh/pwrshcommon/ConfigFileReader.cpp index b3b65874f3c..33b79046a43 100644 --- a/src/powershell-native/nativemsh/pwrshcommon/ConfigFileReader.cpp +++ b/src/powershell-native/nativemsh/pwrshcommon/ConfigFileReader.cpp @@ -44,9 +44,12 @@ namespace NativeMsh } else if (*iter == L'p' || *iter == L'P') { - this->pathToPowerShellAssemblies = this->getValueFromLine(line, psHomeDirTag); - if (this->pathToPowerShellAssemblies.size() > 0) // Found a match + std::wstring psHomeDir = this->getValueFromLine(line, psHomeDirTag); + HANDLE dirHandle = CreateFileW(psHomeDir.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (INVALID_HANDLE_VALUE != dirHandle) { + CloseHandle(dirHandle); + this->pathToPowerShellAssemblies = psHomeDir; std::wstring::const_iterator slashIter = this->pathToPowerShellAssemblies.end(); slashIter--; if (*slashIter != L'\\') @@ -59,9 +62,12 @@ namespace NativeMsh } else if (*iter == L'c' || *iter == L'C') { - this->coreClrDirectory = this->getValueFromLine(line, coreClrDirTag); - if (this->coreClrDirectory.size() > 0) // Found a match + std::wstring coreClrDir = this->getValueFromLine(line, coreClrDirTag); + HANDLE dirHandle = CreateFileW(coreClrDir.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + if (INVALID_HANDLE_VALUE != dirHandle) { + CloseHandle(dirHandle); + this->coreClrDirectory = coreClrDir; std::wstring::const_iterator slashIter = this->coreClrDirectory.end(); slashIter--; if (*slashIter != L'\\') From 6cec0b48027ba26c63dc174a01446db905dab89a Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Sat, 9 Dec 2017 13:32:37 -0800 Subject: [PATCH 8/8] Fix the Linux release build (#5660) The Linux release build was broken because AppImage,tar,tar-arm in build.json is turned into a string of "AppImage,tar,tar-arm" by docker run. Now it's changed to use switch parameters. --- .../Images/GenericLinuxFiles/PowerShellPackage.ps1 | 14 ++++++-------- tools/releaseBuild/build.json | 14 +++++++------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 index 80f6a92f869..74b3762e79c 100644 --- a/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 +++ b/tools/releaseBuild/Images/GenericLinuxFiles/PowerShellPackage.ps1 @@ -12,8 +12,9 @@ param ( [ValidateNotNullOrEmpty()] [string]$ReleaseTag, - [ValidateSet("AppImage", "tar", "tar-arm")] - [string[]]$ExtraPackage + [switch]$AppImage, + [switch]$TarX64, + [switch]$TarArm ) $releaseTagParam = @{} @@ -32,13 +33,10 @@ try { Start-PSBuild -Crossgen -PSModuleRestore @releaseTagParam Start-PSPackage @releaseTagParam - switch ($ExtraPackage) - { - "AppImage" { Start-PSPackage -Type AppImage @releaseTagParam } - "tar" { Start-PSPackage -Type tar @releaseTagParam } - } + if ($AppImage) { Start-PSPackage -Type AppImage @releaseTagParam } + if ($TarX64) { Start-PSPackage -Type tar @releaseTagParam } - if ($ExtraPackage -contains "tar-arm") { + if ($TarArm) { ## Build 'linux-arm' and create 'tar.gz' package for it. ## Note that 'linux-arm' can only be built on Ubuntu environment. Start-PSBuild -Runtime linux-arm -PSModuleRestore @releaseTagParam diff --git a/tools/releaseBuild/build.json b/tools/releaseBuild/build.json index a7ee5c9fd3d..49a6da80cb1 100644 --- a/tools/releaseBuild/build.json +++ b/tools/releaseBuild/build.json @@ -9,7 +9,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -26,7 +26,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -43,7 +43,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -62,7 +62,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -81,7 +81,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -99,7 +99,7 @@ "3968m" ], "DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile", - "AdditionalContextFiles" :[ + "AdditionalContextFiles" :[ ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1", ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1" @@ -113,7 +113,7 @@ { "Name": "ubuntu.14.04", "RepoDestinationPath": "/PowerShell", - "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage AppImage,tar,tar-arm", + "BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -AppImage -TarX64 -TarArm", "BuildDockerOptions": [ "--cap-add", "SYS_ADMIN",