mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-03-30 09:51:12 +02:00
Clean up windows setup
@@ -10,38 +10,20 @@ First you should [download](https://aka.ms/buildtools) and install Visual Studio
|
||||
|
||||
> This is a big download (over 1GB) and takes the most time, so go grab a :coffee:
|
||||
|
||||
Chocolatey is a great package manager for Windows. Follow these [these official instructions](https://chocolatey.org/install), or just do this:
|
||||
|
||||
Then download and install [nvm-windows](https://github.com/coreybutler/nvm-windows/releases)
|
||||
Then install Chocolatey
|
||||
Next download nvm's latest release from their [git](https://github.com/coreybutler/nvm-windows/releases/lastest) and install it for advanced nodejs version management.
|
||||
|
||||
Then run the following from an Administrative PowerShell and press Y when prompted:
|
||||
```powershell
|
||||
# BE SURE YOU ARE IN AN ADMINISTRATIVE PowerShell!
|
||||
nvm install 12.16.0
|
||||
nvm use 12.16.0
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
choco install yarn
|
||||
```
|
||||
|
||||
|
||||
### Node runtime and package manager
|
||||
We recommend using NVM to manage your node runtime. It allows you to easily switch versions and update.
|
||||
```
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
|
||||
```
|
||||
> We have audited this bash script, and it does what it says it is supposed to do. Nevertheless, before blindly curl-bashing a script, it is always wise to look at it first. Here is the file as a mere [download link](https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh)
|
||||
|
||||
Once nvm is installed (you may have to use another terminal), then install Node 12LTS and the latest NPM:
|
||||
```
|
||||
nvm install 12LTS
|
||||
```
|
||||
If you have any problems with NVM, please consult their [project readme](https://github.com/nvm-sh/nvm).
|
||||
|
||||
Now that `npm` is installed, if you like you may additionally install `yarn` - the preferred package manager of the Tauri team.
|
||||
|
||||
```
|
||||
npm install --global yarn
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iwr -useb get.scoop.sh | iex
|
||||
scoop install yarn
|
||||
```
|
||||
This will install the most recent version of nodejs* with nvm, scoop, and yarn.
|
||||
> * Most recent nodejs as of this post
|
||||
> Here you can find help for: [scoop](https://scoop.sh/), [nvm](https://github.com/coreybutler/nvm-windows), [yarn](https://yarnpkg.com/)
|
||||
|
||||
|
||||
### Rustc and Cargo package manager
|
||||
@@ -61,11 +43,14 @@ Open an administrative console and enter:
|
||||
```
|
||||
CheckNetIsolation.exe LoopbackExempt -a -n="Microsoft.Win32WebViewHost_cw5n1h2txyewy"
|
||||
```
|
||||
There are reports that you have to restart your computer after running this command, so if it isn't working for you, try that!
|
||||
|
||||
> There are reports that you have to restart your computer after running this command, so if it isn't working for you, try that!
|
||||
|
||||
### Devtools
|
||||
https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide
|
||||
Next if you want to debug the front-end you will have to download [microsoft edge devtools](https://www.microsoft.com/store/p/microsoft-edge-devtools-preview/9mzbfrmz0mnj) from the microsoft store.
|
||||
|
||||
This will allow you to attach to a running instance of you're tauri project!
|
||||
if you need help take a look at the [devtools-guide](https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide)
|
||||
|
||||
|
||||
## Tauri bundler
|
||||
After you have installed Rust and the build toolchain, it is wise to open a new shell before continuing.
|
||||
|
||||
Reference in New Issue
Block a user