forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install-gui.ps1
36 lines (30 loc) · 970 Bytes
/
Install-gui.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$ErrorActionPreference = "Stop"
if ($null -eq (Get-ChildItem env:VIRTUAL_ENV -ErrorAction SilentlyContinue))
{
Write-Output "This script requires that the Chia Python virtual environment is activated."
Write-Output "Execute '.\venv\Scripts\Activate.ps1' before running."
Exit 1
}
if ($null -eq (Get-Command node -ErrorAction SilentlyContinue))
{
Write-Output "Unable to find Node.js"
Exit 1
}
Write-Output "Running 'git submodule update --init --recursive'."
Write-Output ""
git submodule update --init --recursive
Push-Location
try {
Set-Location chia-blockchain-gui
$ErrorActionPreference = "SilentlyContinue"
npm install --loglevel=error
npm audit fix
npm run build
py ..\installhelper.py
Write-Output ""
Write-Output "Chia blockchain Install-gui.ps1 completed."
Write-Output ""
Write-Output "Type 'cd chia-blockchain-gui' and then 'npm run electron' to start the GUI."
} finally {
Pop-Location
}