-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add pwrshplugin into windows build #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d24bf35
Add pwrshplugin to cmake build
7183581
Copy pwrshplugin native code from [SD:715912]
PowerShellTeam ef96336
Add Release/ entry to .gitignore in powershell-native project
0e35dcd
Temporerely disable SQM Telemetry in pwrshplugin
e73e724
Fix name for pwrshplugin
92db3e5
Update powershell-native\map.json to include pwrshplugin.def
9788e9a
Copy pwrshplugin.def from [SD:715912]
PowerShellTeam 5d9f3ad
Update powershell-native\CMakeLists.txt with a fixed name of the library
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,31 +16,48 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") | |
| set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") | ||
|
|
||
| include_directories( | ||
| nativemsh/pwrshcommon) | ||
| nativemsh/pwrshcommon | ||
| nativemsh/pwrshplugin) | ||
|
|
||
| link_directories( | ||
| nativemsh/pwrshcommon) | ||
|
|
||
| add_definitions(-DUNICODE) | ||
| add_definitions(-D_UNICODE) | ||
|
|
||
| add_executable(powershell WIN32 | ||
| nativemsh/pwrshcommon/pwrshcommon.cpp | ||
| nativemsh/pwrshcommon/WinSystemCallFacade.cpp | ||
|
|
||
| nativemsh/pwrshexe/MainEntry.cpp) | ||
|
|
||
| # This subsystem definition is using old policy. TODO: figure out for release and the rest | ||
| set_target_properties(powershell PROPERTIES COMPILE_DEFINITIONS "_CONSOLE") | ||
| add_library(pwrshplugin | ||
| nativemsh/pwrshplugin/entrypoints.cpp | ||
| nativemsh/pwrshplugin/pwrshclrhost.cpp | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you need pwrshplugin.def here as well |
||
| nativemsh/pwrshplugin/pwrshpluginerrorcodes.mc | ||
| nativemsh/pwrshplugin/pwrshpluginerrorcodes.rc | ||
| nativemsh/pwrshplugin/pwrshplugin.def) | ||
|
|
||
|
|
||
| SET(powershell_definitions | ||
| _CONSOLE | ||
| UNICODE | ||
| _UNICODE) | ||
|
|
||
| set_target_properties(powershell PROPERTIES COMPILE_DEFINITIONS "${powershell_definitions}") | ||
| set_target_properties(powershell PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") | ||
| set_target_properties(powershell PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") | ||
| set_target_properties(powershell PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE") | ||
| set_target_properties(powershell PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:CONSOLE") | ||
|
|
||
| SET(pwrshplugin_definitions | ||
| UNICODE | ||
| _UNICODE) | ||
|
|
||
| set_target_properties(pwrshplugin PROPERTIES COMPILE_DEFINITIONS "${pwrshplugin_definitions}") | ||
|
|
||
| target_link_libraries(powershell | ||
| mscoree.lib | ||
| MUILoad.lib | ||
| kernel32.lib | ||
| msxml6.lib | ||
| legacy_stdio_definitions.lib) | ||
|
|
||
| target_link_libraries(pwrshplugin) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to compile this DLL twice. For FullCLR and CoreCLR.
The CoreCLR version should
1 - Take the CDEFINE CORECLR
2 - Must build for CoreSystem (aka OneCore) by linking against onecore.lib
Both versions must link against wsmsvc.lib as well. I don't see it listed here