-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re{build,pack} node-usb|lzma-native for arm*
- Loading branch information
Showing
6 changed files
with
23,070 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ inputs: | |
default: "[email protected]" | ||
NODE_VERSION: | ||
type: string | ||
default: "14.x" | ||
default: "16.x" | ||
VERBOSE: | ||
type: string | ||
default: "true" | ||
|
@@ -173,6 +173,45 @@ runs: | |
--c.extraMetadata.analytics.mixpanel.token='balena-etcher' \ | ||
--c.extraMetadata.packageType="${target}" | ||
# FIXME: what abut macOS universal DMG packages? | ||
if ! [[ "$target" =~ dmg ]] && ! [[ "$arch" =~ universal ]]; then | ||
# fix pre-built binaries for ARM* and re{build,package} | ||
# https://github.com/Pi-Apps-Coders/files/blob/main/CompileCommands.md#balenaetcher | ||
# https://github.com/theofficialgman | ||
for arch in ${archs[*]}; do | ||
npm run flowzone-preinstall-${runner_os} | ||
if [[ "$arch" =~ arm ]]; then | ||
# correct the broken pre-built for the usb node module | ||
pushd node_modules/usb | ||
rm -rf prebuilds/linux-arm*/node.napi.armv*.node | ||
npm install && npm run prebuild && find prebuilds | ||
popd | ||
# correct the broken lzma-native package (they ship x86_64 binaries under the ARM64 name ): ) | ||
pushd node_modules/lzma-native | ||
npm install && npm run prebuild && find prebuilds | ||
popd | ||
# TBC: might need to do some hacking in here | ||
pushd node_modules/@ronomon/direct-io | ||
npm install && find . | ||
popd | ||
# now start probably won't work so we will just package and then you can test the appimage | ||
npm run webpack | ||
# re{build,package} | ||
ELECTRON_BUILDER_ARCHITECTURE=${arch} electron-builder \ | ||
electron-builder "--${ELECTRON_BUILDER_OS}" ${target} --${arch} \ | ||
--c.extraMetadata.analytics.sentry.token='${{ steps.sentry.outputs.dsn }}' \ | ||
--c.extraMetadata.analytics.mixpanel.token='balena-etcher' \ | ||
--c.extraMetadata.packageType="${target}" | ||
fi | ||
done | ||
fi | ||
find dist -type f -maxdepth 1 | ||
done | ||
|
@@ -188,6 +227,7 @@ runs: | |
# https://www.electron.build/#debug | ||
FPM_DEBUG: 1 | ||
DEBUG: electron-builder | ||
USE_SYSTEM_FPM: true | ||
|
||
# https://www.electron.build/auto-update.html#staged-rollouts | ||
- name: Configure staged rollout(s) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.