mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Update readme for cross-platform support
This commit is contained in:
1 parent
46f0631f64
commit
7c6aac1565
1 file changed
+45
-24
@@ -1,4 +1,4 @@
|
|||||||
# PowerShell on Linux
|
# PowerShell on Linux / OS X / Windows
|
||||||
|
|
||||||
## Obtain the source code
|
## Obtain the source code
|
||||||
|
|
||||||
@@ -77,16 +77,24 @@ fast-forward merge.
|
|||||||
## Setup build environment
|
## Setup build environment
|
||||||
|
|
||||||
We use the [.NET Command Line Interface][dotnet-cli] (`dotnet-cli`) to build
|
We use the [.NET Command Line Interface][dotnet-cli] (`dotnet-cli`) to build
|
||||||
the managed components, and [CMake][] to build the native components. Install
|
the managed components, and [CMake][] to build the native components (on
|
||||||
`dotnet-cli` by following their documentation (make sure to install the
|
non-Windows platforms). Install `dotnet-cli` by following their documentation
|
||||||
`dotnet-dev` package to get the latest version). Then install the following
|
(make sure to install the `dotnet-dev` package on Linux to get the latest
|
||||||
dependencies (assuming Ubuntu 14.04):
|
version). Then install the following dependencies Linux and OS X.
|
||||||
|
|
||||||
|
> Note that OS X dependency installation instructions are not yet documented,
|
||||||
|
> and Windows only needs `dotnet-cli`.
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
Tested on Ubuntu 14.04 and OS X 10.11.
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install g++ cmake make lldb-3.6 strace
|
sudo apt-get install g++ cmake make lldb-3.6 strace
|
||||||
```
|
```
|
||||||
|
|
||||||
### OMI
|
#### OMI
|
||||||
|
|
||||||
To develop on the PowerShell Remoting Protocol (PSRP), you'll need to be able
|
To develop on the PowerShell Remoting Protocol (PSRP), you'll need to be able
|
||||||
to compile OMI, which additionally requires:
|
to compile OMI, which additionally requires:
|
||||||
@@ -100,12 +108,36 @@ sudo apt-get install libpam0g-dev libssl-dev libcurl4-openssl-dev libboost-files
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
The command `dotnet restore` must be done at least once from the top directory
|
*The command `dotnet restore` must be done at least once from the top directory
|
||||||
to obtain all the necessary .NET packages.
|
to obtain all the necessary .NET packages.*
|
||||||
|
|
||||||
Build with `./build.sh`, which does the following steps.
|
Build with `./build.sh` on Linux and OS X, and `./build.ps1` on Windows.
|
||||||
|
|
||||||
> The variable `$BIN` is the output directory, `bin`.
|
## Running
|
||||||
|
|
||||||
|
### Linux / OS X
|
||||||
|
|
||||||
|
- launch local shell with `./bin/powershell`
|
||||||
|
- launch local shell in LLDB with `./debug.sh`
|
||||||
|
- launch `omiserver` for PSRP (and in LLDB) with `./prsp.sh`, and connect with `Enter-PSSession` from Windows
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
Launch `./bin/powershell.exe`. The console output isn't the prettiest, bet the
|
||||||
|
vast majority of Pester tests pass.
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
### xUnit
|
||||||
|
|
||||||
|
Sadly, `dotnet-test` is not fully supported on Linux, so our xUnit tests do not
|
||||||
|
currently run. We may be able to work around this, or get the `dotnet-cli` team
|
||||||
|
to fix their xUnit runner. GitHub
|
||||||
|
[issue](https://github.com/dotnet/cli/issues/18).
|
||||||
|
|
||||||
|
## Detailed Build Notes
|
||||||
|
|
||||||
|
The variable `$BIN` is the output directory, `bin`.
|
||||||
|
|
||||||
### Managed
|
### Managed
|
||||||
|
|
||||||
@@ -152,6 +184,9 @@ cp api-ms-win-core-registry-l1-1-0.dll $BIN
|
|||||||
PSRP communication is tunneled through OMI using the `omi-provider`.
|
PSRP communication is tunneled through OMI using the `omi-provider`.
|
||||||
These build steps are not part of the `./build.sh` script.
|
These build steps are not part of the `./build.sh` script.
|
||||||
|
|
||||||
|
> PSRP has been observed working on OS X, but the changes made to OMI to
|
||||||
|
> accomplish this are not even beta-ready and need to be done correctly.
|
||||||
|
|
||||||
#### OMI
|
#### OMI
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -185,17 +220,3 @@ ln -s ../omi/Unix/ omi-1.0.8
|
|||||||
make -j
|
make -j
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running
|
|
||||||
|
|
||||||
- launch local shell with `./bin/powershell`
|
|
||||||
- launch local shell in LLDB with `./debug.sh`
|
|
||||||
- launch `omiserver` for PSRP (and in LLDB) with `./prsp.sh`, and connect with `Enter-PSSession` from Windows
|
|
||||||
|
|
||||||
## Known Issues
|
|
||||||
|
|
||||||
### xUnit
|
|
||||||
|
|
||||||
Sadly, `dotnet-test` is not fully supported on Linux, so our xUnit tests do not
|
|
||||||
currently run. We may be able to work around this, or get the `dotnet-cli` team
|
|
||||||
to fix their xUnit runner. GitHub
|
|
||||||
[issue](https://github.com/dotnet/cli/issues/407).
|
|
||||||
Reference in new issue
Block a user