Commit Graph
127 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer aeacd0f047 Rename variables and reorganize 2015-10-23 00:49:25 -07:00
Andrew Schwartzmeyer 6fffdd341e fixup! Clean up error codes 2015-10-23 00:40:26 -07:00
Andrew Schwartzmeyer 9abf5d276e 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 54a4a2ae6c Clean up error codes 2015-10-23 00:01:48 -07:00
Andrew Schwartzmeyer 6fb372c72a 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 4ba2ac196a Refactor tpaList into libpshost 2015-10-22 18:17:15 -07:00
Andrew Schwartzmeyer e30f059838 Refactor into GetEnvAbsolutePath() 2015-10-22 15:18:21 -07:00
Andrew Schwartzmeyer 33a09baf03 Remove currentExeAbsolutePath 2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer e55277d2d6 Fix warning in GetDirectory() 2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer 684c849c4b Remove coreclr_path
Obtained via CORE_ROOT, like on Windows.
2015-10-22 14:44:34 -07:00
Andrew Schwartzmeyer f81aec00b3 Move start/stop functions 2015-10-22 13:57:37 -07:00
Andrew Schwartzmeyer 4fd752cee6 Reconcile with coreruncommon.cpp 2015-10-22 13:35:00 -07:00
Andrew Schwartzmeyer bdb06b08d6 Rename to (start|stop)CoreCLR() 2015-10-22 13:31:22 -07:00
Andrew Schwartzmeyer 6eaad394c5 Remove CoreCLRUtil namespace
So that is all accessible from C
2015-10-22 12:39:59 -07:00
Andrew Schwartzmeyer 149b5082f5 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 ba972b0113 Refactor most CLR code into libpshost 2015-10-21 19:15:05 -07:00
Andrew Schwartzmeyer fb9c2424c3 Reindent host code using project standards 2015-10-21 15:37:42 -07:00
Andrew Schwartzmeyer dccd2e9621 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 7196afc5ad Refactor host_common into pshost static lib
For reuse by psrp provider
2015-10-20 11:54:46 -07:00
Andrew Schwartzmeyer ad49db74e2 Ignore more things 2015-10-06 14:08:38 -07:00
Andrew Schwartzmeyer d1de7e28c5 Ignore libps.so 2015-09-30 16:28:16 -07:00
Andy Schwartzmeyer 1366e3bc8f Merge pull request 154 from dev/252-getusername into develop 2015-09-23 22:59:45 +00:00
Andrew Schwartzmeyer a4a9638bcd Use getpwuid(geteuid()) instead of getlogin()
This removes the dependency on a TTY and now does what is expected: gets
the (possibly impersonated) username of the current process/thread.

Implementation and tests updated, still uses reentrant versions where possible.
2015-09-23 15:57:23 -07:00
Aaron Katz 5693da6a46 Merge pull request 113 from dev/8-getcpinfo into develop 2015-08-28 22:59:41 +00:00
Andrew Schwartzmeyer a1f94e6c70 Fix GetCpInfo
- Move cpinfo related code out of pal.h and into getcpinfo.h
- Use static cpinfo struct (not pointer) in test and pass address
- Whitespace cleanup
2015-08-28 15:59:31 -07:00
Aaron 276b5c5481 Got rid of warnings from cpinfo struct 2015-08-28 15:44:04 -07:00
Aaron 777a30c51a Changes to documentation 2015-08-28 15:17:34 -07:00
Aaron b2d89ceba5 Deleted CMakeCache.txt 2015-08-26 13:32:21 -07:00
Aaron a7c773ec8e Merge Conflict 2015-08-26 13:28:51 -07:00
Aaron 5d59019d01 Get rid of merge conflict 2015-08-26 13:03:51 -07:00
Aaron 95060b345f Merge Conflict 2015-08-26 11:55:58 -07:00
Aaron f6958d7212 Got rid of merge conflict 2015-08-26 09:28:48 -07:00
Aaron c9164d5401 made changes based on feedback from pull request 2015-08-25 13:47:39 -07:00
Andrew Schwartzmeyer 440cf6a236 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
Andy Schwartzmeyer 1a34c0de9a Merge pull request 123 from dev/123-main into develop 2015-08-21 23:28:32 +00:00
Andrew Schwartzmeyer 5d117330a8 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 4ffb564dbd added testing code to call into Main 2015-08-21 16:16:38 -07:00
Aaron Katz c5be936efa Merge pull request 102 from dev/9-getcomputername into develop 2015-08-21 16:56:54 +00:00
Aaron e1d4d14028 made changes based on feedback from pull request 2015-08-21 09:55:39 -07:00
Aaron ca4504ec0a changes back on feedback from pull request 2015-08-20 14:40:02 -07:00
Aaron f62c92432b Added changed from feedback from Andy 2015-08-17 17:02:40 -07:00
Aaron d2f7ba1cb4 implemented suggested changes based off of feedback 2015-08-14 12:26:15 -07:00
Aaron d627dac5e8 Merge remote-tracking branch 'origin/develop' into dev/8-getcpinfo 2015-08-14 11:34:48 -07:00
Aaron 18e8bb1dfa No longer defining LPSTR 2015-08-14 11:27:22 -07:00
Aaron df8ab7f662 Changes to make converting beteween UTF8 and UTF16 2015-08-14 10:51:25 -07:00
Aaron 427cce83f0 Added changes based of feedback from Peter 2015-08-14 09:26:45 -07:00
Andrew Schwartzmeyer 9164baa9c4 Use libicu properly in tests 2015-08-13 21:34:59 -07:00
Andrew Schwartzmeyer 8fdfeb250d Use libicu properly for UTF-16 conversion
- No more messy calculations
- Only one include, not four
- No resizing
- No memcpy
- Faster because of fromUTF8()
2015-08-13 21:27:08 -07:00
Andrew Schwartzmeyer 77f9757a05 Use known size instead of calculation 2015-08-13 20:32:30 -07:00
Andrew Schwartzmeyer fd8352c469 Use just LOGIN_NAME_MAX
The +1 is unnecessary since LOGIN_NAME_MAX includes null.
2015-08-13 20:32:30 -07:00