feat: multi-platform multi-arch support (arm64, amd64, macOS Universal)
#2,681 创建于 2023年10月18日
描述
This issue is intended to track the work and requests for distributing IPFS-Desktop across multiple architectures on multiple platforms (arm64, amd64, macOS Universal, and any others that pop up).
We have received requests for supporting the following currently unsupported builds:
| Platform | Architecture | Native build needed | Kubo supported? | Related Issues |
|---|---|---|---|---|
| macOS | arm64 | Darwin arm64 | Yes - https://dist.ipfs.tech/kubo/v0.23.0/kubo_v0.23.0_darwin-arm64.tar.gz | https://github.com/ipfs/ipfs-desktop/issues/1827, https://github.com/ipfs/ipfs-desktop/pull/1856 |
| macOS | Universal | Darwin arm64 + Darwin amd64 | Not directly, need to explicitly build universal build that wraps both. | https://github.com/ipfs/ipfs-desktop/issues/1827, https://github.com/ipfs/ipfs-desktop/pull/1856 |
| Raspberry Pi | arm64 | Linux arm64 | Yes - https://dist.ipfs.tech/kubo/v0.23.0/kubo_v0.23.0_linux-arm64.tar.gz | https://github.com/ipfs/ipfs-desktop/issues/165 |
| Windows | arm64 | Windows arm64 | Yes - https://dist.ipfs.tech/kubo/v0.23.0/kubo_v0.23.0_windows-arm64.zip | https://github.com/ipfs/ipfs-desktop/issues/2656 |
Is IPFS-Desktop opposed to supporting more architectures and platforms?
No. We would love to support more platform+arch with IPFS-Desktop.
What requirements/limitations are there for supporting a platform+arch?
The only limiting factors preventing this work are:
- time & dev resourcing
- whether Kubo supports the platform+arch
- whether electron-builder supports the platform+arch
- Whether we have github-action runners available for building and signing a particular platform+arch combination.
Articles on how to accomplish.
Two good resources I found are:
- https://www.beekeeperstudio.io/blog/electron-apps-for-arm-and-raspberry-pi
- https://github.com/orgs/community/discussions/25319
Other Electron applications bundling platform+arch's we want
I searched for electron-builder stuff in github CI files and found a few examples for us to look at.
https://github.com/jgraph/drawio-desktop seems like a promising place to look for configs and stuff to update our electron-builder flow.. seems like a pretty popular app that's up to date with a really clear electron-builder integration, and multiple arch builds: including mac universal build.
### Tasks
- [ ] Figure out what arm64 hosted-runner kubo-releaser is using
- [ ] update electron & electron-builder
- [ ] Investigate https://github.com/jgraph/drawio-desktop for required changes to electron-builder configs
- [ ] call electron-builder from arm64 hosted-runners with flags as mentioned in https://www.beekeeperstudio.io/blog/electron-apps-for-arm-and-raspberry-pi and at https://www.electron.build/cli
- [ ] Ensure auto-update script is appropriately considering arch type