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.
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"`.
- 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`).
- 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)
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.