mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Removing dependency on JSON .Net for FullClr
This commit is contained in:
1 parent
33c1f2db23
commit
419db0e832
4 files changed
+31
-36
No files matched your search
+2
-1
@@ -267,11 +267,12 @@ function Start-PSBuild {
|
|||||||
Push-Location "$PSScriptRoot\src\powershell-native"
|
Push-Location "$PSScriptRoot\src\powershell-native"
|
||||||
|
|
||||||
# Compile native resources
|
# Compile native resources
|
||||||
|
$currentLocation = Get-Location
|
||||||
@("nativemsh/pwrshplugin") | % {
|
@("nativemsh/pwrshplugin") | % {
|
||||||
$nativeResourcesFolder = $_
|
$nativeResourcesFolder = $_
|
||||||
Get-ChildItem $nativeResourcesFolder -Filter "*.mc" | % {
|
Get-ChildItem $nativeResourcesFolder -Filter "*.mc" | % {
|
||||||
$command = @"
|
$command = @"
|
||||||
cmd.exe /C cd /d "(Get-Location)" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch" "&" mc.exe -o -d -c -U $($_.FullName) -h "$nativeResourcesFolder" -r "$nativeResourcesFolder"
|
cmd.exe /C cd /d "$currentLocation" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch" "&" mc.exe -o -d -c -U $($_.FullName) -h "$nativeResourcesFolder" -r "$nativeResourcesFolder"
|
||||||
"@
|
"@
|
||||||
log " Executing mc.exe Command: $command"
|
log " Executing mc.exe Command: $command"
|
||||||
Start-NativeExecution { Invoke-Expression -Command:$command }
|
Start-NativeExecution { Invoke-Expression -Command:$command }
|
||||||
|
|||||||
@@ -255,7 +255,6 @@ namespace System.Management.Automation.Runspaces
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
int i = ReadRegistryInt("PipelineMaxStackSizeMB", 10);
|
int i = ReadRegistryInt("PipelineMaxStackSizeMB", 10);
|
||||||
|
|
||||||
if (i < 10)
|
if (i < 10)
|
||||||
i = 10; // minimum 10MB
|
i = 10; // minimum 10MB
|
||||||
else if (i > 100)
|
else if (i > 100)
|
||||||
@@ -536,35 +535,35 @@ namespace System.Management.Automation.Runspaces
|
|||||||
// Removed HandleUnexpectedExceptions infrastructure
|
// Removed HandleUnexpectedExceptions infrastructure
|
||||||
|
|
||||||
internal static int ReadRegistryInt(string policyValueName, int defaultValue)
|
internal static int ReadRegistryInt(string policyValueName, int defaultValue)
|
||||||
{
|
{
|
||||||
RegistryKey key;
|
RegistryKey key;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
key = Registry.LocalMachine.OpenSubKey(Utils.GetRegistryConfigurationPrefix());
|
key = Registry.LocalMachine.OpenSubKey(Utils.GetRegistryConfigurationPrefix());
|
||||||
}
|
}
|
||||||
catch (System.Security.SecurityException)
|
catch (System.Security.SecurityException)
|
||||||
{
|
{
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
if (null == key)
|
if (null == key)
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
|
|
||||||
object temp;
|
object temp;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
temp = key.GetValue(policyValueName);
|
temp = key.GetValue(policyValueName);
|
||||||
}
|
}
|
||||||
catch (System.Security.SecurityException)
|
catch (System.Security.SecurityException)
|
||||||
{
|
{
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
if (!(temp is int))
|
if (!(temp is int))
|
||||||
{
|
{
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
int i = (int)temp;
|
int i = (int)temp;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NTRAID#Windows Out Of Band Releases-915506-2005/09/09
|
// NTRAID#Windows Out Of Band Releases-915506-2005/09/09
|
||||||
// Removed HandleUnexpectedExceptions infrastructure
|
// Removed HandleUnexpectedExceptions infrastructure
|
||||||
|
|||||||
@@ -197,9 +197,6 @@
|
|||||||
"System.Management": "",
|
"System.Management": "",
|
||||||
"System.Configuration": "",
|
"System.Configuration": "",
|
||||||
"System.Configuration.Install": ""
|
"System.Configuration.Install": ""
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"Newtonsoft.Json": "7.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,14 +11,12 @@ add_library(pwrshcommon
|
|||||||
target_include_directories(pwrshcommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(pwrshcommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
if (BUILD_ONECORE)
|
if (BUILD_ONECORE)
|
||||||
message("Building OneCore version of pwrshcommon.lib")
|
|
||||||
# Libraries to use when creating this binary for Windows on OneCore-based SKUs
|
# Libraries to use when creating this binary for Windows on OneCore-based SKUs
|
||||||
set(PWRSHCOMMON_WINDOWS_LIBS
|
set(PWRSHCOMMON_WINDOWS_LIBS
|
||||||
# onecore.lib
|
# onecore.lib
|
||||||
)
|
)
|
||||||
set_target_properties(pwrshcommon PROPERTIES COMPILE_DEFINITIONS "CORECLR")
|
set_target_properties(pwrshcommon PROPERTIES COMPILE_DEFINITIONS "CORECLR")
|
||||||
else () # NOT BUILD_ONECORE
|
else () # NOT BUILD_ONECORE
|
||||||
message("Building Full version of pwrshcommon.lib")
|
|
||||||
# Libraries to use when creating this binary for Windows on full SKUs
|
# Libraries to use when creating this binary for Windows on full SKUs
|
||||||
# Note: The appropriate libs get added automatically by VS
|
# Note: The appropriate libs get added automatically by VS
|
||||||
set(PWRSHCOMMON_WINDOWS_LIBS
|
set(PWRSHCOMMON_WINDOWS_LIBS
|
||||||
|
|||||||
Reference in new issue
Block a user