kiwix / kiwix-js-pwa

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.
https://pwa.kiwix.org
GNU General Public License v3.0
183 stars 30 forks source link

Distribute Electron app via Microsoft Store #329

Closed Jaifroid closed 1 year ago

Jaifroid commented 1 year ago

As the old UWP app falls behind technologically, due to its outdated Edge Legacy webview, it would be good to provide an upgrade path for those using the Microsoft Store to get this app.

Electron apps can be distributed via the MS Store. See https://www.electronjs.org/docs/latest/tutorial/windows-store-guide. Electron-Builder has msix/appx as a build target. The main difficulty is that it's a pain to publish to the MS Store due to lack of an automated API (supposedly in development) and need to upload packages manually. The WikiMed/Wikivoyage ones are quite heavy.

Advantage for end-users is automatic update of WikiMed and Wikivoyage apps, as these are currently too unwieldy to use Electron-Builder's update mechanism, which consumes too much user bandwidth in an uncontrolled manner (doesn't obey metered connection, etc.). Having the OS do the update following users' stipulations about metered connections would be more user-friendly.

Automatic updates (via the Electron-Builder mechanism) are currently only enabled for the base app, but not for WikiMed or Wikivoyage.

Jaifroid commented 1 year ago

As a step towards this issue, I am now building a nightly signed Electron appx version. This installs a containerized version of the Electron app in Windows 10 and 11, and can be installed simply by double-clicking the archive. It is slightly larger than the .exe version, but that is not much of a concern if distributed via the Store.

Jaifroid commented 1 year ago

I've submitted a test version to the MS Store. Awaiting certification.

Jaifroid commented 1 year ago

Now available in the MS Store for testing, only using this link:

Store apps can only be installed on Windows 10 and 11.

image

Jaifroid commented 1 year ago

There is now a test WikiMed appx version here: https://github.com/kiwix/kiwix-js-windows/releases/download/v2.5.0-WikiMed/WikiMed.by.Kiwix.2.5.1-E.appx. I haven't made a new MS Store entry for this yet, because I'm wondering if I can re-use the existing entry, and offer this as an upgrade. The idea is that users with appropriate hardware would get the Electron version, and users with less capable hardware would get the UWP version... But it may be the case that the entry is tied to a specific app type. I need to experiment.

Jaifroid commented 1 year ago

Once it has passed Certiifcation, the Microsoft Store should be serving the Electron-based appx to users with x64 Windows as a seamless upgrade. Xbox, mixed reality and Windows Mobile users will continue to get an updated legacy appxbundle.

Jaifroid commented 1 year ago

This is now working well.