Add powershell project shim

The `src/powershell` project builds Core PowerShell as a .NET CLI app,
with a dependency on `Microsoft.PowerShell.ConsoleHost`, so that the
latter can remain a library.
This commit is contained in:
Andrew Schwartzmeyer
2016-05-17 13:28:44 -07:00
parent 72b763a7e1
commit a1a722c4a1
6 changed files with 57 additions and 20 deletions
+6 -1
View File
@@ -221,7 +221,12 @@ function New-PSOptions {
[switch]$FullCLR
)
$Top = "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost"
if ($FullCLR) {
$Top = "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost"
} else {
$Top = "$PSScriptRoot/src/powershell"
}
Write-Verbose "Top project directory is $Top"
if (-not $Configuration) {
$Configuration = if ($IsLinux -or $IsOSX) {
@@ -1,13 +1,12 @@
{
"name": "powershell",
"name": "Microsoft.PowerShell.ConsoleHost",
"version": "1.0.0-*",
"description": "PowerShell Host",
"authors": [ "sevoroby", "andschwa" ],
"compilationOptions": {
"warningsAsErrors": true,
"allowUnsafe": true,
"emitEntryPoint": true
"allowUnsafe": true
},
"dependencies": {
@@ -19,19 +18,16 @@
"content": [
"Modules",
"../Modules",
"*_profile.ps1",
"*.so",
"*.dylib"
"powershell.exe"
],
"frameworks": {
"netcoreapp1.0": {
"netstandard1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ],
"compilationOptions": {
"define": [ "CORECLR", "OPEN" ]
},
"dependencies": {
"Microsoft.NETCore.App": "1.0.0-rc2-3002668",
"Newtonsoft.Json": "8.0.2",
"System.Xml.XDocument": "4.0.11-rc2-24103",
"System.IO.MemoryMappedFiles": "4.0.0-rc2-24103"
@@ -41,15 +37,6 @@
}
},
"runtimes": {
"ubuntu.14.04-x64": { },
"centos.7.1-x64": { },
"win7-x64": { },
"win81-x64": { },
"win10-x64": { },
"osx.10.11-x64": { }
},
"compile": [
"../windows-build/gen/Microsoft.PowerShell.ConsoleHost/*.cs"
]
@@ -14,7 +14,7 @@ using System.Resources;
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.CoreCLR.AssemblyLoadContext")]
[assembly:InternalsVisibleTo("powershell")]
[assembly:InternalsVisibleTo("Microsoft.PowerShell.ConsoleHost")]
[assembly:InternalsVisibleTo("powershell-tests")]
#else
+1 -1
View File
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.4)
project(PSL-NATIVE)
add_compile_options(-std=c++11 -Wall -Werror)
set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../Microsoft.PowerShell.ConsoleHost")
set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../powershell")
# test in BUILD_DIR
enable_testing()
+45
View File
@@ -0,0 +1,45 @@
{
"name": "powershell",
"version": "1.0.0-*",
"description": ".NET CLI PowerShell app",
"authors": [ "andschwa" ],
"compilationOptions": {
"warningsAsErrors": true,
"allowUnsafe": true,
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*"
},
"content": [
"Modules",
"../Modules",
"*_profile.ps1",
"*.so",
"*.dylib"
],
"frameworks": {
"netcoreapp1.0": {
"imports": [ "dnxcore50", "portable-net45+win8" ],
"compilationOptions": {
"define": [ "CORECLR" ]
},
"dependencies": {
"Microsoft.NETCore.App": "1.0.0-rc2-3002668"
}
}
},
"runtimes": {
"ubuntu.14.04-x64": { },
"centos.7.1-x64": { },
"win7-x64": { },
"win81-x64": { },
"win10-x64": { },
"osx.10.11-x64": { }
}
}