From 8c568f5e280e19d294b6845a6c4e983a9aa02fc1 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Tue, 14 Jan 2020 18:41:50 +0100 Subject: [PATCH] GH-1614: Updated the doc with the Windows steps. 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 --- doc/Developing.md | 52 ++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/doc/Developing.md b/doc/Developing.md index c0f9dcb12fe2c..4657e3314aaed 100644 --- a/doc/Developing.md +++ b/doc/Developing.md @@ -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 @@ -323,33 +323,18 @@ etc.) by opening `packages//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 @@ -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. @@ -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