Add plugin support to run NDSes for data files#5
Conversation
Add a new mechanism to construct command lines to run an NDS program with a selected data file as the argument. Plugins are placed in the `/nds/plugins/` directory with the file extension they handle as the name and an nds extension. E.g. copy `tuna-vids.nds` to `/nds/plugins/avi.nds` and then you will be able to browse for and play `.avi` files. Also refactor main() to move `.argv` support to its own function.
Browse for files starting from the root directory if plugins are loaded because data files could be anywhere on the file system and it's more effort to select `[..]` at every start up.
|
I'm not at all keen on this approach. Personally I'd rather have files that specify file associations rather than renaming nds files to the extension they can handle. This approach is going to lead to duplication of binaries for no better reason than they support multiple file formats. This isn't plugin support either. |
No problem, I'll rework this to be something better.
I've got a few ways in mind:
I prefer approach 3, but let me know if you have a different preference.
Naming is a hard problem in computer science and "plugin" was just the first thing that came to mind. We can go with "handler" (as above) in the documentation, or something different if you prefer. Also, what are your thoughts on changing the startup directory based on the presence of plugins/handlers (commit b8c3131)? |
|
Superseded by #6 |
Add a new mechanism to construct command lines to run an NDS program with a selected data file as the argument. Plugins are placed in the
/nds/plugins/directory with the file extension they handle as thename and an nds extension.
E.g. copy
tuna-vids.ndsto/nds/plugins/avi.ndsand then you will be able to browse for and play.avifiles.