ipfs/ipfs-desktop

feat: multi-platform multi-arch support (arm64, amd64, macOS Universal)

Open

#2681 aperta il 18 ott 2023

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (912 fork)batch import
P1area/Kuboarea/linuxarea/macosarea/windowseffort/weeksexp/wizardhelp wantedkind/architecturekind/enhancementneed/analysisstatus/readytopic/infratopic/interoptopic/linuxtopic/macostopic/windows

Metriche repository

Star
 (5632 star)
Metriche merge PR
 (Merge medio 14g 4h) (4 PR mergiate in 30 g)

Descrizione

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:

  1. time & dev resourcing
  2. whether Kubo supports the platform+arch
  3. whether electron-builder supports the platform+arch
  4. 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:

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

Guida contributor