Updated the linux build

This commit is contained in:
Jianyun Tao 2016-07-15 18:34:33 -07:00
parent 5a1432e234
commit 5e46f5be6e

View file

@ -28,7 +28,7 @@ We use the [.NET Command Line Interface][dotnet-cli] (`dotnet`) to
build the managed components, and [CMake][] to build the native
components. Install the following packages for the toolchain:
- `dotnet`: Must be installed from the `Start-PSBootstrap` module as described below.
- `dotnet`: Must be installed from the `Start-PSBootstrap` module as described below.
- `cmake`
- `make`
- `g++`
@ -55,16 +55,28 @@ The `./tools/download.sh` script will also install the PowerShell package.
In Bash:
```sh
GITHUB_TOKEN=<replace with your token> ./tools/download.sh
git clone https://github.com/PowerShell/powerShell.git
```
If git prompts you for your password, you need to enter your access token. Click [GitHub Help][help] for how to get access token.
[help]:https://help.github.com/articles/creating-an-access-token-for-command-line-use/
```sh
GITHUB_TOKEN=<replace with your token>
./tools/download.sh
powershell
```
You should now be in a `powershell` console host that is installed
separately from any development copy you're about to build. Just
import our module, bootsrap the dependencies, and build!
import our module, bootstrap the dependencies, and build!
In PowerShell:
Change your directory to the one that you just cloned, for example, ``./src/PowerShell`.
```powershell
Import-Module ./build.psm1
Start-PSBootstrap
@ -113,14 +125,17 @@ toolchain setup section above, you should have `powershell` installed.
```powershell
Import-Module ./build.psm1
git submodule init
git submodule update
Start-PSBuild
```
Congratulations! If everything went right, PowerShell is now built.
The `Start-PSBuild` script will output the location of the executable:
`./src/powershell/bin/Linux/netcoreapp1.0/ubuntu.14.04-x64/powershell`.
You can run our cross-platform Pester tests with `Start-PSPester`, and
You should now be running the `powershell` that is what you just built if your run the above executable. You can run our cross-platform Pester tests with `Start-PSPester`, and
our xUnit tests with `Start-PSxUnit`.
Build manually