mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Merge pull request #1148 from PowerShell/vors/pwrshplugin
Add pwrshplugin into windows build
This commit is contained in:
commit
09238a9f1a
16 files changed
+2890
-12
No files matched your search
+16
-1
@@ -92,6 +92,13 @@ function Start-PSBuild {
|
||||
}
|
||||
|
||||
$precheck = $precheck -and (precheck 'msbuild' 'msbuild not found. Install Visual Studio 2015.')
|
||||
|
||||
#mc.exe is Message Compiler for native resources
|
||||
$mcexe = Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\" -Recurse -Filter 'mc.exe' | ? {$_.FullName -match 'x64'} | select -First 1 | % {$_.FullName}
|
||||
if (-not $mcexe) {
|
||||
throw 'mc.exe not found. Install Microsoft Windows SDK.'
|
||||
}
|
||||
|
||||
} elseif ($IsLinux -or $IsOSX) {
|
||||
foreach ($Dependency in 'cmake', 'make', 'g++') {
|
||||
$precheck = $precheck -and (precheck $Dependency "Build dependency '$Dependency' not found. Run Start-PSBootstrap.")
|
||||
@@ -175,13 +182,21 @@ function Start-PSBuild {
|
||||
try {
|
||||
Push-Location "$PSScriptRoot\src\powershell-native"
|
||||
|
||||
# Compile native resources
|
||||
@("nativemsh/pwrshplugin") | % {
|
||||
$nativeResourcesFolder = $_
|
||||
Get-ChildItem $nativeResourcesFolder -Filter "*.mc" | % {
|
||||
& $mcexe -c -U $_.FullName -h $nativeResourcesFolder -r $nativeResourcesFolder
|
||||
}
|
||||
}
|
||||
|
||||
if ($cmakeGenerator) {
|
||||
cmake -G $cmakeGenerator .
|
||||
} else {
|
||||
cmake .
|
||||
}
|
||||
|
||||
Start-NativeExecution { msbuild powershell.vcxproj /p:Configuration=$msbuildConfiguration }
|
||||
Start-NativeExecution { msbuild ALL_BUILD.vcxproj /p:Configuration=$msbuildConfiguration }
|
||||
|
||||
} finally {
|
||||
Pop-Location
|
||||
|
||||
Reference in new issue
Block a user