Skip to content

Commit

Permalink
GH-1614: Updated the doc with the Windows steps.
Browse files Browse the repository at this point in the history
Got rid of `choco` and simplified the steps with `scoop`.

The steps now include headless commands for installing the followings:
 - `nvm`,
 - Node.js,
 - `yarn`, and optionally
 - `git`.

Closes #1614

Signed-off-by: Akos Kitta <[email protected]>
  • Loading branch information
Akos Kitta authored and kittaakos committed Jan 19, 2020
1 parent 6f16516 commit 8c568f5
Showing 1 changed file with 13 additions and 39 deletions.
52 changes: 13 additions & 39 deletions doc/Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Some additional tools and libraries are needed depending on your platform:
- [nvm](https://github.com/nvm-sh/nvm) is recommended to easily switch between Node.js versions.

- Windows
- [nvm-windows](https://github.com/coreybutler/nvm-windows) addresses the same issue as the Unix [nvm](https://github.com/nvm-sh/nvm) shell tool, although they are completely separate projects.
- We recommend using [`scoop`](https://scoop.sh/). The detailed steps are [here](#building-on-windows).

## Quick Start

Expand Down Expand Up @@ -323,33 +323,18 @@ etc.) by opening `packages/<package name>/coverage/index.html`.

## Building on Windows

Run cmd.exe as an administrator and install `choco` by copy-pasting the command
to your console:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Install `yarn` via `choco`. The `yarn` installation ensures that you will have
Node.js and npm too:

choco install yarn

Install `git` via `choco`

choco install git

Install the correct version of `yarn` (The version is important)

choco install yarn --version 1.7.0 -y

Install Windows-Build-Tools.
Run PowerShell as an administrator and copy-paste the below command:

npm --add-python-to-path install --global --production windows-build-tools
- Install [`scoop`](https://github.com/lukesampson/scoop#installation).
- Install [`nvm`](https://github.com/coreybutler/nvm-windows) with scoop: `scoop install nvm`.
- Install Node.js with `nvm`: `nvm install 10.15.3`, then use it: `nvm use 10.15.13`. You can list all available Node.js versions with `nvm list available` if you want to pick another version.
- Install `yarn`: `scoop install yarn`.
- Install [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools). Run `PowerShell` as _Administrator_ and copy paste the following: `npm --add-python-to-path install --global --production windows-build-tools`

Clone, build and run Theia.
Using Git Bash as administrator:

git clone https://github.com/eclipse-theia/theia.git && cd theia && yarn && cd examples/browser && yarn run start
git clone https://github.com/eclipse-theia/theia.git && cd theia && yarn && yarn --cwd examples\browser start

If you do not have Git Bash installed on your system, [get one](https://gitforwindows.org/), or use `scoop`: `scoop install git`.

## Troubleshooting

Expand All @@ -364,13 +349,9 @@ It can be done like so:

### Windows

Theia uses native modules and also requires Python 2.x to be installed on the
system when building the application.
If you see `LINK : fatal error LNK1104: cannot open file 'C:\\Users\\path\\to\\node.lib' [C:\path\to\theia\node_modules\drivelist\build\drivelist.vcxproj]`, then set the Visual Studio version manually with `npm config set msvs_version 2017 --global`. Note, if you have `2015` installed, use `2015` instead of `2017.`

- One can get all the [all-in-one packages] by running
`npm install --global windows-build-tools` script.

If you are facing with `EPERM: operation not permitted` or `permission denied`
If you are facing with `EPERM: operation not permitted` or `permission denied`
errors while building, testing or running the application then;

- You don't have write access to the installation directory.
Expand All @@ -383,16 +364,9 @@ errors while building, testing or running the application then;
See [here](https://github.com/npm/npm/issues/13461#issuecomment-282556281).
- Still having issues on Windows? File a [bug]. We are working on Linux or OS X
operating systems. Hence we are more than happy to receive any Windows-related
feedbacks, bug reports.

If you have accidentally installed the wrong `yarn` version, you have to remove it, then reinstall it.

- Run PowerShell as an administrator.
- Run: choco uninstall yarn -y
- Run: choco install yarn --version 1.7.0 -y
feedbacks, [bug](https://github.com/eclipse-theia/theia/issues) reports.

[all-in-one packages]: https://github.com/felixrieseberg/windows-build-tools
[bug]: https://github.com/eclipse-theia/theia/issues
If you're still struggling with the build but you use Windows 10, the you can enable the `Windows Subsystem for Linux` and you can get a Linux distro for free.

### macOS

Expand Down

0 comments on commit 8c568f5

Please sign in to comment.