Mbed Studio PoC Flatpak packaging

This is an initial Flatpak manifest for Mbed Studio, as a proof-of-concept to show the developers it would be easy to package the app as a Flatpak and distribute via Flathub.

Some things to be aware of:

  • I do not have Mbed compatible development boards to test with.
  • I’ve done very little testing of this, I have zero experience with Mbed but I plan to fiddle it somewhat later.
  • Flatpak does not touch the host system so the user needs to add the udev rules manually.
  • This actually does not distribute the binary release via a Flatpak repository. Instead, it uses the extra-data step to download Mbed Studio when the user install the Flapak app.

What I would like to see changes in Mbed Studio:

  • Mbed Studio should be able to fetch the mbed-studio-tools on the first run by itself, so the Flatpak package won’t need to deploy it on startup to the user home like I’ve done here. The app is already able to fetch the tools when there’s an update, why not also deploy on first run?
  • You really need to follow the XDG Base Directory Specification. At least don’t hardcode the Mbed Studio user dir as $HOME/.config/Mbed Studio and try first $XDG_CONFIG_HOME/Mbed Studio
  • It would be nice if there was a non-AppImage binary release, like a tarball or a deb package. Right now there’s a good tool for AppImage extraction but this can break in the future if the file format will change (it already changed once).

Mbed Studio Flatpak manifest

2 Likes

In 1.2.0 the installer switched from version specific download links of tarballs to a generic latest tarball release.

MbedStudio.sh installer changes ( https://studio.mbed.com/installers/latest/linux/MbedStudio.sh )
---------------------------------------------------------------------------
--- @	Tue, 21 Jul 2020 22:43:41 +0300
+++ @	Mon, 24 Aug 2020 13:31:15 +0300
@@ -1,2 +1,2 @@
-ARCHIVE_PATH=/installers/release-1.1.0/1.1.0.c6d10c8c/linux/MbedStudio.tar.gz
+ARCHIVE_PATH=/installers/latest/linux/MbedStudio.tar.gz
 CLANGD_FILENAME=clangd-8.0.2.zip
------------------------------------

This means (re-)packaging is not reproducible. It would be nice to have a text file served somewhere with version specific download links.

The change has been reversed with 1.2.1.42d8a0c0 release.
I don’t know if my post was the reason but thanks anyway.