Skip to content

Commit

Permalink
re{build,pack} node-usb|lzma-native for arm*
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Dec 30, 2022
1 parent 9c050ab commit 028f679
Show file tree
Hide file tree
Showing 6 changed files with 23,070 additions and 89 deletions.
42 changes: 41 additions & 1 deletion .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
default: "[email protected]"
NODE_VERSION:
type: string
default: "14.x"
default: "16.x"
VERBOSE:
type: string
default: "true"
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
# --- custom environment
NODE_VERSION:
type: string
default: "14.x"
default: "16.x"
VERBOSE:
type: string
default: "true"
Expand Down
3 changes: 2 additions & 1 deletion lib/gui/app/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ const translation = {
autoUpdate: 'Auto-updates enabled',
settings: 'Settings',
systemInformation: 'System Information',
trimExtPartitions: 'Trim unallocated space on raw images (in ext-type partitions)',
trimExtPartitions:
'Trim unallocated space on raw images (in ext-type partitions)',
},
menu: {
edit: 'Edit',
Expand Down
Loading

0 comments on commit 028f679

Please sign in to comment.