plugin system and testing
Hi
I'm developing a LARGE application which uses plugins for its work. I've following doubts: How to scan for available plugins while testing? Should I use separate code for scaning plugin while testing (using preprocessor directives) or some other method? Please specify. I'm currently using just plain libs for testing. Thanks |
I think libtool's libltdl has some facilities for searching for plugins.
You haven't given a lot of information about what a plugin *means* for your app. A typical way to do it is have all the apps plugins reside in some directory; you could change this directory to something in your home directory for debugging, or read it out of an environment variable or config file. e.g. have the app look in /usr/lib/myapp/plugins by default, but use the value of $MYAPP_PLUGIN_PATH if it's set. You could even have that be a colon-separated list of directories. I even sort of remember libltdl supporting a list of directories to seach. |
Thanks, it did not came to my mind.
I used the term 'plugin' incorrectly. Actually my app is growing day-by-day(expectedly) and I had separated it (from the earlier stages) in small modules (currently statically linked) based on usage, so that those may only be loaded if there is need. Also, user has the option to disable a certain module (hence the requirement of scanning for available modules). |
All times are GMT -5. The time now is 07:16 PM. |