PaperPi icon indicating copy to clipboard operation
PaperPi copied to clipboard

packaging plugin

Open txoof opened this issue 3 years ago • 4 comments

need a packaging script to bundle up plugin in sensible way that is easily installable

txoof avatar Feb 15 '22 04:02 txoof

This is an interesting way to handle plugins. Just one approach

https://alysivji.github.io/simple-plugin-system.html

It also lists a few plugin framework modules that we could look at instead of reinventing the wheel

aaronr8684 avatar Feb 15 '22 14:02 aaronr8684

I wonder if a phase 2 of this couldn't be a simple web interface with the ability to enable/disable plugins, set configs, install/uninstall, etc. Pretty big phase 2, but I'm just thinking out loud. Obviously, this would be a pretty big upgrade and I want to focus on the rest of the stuff we have planned (including modularizing the plugins) before even attempting this.

aaronr8684 avatar Mar 11 '22 16:03 aaronr8684

I like this idea. I'll need to put some more work into packaging and managing plugin install/uninstall.

txoof avatar Mar 12 '22 10:03 txoof

I've started with a basic script to do the plugin install; it's based loosely on the existing install script.

https://github.com/txoof/PaperPi/blob/plugin_installer/utilities/install_plugin.sh

There's not much to it yet, just a basic outline of what it will do:

  • stop running instance of PaperPi (daemon)
  • decompress plugin tar
  • copy the plugin into the PaperPi/plguins/directory
  • do some checking that it will not clobber an existing plugin w/out confirmation
  • install any debian or python requirements
    • prompt the user to handle the debian reqs first?
    • install the python reqs automatically
  • add plugin configuration to user/etc config filesprompt user to edit config files and manage settings
  • display a sample of the config so the user knows what to look for
  • clean up temp files
  • prompt user to restart paperp
    • optionally restart automatically (dubious)

txoof avatar Mar 12 '22 13:03 txoof