Skip to content

Commit

Permalink
Electron react (Chia-Network#226)
Browse files Browse the repository at this point in the history
* clean react
* add material ui
* add word list
* mnemonic v0
* jeepney backup
* keychain usage
* wallet api
* mnemonic ui
* mnemonics redux state
* handle exceptions correctly
* dashboard
* wallets
* get puzzle hash
* tx history
* sidebar
* start stop wallet node
* use existing mnemonics
* status info
* create cc wallet
* theme should be outside of switch
* create offer
* dbus alternative for linux
* key migration
* don't autocomplete, don't reset simulator db
* reset mnemonics
* Refactor keychain, and key migration
* Implement UI for changing keys
* Removing keys and mnemonic button
* Start making farmer and harvester RPCs
* start rpx for simulator
* Harvester and farmer websocket, and basic UI
* Plot display and deletion
* launch daemon on start
* State changes from full node, harvester, farmer, and full node ui improvements
* split balances in react
* pending change balance
* plotter
* dev config
* maintain connection / retry
* Remove electron-ui, and style fixes
* Better farmer and full node control
* Remove electron ui references
* Uncomment out starting the dameon
* Remove timelord tab, and change full node style
* Clean up new wallet login
* Refactor RPCs
* Now that the GH runner uses python 3.7.7 - use for windows installer
* add balance split to coloured coin wallet
* spendable balance fix
* Import private key from UI fix
* mac build/installer

Co-authored-by: Mariano Sorgente <[email protected]>
Co-authored-by: Lipa Long <[email protected]>
Co-authored-by: Gene Hoffman <[email protected]>
  • Loading branch information
4 people authored and wjblanke committed Jun 1, 2020
1 parent f258d70 commit b964d86
Show file tree
Hide file tree
Showing 205 changed files with 32,431 additions and 13,376 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,54 @@ jobs:
runs-on: [windows-latest]

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- uses: actions/setup-python@v1
name: Install Python 3.7
with:
python-version: '3.7'

- name: curl miniupnpc and setproctitle
working-directory: ${{ github.workspace }}\electron-wix\blockchain
run: |
curl -OL --show-error --fail https://download.chia.net/simple/miniupnpc/miniupnpc-2.1-cp37-cp37m-win_amd64.whl
curl -OL --show-error --fail https://download.chia.net/simple/setproctitle/setproctitle-1.1.10-cp37-cp37m-win_amd64.whl
- name: Collect and Create wheels for chia-blockchain
run: |
python -m pip install --upgrade pip
pip install pep517 wheel
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ -f ${{ github.workspace }} --wheel-dir=${{ github.workspace }}\electron-wix\blockchain ${{ github.workspace }}\.
- name: Install electron-packager
run: |
npm install electron-packager -g
- name: npm install
working-directory: ${{ github.workspace }}\electron-ui
run: |
npm install --runtime=electron --target=1.7.6
- name: curl Visual C++ 2019 redistributable # Windows has curl natively
working-directory: ${{ github.workspace }}\electron-wix\prerequisites\
run: curl -OL --show-error --fail https://aka.ms/vs/16/release/vc_redist.x64.exe

- name: curl Python 3.7.6 Installer
working-directory: ${{ github.workspace }}\electron-wix\prerequisites\
run: curl -OL --show-error --fail https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe

- name: Build Windows installer with Wix
env:
version: 0.1.13 # TODO Need to create this from setuptools_scm for Windows
working-directory: ${{ github.workspace }}\electron-wix
run: |
.\rebuild-all.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: Windows-Installers
path: ${{ github.workspace }}\electron-wix\final
- uses: actions/checkout@v1
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- uses: actions/setup-python@v1
name: Install Python 3.7
with:
python-version: "3.7"

- name: curl miniupnpc and setproctitle
working-directory: ${{ github.workspace }}\electron-wix\blockchain
run: |
curl -OL --show-error --fail https://download.chia.net/simple/miniupnpc/miniupnpc-2.1-cp37-cp37m-win_amd64.whl
curl -OL --show-error --fail https://download.chia.net/simple/setproctitle/setproctitle-1.1.10-cp37-cp37m-win_amd64.whl
- name: Collect and Create wheels for chia-blockchain
run: |
python -m pip install --upgrade pip
pip install pep517 wheel
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ -f ${{ github.workspace }} --wheel-dir=${{ github.workspace }}\electron-wix\blockchain ${{ github.workspace }}\.
- name: Install electron-packager
run: |
npm install electron-packager -g
- name: npm install
working-directory: ${{ github.workspace }}\electron-react
run: |
npm install --runtime=electron --target=1.7.6
- name: curl Visual C++ 2019 redistributable # Windows has curl natively
working-directory: ${{ github.workspace }}\electron-wix\prerequisites\
run: curl -OL --show-error --fail https://aka.ms/vs/16/release/vc_redist.x64.exe

- name: curl Python 3.7.7 Installer
working-directory: ${{ github.workspace }}\electron-wix\prerequisites\
run: curl -OL --show-error --fail https://www.python.org/ftp/python/3.7.7/python-3.7.7-amd64.exe

- name: Build Windows installer with Wix
env:
version: 0.1.13 # TODO Need to create this from setuptools_scm for Windows
working-directory: ${{ github.workspace }}\electron-wix
run: |
.\rebuild-all.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: Windows-Installers
path: ${{ github.workspace }}\electron-wix\final
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ chia-blockchain.tar.gz
# Timelord utilities
vdf_bench

# Electron wallet node modules
src/wallet/electron/node_modules/

# Node modules
**/node_modules

# Offer Files
*.offer

# Dev config react
electron-react/src/dev_config.js
# React built app
electron-react/build
106 changes: 88 additions & 18 deletions CHANGELOG.md

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,71 +6,71 @@
trigger:
branches:
include:
- '*'
- "*"
#- master
#- dev

pool:
vmImage: 'macOS-10.14'
vmImage: "macOS-10.14"
strategy:
matrix:
Python37:
python.version: '3.7'
python.version: "3.7"
# Python38:
# python.version: '3.8' # Disabled 3.8 because artifact names conflict
# Also, installer can target one verison

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"

# since we're installing miniupnpc & setproctitle below,
# only cbor2 will end up in wheels/
- script: |
python -m pip install --upgrade pip
pip install wheel pep517
node -v
npm cache clean -f
npm install -g n
sudo n stable
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 cbor2==5.1.0
cd ./electron-ui
npm install
displayName: 'Install dependencies'
# since we're installing miniupnpc & setproctitle below,
# only cbor2 will end up in wheels/
- script: |
python -m pip install --upgrade pip
pip install wheel pep517
node -v
npm cache clean -f
npm install -g n
sudo n stable
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 cbor2==5.1.0
cd ./electron-react
npm install
displayName: "Install dependencies"
- script: |
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ --wheel-dir=wheels .
displayName: 'Build wheels'
- script: |
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ --wheel-dir=wheels .
displayName: "Build wheels"
- script: |
cd ./electron-ui
npm install
displayName: 'Build Electron UI'
- script: |
cd ./electron-react
npm install
displayName: "Build Electron UI"
# Using wheels and release style install so no sh install.sh
- script: |
pip install .
displayName: 'Install wheels'
# Using wheels and release style install so no sh install.sh
- script: |
pip install .
displayName: "Install wheels"
# install-timelord.sh usually wants venv, but this clean runner is the "venv"
- script: |
brew install boost
sh install-timelord.sh
displayName: 'Install timelord'
# install-timelord.sh usually wants venv, but this clean runner is the "venv"
- script: |
brew install boost
sh install-timelord.sh
displayName: "Install timelord"
- script: |
python -m pip install -r requirements-dev.txt
displayName: 'Install dev dependencies'
- script: |
python -m pip install -r requirements-dev.txt
displayName: "Install dev dependencies"
- script: |
pip install pytest pytest-azurepipelines
py.test tests -s -v
displayName: 'pytest'
- script: |
pip install pytest pytest-azurepipelines
py.test tests -s -v
displayName: "pytest"
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/wheels
artifactName: MacOS-wheels
displayName: 'Upload MacOS wheels'
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/wheels
artifactName: MacOS-wheels
displayName: "Upload MacOS wheels"
13 changes: 13 additions & 0 deletions build_scripts/build_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
npm install electron-installer-dmg -g
npm install electron-packager -g
sudo rm -rf dist
mkdir dist
sudo pyinstaller daemon.spec
cp -r dist/daemon ../electron-react
cd ..
cd electron-react
npm run build
electron-packager . chia --overwrite
mv chia-darwin-x64 ../build_scripts/dist/
cd ../build_scripts
electron-installer-dmg dist/chia-darwin-x64/chia.app Chia
Empty file added build_scripts/build_windows.ps1
Empty file.
Loading

0 comments on commit b964d86

Please sign in to comment.