Skip to content

Instantly share code, notes, and snippets.

@Pushpavel
Last active May 23, 2022 11:43
Show Gist options
  • Save Pushpavel/21d7e55ef37cec2c74942272c998f491 to your computer and use it in GitHub Desktop.
Save Pushpavel/21d7e55ef37cec2c74942272c998f491 to your computer and use it in GitHub Desktop.
This script installs the required dependencies to build a tauri app using chocolatey package manager in windows machines
##### Installs Dependencies required by Tauri using chocolatey package manager #####
# Run the below command in powershell before running this script
# Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
# check for elavated permissions (admin)
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Output "Run as Admin"; exit }
# installs chocolatey (package manager)
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# installs dependencies (https://tauri.studio/v1/guides/getting-started/prerequisites#setting-up-windows)
choco install visualstudio2019buildtools -y --params "--quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" `
webview2-runtime `
nodejs-lts `
rustup.install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment