mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-24 16:26:02 +03:00
move electron build config to build_scripts/electron-builder.json
(#17007)
This commit is contained in:
parent
99ba21ab2b
commit
2ed94c31c9
@ -188,7 +188,9 @@ jobs:
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: spec
|
||||
path: build_scripts/dist/*.spec
|
||||
path: |
|
||||
build_scripts/dist/cli.spec
|
||||
build_scripts/dist/gui.spec
|
||||
|
||||
- name: Upload Linux artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -93,21 +93,25 @@ if [ "$PLATFORM" = "arm64" ]; then
|
||||
echo USE_SYSTEM_FPM=true npx electron-builder build --linux deb --arm64 \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.deb.packageName="chia-blockchain"
|
||||
--config.deb.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
USE_SYSTEM_FPM=true npx electron-builder build --linux deb --arm64 \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.deb.packageName="chia-blockchain"
|
||||
--config.deb.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
LAST_EXIT_CODE=$?
|
||||
else
|
||||
echo electron-builder build --linux deb --x64 \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.deb.packageName="chia-blockchain"
|
||||
--config.deb.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
npx electron-builder build --linux deb --x64 \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.deb.packageName="chia-blockchain"
|
||||
--config.deb.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
LAST_EXIT_CODE=$?
|
||||
fi
|
||||
ls -l dist/linux*-unpacked/resources
|
||||
|
@ -91,7 +91,7 @@ cp package.json package.json.orig
|
||||
jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json && mv temp.json package.json
|
||||
|
||||
export FPM_EDITOR="cat >../../../build_scripts/dist/gui.spec <"
|
||||
jq '.build.rpm.fpm |= . + ["--edit"]' package.json > temp.json && mv temp.json package.json
|
||||
jq '.rpm.fpm |= . + ["--edit"]' ../../../build_scripts/electron-builder.json > temp.json && mv temp.json ../../../build_scripts/electron-builder.json
|
||||
|
||||
echo "Building Linux(rpm) Electron app"
|
||||
OPT_ARCH="--x64"
|
||||
@ -102,11 +102,13 @@ PRODUCT_NAME="chia"
|
||||
echo npx electron-builder build --linux rpm "${OPT_ARCH}" \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="${PRODUCT_NAME}" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.rpm.packageName="chia-blockchain"
|
||||
--config.rpm.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
npx electron-builder build --linux rpm "${OPT_ARCH}" \
|
||||
--config.extraMetadata.name=chia-blockchain \
|
||||
--config.productName="${PRODUCT_NAME}" --config.linux.desktop.Name="Chia Blockchain" \
|
||||
--config.rpm.packageName="chia-blockchain"
|
||||
--config.rpm.packageName="chia-blockchain" \
|
||||
--config ../../../build_scripts/electron-builder.json
|
||||
LAST_EXIT_CODE=$?
|
||||
ls -l dist/linux*-unpacked/resources
|
||||
|
||||
|
@ -63,8 +63,8 @@ else
|
||||
echo "Not on ci or no secrets so not signing"
|
||||
export CSC_IDENTITY_AUTO_DISCOVERY=false
|
||||
fi
|
||||
echo npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11"
|
||||
npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11"
|
||||
echo npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11" --config ../../../build_scripts/electron-builder.json
|
||||
npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11" --config ../../../build_scripts/electron-builder.json
|
||||
LAST_EXIT_CODE=$?
|
||||
ls -l dist/mac*/chia.app/Contents/Resources/app.asar
|
||||
|
||||
|
@ -68,7 +68,7 @@ Write-Output " ---"
|
||||
|
||||
Write-Output " ---"
|
||||
Write-Output "electron-builder create package directory"
|
||||
npx electron-builder build --win --x64 --config.productName="Chia" --dir
|
||||
npx electron-builder build --win --x64 --config.productName="Chia" --dir --config ../../../build_scripts/electron-builder.json
|
||||
Get-ChildItem dist\win-unpacked\resources
|
||||
Write-Output " ---"
|
||||
|
||||
@ -88,7 +88,7 @@ If ($env:HAS_SIGNING_SECRET) {
|
||||
|
||||
Write-Output " ---"
|
||||
Write-Output "electron-builder create installer"
|
||||
npx electron-builder build --win --x64 --config.productName="Chia" --pd ".\dist\win-unpacked"
|
||||
npx electron-builder build --win --x64 --config.productName="Chia" --pd ".\dist\win-unpacked" --config ../../../build_scripts/electron-builder.json
|
||||
Write-Output " ---"
|
||||
|
||||
If ($env:HAS_SIGNING_SECRET) {
|
||||
|
112
build_scripts/electron-builder.json
Normal file
112
build_scripts/electron-builder.json
Normal file
@ -0,0 +1,112 @@
|
||||
{
|
||||
"productName": "chia",
|
||||
"appId": "net.chia.blockchain",
|
||||
"asar": true,
|
||||
"asarUnpack": "**/daemon/**",
|
||||
"npmRebuild": false,
|
||||
"files": [
|
||||
"build",
|
||||
"daemon",
|
||||
"!node_modules",
|
||||
"!src",
|
||||
"!public"
|
||||
],
|
||||
"protocols": [
|
||||
{
|
||||
"name": "Chia URL",
|
||||
"schemes": [
|
||||
"chia"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Chia XCH Address",
|
||||
"schemes": [
|
||||
"xch"
|
||||
]
|
||||
}
|
||||
],
|
||||
"win": {
|
||||
"target": "nsis",
|
||||
"icon": "src/assets/img/chia.ico",
|
||||
"timeStampServer": "http://timestamp.comodoca.com",
|
||||
"executableName": "Chia"
|
||||
},
|
||||
"nsis": {
|
||||
"artifactName": "ChiaSetup-${env.CHIA_INSTALLER_VERSION}.exe",
|
||||
"oneClick": false,
|
||||
"deleteAppDataOnUninstall": true,
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"license": "../../LICENSE",
|
||||
"include": "installer.nsh"
|
||||
},
|
||||
"mac": {
|
||||
"executableName": "Chia",
|
||||
"artifactName": "${productName}-${env.CHIA_INSTALLER_VERSION}.${ext}",
|
||||
"category": "public.app-category.finance",
|
||||
"target": "dmg",
|
||||
"icon": "src/assets/img/chia.icns",
|
||||
"entitlements": "entitlements.mac.plist",
|
||||
"provisioningProfile": "chiablockchain.provisionprofile",
|
||||
"darkModeSupport": true,
|
||||
"hardenedRuntime": true,
|
||||
"gatekeeperAssess": false
|
||||
},
|
||||
"dmg": {
|
||||
"background": "../../../build_scripts/assets/dmg/background.tiff",
|
||||
"iconSize": 80,
|
||||
"contents": [
|
||||
{
|
||||
"x": 466,
|
||||
"y": 280,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
},
|
||||
{
|
||||
"x": 192,
|
||||
"y": 280,
|
||||
"type": "file"
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"width": 658,
|
||||
"height": 498
|
||||
}
|
||||
},
|
||||
"linux": {
|
||||
"artifactName": "${productName}-${env.CHIA_INSTALLER_VERSION}.${ext}",
|
||||
"icon": "src/assets/img/chia.icns"
|
||||
},
|
||||
"deb": {
|
||||
"afterInstall": "../../../build_scripts/assets/deb/postinst.sh",
|
||||
"afterRemove": "../../../build_scripts/assets/deb/prerm.sh",
|
||||
"depends": [
|
||||
"libgbm1",
|
||||
"libgtk-3-0",
|
||||
"libnotify4",
|
||||
"libnss3",
|
||||
"libxss1",
|
||||
"libxtst6",
|
||||
"xdg-utils",
|
||||
"libatspi2.0-0",
|
||||
"libuuid1",
|
||||
"libsecret-1-0"
|
||||
]
|
||||
},
|
||||
"rpm": {
|
||||
"afterInstall": "../../../build_scripts/assets/rpm/postinst.sh",
|
||||
"afterRemove": "../../../build_scripts/assets/rpm/prerm.sh",
|
||||
"fpm": [
|
||||
"--rpm-rpmbuild-define=_build_id_links none",
|
||||
"--rpm-rpmbuild-define=_enable_debug_package 0",
|
||||
"--rpm-rpmbuild-define=debug_package %{nil}",
|
||||
"--rpm-rpmbuild-define=__os_install_post /usr/lib/rpm/brp-compress %{nil}",
|
||||
"--rpm-attr=4755,root,root:/opt/chia/chrome-sandbox",
|
||||
"--rpm-tag=Recommends: libxcrypt-compat",
|
||||
"--directories=/opt/chia",
|
||||
"--rpm-tag=Requires(pre): findutils",
|
||||
"--before-install=../../../build_scripts/assets/rpm/before-install.sh"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user