From 2c3f43b6bd5b78d506a2d8f609e3f025a433dd2c Mon Sep 17 00:00:00 2001 From: XXL Steve <80220423+CornetPanique86@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:53:12 +0100 Subject: [PATCH] Update README.md Added windows guide for building --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d79649c..7033996 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ You can download the app from the [nightly builds](https://nightly.link/Communau ## Building -(Note: If you're on Windows, you must install WSL) +(Note: If you're on Windows, you must install WSL: [see guide below](https://github.com/Communaute-Events/AutoEvent#windows)) Install Jq ```shell @@ -82,4 +82,70 @@ Run the build script for your target OS ./build win # All platforms ./build all -``` \ No newline at end of file +``` + +### Windows + +#### Install WSL + +To install WSL, or Windows Subsystem for Linux, open Powershell/Command prompt in **administrator** mode and enter the command: +```shell +wsl --install +``` +###### [*[more info]*](https://learn.microsoft.com/en-us/windows/wsl/install) + +Now, open an Ubuntu console which will request you to create your user account. + +Before going further, update the packages and add wget (retrieve content from web servers) and ca-certificates (allow SSL-based applications to check for the authenticity of SSL connections): +```shell +sudo apt update && sudo apt upgrade +sudo apt-get install wget ca-certificates +``` +###### [*[more info]*](https://learn.microsoft.com/en-us/windows/wsl/setup/environment#set-up-your-linux-username-and-password) + +#### VS Code Development Environment +Install the [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) which includes the WSL extension (or only install the [WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)). + +To open a WSL project: +- **from the command line**: open the Ubuntu console, type `code .` +- **from VS Code**: type `WSL` in the command palette (`Ctrl+Shift+P`) to see available options. + +#### Install Node.js +The most stable way is to use [NVM](https://github.com/nvm-sh/nvm), or Node Version Manager. + +Install NVM: +```shell +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +``` + +Now restart WSL or type the following command: +```shell +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +``` + +If it's installed: +```shell +$ nvm --version # returns version +$ nvm ls +iojs -> N/A (default) +node -> stable (-> N/A) (default) +unstable -> N/A (default) +``` + +Now install the LTS versions of Node.js: +```shell +nvm install --lts +``` + +...if it's installed: +```shell +node --version +npm --version +``` + +[*[more info]*](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl) + + + +Now you can install Jq, the neu-cli and clone the repo using the commands stated [above](https://github.com/Communaute-Events/AutoEvent#building). \ No newline at end of file