Update installation guide

This commit is contained in:
Lea O'Anthony 2024-07-31 08:06:18 +10:00
commit 011c9e66fb
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405

View file

@ -1,15 +1,6 @@
# Installation
To install the Wails CLI, ensure you have [Go 1.21+](https://go.dev/dl/)
installed and run:
```shell
git clone https://github.com/wailsapp/wails.git
cd wails
git checkout v3-alpha
cd v3/cmd/wails3
go install
```
To install the Wails CLI, first ensure you have the correct dependencies installed:
## Supported Platforms
@ -29,11 +20,13 @@ Wails has a number of common dependencies that are required before installation:
Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks:
- Check Go is installed correctly: `go version`
- Check `~/go/bin` is in your PATH variable: `echo $PATH | grep go/bin`
- Check `~/go/bin` is in your PATH variable
- Mac / Linux: `echo $PATH | grep go/bin`
- Windows: `$env:PATH -split ';' | Where-Object { $_ -like '*\go\bin' }`
=== "npm (Optional)"
Although Wails doesn't require npm to be installed, it is needed if you want to use the bundled templates.
Although Wails doesn't require npm to be installed, it is needed by most of the bundled templates.
Download the latest node installer from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against.
@ -65,6 +58,24 @@ You will also need to install platform specific dependencies:
Linux requires the standard `gcc` build tools plus `gtk3` and `webkit2gtk`. Run <code>wails doctor</code> after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please let us know on discord.
## Installation
To install the Wails CLI using Go Modules, run the following commands:
```shell
go install -v github.com/wailsapp/wails/v3/cmd/wails3@latest
```
If you would like to install the latest development version, run the following commands:
```shell
git clone https://github.com/wailsapp/wails.git
cd wails
git checkout v3-alpha
cd v3/cmd/wails3
go install
```
## System Check
Running `wails3 doctor` will check if you have the correct dependencies
@ -76,6 +87,5 @@ any problems.
If your system is reporting that the `wails3` command is missing, check the
following:
- Make sure you have followed the Go installation guide correctly.
- Check that the `go/bin` directory is in the `PATH` environment variable.
- Make sure you have followed the [Go installation guide](#__tabbed_1_1) correctly and that the `go/bin` directory is in the `PATH` environment variable.
- Close/Reopen current terminals to pick up the new `PATH` variable.