clowd / Clowd.Squirrel

Quick and easy installer and automatic updates for cross-platform dotnet applications
426 stars 39 forks source link

Use Clowd.Squirrel also for app plugins #101

Closed StefanKoell closed 11 months ago

StefanKoell commented 2 years ago

Hi!

is there an easy/recommended way how to use Squirrel not only for the main app distribution but also for plugins that application might offer? In my app a plugin is basically a directory containing assemblies, resources and dependencies which are dynamically loaded on app startup.

caesay commented 2 years ago

There's currently not an easy way to do this as the required methods/configuration is internal. I'll leave this issue open and have a think about how we could expose more granular/customisable update functionality in a future update.

StefanKoell commented 2 years ago

Thanks for the speedy response. I think this would be a great addition although it's not a showstopper. I already have a working system, I just thought it would be a good fit and maybe can use Squirrel all the way.

My current system has two "features" or behaviors which may also be needed in case Squirrel gets love in this area:

If there's something I can contribute, let me know.

caesay commented 2 years ago

I don't envision Squirrel providing your two requirements directly.

Indirectly, the functions to list remote versions (IUpdateSource), and to update to a specific version already exist. How you want to use these to allow conditional upgrading is up to you. The functionality I'm considering exposing at the moment would be more control around the folder structures used. You could point UpdateManager at your plugin directory, tell it what you want the folder to look like, give it a remote url to check for plugin updates and fire it off. As far as Squirrel is concerned, every plugin would just be a unique application with a custom folder configuration.

Most of the above is possible already in v3, it's just internal.

Downgrading to older versions is currently not supported, that should probably be opened as a separate issue.

StefanKoell commented 2 years ago

That makes sense. I guess, "uninstalling" a plugin would be easy by just deleting the plugin directory and when I have all available versions, this would make a "downgrade" also easy by just uninstalling the plugin and installing a specific version.

I guess the only thing I'm not sure how to solve using the present logic is how to find out which plugin is suitable for which host version. Is there a way to provide/enclose additional metadata in an app/plugin which could help with that when processing the remote versions using IUpdateSource?

caesay commented 11 months ago

Not currently planned