Commit Graph
275 Commits
Author SHA1 Message Date
Andy Schwartzmeyer 435111d4e5 Merge pull request 224 from dev/defaults into develop
Add sensible defaults for powershell and coreclr
2015-10-28 21:33:14 +00:00
Andrew Schwartzmeyer 4d2b184892 Add sensible defaults for powershell and coreclr 2015-10-27 23:47:54 -07:00
George Fleming c21fad08a5 Merge pull request 221 from dev/GetComputerName-Native into develop 2015-10-27 22:42:36 +00:00
George Fleming 1759f9a2f6 Changes per Zack comments 2015-10-27 15:33:25 -07:00
George Fleming 7f6a494bf0 Modify return value 2015-10-27 14:21:25 -07:00
George Fleming 81f833cf25 Remove <iostream> 2015-10-27 10:57:02 -07:00
George Fleming b7260951f1 Remove debug output 2015-10-27 10:55:27 -07:00
George Fleming 9718cd02ab Remove W suffix of native function 2015-10-27 10:48:31 -07:00
George Fleming 845c4483b6 Simpliefied GetComputerName 2015-10-27 09:19:41 -07:00
Andrew Schwartzmeyer 5d61b3ff10 Merge branch 'dev/build-refactor' into develop
Note that a subtree split took place, removing the src directory.
2015-10-26 16:02:46 -07:00
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 c6ca4db6a4 Output psnative and pshost to monad-linux/bin
But leave test artifacts in monad-native.
2015-10-25 17:59:14 -07:00
Andrew Schwartzmeyer 1c247171bd Update gitignore 2015-10-25 17:58:43 -07:00
Andrew Schwartzmeyer af813b9a08 Enable unit testing via CMake 2015-10-25 12:49:19 -07:00
Andrew Schwartzmeyer 523279f6e2 Resurrect .gitignore 2015-10-25 12:21:53 -07:00
Andrew Schwartzmeyer 569de14c1e Rename libps to libpsnative
And impl to native
2015-10-25 12:21:53 -07:00
Andrew Schwartzmeyer c1a5e9fb53 Resurrect .gitmodules after subtree split
Removed src intermediate directory
2015-10-25 12:15:21 -07:00
Andrew Schwartzmeyer 659ca235a7 Merge branch 'dev/HardLink-Native' into dev/username 2015-10-25 12:12:35 -07:00
Andrew Schwartzmeyer a548455918 Rename host_cmdline to powershell 2015-10-25 12:09:49 -07:00
Andrew Schwartzmeyer 807760f06d Remove deprecated GetCPInfo code 2015-10-25 12:06:47 -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 5ed81a0a41 Return char* for GetUserName
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.
2015-10-24 22:17:44 -07:00
Andrew Schwartzmeyer b91c117313 GetLinkCount is not Unicode 2015-10-24 21:30:42 -07:00
Andrew Schwartzmeyer a3a3e2b5c9 Conditionalize extern "C" 2015-10-23 15:59:06 -07:00
Andrew Schwartzmeyer 6af36478fd Conditionalize extern "C" 2015-10-23 15:59:06 -07:00
George Fleming cf9b390faa Adding native tests 2015-10-23 15:48:48 -07:00
Andy Schwartzmeyer b6aed2a6a4 Merge pull request 201 from dev/libhost into master 2015-10-23 19:17:32 +00:00
George Fleming 43c7bdd137 New GetLinkCount() 2015-10-23 10:55:55 -07:00
Andrew Schwartzmeyer 460f51fa7f Update libpshost comments 2015-10-23 01:04:45 -07:00
Andrew Schwartzmeyer 4767d46b38 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 6a1b9f3e59 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 6432bb94b8 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 aeacd0f047 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 6fffdd341e 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 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 5573c58a75 Clean up error codes 2015-10-23 00:01:48 -07:00
Andrew Schwartzmeyer 54a4a2ae6c 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 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 da69d4a8c7 Refactor tpaList into libpshost 2015-10-22 18:17:15 -07:00
Andrew Schwartzmeyer 4ba2ac196a 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 e30f059838 Refactor into GetEnvAbsolutePath() 2015-10-22 15:18:21 -07:00
Andrew Schwartzmeyer cb3fe8d16e Remove currentExeAbsolutePath 2015-10-22 14:44:34 -07:00