chia-blockchain/Install-gui.ps1
Zlatko Fedor c6b5feaf3b
replaced npm install => npm ci (#9717)
* replaced npm install => npm ci

* Made global npm modules be executed as local npm modules (#9740)

* Made global npm modules be executed as local npm modules

* Fixed a typo and added empty index.js for lgtm analysis

* Tried to fix pre-commit CI error

* Fixed a windows build file issue

* Fixed a rpm build script issue

* Removed unnecessary index.js which were introduced just to pass LGTM analysis

* Set nodejs version to 16 for arm64 build

* Removed unnecessary nodejs install action

Co-authored-by: ChiaMineJP <admin@chiamine.jp>
2022-01-19 16:52:20 -08:00

37 lines
965 B
PowerShell

$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 ci --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
}