Page MenuHomePhabricator

docs: Copy all images to output folder

Authored by segfaultxavi on Nov 18 2019, 6:26 AM.



Doxygen only copies to the output folder ("html") images included through
the \image tag. However, we have several images included using \htmlonly
blocks with <img> tags inside, which also need copying.
Old makefiles included code to manually copy all pngs, and this patch does
the same for meson.
I apologize for needing an external script just to run "cp -rf", it looks
like meson does not allow wildcards passed to "cp".
Files not in the output folder won't be included in the tarball and won't
be distributed.

Test Plan

Generated documentation now includes images for pages like:

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
segfaultxavi created this revision.Nov 18 2019, 6:26 AM
segfaultxavi requested review of this revision.Nov 18 2019, 6:26 AM
segfaultxavi edited the test plan for this revision. (Show Details)Nov 18 2019, 6:28 AM

I'm particularly worried about portability. Do all our supported systems have cp?

Maybe a python script using shutil?

Something like this:

#!/usr/bin/env python

import sys
import glob
import shutil

def main():
    srcs = sys.argv[1]
    dst = sys.argv[2]

    for f in glob.glob(srcs):
        print('copying %s' % f)
        shutil.copy(f, dst)

if __name__ == "__main__":
bu5hm4n accepted this revision.Nov 19 2019, 3:04 AM

I am pretty much fine with this,i think we can still move to python if there are issues. I am also not sure if the doc build works anywhere except linux ... :/

This revision is now accepted and ready to land.Nov 19 2019, 3:04 AM
This revision was automatically updated to reflect the committed changes.