diff --git a/docs/building/linux.md b/docs/building/linux.md index 5e4076f7ed..68fbf0bbe6 100644 --- a/docs/building/linux.md +++ b/docs/building/linux.md @@ -10,6 +10,16 @@ Environment These instructions are written assuming the Ubuntu 14.04 LTS, since that's the distro the team uses. +Git Setup +--------- + +Using Git requires it to be setup correctly; refer to the +[README](../../README.md) and +[Contributing Guidelines](../../CONTRIBUTING.md). + +This guide assumes that you have recursively cloned the PowerShell +repository and `cd`ed into it. + Toolchain Setup --------------- @@ -26,16 +36,46 @@ Unfortunately, the `apt-get` feed for `dotnet` has been deprecated, and the latest version is only distributed in the form of three separate packages, which require manual dependency resolution. -**To ease this process, just run `./bootstrap.sh` and enter password -for `sudo` when prompted.** +Installing the toolchain is as easy as running `Start-PSBootstrap` in +PowerShell. Of course, this requires a self-hosted copy of PowerShell +on Linux. -The [bootstrap script](../../bootstrap.sh) does the following: +Fortunately, this is as easy as downloading and installing the +package. Unfortunately, while the repository is still private, the +package cannot be downloaded as simply as with `wget`. We have a +script that wraps the GitHub API and uses a personal access token to +authorize in order to obtain the package. + +The `./download.sh` script will also install the PowerShell package. + +> You can alternativelly download via a browser, upload it to your +> box via some other method, and manually install it. + +In Bash: + +```sh +GITHUB_TOKEN= ./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! + +In PowerShell: + +```powershell +Import-Module ./PowerShellGitHubDev.psm1 +Start-PSBootstrap +``` + +The `Start-PSBootstrap` function does the following: - Adds the LLVM package feed - Installs our dependencies combined with the dependencies of the .NET CLI toolchain via `apt-get` - Installs the .NET CLI host, shared framework, and SDK by downloading - the three `.deb` packages to `/tmp` and using `dpkg -i` + the three `.deb` packages and using `dpkg -i` [dotnet-cli]: https://github.com/dotnet/cli#new-to-net-cli [CMake]: https://cmake.org/cmake/help/v2.8.12/cmake.html @@ -55,36 +95,13 @@ uninstall prior any prior versions. [cli-docs]: https://dotnet.github.io/getting-started/ -Git Setup ---------- - -Using Git requires it to be setup correctly; refer to the -[README](../../README.md) and -[Contributing Guidelines](../../CONTRIBUTING.md). - Build using our module ====================== We maintain a [PowerShell module](../../PowerShellGitHubDev.psm1) with the function `Start-PSBuild` to build PowerShell. Since this is -PowerShell code, it requires self-hosting. Fortunately, this is as -easy as downloading and installing the package. Unfortunately, while -the repository is still private, the package cannot be downloaded as -simply as with `wget`. We have a script that wraps the GitHub API and -uses a personal access token to authorize and obtain the package. - -> You can alternativelly download via a browser and upload it to your -> box via some other method. - -```sh -GITHUB_TOKEN= ./download.sh -sudo dpkg -i ./powershell.deb -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 and build! +PowerShell code, it requires self-hosting. If you have followed the +toolchain setup section above, you should have `powershell` installed. > If you cannot or do not want to self-host, `Start-PSBuild` is just a > convenience; you can execute each step of the build process yourself @@ -99,8 +116,6 @@ Congratulations! If everything went right, PowerShell is now built. The `Start-PSBuild` script will output the location of the executable: `./src/Microsoft.PowerShell.CoreConsoleHost/bin/Linux/netstandardapp1.5/ubuntu.14.04-x64/powershell`. -> Note that the `./build.sh` script is deprecated and will be removed - You can run our cross-platform Pester tests with `Start-PSPester`, and our xUnit tests with `Start-PSxUnit`. diff --git a/docs/building/osx.md b/docs/building/osx.md index de8b97737f..56c4c04a7a 100644 --- a/docs/building/osx.md +++ b/docs/building/osx.md @@ -11,22 +11,14 @@ Environment =========== You will want [Homebrew](http://brew.sh/), the missing package manager -for OS X. Once installed, use `brew` to install the following -dependencies. +for OS X. Once installed, follow the same instructions to download and +install a self-hosted copy of PowerShell on your OS X machine, and use +`Start-PSBootstrap` to install the dependencies. -```sh -brew install openssl cmake wget -``` +The `Start-PSBootstrap` function does the following: -Instead of using Linux `./bootstrap.sh` to install .NET CLI's Ubuntu -packages, you will want to use the official PKG installer for OS X. - -```sh -wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-dev-osx-x64.latest.pkg -open ./dotnet-dev-osx-x64.latest.pkg -``` - -Then follow the wizard's instructions to complete installation. +- Uses `brew` to install CMake, OpenSSL, and GNU WGet +- Downloads and installs the latest .NET CLI package Build using our module ====================== diff --git a/docs/building/windows-core.md b/docs/building/windows-core.md index 31def61ac7..288ef7a61c 100644 --- a/docs/building/windows-core.md +++ b/docs/building/windows-core.md @@ -11,16 +11,33 @@ Environment These instructions are tested on Windows 10 and Windows Server 2012 R2, though they should work anywhere the dependencies work. +Git Setup +--------- + +Using Git requires it to be setup correctly; refer to the +[README](../../README.md) and +[Contributing Guidelines](../../CONTRIBUTING.md). + +This guide assumes that you have recursively cloned the PowerShell +repository and `cd`ed into it. + .NET CLI -------- We use the [.NET Command Line Interface][dotnet-cli] (`dotnet`) to -build PowerShell. The following script will install `dotnet` and add -it to your PowerShell session's path: +build PowerShell. The `Start-PSBootstrap` function will automatically +install it and add it to your path: + +```powershell +Import-Module ./PowerShellGitHubDev.psm1 +Start-PSBootstrap +``` + +The `Start-PSBootstrap` function itself does exactly this: ```powershell Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1 -./install.ps1 -version 1.0.0-beta-002198 +./install.ps1 $env:Path += ";$env:LocalAppData\Microsoft\dotnet\cli" ``` @@ -43,13 +60,6 @@ CLI can cause odd failures when running. Please check your version. [redist-2012]: https://www.microsoft.com/en-us/download/confirmation.aspx?id=30679 [redist-2015]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 -Git Setup ---------- - -Using Git requires it to be setup correctly; refer to the -[README](../../README.md) and -[Contributing Guidelines](../../CONTRIBUTING.md). - Build using our module ======================