| Message |
*boggle*
I think I see where you guys are coming from with this. But how about this? First, let's look at how WoW implements plugins.
- They have an AddOns folder inside their installation directory.
- For each plugin there is a subfolder (not a file) (eg. Cartographer folder for the Cartographer plugin).
- Inside that folder are some standard files, in particular Cartographer.toc which is the "Table of Contents" file. That lists other files that are required.
- The plugin itself is a .lua file (Cartographer.lua in this case)
- I am not an expert, but somewhere in there are the dependencies (in other words, what other plugins also need to exist)
- Any required data is in the folder as well
Now this effectively gets around the mess of not knowing what belongs to what. They also have the idea of a "saved data" folder somewhere else. In their case they put different accounts into different directories, which is conceptually similar to the plugin state file which has the world id as part of the name.
I don't know about having everything in a zip file - it has to be unzipped anyway to use it, but the folder idea I quite like.
A while ago I did a "plugin installer" plugin which simply installed every plugin it could find in a directory. Effectively WoW does the same (other programs would be similar, eg. Photoshop). Rather than having to go through a "plugin install" process you simply unzip the plugin folder (for a specific plugin) into the plugins folder.
So, to summarize, what you could simply do is:
- Make a plugin per folder
- Inside that folder put the .lua file
- Also put any data (eg. images, sounds, databases)
- Somewhere (possibly the plugin itself) put dependencies
Now MUSHclient could scan all folders looking for plugins, build up a list, check all the dependencies are satisfied, and then start installing them (eg. the ones which others are dependent on, first).
All this could be tricky to get right, but your comments are welcome, even if you think my idea has serious flaws in it. ;) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|