projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.22k stars 365 forks source link

Initial import of sphinx project #768

Closed dpw13 closed 4 months ago

dpw13 commented 4 months ago
dpw13 commented 4 months ago

This is less of a PR and more of an RFC. I didn't have opinions on the look and feel of the generated documentation; this PR only creates the scaffolding to produce somewhat sensical documentation as described in https://github.com/projectM-visualizer/projectm/issues/731.

Generated documentation attached. Note that there are issues in generating the ToC; the index file has the ToC replicated in its body and I haven't figured out how to fix that. projectm_sphinx.zip

dpw13 commented 4 months ago

Turns out the tool exhale is really useful for organizing projects any larger than "trivial". New (much larger) generated docs attached.

projectm_sphinx.zip

kblaschke commented 4 months ago

Turns out the tool exhale is really useful for organizing projects any larger than "trivial". New (much larger) generated docs attached.

They use an interesting naming scheme in Sphinx. I actually like it 😆

kblaschke commented 4 months ago

This is the Sphinx project for the internal classes, right?

We also need another section in the docs for the public-facing API, which is the main area of interest for users of the library. This documentation needs to be generated from the installed files/headers only, so it doesn't include all the internal classes and also includes the proper (generated) files/directory structure of the final include directory.

Since some headers/code files are also generated during the source build, it'd be nice to include the additional include dirs in the build directory in the Sphinx project. Not sure how it'll deal with the directory structure though, as it could get messy. We probably have to create a temporary amalgamated "source" dir with all libprojectM headers, including the generated ones, in the build dir and then run Doxygen on this.

This is actually a point where Doxygen shows its age, it was definitely not designed for dynamic build systems which generate files out-of-source. It's always a pain to make it do what it needs to.

Oh, this is just a rant on ideas - the initial check-in is fine, way better than nothing and we can work through all the remaining things step by step of course :)