Clean up installers (#239)

* Clean up win, mac installers
* Build Catalina DMG on GitHub Actions
* gitignore dmg builds
* Manage mac artifacts
* Correct Mac artifact, temp disable azure pytest
* Re-enable pytest on azure pipeline
This commit is contained in:
Gene Hoffman 2020-05-23 13:41:19 -07:00 committed by wjblanke
parent a157054ece
commit e55a9fa1e5
7 changed files with 71 additions and 18 deletions

View File

@ -56,6 +56,19 @@ jobs:
run: |
./venv/bin/mypy src tests
- name: Build MacOS DMG in Catalina
if: startsWith(matrix.os, 'mac')
run: |
cd build_scripts
sh build_macos.sh
- name: Test blockchain code with pytest
run: |
./venv/bin/py.test tests -s -v
- name: Upload MacOS artifacts
if: startsWith(matrix.os, 'mac')
uses: actions/upload-artifact@v1
with:
name: Chia-MacOS-10.15-dmg
path: ${{ github.workspace }}/build_scripts/Chia.dmg

View File

@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
build:
name: Build Windows .msi
name: Build Windows Installer
runs-on: [windows-latest]
steps:
@ -18,19 +18,19 @@ jobs:
with:
python-version: "3.7"
- name: curl miniupnpc and setproctitle
- name: Run build_windows.ps1
working-directory: ${{ github.workspace }}\build_scripts
run: |
git config --global core.longpaths true
./build_windows.ps1
- name: Upload artifacts EXE
- name: Upload Windows exe's
uses: actions/upload-artifact@v1
with:
name: Windows-Exe
path: ${{ github.workspace }}\electron-react\Chia-win32-x64
- name: Upload artifacts
- name: Upload Installer to artifacts
uses: actions/upload-artifact@v1
with:
name: Windows-Installers

3
.gitignore vendored
View File

@ -32,6 +32,9 @@ chia-blockchain.tar.gz.tar.gz
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
build_scripts/*.dmg
build_scripts/build
# Installer logs
pip-log.txt

View File

@ -9,8 +9,8 @@ and this project does not yet adhere to [Semantic Versioning](https://semver.org
### Added
- Windows and MacOS now have one click installers that then send users to a GUI on both platforms to farm or use their wallets.
- You can see and control your farmer and harvester from the GUI on Windows, MacOS, and Linux.
- Windows and MacOS now have one click installers that then send users to a GUI on both platforms to farm or use their wallets. Windows is built on GitHub Actions and MacOS is also built on Azure Pipelines so as to build on Mojave.
- You can see and control your farmer, harvester, and plotter from the GUI on Windows, MacOS, and Linux.
- Create plots and see the plotting log from a GUI on Windows, MacOS, and Linux.
- You can now create or import private keys with a 24 word mnemonic, both in the UI and 'chia keys' command line.
- You can delete and change active keys from the GUI and cli.

View File

@ -71,7 +71,7 @@ steps:
- script: |
cd build_scripts
sh build_mac.sh
sh build_macos.sh
displayName: "Build DMG"
- task: PublishPipelineArtifact@1

View File

@ -1,14 +1,26 @@
#!/bin/bash
echo "Installing npm and electron packagers"
npm install electron-installer-dmg -g
npm install electron-packager -g
echo "Create dist/"
sudo rm -rf dist
mkdir dist
echo "Create executeables with pyinstaller"
pip install pyinstaller
sudo pyinstaller daemon.spec
cp -r dist/daemon ../electron-react
cd ..
cd electron-react
echo "npm build"
npm install
npm run build
electron-packager . Chia --overwrite --icon=./src/assets/img/chia.ico
mv Chia-darwin-x64 ../build_scripts/dist/
cd ../build_scripts
echo"Create .dmg"
electron-installer-dmg dist/Chia-darwin-x64/Chia.app Chia --overwrite
ls -l

View File

@ -2,38 +2,63 @@ cd ..
mkdir build_scripts\win_build
cd build_scripts\win_build
Write-Output " ---";
Write-Output "curl miniupnpc, setprotitle";
Write-Output " ---";
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
# C:\curl\curl.exe -OL --show-error --fail https://download.chia.net/simple/setproctitle/setproctitle-1.1.10-cp37-cp37m-win_amd64.whl
# C:\curl\curl.exe -OL --show-error --fail https://download.chia.net/simple/miniupnpc/miniupnpc-2.1-cp37-cp37m-win_amd64.whl
Write-Output "checkpoint 1";
Write-Output " ---";
Write-Output "Install pip/python prerequisites";
Write-Output " ---";
cd ..\..
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 . --wheel-dir=.\build_scripts\win_build .
Write-Output "checkpoint 2";
Write-Output " ---";
Write-Output "Build chia-blockchain wheels";
Write-Output " ---";
pip wheel --use-pep517 --only-binary cbor2 --extra-index-url https://download.chia.net/simple/ -f . --wheel-dir=.\build_scripts\win_build .
Write-Output " ---";
Write-Output "\Create venv - python3.7 or 3.8 is required in PATH";
Write-Output " ---";
python -m venv venv
. .\venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install pywin32 pyinstaller
Write-Output " ---";
Write-Output "Install chia-blockchain wheels into venv with install_win.py";
Write-Output " ---";
cd build_scripts
python install_win.py
Write-Output "checkpoint 3";
pip install pywin32
pip install pyinstaller
Write-Output " ---";
Write-Output "Use pyinstaller to create chia .exe's";
Write-Output " ---";
pyinstaller daemon_windows.spec
Write-Output "checkpoint 4";
Write-Output " ---";
Write-Output "Copy chia executables to electron-react/";
Write-Output " ---";
cp -r dist/daemon ../electron-react/
cd ../electron-react
Write-Output "checkpoint 5";
Write-Output " ---";
Write-Output "Prepare Electron package";
Write-Output " ---";
npm install --save-dev electron-winstaller
npm install -g electron-packager
npm install
Write-Output " ---";
Write-Output "Electron package Windows Installer";
Write-Output " ---";
npm run build
electron-packager . Chia --asar.unpack="**/daemon/**" --overwrite --icon=./src/assets/img/chia.ico
node winstaller.js
Write-Output " ---";
Write-Output "Windows Installer complete";
Write-Output " ---";