mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
Powershell scripts to support installation from source. (#8651)
* Powershell scripts to support installation from source.
* Update Install-gui.ps1
* Update Install-gui.ps1
* Linter fixes
* Revert "Linter fixes"
This reverts commit 8c4e073671.
* Linter fixes
* Minor textual changes. Updated encoding/line-endings to UTF-8/LF. Git on Windows should autocrlf as necessary.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
$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
|
||||
|
||||
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."
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if ([Environment]::Is64BitOperatingSystem -eq $false)
|
||||
{
|
||||
Write-Output "Chia requires a 64-bit Windows installation"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
if ((Get-Item "$env:windir\System32\msvcp140.dll").Exists -eq $false)
|
||||
{
|
||||
Write-Output "Unable to find Visual C++ Runtime DLLs"
|
||||
Write-Output ""
|
||||
Write-Output "Download and install the Visual C++ Redistributable for Visual Studio 2019 package from:"
|
||||
Write-Output "https://visualstudio.microsoft.com/downloads/#microsoft-visual-c-redistributable-for-visual-studio-2019"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
if ($null -eq (Get-Command git -ErrorAction SilentlyContinue))
|
||||
{
|
||||
Write-Output "Unable to find git"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
git submodule update --init mozilla-ca
|
||||
|
||||
if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
|
||||
{
|
||||
Write-Output "Unable to find py"
|
||||
Write-Output "Note the check box during installation of Python to install the Python Launcher for Windows."
|
||||
Write-Output ""
|
||||
Write-Output "https://docs.python.org/3/using/windows.html#installation-steps"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$pythonVersion = (py --version).split(" ")[1]
|
||||
if ([version]$pythonVersion -lt [version]"3.7.0")
|
||||
{
|
||||
Write-Output "Found Python version:" $pythonVersion
|
||||
Write-Output "Installation requires Python 3.7 or later"
|
||||
Exit 1
|
||||
}
|
||||
Write-Output "Python version is:" $pythonVersion
|
||||
|
||||
py -m venv venv
|
||||
.\venv\Scripts\Activate.ps1
|
||||
|
||||
py -m pip install pip --upgrade
|
||||
pip install --upgrade setuptools
|
||||
pip install --upgrade wheel
|
||||
pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.2.2
|
||||
pip install --editable . --extra-index-url https://pypi.chia.net/simple/
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "Chia blockchain .\Install.ps1 complete."
|
||||
Write-Output "For assistance join us on Keybase in the #support chat channel:"
|
||||
Write-Output "https://keybase.io/team/chia_network.public"
|
||||
Write-Output ""
|
||||
Write-Output "Try the Quick Start Guide to running chia-blockchain:"
|
||||
Write-Output "https://github.com/Chia-Network/chia-blockchain/wiki/Quick-Start-Guide"
|
||||
Write-Output ""
|
||||
Write-Output "To install the GUI type '.\Install-gui.ps1' after '.\venv\scripts\Activate.ps1'."
|
||||
Write-Output ""
|
||||
Write-Output "Type '.\venv\Scripts\Activate.ps1' and then 'chia init' to begin."
|
||||
Reference in New Issue
Block a user