Menu

#213 Fix HTML doc images by installing to the right directory

v3.x
closed-accepted
compyx
None
bugfix
2020-03-31
2020-01-23
No

The images in the installed HTML docs are broken because they point to an images subdirectory even though all the files are placed in the same directory. This patch installs the images to an images subdirectory as they are in the source tree.

It does the same for fonts although these are not referenced in the HTML files at all. A couple of the HTML files link to the Lato font on Google instead. I suggest you remove the font files from the project entirely and consistently use external fonts.

Finally I moved all the "html" docs into a html subdirectory on installation to keep them separate from the rest of the docs. This is useful for Gentoo Linux as it compresses docs that are not within the html subdirectory but it also keeps things tidier in general. This way you can easily tell which files need to be read directly and which can be accessed in a browser via index.html.

1 Attachments

Discussion

  • gpz

    gpz - 2020-01-23

    where did you find references to google? i thought i removed all of them (that was the whole point of the font dir)

    edit: nevermind, found and removed. the actual references are in latofonts.css, which is imported by vice.css, which is in turn used by the html files

    that said, i am not sure if removing the html docs from installation (and binary packages for that matter) wouldnt be the better idea. all major platforms can use the .pdf, which is also easier to read and search.

     

    Last edit: gpz 2020-01-23
    • James Le Cuirot

      James Le Cuirot - 2020-01-23
      • doc/html/android.html
      • doc/html/darwin.html
      • doc/html/nsosrh.html
      • doc/html/sortix.html

      nsosrh.html and sortix.html are referenced by index.html but aren't actually installed. The same is true for latofonts.css so I now realise the font files are referenced from there.

       
  • gpz

    gpz - 2020-01-23

    ps: pdf is also what opens when using "help" in the UI - so most ppl wont ever use the html

     
  • compyx

    compyx - 2020-01-24

    If we remove the html docs, we need to 'rescue' (ie move) the 'vice-logo.svg' and 'vice-logo-black.svg' files, at least the black logo file is used in the vice.gresource file by reading it from the html/images directory.

    I know using the logo from the doc/html/images dir isn't ideal, but I'd rather not have duplicate files in the the source tree if it can be avoided. Perhaps we can move the images into data/common and install the html docs images from there?

     
    • Greg King

      Greg King - 2020-01-24

      ... , we need to 'rescue' (ie, move) the 'vice-logo.svg' and 'vice-logo-black.svg' files -- at least, the black logo file is used in the vice.gresource file by reading it from the html/images directory.

      But, it doesn't belong there! "vice-logo-black.svg" isn't used by the HTML pages. It is only a UI file. It belongs in the directory which holds the UI's icon files.

       
      • compyx

        compyx - 2020-01-26

        Yes, the black variant is only used in the UI while the white variant is used in the HTML docs, so I suspect at some point either there was some intention to perhaps use both in the HTML docs (ie different themes) or both logos provided by Seven were just stored in the html/images dir to have them in the source tree.

        I have no trouble moving the vice-logo-black.svg into common/data, at least makes the generation of the gresource file a bit more consistent.

         
  • gpz

    gpz - 2020-01-24

    ugh no, please lets keep everything together :) and the point wasnt to remove the html - but to not install it in the system (or bindist), and only use it for the website.

     
  • James Le Cuirot

    James Le Cuirot - 2020-01-24

    In that case, please see this patch. It;

    • Builds but doesn't install the docs.
    • Adds the missing filenames.
    • Sorts the filenames to avoid missing any in future.
    • Cleans all the generated/copied files.

    texi2pdf is quite a heavy dependency so I may still install the HTML docs on Gentoo as a fallback but this can be done without the Makefile easily enough.

     
  • James Le Cuirot

    James Le Cuirot - 2020-01-28

    Recent changes led to a conflict so here's a fresh patch.

    I'm taking back what I said about installing docs without the Makefile though because it's a bit fiddly avoiding the additional build files. I'll see whether I can make them install only when --htmldir= (a standard configure option) is given.

     
  • compyx

    compyx - 2020-01-29

    Wouldn't only installing HTML docs when -htmldir is used break autoconf standard behaviour? Seems to me it is used to override @docdir@, not to optionally generate HTML docs. (Not that I care much).

    I'll check your patch, probably tomorrow.

     
    • James Le Cuirot

      James Le Cuirot - 2020-01-29

      Yeah, I reconsidered that afterwards. I'll make it a --install-html-docs option or something. I'd like --install-pdf-docs too because distros try to keep builds deterministic, i.e. only install a PDF when I say, not when texi2dvi just happens to be present.

       
      • compyx

        compyx - 2020-01-29

        That sounds good.

        I just tried your patch, it generates the HTML docs just fine, but I can't find any CSS or images in ($build_dir)/doc/html (building out-of-tree here).

         
        • James Le Cuirot

          James Le Cuirot - 2020-01-29

          I noticed that when building out-of-tree too but I think it's always been like that so I figured you didn't mind or expected most people to build in-tree. I guess you'd need to copy the static files to the build directory if it's different. I can try adding that, if you like.

           
          • compyx

            compyx - 2020-01-29

            I think it's mostly VICE devs (and perhaps package maintainers) who build out-of-tree. Using --enable-internal-ffmpeg breaks when building out-of-tree, nobody except me ever complained about that. Should it become a problem I can fix that.

            Doesn't Gentoo use a separate build dir? I think it did that when I used it, could be wrong though, when I used Gentoo you could still do a stage1 build ;)

             
  • James Le Cuirot

    James Le Cuirot - 2020-02-09

    Okay, new and hopefully final patch. It sticks to the best practise principle of:

    • Allow explicit disabling and enabling of features.
    • Try to build a feature if possible, if we want it enabled by default.
    • Only error at configure time if dependencies are missing and the feature was explicitly enabled.

    More specifically, it:

    • Installs HTML documentation files to the right directories.
    • Generates the HTML documentation unconditionally.
    • Skips generating the parts requiring Perl if that's not available.
    • Adds an option to install the HTML documentation (defaults to no).
    • Adds an option to generate (and install) the PDF documentation (defaults to if possible).
    • Copies documentation source files into out-of-tree builds.
    • Supports make clean and ensures source files aren't removed from in-tree builds.
    • Adds various missing files to the HTML documentation.
    • Removes an unused AC_PATH_PROG(PERL, perl) I noticed in resid-dtv.

    To answer your question, Gentoo has never built out-of-tree for Autotools-based projects by default but it frequently does anyway for packages that are multilib-enabled. In this case, I am using "multibuild" to build the GTK, SDL2, and headless variants as requested.

     
  • compyx

    compyx - 2020-02-22
    • status: open --> pending-fixed
    • assigned_to: compyx
     
  • compyx

    compyx - 2020-02-22

    Patch applied in r37493, Thanks again and sorry for the delay.

     
  • compyx

    compyx - 2020-02-24

    Spoke too soon, this happens on both Debian and Gentoo when compiling in-tree:

    Making all in html
    make[2]: Circular amigaos.html <- amigaos.html dependency dropped.
    make[2]: Circular android.html <- android.html dependency dropped.
    make[2]: Circular beos.html <- beos.html dependency dropped.
    make[2]: Circular darwin.html <- darwin.html dependency dropped.
    make[2]: Circular favicon.ico <- favicon.ico dependency dropped.
    make[2]: Circular index.html <- index.html dependency dropped.
    make[2]: Circular latofonts.css <- latofonts.css dependency dropped.
    make[2]: Circular macosx.html <- macosx.html dependency dropped.
    make[2]: Circular nsosrh.html <- nsosrh.html dependency dropped.
    make[2]: Circular qnx.html <- qnx.html dependency dropped.
    make[2]: Circular robots.txt <- robots.txt dependency dropped.
    make[2]: Circular sco.html <- sco.html dependency dropped.
    make[2]: Circular sitemap.xml <- sitemap.xml dependency dropped.
    make[2]: Circular solaris.html <- solaris.html dependency dropped.
    make[2]: Circular sortix.html <- sortix.html dependency dropped.
    make[2]: Circular unix.html <- unix.html dependency dropped.
    make[2]: Circular vice.css <- vice.css dependency dropped.
    make[2]: Circular windows.html <- windows.html dependency dropped.
    make[2]: Circular fonts/Lato-Bold.eot <- fonts/Lato-Bold.eot dependency dropped.
    make[2]: Circular fonts/Lato-Bold.ttf <- fonts/Lato-Bold.ttf dependency dropped.
    make[2]: Circular fonts/Lato-Bold.woff <- fonts/Lato-Bold.woff dependency dropped.
    make[2]: Circular fonts/Lato-Bold.woff2 <- fonts/Lato-Bold.woff2 dependency dropped.
    make[2]: Circular fonts/Lato-BoldItalic.eot <- fonts/Lato-BoldItalic.eot dependency dropped.
    make[2]: Circular fonts/Lato-BoldItalic.ttf <- fonts/Lato-BoldItalic.ttf dependency dropped.
    make[2]: Circular fonts/Lato-BoldItalic.woff <- fonts/Lato-BoldItalic.woff dependency dropped.
    make[2]: Circular fonts/Lato-BoldItalic.woff2 <- fonts/Lato-BoldItalic.woff2 dependency dropped.
    make[2]: Circular fonts/Lato-Italic.eot <- fonts/Lato-Italic.eot dependency dropped.
    make[2]: Circular fonts/Lato-Italic.ttf <- fonts/Lato-Italic.ttf dependency dropped.
    make[2]: Circular fonts/Lato-Italic.woff <- fonts/Lato-Italic.woff dependency dropped.
    make[2]: Circular fonts/Lato-Italic.woff2 <- fonts/Lato-Italic.woff2 dependency dropped.
    make[2]: Circular fonts/Lato-Regular.eot <- fonts/Lato-Regular.eot dependency dropped.
    make[2]: Circular fonts/Lato-Regular.ttf <- fonts/Lato-Regular.ttf dependency dropped.
    make[2]: Circular fonts/Lato-Regular.woff <- fonts/Lato-Regular.woff dependency dropped.
    make[2]: Circular fonts/Lato-Regular.woff2 <- fonts/Lato-Regular.woff2 dependency dropped.
    make[2]: Circular fonts/OFL.txt <- fonts/OFL.txt dependency dropped.
    make[2]: Circular images/CIPS2008.png <- images/CIPS2008.png dependency dropped.
    make[2]: Circular images/new.gif <- images/new.gif dependency dropped.
    make[2]: Circular images/vice-logo.svg <- images/vice-logo.svg dependency dropped.
    Making all in readmes
    

    Tried a few things, but it seems even with just ./configure the src/doc/html/Makefile.am isn't correct. When I remove $(STATIC_FILES) from HTML_FILES I get less complaints, but I still get:

    oc/html/Makefile.am:7: warning: ':='-style assignments are not portable
    doc/html/Makefile.am:7: warning: patsubst %,vice_%.html,$(shell seq 22: non-POSIX variable name
    doc/html/Makefile.am:7: (probably a GNU make extension)
    doc/html/Makefile.am:68: warning: if $(subst x.x,,x$(srcdir: non-POSIX variable name
    doc/html/Makefile.am:68: (probably a GNU make extension)
    

    So something is obviously wrong with the dependencies in that file.

     
  • compyx

    compyx - 2020-02-24
    • status: pending-fixed --> open-needinfo
     
  • James Le Cuirot

    James Le Cuirot - 2020-02-24

    This fixes both sets of warnings. As discussed, it would be nice to apply the Automake fix globally in configure.proto but I'm leaving you to sort out the $VICE_VERSION mess. ;-)

     

    Last edit: James Le Cuirot 2020-02-24
    • compyx

      compyx - 2020-02-26

      Applied in r35711, works on my machine. Thanks!

      As for the global Automake fix and $VICE_VERSION, I'll take my time with that, to avoid breaking the buildsystem. ;-)

      Edit: seems I already did some modernizing on configure.proto in r35709. Haven't had any problems with that on Debian or msys2, so perhaps "it just works" for now?

       

      Last edit: compyx 2020-02-26
  • compyx

    compyx - 2020-03-31
    • status: open-needinfo --> pending-accepted
     
  • compyx

    compyx - 2020-03-31

    It seems to me we fixed the issues the patch addresses, and even some more. So, I'm hoping we can close this, unless anyone has any objections.

     
    • James Le Cuirot

      James Le Cuirot - 2020-03-31

      Do it.

       
  • compyx

    compyx - 2020-03-31
    • status: pending-accepted --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB