Maslow Home Maslow Community Garden Newsletter

Poll: WebControl Distribution Options

I’m looking at the possibility of moving the distribution of WebControl entirely (i.e., no docker or webmcp) to an executable created via PyInstaller. It’s what I’m using for Windows and it seems to work pretty well, but I noticed an issue with it on the Raspberry Pi.

Pyinstaller has two options, create a single file where all data is packaged together and extracted to a temporary directory and then run, and a single directory where an executable and all the needed files are located (which is then zipped up into a compressed file that the user then extracts). The single file is more ‘portable’ in that you can place it anywhere on your PC and run it, the downside is that it has to do the extraction everytime its run. For a Windows 10 PC, this didn’t seem to be too long (5-10 seconds) but on the Raspberry PI, its taking me nearly 60 seconds.

I’m leaning to the single directory model for the RPI to eliminate the wait and re-extractions to the SD card… but not sure about the Windows 10 or linux (because people may use slow linux boxes). I can have different builds for different OS. Hence the poll…

  • Single-directory for RPI and single-file for everything else.
  • Single-directory for RPI and Linux and single-file for everything else.
  • Single-file for everything
  • Single-directory for everything

0 voters

What’s not an option at this time is something like packaging it up for apt-gets or pip installs, or docker for everything, or both single-file and single-directory for everything… for various reasons.

I’m a fan of having a single distribution. Are there any other benefits to a single file distribution other than simple drop and run? If not, I don’t see why go through the trouble. Either way, the application will have to be uncompressed into its component files before actually starting execution.

How often are you thinking that users will move the application? My guess is that a single version will be downloaded only once per computer (or PI) and then run from the same place many times. I don’t see the average user having tens of copies on a single PC (and only one or two on a PI at a time, maybe).

We could debate the space savings of having the app in a compressed state for people that have every version on their computer. How many versions would you need to have on a single machine before you started to run into storage space issues, assuming that the destination PC or RPI would only be used to run their Maslow?

@MartinJ, very valid points. I’m really thinking from an update perspective and believe a single file would be easier to manage. I’ve got to figure out how to automate the process and replacing one file seems to have distinct advantages over replacing a directory, but haven’t really spent the time testing it. Regardless, the one I’m worried about most (Raspberry Pi because they may be headless) I’m leaning to doing single-directory anyway.

1 Like