Skip to content

Commit

Permalink
Merge pull request #383 from AllenInstitute/bugfix/macos-manual-build
Browse files Browse the repository at this point in the history
Update build process for MacOS desktop app
  • Loading branch information
aswallace authored Jan 9, 2025
2 parents 7688f94 + 1d416f7 commit 58d348c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dev-docs/04-versioning-and-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ builds of `packages/desktop`, prepare a draft Github release, and upload the bui
6) [Update the GitHub release](https://github.com/AllenInstitute/biofile-finder/releases) once the Github action in Step 4 is finished, manually edit the Github release which was drafted as part of Step 4. Format its release name with the date (consistent with other release names), add a description of the changes, and optionally
mark whether the release is "pre-release." If it is marked as "pre-release," it will not be accessible for download through the
Github pages site.
<!-- Added by Anya W 2025-01-07 -->
7) **Temporary workaround for MacOS** (as of Jan 2025): GitHub Actions currently builds .dmg files that don't work for x86 processors and that are interpreted as "damaged" by new MacOS versions. To get around this, follow the instructions below to [manually build executables](#manually-building-an-executable). You will need to do this separately for both arm64 and x86, and each build process **must be done on a machine that uses the correct processor** (e.g., on a computer with an Intel chip for the x86 build).
After building, change the .dmg name to match the current tag number and the processor that the build is for (e.g., `BioFile Finder-tag.number-arm64.dmg` or `BioFile Finder-tag.number-x86_64.dmg`), and upload these to the release page. You may need to delete existing .dmg files from the release if GitHub has already generated them automatically.
### Manually building an executable
If the build doesn't work (e.g., says it's damaged when downloaded from GitHub), change the `mac` build arch in `/desktop/package.json` from `"universal"` to whichever processor you're targeting (e.g., `"arm64"`).

## Manually building an executable
To manually build an executable for the desktop app, run the following from inside the `packages/desktop` directory:
```
npm run build-executable
Expand Down
5 changes: 4 additions & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
},
"mac": {
"darkModeSupport": false,
"target": "dmg"
"target": [{
"target": "dmg",
"arch": "universal"
}]
},
"win": {
"target": "portable"
Expand Down

0 comments on commit 58d348c

Please sign in to comment.