Work in progress to modify the native binary CoreCLR build.

This commit is contained in:
Mike Richmond committed 2016-08-10 20:48:47 -07:00
1 parent 4e23d6e1ee
commit afe86d6bd7
5 files changed
+54 -34

No files matched your search

+2 -1
View File
@@ -62,7 +62,8 @@ SET (WIN_VERSION_WINXP 0x0501)
#include(dsc_defs.cmake) #include(dsc_defs.cmake)
if (BUILD_ONECORE) if (BUILD_ONECORE)
include(nano_defs.cmake) include(coreclr_defs.cmake)
#include(nano_defs.cmake)
else () else ()
include(coreclr_defs.cmake) include(coreclr_defs.cmake)
endif (BUILD_ONECORE) endif (BUILD_ONECORE)
@@ -13,7 +13,15 @@
param param
( (
[Switch]$Verbose [parameter(ParameterSetName = "ByPath")]
[ValidateNotNullOrEmpty()]
[string]
$PowerShellHome,
[parameter(ParameterSetName = "ByPath")]
[ValidateNotNullOrEmpty()]
[string]
$PowerShellVersion
) )
function Register-WinRmPlugin function Register-WinRmPlugin
@@ -74,13 +82,18 @@ function Generate-PluginConfigFile
[string] [string]
[parameter(Mandatory=$true)] [parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
$pluginFile $pluginFile,
[string]
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$powershellHomeDir
) )
# This always overwrites the file with a new version of it if the # This always overwrites the file with a new version of it if the
# script is invoked multiple times. # script is invoked multiple times.
Set-Content -Path $pluginFile -Value "PSHOMEDIR=$PSHOME" Set-Content -Path $pluginFile -Value "PSHOMEDIR=$powershellHomeDir"
Add-Content -Path $pluginFile -Value "CORECLRDIR=$PSHOME" Add-Content -Path $pluginFile -Value "CORECLRDIR=$powershellHomeDir"
Write-Verbose "Created Plugin Config File: $pluginFile" Write-Verbose "Created Plugin Config File: $pluginFile"
} }
@@ -103,7 +116,9 @@ if ($Verbose)
$VerbosePreference = "Continue" $VerbosePreference = "Continue"
} }
$powershellVersion = $PSVersionTable.PSVersion $powershellVersion = $PowershellVersion
$powershellHome = $PowerShellHome
$pluginBasePath = Join-Path "$env:WINDIR\System32\PowerShell" $powerShellVersion $pluginBasePath = Join-Path "$env:WINDIR\System32\PowerShell" $powerShellVersion
$resolvedPluginAbsolutePath = "" $resolvedPluginAbsolutePath = ""
@@ -122,10 +137,10 @@ $pluginRawPath = Join-Path $resolvedPluginAbsolutePath "pwrshplugin.dll"
$fixedPluginPath = $pluginRawPath -replace '\\','\\' $fixedPluginPath = $pluginRawPath -replace '\\','\\'
# This is forced to ensure the the file is placed correctly # This is forced to ensure the the file is placed correctly
Copy-Item $PSHOME\pwrshplugin.dll $resolvedPluginAbsolutePath -Force -Verbose Copy-Item $powershellHome\pwrshplugin.dll $resolvedPluginAbsolutePath -Force -Verbose
$pluginFile = Join-Path $resolvedPluginAbsolutePath "RemotePowerShellConfig.txt" $pluginFile = Join-Path $resolvedPluginAbsolutePath "RemotePowerShellConfig.txt"
Generate-PluginConfigFile $pluginFile Generate-PluginConfigFile $pluginFile $powershellHome
$pluginEndpointName = "powershell.$powershellVersion" $pluginEndpointName = "powershell.$powershellVersion"
-7
View File
@@ -171,13 +171,6 @@ add_compile_options($<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:/MTd>)
# clr_unknown_arch() # clr_unknown_arch()
#endif (CLR_CMAKE_TARGET_ARCH_AMD64) #endif (CLR_CMAKE_TARGET_ARCH_AMD64)
#
# TODO: Are these needed???????????
#
#add_definitions(-D_BLD_CLR)
#add_definitions(-DDEBUGGING_SUPPORTED)
#add_definitions(-DPROFILING_SUPPORTED)
add_definitions(-DWIN32) add_definitions(-DWIN32)
add_definitions(-D_WIN32) add_definitions(-D_WIN32)
add_definitions(-DWINVER=${WIN_VERSION_WIN8})# 0x0601 for Win7, was 0x0602 add_definitions(-DWINVER=${WIN_VERSION_WIN8})# 0x0601 for Win7, was 0x0602
@@ -8,17 +8,17 @@ if (BUILD_ONECORE)
CssMainEntry.cpp CssMainEntry.cpp
) )
set(PWRSHEXE_WINDOWS_LIBS set(PWRSHEXE_WINDOWS_LIBS
### ${STATIC_MT_CRT_LIB}
### ${STATIC_MT_VCRT_LIB}
### ${STATIC_UCRT_LIB}
onecore.lib onecore.lib
vcruntime.lib ${STATIC_MT_CRT_LIB} # use for coreclr_defs
ucrtd.lib ${STATIC_MT_VCRT_LIB} # use for coreclr_defs
msvcrt.lib ### ${STATIC_UCRT_LIB}
msvcrt.lib #vcruntime.lib# use for nano_defs
msvcprtd.lib #ucrtd.li# use for nano_defs
user32.lib #msvcrt.lib# use for nano_defs
atls.lib #msvcrt.lib# use for nano_defs
#msvcprtd.lib# use for nano_defs
#user32.lib # use for nano_defs
#atls.lib# use for nano_defs
) )
set(powershell_definitions set(powershell_definitions
_CONSOLE _CONSOLE
@@ -13,16 +13,27 @@ add_library(pwrshplugin SHARED
if (BUILD_ONECORE) if (BUILD_ONECORE)
# 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(PWRSHPLUGIN_WINDOWS_LIBS set(PWRSHPLUGIN_WINDOWS_LIBS
### ${STATIC_MT_CRT_LIB} ${STATIC_MT_CRT_LIB} # use for coreclr_defs
### ${STATIC_MT_VCRT_LIB} ${STATIC_MT_VCRT_LIB} # use for coreclr_defs
### ${STATIC_UCRT_LIB} ### ${STATIC_UCRT_LIB}
onecore.lib
vcruntime.lib kernel32.lib
ucrtd.lib advapi32.lib
msvcrt.lib ole32.lib
msvcprtd.lib #oleaut32.lib
user32.lib #uuid.lib
atls.lib #user32.lib
#version.lib
#shlwapi.lib
#bcrypt.lib
#onecore.lib #use for nano_defs
#vcruntime.lib # use for nano_defs
#ucrtd.lib # use for nano_defs
#msvcrt.lib # use for nano_defs
#msvcprtd.lib # use for nano_defs
#user32.lib # use for nano_defs
#atls.lib # use for nano_defs
wsmsvc.lib wsmsvc.lib
) )
set_target_properties(pwrshplugin PROPERTIES COMPILE_DEFINITIONS "CORECLR") set_target_properties(pwrshplugin PROPERTIES COMPILE_DEFINITIONS "CORECLR")