mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Installer Fixes - New UI (#9506)
* Update to node 16 * Install lerna globally. Lerna clean, and comment out audit:fix for now since it doesn't work with Lerna (see https://github.com/lerna/lerna/issues/1663) * Global lerna in build mac as well * Test building the gui package, instead of from the root * Build installer from the gui package and copy daemon folder to the correct place * Pass executable name / options.name to linux installers * Move installers to the root of blockchain-gui * Fix winstaller * Latest NEXT * Update to latest UI * Copy signing cert for windows to proper location
This commit is contained in:
parent
9217993282
commit
313cf27eee
@ -141,10 +141,10 @@ jobs:
|
||||
run: |
|
||||
sh install.sh
|
||||
|
||||
- name: Setup Node 12.x
|
||||
- name: Setup Node 16.x
|
||||
uses: actions/setup-node@v2.4.1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Add jq
|
||||
run: |
|
||||
|
4
.github/workflows/build-macos-installer.yml
vendored
4
.github/workflows/build-macos-installer.yml
vendored
@ -117,10 +117,10 @@ jobs:
|
||||
run: |
|
||||
sh install.sh
|
||||
|
||||
- name: Setup Node 14.x
|
||||
- name: Setup Node 16.x
|
||||
uses: actions/setup-node@v2.4.1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Build MacOS DMG in Catalina
|
||||
env:
|
||||
|
@ -106,9 +106,9 @@ jobs:
|
||||
run: |
|
||||
arch -arm64 sh install.sh
|
||||
|
||||
- name: Install node 14.x
|
||||
- name: Install node 16.x
|
||||
run: |
|
||||
arch -arm64 brew install node@14
|
||||
arch -arm64 brew install node@16
|
||||
|
||||
- name: Build MacOS DMG
|
||||
env:
|
||||
@ -116,7 +116,7 @@ jobs:
|
||||
APPLE_NOTARIZE_USERNAME: "${{ secrets.APPLE_NOTARIZE_USERNAME }}"
|
||||
APPLE_NOTARIZE_PASSWORD: "${{ secrets.APPLE_NOTARIZE_PASSWORD }}"
|
||||
run: |
|
||||
export PATH=$(brew --prefix node@14)/bin:$PATH
|
||||
export PATH=$(brew --prefix node@16)/bin:$PATH
|
||||
. ./activate
|
||||
cd ./chia-blockchain-gui
|
||||
arch -arm64 git status
|
||||
|
@ -65,6 +65,11 @@ jobs:
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Setup Node 16.x
|
||||
uses: actions/setup-node@v2.4.1
|
||||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Test for secrets access
|
||||
id: check_secrets
|
||||
shell: bash
|
||||
|
@ -73,8 +73,8 @@ steps:
|
||||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '14.x'
|
||||
displayName: "Setup Node 14.x"
|
||||
versionSpec: '16.x'
|
||||
displayName: "Setup Node 16.x"
|
||||
|
||||
- bash: |
|
||||
. ./activate
|
||||
|
@ -26,6 +26,7 @@ echo "Chia Installer Version is: $CHIA_INSTALLER_VERSION"
|
||||
echo "Installing npm and electron packagers"
|
||||
npm install electron-packager -g
|
||||
npm install electron-installer-debian -g
|
||||
npm install lerna -g
|
||||
|
||||
echo "Create dist/"
|
||||
rm -rf dist
|
||||
@ -41,13 +42,15 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
cp -r dist/daemon ../chia-blockchain-gui
|
||||
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
|
||||
cd .. || exit
|
||||
cd chia-blockchain-gui || exit
|
||||
|
||||
echo "npm build"
|
||||
lerna clean -y
|
||||
npm install
|
||||
npm audit fix
|
||||
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
||||
# npm audit fix
|
||||
npm run build
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
@ -55,13 +58,16 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
# Change to the gui package
|
||||
cd packages/gui || exit
|
||||
|
||||
# sets the version for chia-blockchain in package.json
|
||||
cp package.json package.json.orig
|
||||
jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json && mv temp.json package.json
|
||||
|
||||
electron-packager . chia-blockchain --asar.unpack="**/daemon/**" --platform=linux \
|
||||
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
|
||||
--appVersion=$CHIA_INSTALLER_VERSION
|
||||
--appVersion=$CHIA_INSTALLER_VERSION --executable-name=chia-blockchain
|
||||
LAST_EXIT_CODE=$?
|
||||
|
||||
# reset the package.json to the original
|
||||
@ -72,14 +78,14 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
mv $DIR_NAME ../build_scripts/dist/
|
||||
cd ../build_scripts || exit
|
||||
mv $DIR_NAME ../../../build_scripts/dist/
|
||||
cd ../../../build_scripts || exit
|
||||
|
||||
echo "Create chia-$CHIA_INSTALLER_VERSION.deb"
|
||||
rm -rf final_installer
|
||||
mkdir final_installer
|
||||
electron-installer-debian --src dist/$DIR_NAME/ --dest final_installer/ \
|
||||
--arch "$PLATFORM" --options.version $CHIA_INSTALLER_VERSION
|
||||
--arch "$PLATFORM" --options.version $CHIA_INSTALLER_VERSION --options.bin chia-blockchain --options.name chia-blockchain
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
echo >&2 "electron-installer-debian failed!"
|
||||
|
@ -27,6 +27,7 @@ echo "Chia Installer Version is: $CHIA_INSTALLER_VERSION"
|
||||
echo "Installing npm and electron packagers"
|
||||
npm install electron-packager -g
|
||||
npm install electron-installer-redhat -g
|
||||
npm install lerna -g
|
||||
|
||||
echo "Create dist/"
|
||||
rm -rf dist
|
||||
@ -42,13 +43,15 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
cp -r dist/daemon ../chia-blockchain-gui
|
||||
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
|
||||
cd .. || exit
|
||||
cd chia-blockchain-gui || exit
|
||||
|
||||
echo "npm build"
|
||||
lerna clean -y
|
||||
npm install
|
||||
npm audit fix
|
||||
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
||||
# npm audit fix
|
||||
npm run build
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
@ -56,13 +59,16 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
# Change to the gui package
|
||||
cd packages/gui || exit
|
||||
|
||||
# sets the version for chia-blockchain in package.json
|
||||
cp package.json package.json.orig
|
||||
jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json && mv temp.json package.json
|
||||
|
||||
electron-packager . chia-blockchain --asar.unpack="**/daemon/**" --platform=linux \
|
||||
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
|
||||
--appVersion=$CHIA_INSTALLER_VERSION
|
||||
--appVersion=$CHIA_INSTALLER_VERSION --executable-name=chia-blockchain
|
||||
LAST_EXIT_CODE=$?
|
||||
|
||||
# reset the package.json to the original
|
||||
@ -73,8 +79,8 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
mv $DIR_NAME ../build_scripts/dist/
|
||||
cd ../build_scripts || exit
|
||||
mv $DIR_NAME ../../../build_scripts/dist/
|
||||
cd ../../../build_scripts || exit
|
||||
|
||||
if [ "$REDHAT_PLATFORM" = "x86_64" ]; then
|
||||
echo "Create chia-blockchain-$CHIA_INSTALLER_VERSION.rpm"
|
||||
@ -98,7 +104,7 @@ if [ "$REDHAT_PLATFORM" = "x86_64" ]; then
|
||||
|
||||
electron-installer-redhat --src dist/$DIR_NAME/ --dest final_installer/ \
|
||||
--arch "$REDHAT_PLATFORM" --options.version $CHIA_INSTALLER_VERSION \
|
||||
--license ../LICENSE
|
||||
--license ../LICENSE --options.bin chia-blockchain --options.name chia-blockchain
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
echo >&2 "electron-installer-redhat failed!"
|
||||
|
@ -22,6 +22,7 @@ npm install electron-installer-dmg -g
|
||||
npm install electron-packager@15.4.0 -g
|
||||
npm install electron-osx-sign@v0.5.0 -g
|
||||
npm install notarize-cli -g
|
||||
npm install lerna -g
|
||||
|
||||
echo "Create dist/"
|
||||
sudo rm -rf dist
|
||||
@ -36,13 +37,15 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
echo >&2 "pyinstaller failed!"
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
cp -r dist/daemon ../chia-blockchain-gui
|
||||
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
|
||||
cd .. || exit
|
||||
cd chia-blockchain-gui || exit
|
||||
|
||||
echo "npm build"
|
||||
lerna clean -y
|
||||
npm install
|
||||
npm audit fix
|
||||
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
||||
# npm audit fix
|
||||
npm run build
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
@ -50,6 +53,9 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
# Change to the gui package
|
||||
cd packages/gui || exit
|
||||
|
||||
# sets the version for chia-blockchain in package.json
|
||||
brew install jq
|
||||
cp package.json package.json.orig
|
||||
@ -80,8 +86,8 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
mv Chia-darwin-x64 ../build_scripts/dist/
|
||||
cd ../build_scripts || exit
|
||||
mv Chia-darwin-x64 ../../../build_scripts/dist/
|
||||
cd ../../../build_scripts || exit
|
||||
|
||||
DMG_NAME="Chia-$CHIA_INSTALLER_VERSION.dmg"
|
||||
echo "Create $DMG_NAME"
|
||||
|
@ -22,6 +22,7 @@ npm install electron-installer-dmg -g
|
||||
npm install electron-packager@15.4.0 -g
|
||||
npm install electron-osx-sign@v0.5.0 -g
|
||||
npm install notarize-cli -g
|
||||
npm install lerna -g
|
||||
|
||||
echo "Create dist/"
|
||||
sudo rm -rf dist
|
||||
@ -38,13 +39,15 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
echo >&2 "pyinstaller failed!"
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
cp -r dist/daemon ../chia-blockchain-gui
|
||||
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
|
||||
cd .. || exit
|
||||
cd chia-blockchain-gui || exit
|
||||
|
||||
echo "npm build"
|
||||
lerna clean -y
|
||||
npm install
|
||||
npm audit fix
|
||||
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
||||
# npm audit fix
|
||||
npm run build
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
@ -52,6 +55,9 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
# Change to the gui package
|
||||
cd packages/gui || exit
|
||||
|
||||
# sets the version for chia-blockchain in package.json
|
||||
brew install jq
|
||||
cp package.json package.json.orig
|
||||
@ -82,8 +88,8 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
exit $LAST_EXIT_CODE
|
||||
fi
|
||||
|
||||
mv Chia-darwin-arm64 ../build_scripts/dist/
|
||||
cd ../build_scripts || exit
|
||||
mv Chia-darwin-arm64 ../../../build_scripts/dist/
|
||||
cd ../../../build_scripts || exit
|
||||
|
||||
DMG_NAME="Chia-$CHIA_INSTALLER_VERSION-arm64.dmg"
|
||||
echo "Create $DMG_NAME"
|
||||
|
@ -86,8 +86,10 @@ pyinstaller --log-level INFO $SPEC_FILE
|
||||
Write-Output " ---"
|
||||
Write-Output "Copy chia executables to chia-blockchain-gui\"
|
||||
Write-Output " ---"
|
||||
Copy-Item "dist\daemon" -Destination "..\chia-blockchain-gui\" -Recurse
|
||||
Copy-Item "dist\daemon" -Destination "..\chia-blockchain-gui\packages\gui\" -Recurse
|
||||
Set-Location -Path "..\chia-blockchain-gui" -PassThru
|
||||
# We need the code sign cert in the gui subdirectory so we can actually sign the UI package
|
||||
Copy-Item "win_code_sign_cert.p12" -Destination "packages\gui\"
|
||||
|
||||
git status
|
||||
|
||||
@ -95,10 +97,13 @@ Write-Output " ---"
|
||||
Write-Output "Prepare Electron packager"
|
||||
Write-Output " ---"
|
||||
$Env:NODE_OPTIONS = "--max-old-space-size=3000"
|
||||
npm install --save-dev electron-winstaller
|
||||
npm install -g electron-packager
|
||||
npm install -g lerna
|
||||
|
||||
lerna clean -y
|
||||
npm install
|
||||
npm audit fix
|
||||
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
|
||||
# npm audit fix
|
||||
|
||||
git status
|
||||
|
||||
@ -110,6 +115,9 @@ If ($LastExitCode -gt 0){
|
||||
Throw "npm run build failed!"
|
||||
}
|
||||
|
||||
# Change to the GUI directory
|
||||
Set-Location -Path "packages\gui" -PassThru
|
||||
|
||||
Write-Output " ---"
|
||||
Write-Output "Increase the stack for chia command for (chia plots create) chiapos limitations"
|
||||
# editbin.exe needs to be in the path
|
||||
@ -154,6 +162,12 @@ If ($env:HAS_SECRET) {
|
||||
|
||||
git status
|
||||
|
||||
Write-Output " ---"
|
||||
Write-Output "Moving final installers to expected location"
|
||||
Write-Output " ---"
|
||||
Copy-Item ".\Chia-win32-x64" -Destination "$env:GITHUB_WORKSPACE\chia-blockchain-gui\" -Recurse
|
||||
Copy-Item ".\release-builds" -Destination "$env:GITHUB_WORKSPACE\chia-blockchain-gui\" -Recurse
|
||||
|
||||
Write-Output " ---"
|
||||
Write-Output "Windows Installer complete"
|
||||
Write-Output " ---"
|
||||
|
@ -18,7 +18,7 @@ cd "$PWD" || true
|
||||
|
||||
# Do our best to get rid of any globally installed notarize-cli versions so the version in the current build script is
|
||||
# installed without conflicting with the other version that might be installed
|
||||
PATH=$(brew --prefix node@14)/bin:$PATH || true
|
||||
PATH=$(brew --prefix node@16)/bin:$PATH || true
|
||||
export PATH
|
||||
npm uninstall -g notarize-cli || true
|
||||
npm uninstall -g @chia-network/notarize-cli || true
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2c236bf0f4a32b718ec6f8a243e07736f7a555f3
|
||||
Subproject commit b8273d970e4a7e36f6cf584e3354f5bf9f035408
|
Loading…
Reference in New Issue
Block a user