Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
add arm64 releases that can be built on amd64 to build:all; rewrite i…
Browse files Browse the repository at this point in the history
…nstructions in readme
  • Loading branch information
lsfxz committed Oct 2, 2021
1 parent de8b7bf commit f461fb2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
27 changes: 7 additions & 20 deletions README.md
Expand Up @@ -45,8 +45,6 @@ To determine where to install a dependency:

## Building

### Amd64

Build for all platforms:

- `yarn build:all`
Expand All @@ -57,25 +55,14 @@ or
- `yarn build mac`
- `yarn build snap`
- `yarn build windows`
- `yarn build appimage:arm64`
- `yarn build deb:arm64`

### Arm64

Building on amd64 machines is only possible with AppImage, Debian and universal "dir" targets.

`npm_config_target_arch=arm64` needs to be set as an environment variable before building (eg. with `export npm_config_target_arch=arm64`).
## Building natively on arm64

The required steps are, mostly analogous to the regular build / run process:

- `yarn setup`
- `yarn bundle:arm64`

Followed by any or all of the following:

- `yarn build:dir:arm64`
- `yarn build:appimage:arm64`
- `yarn build:deb:arm64`
Building arm64 releases on amd64 systems is only possible with AppImage, Debian and universal "dir" targets.

Building snap releases (or natively building the other release types natively on an arm64machine) requires some extra preparation.
Building arm64 releases natively on arm64 systems requires some additional preparation:

- `export npm_config_target_arch=arm64`
- `export npm_config_arch=arm64`
Expand All @@ -88,12 +75,12 @@ and making sure `$GEM_HOME/bin` is added to `$PATH`.

Snap releases also require a working snapcraft / `snapd` installation.

Building then follows the same steps as above:
Building can then be done by running:

- `yarn setup`
- `yarn bundle:arm64`

Then followed by either:
Followed by either:

- `yarn build:all:arm64`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -106,7 +106,7 @@
},
"scripts": {
"build": "yarn lint && yarn build:web && node scripts/build.mjs",
"build:all": "yarn bundle && electron-builder -wl --x64 --ia32 && yarn build:mac && yarn build:snap && yarn build:write-sums",
"build:all": "yarn bundle && electron-builder -wl --x64 --ia32 && yarn build:mac && yarn build:snap && yarn build:appimage:arm64 && yarn build:deb:arm64 && yarn build:write-sums",
"build:mac": "node scripts/build.mjs mac",
"build:snap": "node scripts/build.mjs snap",
"build:write-sums": "node scripts/sums.mjs",
Expand Down
4 changes: 2 additions & 2 deletions scripts/utils.mjs
Expand Up @@ -12,15 +12,15 @@ export async function getLatestBuiltFilesList() {
`standard-notes-${version}-linux-x86_64.AppImage`,
`standard-notes-${version}-linux-amd64.snap`,

`standard-notes-${version}-linux-arm64.deb`,
`standard-notes-${version}-linux-arm64.AppImage`,
`standard-notes-${version}-linux-arm64.snap`,
// `standard-notes-${version}-linux-arm64.deb`,

`standard-notes-${version}-win.exe`,
`standard-notes-${version}-win.exe.blockmap`,

'latest-linux-ia32.yml',
'latest-linux.yml',
'latest-linux-arm64.yml',
'latest-mac.yml',
'latest.yml',
'builder-effective-config.yaml',
Expand Down

0 comments on commit f461fb2

Please sign in to comment.