3 ms·
> Sure, Electron is theoretically cross-platform. But you are going to need a lot of platform-specific code to package the app for macOS, Windows, or Linux anyw
by eatonphil 5y ago
> Sure, Electron is theoretically cross-platform. But you are going to need a lot of platform-specific code to package the app for macOS, Windows, or Linux anyway.
Not really. The most platform-specific code I've got in my app is 1) the CI install instructions that use brew rather than apt-get [0] and 2) what exists in the application menu [1].
For packaging, electron-packager [2] handles everything else platform specific. So my Windows, Linux, and macOS builds share the exact same script [3]. The result gets zipped and uploaded to the relevant Github release page.
[0] https://github.com/multiprocessio/datastation/blob/master/.github/workflows/pull_requests.yml#L39 https://github.com/multiprocessio/datastation/blob/master/.g...
[1] https://github.com/multiprocessio/datastation/blob/master/desktop/project.ts#L14 https://github.com/multiprocessio/datastation/blob/master/de...
[2] https://github.com/electron/electron-packager https://github.com/electron/electron-packager
[3] https://github.com/multiprocessio/datastation/blob/master/desktop/scripts/release.build https://github.com/multiprocessio/datastation/blob/master/de...
- yarcob 5y agoHave you tried opening your app on a Mac? macOS literally suggests you move it to the trash.
- eatonphil 5y agoYeah, it's not signed at the moment. And fair that that's an extra platform-specific step. Since my audience is developers and this is an early project I'm ok with them having to do the usual right-click Open and Open Anyway flow.
- yarcob 5y agoI feel it's a bit disingenuous to tell people how easy packaging Electron apps is when you skip the hard parts.
- eatonphil 5y agoYou can distribute native macOS apps that aren't signed too. It's a step everyone needs to do regardless of electron or native. So I don't think there's anything disingenuous here.
- yarcob 5y agoYou said that you don't need platform specific code, but it turns out that's because you just skip the platform specific stuff, resulting in a product that I would not consider ready to ship.