Commit Graph
35 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 18a047408d Compile pshost with -fPIC
So that libpshost can be linked with shared libraries (like the OMI
provider).
2015-10-26 12:08:16 -07:00
Andrew Schwartzmeyer 28dfd36a58 Require absolute path to assembly
Rather than assuming that it's in the current directory. Later this will
be refactoring to choose the appropriate host assembly (for an
interactive shell, script, command list, or self-test) from the
`PWRSH_ROOT` path.
2015-10-25 20:32:50 -07:00
Andrew Schwartzmeyer a548455918 Rename host_cmdline to powershell 2015-10-25 12:09:49 -07:00
Andrew Schwartzmeyer 81984534b8 Refactor CMake build system and host files
Use CMakeLists.txt file for each directory. Setup to be consumed by
monad-linux's CMake. Utilize GoogleTest's CMake. Refactor host files
layout.
2015-10-25 12:03:49 -07:00
Andrew Schwartzmeyer 6af36478fd Conditionalize extern "C" 2015-10-23 15:59:06 -07:00
Andrew Schwartzmeyer 460f51fa7f Update libpshost comments 2015-10-23 01:04:45 -07:00
Andrew Schwartzmeyer 8d399e84c2 Remove deprecated functions from coreclrutil
Using `getcwd()` in main for resolving relative to the current working
directory removed the last public use of `GetAbsolutePath()`, so
`coreclrutil.h` is now stricly `extern "C"`.
2015-10-23 00:57:55 -07:00
Andrew Schwartzmeyer 556f423aa7 Remove deprecated hostutil and tests 2015-10-23 00:57:17 -07:00
Andrew Schwartzmeyer 9b308fa600 Rename variables and reorganize 2015-10-23 00:49:25 -07:00
Andrew Schwartzmeyer cfb8f2e59f fixup! Clean up error codes 2015-10-23 00:40:26 -07:00
Andrew Schwartzmeyer 762930f61e Move appPath and nativeDllSearchDirs to libpshost
- for PowerShell, the `appPath` is the path to the PowerShell libraries
  and consoles, i.e., `PWRSH_ROOT`

- the `nativeDllSearchDirs` is just `appPath` plus `CORE_ROOT`

- probably should parse and add `LD_LIBRARY_PATH` to `appPath`

This refactors the last vestiges of command line arguments out of the
command-line host and into libpshost, where all necessary questions are
answered either automatically or through the two introduced environment
variables (`CORE_ROOT` and `PWRSH_ROOT`).
2015-10-23 00:36:47 -07:00
Andrew Schwartzmeyer 5573c58a75 Clean up error codes 2015-10-23 00:01:48 -07:00
Andrew Schwartzmeyer b897e08d21 Remove base_path and load_context_assembly
- libpshost resolves the absolute path to the PowerShell binaries from
  the environment variable PWRSH_ROOT

- libpshost assumes that PowerShell's AssemblyLoadContext.dll exists in
  PWRSH_ROOT and loads during `startCoreCLR()`

- libicu is now only used by libpshost; note that an icu::UnicodeString
  is UTF-16, and endianness does not matter (see
  http://userguide.icu-project.org/strings#TOC-ICU:-16-bit-Unicode-strings)
2015-10-22 18:17:27 -07:00
Andrew Schwartzmeyer da69d4a8c7 Refactor tpaList into libpshost 2015-10-22 18:17:15 -07:00
Andrew Schwartzmeyer e570c2a0a8 Refactor into GetEnvAbsolutePath() 2015-10-22 15:18:21 -07:00
Andrew Schwartzmeyer cb3fe8d16e Remove currentExeAbsolutePath 2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer b4b0f70ad1 Fix warning in GetDirectory() 2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer 6b1f0d9847 Remove coreclr_path
Obtained via CORE_ROOT, like on Windows.
2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer 4e6b7a8e6e Move start/stop functions 2015-10-22 13:57:37 -07:00
Andrew Schwartzmeyer 2c4b99455a Reconcile with coreruncommon.cpp 2015-10-22 13:35:00 -07:00
Andrew Schwartzmeyer 80c68707aa Rename to (start|stop)CoreCLR() 2015-10-22 13:31:22 -07:00
Andrew Schwartzmeyer 27563ab7b7 Remove CoreCLRUtil namespace
So that is all accessible from C
2015-10-22 12:39:59 -07:00
Andrew Schwartzmeyer fa79c480d0 Add 'src/host/unixcoreruncommon/' from commit 'a566a181a076f4fa49f4874934c080309424bd6c'
git-subtree-dir: src/host/unixcoreruncommon
git-subtree-mainline: ba972b0113
git-subtree-split: a566a181a0
2015-10-22 11:58:35 -07:00
Andrew Schwartzmeyer a1b9511f38 Refactor most CLR code into libpshost 2015-10-21 19:15:05 -07:00
Andrew Schwartzmeyer be95c604e6 Reindent host code using project standards 2015-10-21 15:37:42 -07:00
Andrew Schwartzmeyer 6cddef6b1e Use stream in one statement
This just really bugged me and I had it stashed from earlier
2015-10-21 15:06:54 -07:00
Andrew Schwartzmeyer 42ce3fa48b Remove type_name and function_name from host
Custom hosting code was refactored to take a path to an assembly instead
of an assembly name coupled with a type and function to
execute. Instead, the host now directly executes the given assembly,
calling its Main function.

The path is resolved relative to the current directory, as should be
expected.
2015-08-21 17:39:52 -07:00
Andrew Schwartzmeyer 46d3894c02 Call into Main of PowerShell assembly
Instead of UnmanagedMain. Requires patch to CoreCLR (submitted upstream
but backported until we've integrated their work).
2015-08-21 16:17:16 -07:00
Peter Honeder 24f0f853a8 added testing code to call into Main 2015-08-21 16:16:38 -07:00
Peter Honeder 8eeb24ece9 added hostutil.h, added tests for hostutil, added more cmdline options to PS host 2015-07-30 16:53:35 +02:00
Peter Honeder ff2ceeceb7 added interpreting the verbose option 2015-07-29 18:12:31 +02:00
Peter Honeder ea76b7e8fd fixed string termination issue, added verbose mode 2015-07-28 18:49:32 +02:00
Peter Honeder c0414f8fc4 cleaned up implementation, added command line parsing and standardized managed interface for cmdline hosts 2015-07-28 18:28:09 +02:00
Peter Honeder ba45c8f076 renamed function pointer type, changed code to call UnmanagedMain 2015-07-27 18:40:33 +02:00
Peter Honeder b9784906f4 added first version of custom PS hosting code 2015-07-27 17:40:14 +02:00