mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Move resgen artifacts from submodules into src subfolders
Submodule adds unnessesary complexity. This commit removes dependency on pre-generated C# bindings. Start-PsBuild -ResGen will call Start-ResGen. It also has auto-detect logic to simplify first time expirience.
This commit is contained in:
1 parent
209a30da00
commit
d92620dcf3
9 files changed
+19
-33
No files matched your search
@@ -30,3 +30,6 @@ powershell.version
|
|||||||
|
|
||||||
# default location for produced nuget packages
|
# default location for produced nuget packages
|
||||||
/nuget-artifacts
|
/nuget-artifacts
|
||||||
|
|
||||||
|
# resgen output
|
||||||
|
gen
|
||||||
+14
-3
@@ -26,6 +26,7 @@ function Start-PSBuild {
|
|||||||
[switch]$NoPath,
|
[switch]$NoPath,
|
||||||
[switch]$Restore,
|
[switch]$Restore,
|
||||||
[string]$Output,
|
[string]$Output,
|
||||||
|
[switch]$ResGen,
|
||||||
|
|
||||||
[Parameter(ParameterSetName='CoreCLR')]
|
[Parameter(ParameterSetName='CoreCLR')]
|
||||||
[switch]$Publish,
|
[switch]$Publish,
|
||||||
@@ -143,6 +144,13 @@ function Start-PSBuild {
|
|||||||
Start-NativeExecution { dotnet restore $RestoreArguments }
|
Start-NativeExecution { dotnet restore $RestoreArguments }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# handle ResGen
|
||||||
|
if ($ResGen -or -not (Test-Path "$($Options.Top)/gen"))
|
||||||
|
{
|
||||||
|
log "Run ResGen (generating C# bindings for resx files)"
|
||||||
|
Start-ResGen
|
||||||
|
}
|
||||||
|
|
||||||
# Build native components
|
# Build native components
|
||||||
if ($IsLinux -or $IsOSX) {
|
if ($IsLinux -or $IsOSX) {
|
||||||
$Ext = if ($IsLinux) {
|
$Ext = if ($IsLinux) {
|
||||||
@@ -867,6 +875,9 @@ function Send-GitDiffToSd {
|
|||||||
|
|
||||||
function Start-ResGen
|
function Start-ResGen
|
||||||
{
|
{
|
||||||
|
[CmdletBinding()]
|
||||||
|
param()
|
||||||
|
|
||||||
@("Microsoft.PowerShell.Commands.Management",
|
@("Microsoft.PowerShell.Commands.Management",
|
||||||
"Microsoft.PowerShell.Commands.Utility",
|
"Microsoft.PowerShell.Commands.Utility",
|
||||||
"Microsoft.PowerShell.ConsoleHost",
|
"Microsoft.PowerShell.ConsoleHost",
|
||||||
@@ -890,9 +901,9 @@ function Start-ResGen
|
|||||||
}
|
}
|
||||||
|
|
||||||
$genSource = Get-StronglyTypeCsFileForResx -xml $xml -ModuleName $module -ClassName $className -NamespaceName $namespace
|
$genSource = Get-StronglyTypeCsFileForResx -xml $xml -ModuleName $module -ClassName $className -NamespaceName $namespace
|
||||||
$outPath = "$PSScriptRoot/src/windows-build/gen/$module/$fileName.cs"
|
$outPath = "$PSScriptRoot/src/$module/gen/$fileName.cs"
|
||||||
log "ResGen for $outPath"
|
Write-Verbose "ResGen for $outPath"
|
||||||
mkdir -ErrorAction SilentlyContinue (Split-Path $outPath) > $null
|
New-Item -Type Directory -ErrorAction SilentlyContinue (Split-Path $outPath) > $null
|
||||||
Set-Content -Encoding Ascii -Path $outPath -Value $genSource
|
Set-Content -Encoding Ascii -Path $outPath -Value $genSource
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"define": [ "CORECLR" ],
|
"define": [ "CORECLR" ],
|
||||||
"compile": {
|
"compile": {
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Commands.Management/*.cs" ],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"commands/management/ClearRecycleBinCommand.cs",
|
"commands/management/ClearRecycleBinCommand.cs",
|
||||||
"commands/management/CommitTransactionCommand.cs",
|
"commands/management/CommitTransactionCommand.cs",
|
||||||
@@ -48,11 +47,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net451": {
|
"net451": {
|
||||||
"buildOptions": {
|
|
||||||
"compile": {
|
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Commands.Management/*.cs" ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"frameworkAssemblies": {
|
"frameworkAssemblies": {
|
||||||
"System.ServiceProcess": "",
|
"System.ServiceProcess": "",
|
||||||
"System.Windows.Forms": "",
|
"System.Windows.Forms": "",
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"define": [ "CORECLR" ],
|
"define": [ "CORECLR" ],
|
||||||
"compile": {
|
"compile": {
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Commands.Utility/*.cs" ],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"commands/utility/FormatAndOutput/OutGridView/ColumnInfo.cs",
|
"commands/utility/FormatAndOutput/OutGridView/ColumnInfo.cs",
|
||||||
"commands/utility/FormatAndOutput/OutGridView/ExpressionColumnInfo.cs",
|
"commands/utility/FormatAndOutput/OutGridView/ExpressionColumnInfo.cs",
|
||||||
@@ -65,11 +64,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net451": {
|
"net451": {
|
||||||
"buildOptions": {
|
|
||||||
"compile": {
|
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Commands.Utility/*.cs" ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"frameworkAssemblies": {
|
"frameworkAssemblies": {
|
||||||
"System.Drawing": "",
|
"System.Drawing": "",
|
||||||
"System.Web": "",
|
"System.Web": "",
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true,
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true,
|
||||||
"compile": [ "../windows-build/gen/Microsoft.PowerShell.ConsoleHost/*.cs" ],
|
|
||||||
"copyToOutput": {
|
"copyToOutput": {
|
||||||
"include": [
|
"include": [
|
||||||
"Modules",
|
"Modules",
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true,
|
||||||
"allowUnsafe": true,
|
"allowUnsafe": true
|
||||||
"compile": [ "../windows-build/gen/Microsoft.PowerShell.CoreCLR.Eventing/*.cs" ]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
"authors": [ "OPS" ],
|
"authors": [ "OPS" ],
|
||||||
|
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"warningsAsErrors": true,
|
"warningsAsErrors": true
|
||||||
"compile": [ "../windows-build/gen/Microsoft.PowerShell.LocalAccounts/*.cs" ]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"define": [ "CORECLR" ],
|
"define": [ "CORECLR" ],
|
||||||
"compile": {
|
"compile": {
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Security/*.cs" ],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"security/CertificateCommands.cs",
|
"security/CertificateCommands.cs",
|
||||||
"security/CmsCommands.cs",
|
"security/CmsCommands.cs",
|
||||||
@@ -28,11 +27,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net451": {
|
"net451": {
|
||||||
"buildOptions": {
|
|
||||||
"compile": {
|
|
||||||
"include": [ "../windows-build/gen/Microsoft.PowerShell.Security/*.cs" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
"define": [ "CORECLR" ],
|
"define": [ "CORECLR" ],
|
||||||
"compile": {
|
"compile": {
|
||||||
"include": [ "../windows-build/gen/System.Management.Automation/*.cs" ],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"cimSupport/cmdletization/xml/cmdlets-over-objects.objectModel.autogen.cs",
|
"cimSupport/cmdletization/xml/cmdlets-over-objects.objectModel.autogen.cs",
|
||||||
"cimSupport/cmdletization/xml/cmdlets-over-objects.xmlSerializer.autogen.cs",
|
"cimSupport/cmdletization/xml/cmdlets-over-objects.xmlSerializer.autogen.cs",
|
||||||
@@ -163,12 +162,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"net451": {
|
"net451": {
|
||||||
"buildOptions": {
|
|
||||||
"compile": {
|
|
||||||
"include": [ "../windows-build/gen/System.Management.Automation/*.cs" ]
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"frameworkAssemblies": {
|
"frameworkAssemblies": {
|
||||||
"System.Runtime": "",
|
"System.Runtime": "",
|
||||||
"System.Xml": "",
|
"System.Xml": "",
|
||||||
|
|||||||
Reference in new issue
Block a user