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.
The UTF-8 char* is marshaled to a UTF-16 string automatically. It must
be allocated on the heap as the CLR will free the returned memory.
This removes entire classes of possible errors, greatly reducing the
code complexity and number of tests.
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"`.
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`).
- 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`).