mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Create separate Top-level directory per platform
- Replace src\powershell top level project by two
new root-level projects:
- src\powershell-unix
- src\powershell-windows
- Break src\Modules into more granular structure:
- Shared
- Windows+Unix-Core
- Windows-Core
- Windows-Core+Full
- Windows-Full
- To be created: Unix-Core. We will do it as a separate PR
- Fix #1122 : Platform-specific set of Modules (and assemblies)
- Fix Start-TypeGen to work with new top level folders layout
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Full",
|
||||
"../Modules/Windows-Full",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
@@ -34,7 +35,8 @@
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Full",
|
||||
"../Modules/Windows-Full",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
@@ -56,15 +58,8 @@
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*"
|
||||
"System.Management.Automation": "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
@@ -94,15 +89,22 @@
|
||||
},
|
||||
"net451": {
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.ScheduledJob": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Workflow.ServiceCore": "1.0.0-*",
|
||||
"Microsoft.PowerShell.GraphicalHost": "1.0.0-*",
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Core.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Diagnostics.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.GraphicalHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Management.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.ScheduledJob": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Security.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Utility.Activities": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Workflow.ServiceCore": "1.0.0-*",
|
||||
"Microsoft.WSMan.Management.Activities": "1.0.0-*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,15 +11,16 @@ Content files includes:
|
||||
|
||||
These files are copied as-is by `dotnet`
|
||||
|
||||
- **Shared** is shared between all flavours
|
||||
- **Full** for FullCLR (Windows)
|
||||
- **Core** for CoreCLR (all platforms)
|
||||
- Shared (shared between all variations)
|
||||
- Windows+Unix-Core
|
||||
- Windows-Core
|
||||
- Windows-Core+Full
|
||||
- Windows-Full
|
||||
|
||||
Notes
|
||||
-----------
|
||||
|
||||
* We have files with the same names in "Full" and "Core" folders.
|
||||
We have files with the same names in different folders.
|
||||
That means that the contents of these two files are different.
|
||||
I.e. if it's .psd1 file, it could be because `CmdletsToExport` are different for different platforms.
|
||||
|
||||
* Also, we should never have files with the same names under "Full" and "Shared" (or "Core" and "Shared").
|
||||
I.e. if it's .psd1 file, it could be because `CmdletsToExport`
|
||||
are different for different runtimes (platforms) or frameworks.
|
||||
|
||||
+28
-26
@@ -1,9 +1,5 @@
|
||||
{
|
||||
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psd1": "Shared/PSDiagnostics/PSDiagnostics.psd1",
|
||||
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psm1": "Shared/PSDiagnostics/PSDiagnostics.psm1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1": "Shared/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psm1",
|
||||
"monad/miscfiles/modules/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1": "Shared/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1",
|
||||
"monad/miscfiles/display/WSMan.format.ps1xml": "Shared/Microsoft.WSMan.Management/WSMan.format.ps1xml",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1": "Shared/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1": "Shared/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psm1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Archive/ArchiveResources.psd1": "Shared/Microsoft.PowerShell.Archive/ArchiveResources.psd1",
|
||||
@@ -12,8 +8,6 @@
|
||||
"monad/miscfiles/modules/PSGet/PSGet.Format.ps1xml": "Shared/PowerShellGet/PSGet.Format.ps1xml",
|
||||
"monad/miscfiles/modules/PSGet/PSGet.Resource.psd1": "Shared/PowerShellGet/PSGet.Resource.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1": "Shared/Microsoft.PowerShell.Host/Microsoft.PowerShell.Host.psd1",
|
||||
"monad/src/LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1": "Shared/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1",
|
||||
"monad/src/LocalAccounts/LocalAccounts.format.ps1xml": "Shared/Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml",
|
||||
"monad/src/oneget/PowerShell.Module/PackageManagement.psd1": "Shared/PackageManagement/PackageManagement.psd1",
|
||||
"monad/src/oneget/PowerShell.Module/PackageManagement.format.ps1xml": "Shared/PackageManagement/PackageManagement.format.ps1xml",
|
||||
"monad/src/oneget/providers/inbox/powershell.metaprovider/PackageProviderFunctions.psm1": "Shared/PackageManagement/PackageProviderFunctions.psm1",
|
||||
@@ -23,25 +17,33 @@
|
||||
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsHelper.ps1",
|
||||
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1": "Shared/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataV4Adapter.ps1",
|
||||
"wmi/psws/PSODataUtils/Microsoft.PowerShell.ODataUtils/Microsoft.PowerShell.ODataUtilsStrings.psd1": "Shared/Microsoft.PowerShell.ODataUtils/en-US/Microsoft.PowerShell.ODataUtilsStrings.psd1",
|
||||
"wmi/WMIv2/Client/CIMCmdlets/CimCmdlets.psd1": "Shared/CimCmdlets/CimCmdlets.psd1",
|
||||
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1": "Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1": "Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1": "Full/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
|
||||
"monad/miscfiles/types/getevent.types.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/GetEvent.types.ps1xml",
|
||||
"monad/miscfiles/display/Event.format.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/Event.format.ps1xml",
|
||||
"monad/miscfiles/display/Diagnostics.format.ps1xml": "Full/Microsoft.PowerShell.Diagnostics/Diagnostics.format.ps1xml",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1": "Full/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.Format.ps1xml": "Full/PSScheduledJob/PSScheduledJob.Format.ps1xml",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.psd1": "Full/PSScheduledJob/PSScheduledJob.psd1",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.types.ps1xml": "Full/PSScheduledJob/PSScheduledJob.types.ps1xml",
|
||||
"monad/src/m3p/product/PSWorkflow.psd1": "Full/PSWorkflow/PSWorkflow.psd1",
|
||||
"monad/src/m3p/product/PSWorkflow.psm1": "Full/PSWorkflow/PSWorkflow.psm1",
|
||||
"monad/src/m3p/product/PSWorkflow.types.ps1xml": "Full/PSWorkflow/PSWorkflow.types.ps1xml",
|
||||
"monad/src/m3p/product/PSWorkflowUtility.psd1": "Full/PSWorkflowUtility/PSWorkflowUtility.psd1",
|
||||
"monad/src/m3p/product/PSWorkflowUtility.psm1": "Full/PSWorkflowUtility/PSWorkflowUtility.psm1",
|
||||
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Security/CoreClr/Microsoft.PowerShell.Security.psd1": "Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/CoreClr/Microsoft.PowerShell.Diagnostics.psd1": "Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/CoreClr/Microsoft.PowerShell.Utility.psd1": "Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1"
|
||||
"wmi/WMIv2/Client/CIMCmdlets/CimCmdlets.psd1": "Windows-Core+Full/CimCmdlets/CimCmdlets.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1": "Windows-Core+Full/Microsoft.WSMan.Management/Microsoft.WSMan.Management.psd1",
|
||||
"monad/miscfiles/display/WSMan.format.ps1xml": "Windows-Core+Full/Microsoft.WSMan.Management/WSMan.format.ps1xml",
|
||||
"monad/src/LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1": "Windows-Core+Full/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1",
|
||||
"monad/src/LocalAccounts/LocalAccounts.format.ps1xml": "Windows-Core+Full/Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml",
|
||||
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psd1": "Windows-Core+Full/PSDiagnostics/PSDiagnostics.psd1",
|
||||
"monad/miscfiles/modules/PSDiagnostics/PSDiagnostics.psm1": "Windows-Core+Full/PSDiagnostics/PSDiagnostics.psm1",
|
||||
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1": "Windows-Full/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1": "Windows-Full/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1": "Windows-Full/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
|
||||
"monad/miscfiles/types/getevent.types.ps1xml": "Windows-Full/Microsoft.PowerShell.Diagnostics/GetEvent.types.ps1xml",
|
||||
"monad/miscfiles/display/Event.format.ps1xml": "Windows-Full/Microsoft.PowerShell.Diagnostics/Event.format.ps1xml",
|
||||
"monad/miscfiles/display/Diagnostics.format.ps1xml": "Windows-Full/Microsoft.PowerShell.Diagnostics/Diagnostics.format.ps1xml",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1": "Windows-Full/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.Format.ps1xml": "Windows-Full/PSScheduledJob/PSScheduledJob.Format.ps1xml",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.psd1": "Windows-Full/PSScheduledJob/PSScheduledJob.psd1",
|
||||
"monad/src/ScheduledJob/PSScheduledJob.types.ps1xml": "Windows-Full/PSScheduledJob/PSScheduledJob.types.ps1xml",
|
||||
"monad/src/m3p/product/PSWorkflow.psd1": "Windows-Full/PSWorkflow/PSWorkflow.psd1",
|
||||
"monad/src/m3p/product/PSWorkflow.psm1": "Windows-Full/PSWorkflow/PSWorkflow.psm1",
|
||||
"monad/src/m3p/product/PSWorkflow.types.ps1xml": "Windows-Full/PSWorkflow/PSWorkflow.types.ps1xml",
|
||||
"monad/src/m3p/product/PSWorkflowUtility.psd1": "Windows-Full/PSWorkflowUtility/PSWorkflowUtility.psd1",
|
||||
"monad/src/m3p/product/PSWorkflowUtility.psm1": "Windows-Full/PSWorkflowUtility/PSWorkflowUtility.psm1",
|
||||
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Diagnostics/CoreClr/Microsoft.PowerShell.Diagnostics.psd1": "Windows-Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1",
|
||||
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Security/CoreClr/Microsoft.PowerShell.Security.psd1": "Windows+Unix-Core/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.psd1",
|
||||
"monad/miscfiles/modules/Microsoft.PowerShell.Utility/CoreClr/Microsoft.PowerShell.Utility.psd1": "Windows+Unix-Core/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1"
|
||||
}
|
||||
|
||||
@@ -13,6 +13,13 @@ namespace TypeCatalogParser
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"Usage: ./TypeCatalogParser <path-to-top-level-powershell-project>\n" +
|
||||
"Valid options are '../powershell-unix' and '../powershell-windows'");
|
||||
}
|
||||
|
||||
// These are packages that are not part of .NET Core and must be excluded
|
||||
string[] excludedPackages = {
|
||||
"Microsoft.Management.Infrastructure",
|
||||
@@ -25,7 +32,7 @@ namespace TypeCatalogParser
|
||||
var outputPath = "../TypeCatalogGen/powershell.inc";
|
||||
|
||||
// Get a context for our top level project
|
||||
var context = ProjectContext.Create("../powershell", NuGetFramework.Parse("netcoreapp1.0"));
|
||||
var context = ProjectContext.Create(args[0], NuGetFramework.Parse("netcoreapp1.0"));
|
||||
|
||||
System.IO.File.WriteAllLines(outputPath,
|
||||
// Get the target for the current runtime
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Core",
|
||||
"../Modules/Windows+Unix-Core",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
@@ -25,14 +25,17 @@
|
||||
"*.dylib",
|
||||
"../../powershell.version"
|
||||
]
|
||||
}
|
||||
},
|
||||
"compile": [
|
||||
"../powershell/Program.cs"
|
||||
]
|
||||
},
|
||||
|
||||
"publishOptions": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Core",
|
||||
"../Modules/Windows+Unix-Core",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
@@ -48,7 +51,11 @@
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*"
|
||||
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
@@ -67,9 +74,6 @@
|
||||
"ubuntu.14.04-x64": { },
|
||||
"debian.8-x64": { },
|
||||
"centos.7-x64": { },
|
||||
"win7-x64": { },
|
||||
"win81-x64": { },
|
||||
"win10-x64": { },
|
||||
"osx.10.11-x64": { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "powershell",
|
||||
"version": "1.0.0-*",
|
||||
"description": ".NET CLI PowerShell app",
|
||||
|
||||
"buildOptions": {
|
||||
"xmlDoc": true,
|
||||
"warningsAsErrors": true,
|
||||
"allowUnsafe": true,
|
||||
"emitEntryPoint": true,
|
||||
"copyToOutput": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Windows-Core",
|
||||
"../Modules/Windows+Unix-Core",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
"../Modules/Shared/Pester/.git*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"../../powershell.version"
|
||||
]
|
||||
},
|
||||
"compile": [
|
||||
"../powershell/Program.cs"
|
||||
]
|
||||
},
|
||||
|
||||
"publishOptions": {
|
||||
"mappings": {
|
||||
"Modules/" : {
|
||||
"include": [
|
||||
"../Modules/Windows-Core",
|
||||
"../Modules/Windows+Unix-Core",
|
||||
"../Modules/Windows-Core+Full",
|
||||
"../Modules/Shared"
|
||||
],
|
||||
"exclude": [
|
||||
"../Modules/Shared/Pester/.git*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"../../powershell.version"
|
||||
],
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.PowerShell.ConsoleHost": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PSReadLine": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Diagnostics": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
|
||||
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*",
|
||||
"Microsoft.PowerShell.LocalAccounts": "1.0.0-*",
|
||||
"Microsoft.PowerShell.PackageManagement": "1.0.0-*",
|
||||
"Microsoft.Management.Infrastructure.CimCmdlets": "1.0.0-*"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [ "dnxcore50", "portable-net45+win8" ],
|
||||
"buildOptions": {
|
||||
"define": [ "CORECLR" ]
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": "1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"runtimes": {
|
||||
"win7-x64": { },
|
||||
"win81-x64": { },
|
||||
"win10-x64": { },
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
PowerShell
|
||||
==========
|
||||
|
||||
The `powershell[.exe]` executable for Open PowerShell is built by this project,
|
||||
as it is the top dependency of the graph, and has `emitEntryPoint: true`,
|
||||
The `powershell[.exe]` executable for PowerShell is built by
|
||||
**powershell-unix** and **powershell-windows** projects,
|
||||
as they are the top dependencies of the graph, and has `emitEntryPoint: true`,
|
||||
meaning a native executable is produced automatically by CLI (no need to own a
|
||||
separate native host).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user