Work in progress to modify the native binary CoreCLR build.

This commit is contained in:
Mike Richmond
2016-08-10 20:48:47 -07:00
parent 4e23d6e1ee
commit afe86d6bd7
5 changed files with 54 additions and 34 deletions
+2 -1
View File
@@ -62,7 +62,8 @@ SET (WIN_VERSION_WINXP 0x0501)
#include(dsc_defs.cmake)
if (BUILD_ONECORE)
include(nano_defs.cmake)
include(coreclr_defs.cmake)
#include(nano_defs.cmake)
else ()
include(coreclr_defs.cmake)
endif (BUILD_ONECORE)
@@ -13,7 +13,15 @@
param
(
[Switch]$Verbose
[parameter(ParameterSetName = "ByPath")]
[ValidateNotNullOrEmpty()]
[string]
$PowerShellHome,
[parameter(ParameterSetName = "ByPath")]
[ValidateNotNullOrEmpty()]
[string]
$PowerShellVersion
)
function Register-WinRmPlugin
@@ -74,13 +82,18 @@ function Generate-PluginConfigFile
[string]
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$pluginFile
$pluginFile,
[string]
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$powershellHomeDir
)
# This always overwrites the file with a new version of it if the
# script is invoked multiple times.
Set-Content -Path $pluginFile -Value "PSHOMEDIR=$PSHOME"
Add-Content -Path $pluginFile -Value "CORECLRDIR=$PSHOME"
Set-Content -Path $pluginFile -Value "PSHOMEDIR=$powershellHomeDir"
Add-Content -Path $pluginFile -Value "CORECLRDIR=$powershellHomeDir"
Write-Verbose "Created Plugin Config File: $pluginFile"
}
@@ -103,7 +116,9 @@ if ($Verbose)
$VerbosePreference = "Continue"
}
$powershellVersion = $PSVersionTable.PSVersion
$powershellVersion = $PowershellVersion
$powershellHome = $PowerShellHome
$pluginBasePath = Join-Path "$env:WINDIR\System32\PowerShell" $powerShellVersion
$resolvedPluginAbsolutePath = ""
@@ -122,10 +137,10 @@ $pluginRawPath = Join-Path $resolvedPluginAbsolutePath "pwrshplugin.dll"
$fixedPluginPath = $pluginRawPath -replace '\\','\\'
# 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"
Generate-PluginConfigFile $pluginFile
Generate-PluginConfigFile $pluginFile $powershellHome
$pluginEndpointName = "powershell.$powershellVersion"
-7
View File
@@ -171,13 +171,6 @@ add_compile_options($<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:/MTd>)
# clr_unknown_arch()
#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(-D_WIN32)
add_definitions(-DWINVER=${WIN_VERSION_WIN8})# 0x0601 for Win7, was 0x0602
@@ -8,17 +8,17 @@ if (BUILD_ONECORE)
CssMainEntry.cpp
)
set(PWRSHEXE_WINDOWS_LIBS
### ${STATIC_MT_CRT_LIB}
### ${STATIC_MT_VCRT_LIB}
### ${STATIC_UCRT_LIB}
onecore.lib
vcruntime.lib
ucrtd.lib
msvcrt.lib
msvcrt.lib
msvcprtd.lib
user32.lib
atls.lib
${STATIC_MT_CRT_LIB} # use for coreclr_defs
${STATIC_MT_VCRT_LIB} # use for coreclr_defs
### ${STATIC_UCRT_LIB}
#vcruntime.lib# use for nano_defs
#ucrtd.li# use for nano_defs
#msvcrt.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
)
set(powershell_definitions
_CONSOLE
@@ -13,16 +13,27 @@ add_library(pwrshplugin SHARED
if (BUILD_ONECORE)
# Libraries to use when creating this binary for Windows on OneCore-based SKUs
set(PWRSHPLUGIN_WINDOWS_LIBS
### ${STATIC_MT_CRT_LIB}
### ${STATIC_MT_VCRT_LIB}
${STATIC_MT_CRT_LIB} # use for coreclr_defs
${STATIC_MT_VCRT_LIB} # use for coreclr_defs
### ${STATIC_UCRT_LIB}
onecore.lib
vcruntime.lib
ucrtd.lib
msvcrt.lib
msvcprtd.lib
user32.lib
atls.lib
kernel32.lib
advapi32.lib
ole32.lib
#oleaut32.lib
#uuid.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
)
set_target_properties(pwrshplugin PROPERTIES COMPILE_DEFINITIONS "CORECLR")