X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=doc%2Fmanual%2FMakefile;h=d57dd26307f8f2a657eae9d383abc7d707b622c1;hp=115d7c3c8c9b6b45efc4b34aff0c3e3e181a635f;hb=3f047eef5b84c4212da865b5cdadb70076f07805;hpb=996b0c06e23bcb6b300d7b8799df94993692e07d diff --git a/doc/manual/Makefile b/doc/manual/Makefile index 115d7c3c8..d57dd2630 100644 --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -1,79 +1,116 @@ # DCP-o-matic manual makefile +INKSCAPE = ~/Applications/inkscape + + all: html pdf -DIAGRAMS := +DIAGRAMS := file-structure.svg 3d-left-right.svg 3d-top-bottom.svg timecode.svg pipeline1.svg pipeline2.svg \ + pipeline3.svg pipeline4.svg burn-in.svg discrete.svg dcp-copy.svg dcp-refer.svg reels-by-video.svg \ + crypt.svg -SCREENSHOTS := file-new.png video-new-film.png still-new-film.png click-content-selector.png video-select-content-file.png \ - still-select-content-file.png examine-thumbs.png \ - calculate-audio-gain.png prefs.png making-dcp.png filters.png film-tab.png video-tab.png audio-tab.png subtitles-tab.png +SCREENSHOTS := file-new.pdf new-film.pdf video-select-content-file.pdf \ + still-select-content-file.pdf examine-content.pdf timing-tab.pdf \ + calculate-audio-gain.pdf add-file.pdf dcp-tab.pdf colour-conversion.pdf \ + prefs-email.pdf prefs-kdm-email.pdf prefs-general.pdf prefs-tms.pdf prefs-cover-sheet.pdf \ + prefs-advanced.pdf prefs-defaults.pdf prefs-servers.pdf prefs-keys.pdf \ + prefs-notifications.pdf timeline1.pdf timed-text-tab.pdf \ + making-dcp.pdf filters.pdf video-tab.pdf audio-tab.pdf \ + audio-plot.pdf audio-map-eg1.pdf audio-map-eg2.pdf audio-map-eg3.pdf kdm.pdf \ + kdm-creator.pdf export.pdf advanced-content.pdf XML := dcpomatic.xml -GRAPHICS := - # -# For the HTML, default to copying the screenshots direct +# For the HTML: convert PDF screenshots to PNG and copy into html/screenshots, scaling some. # -html/screenshots/%.png: screenshots/%.png +html/screenshots/%.png: screenshots/%.pdf mkdir -p html/screenshots + pdftoppm $< $(basename $@) -png -f 1 -singlefile -rx 80 -ry 80 + + +# For LaTeX/PDF: crop some of the PDF screenshots; use others as-is +screenshots/%.pdf: raw-screenshots/%.pdf cp $< $@ -# -# Some need resizing... -# -html/screenshots/editor.png: screenshots/editor.png - mkdir -p html/screenshots - convert -resize 50% $< $@ -html/screenshots/mixer.png: screenshots/mixer.png - mkdir -p html/screenshots - convert -resize 50% $< $@ -html/screenshots/default-folder-for-new-sessions.png: screenshots/default-folder-for-new-sessions.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/welcome-to-ardour.png: screenshots/welcome-to-ardour.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/monitoring-choices.png: screenshots/monitoring-choices.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/monitor-section.png: screenshots/monitor-section.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/audio-midi-setup-device.png: screenshots/audio-midi-setup-device.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/new-session.png: screenshots/new-session.png - mkdir -p html/screenshots - convert -resize 75% $< $@ -html/screenshots/export-dialogue.png: screenshots/export-dialogue.png - mkdir -p html/screenshots - convert -resize 75% $< $@ +screenshots/prefs-general.pdf: raw-screenshots/prefs-general.pdf + python3 pdf_crop_by.py $< $@ 0 400 0 0 + +screenshots/prefs-defaults.pdf: raw-screenshots/prefs-defaults.pdf + python3 pdf_crop_by.py $< $@ 0 400 0 0 + +screenshots/prefs-servers.pdf: raw-screenshots/prefs-servers.pdf + python3 pdf_crop_by.py $< $@ 0 700 0 0 -# For HTML: convert graphics from SVG to PNG -graphics/%.png: graphics/%.svg - inkscape -z -f $< --export-png $@ --export-area-drawing +screenshots/prefs-keys.pdf: raw-screenshots/prefs-keys.pdf + python3 pdf_crop_by.py $< $@ 0 600 0 0 + +screenshots/prefs-tms.pdf: raw-screenshots/prefs-tms.pdf + python3 pdf_crop_by.py $< $@ 0 600 0 0 + +screenshots/prefs-email.pdf: raw-screenshots/prefs-email.pdf + python3 pdf_crop_by.py $< $@ 0 700 0 0 + +screenshots/prefs-cover-sheet.pdf: raw-screenshots/prefs-cover-sheet.pdf + python3 pdf_crop_by.py $< $@ 0 600 0 0 + +screenshots/examine-content.pdf: raw-screenshots/examine-content.pdf + python3 pdf_crop_by.py $< $@ 460 270 200 580 + +screenshots/audio-tab.pdf: raw-screenshots/audio-tab.pdf + python3 pdf_crop_by.py $< $@ 0 0 1480 420 + +screenshots/timing-tab.pdf: raw-screenshots/timing-tab.pdf + python3 pdf_crop_by.py $< $@ 0 100 1475 420 + +screenshots/timed-text-tab.pdf: raw-screenshots/timed-text-tab.pdf + python3 pdf_crop_by.py $< $@ 0 50 1480 420 + +screenshots/video-tab.pdf: raw-screenshots/video-tab.pdf + python3 pdf_crop_by.py $< $@ 0 0 1480 365 + +screenshots/add-file.pdf: raw-screenshots/add-file.pdf + python3 pdf_crop_by.py $< $@ 0 600 1210 0 + +screenshots/making-dcp.pdf: raw-screenshots/making-dcp.pdf + python3 pdf_crop_by.py $< $@ 470 190 300 700 + +screenshots/audio-map-eg1.pdf: raw-screenshots/audio-map-eg1.pdf + python3 pdf_crop_by.py $< $@ 10 195 1350 630 + +screenshots/audio-map-eg2.pdf: raw-screenshots/audio-map-eg2.pdf + python3 pdf_crop_by.py $< $@ 10 195 1350 630 + +screenshots/audio-map-eg3.pdf: raw-screenshots/audio-map-eg3.pdf + python3 pdf_crop_by.py $< $@ 10 75 1350 630 + +screenshots/dcp-tab.pdf: raw-screenshots/dcp-tab.pdf + python3 pdf_crop_by.py $< $@ 0 250 1480 30 -# For LaTeX/PDF: convert graphics from SVG to PDF -graphics/%.pdf: graphics/%.svg - inkscape -z -f $< --export-pdf $@ --export-area-drawing # For HTML: convert diagrams from SVG to PNG diagrams/%.png: diagrams/%.svg - inkscape -z -f $< --export-png $@ --export-area-drawing + $(INKSCAPE) $< --export-type=png --export-filename=$@ --export-area-drawing # For LaTeX/PDF: convert diagrams from SVG to PDF diagrams/%.pdf: diagrams/%.svg - inkscape -z -f $< --export-pdf $@ --export-area-drawing + $(INKSCAPE) $< --export-type=pdf --export-filename=$@ --export-area-drawing + +config.xml: ../../src/lib/config.cc config.py + python3 config.py ../../src/lib/config.cc > config.xml + +SHORTCUTS := ../../src/tools/dcpomatic.cc + +shortcuts.xml: $(SHORTCUTS) shortcuts.py + python3 shortcuts.py $(SHORTCUTS) > $@ # # HTML # -html: $(XML) dcpomatic-html.xsl extensions-html.ent dcpomatic.css \ - $(addprefix html/screenshots/,$(SCREENSHOTS)) \ +html: $(XML) config.xml shortcuts.xml dcpomatic-html.xsl extensions-html.ent dcpomatic.css dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \ + $(subst .pdf,.png,$(addprefix html/screenshots/,$(SCREENSHOTS))) \ $(subst .svg,.png,$(addprefix diagrams/,$(DIAGRAMS))) \ - $(subst .svg,.png,$(addprefix graphics/,$(GRAPHICS))) \ # The DocBook needs to know what file extensions to look for # for screenshots and diagrams; use the correct file to tell it. @@ -83,16 +120,17 @@ html: $(XML) dcpomatic-html.xsl extensions-html.ent dcpomatic.css \ xmlto html -m dcpomatic-html.xsl dcpomatic.xml --skip-validation -o html # Copy graphics and CSS in -# mkdir -p html/diagrams html/graphics -# cp diagrams/*.png html/diagrams -# cp graphics/*.png html/graphics + mkdir -p html/diagrams + cp diagrams/*.png html/diagrams cp dcpomatic.css html # # PDF # -pdf: $(XML) dcpomatic-pdf.xsl extensions-pdf.ent screenshots/*.png $(subst .svg,.pdf,$(addprefix diagrams/,$(DIAGRAMS))) +pdf: $(XML) config.xml dcpomatic-pdf.xsl extensions-pdf.ent dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \ + $(addprefix screenshots/,$(SCREENSHOTS)) \ + $(subst .svg,.pdf,$(addprefix diagrams/,$(DIAGRAMS))) # The DocBook needs to know what file extensions to look for # for screenshots and diagrams; use the correct file to tell it. @@ -107,7 +145,7 @@ pdf: $(XML) dcpomatic-pdf.xsl extensions-pdf.ent screenshots/*.png $(subst .svg, # LaTeX (handy for debugging) # -tex: $(XML) dcpomatic-pdf.xsl extensions-pdf.ent +tex: $(XML) config.xml dcpomatic-pdf.xsl extensions-pdf.ent # The DocBook needs to know what file extensions to look for # for screenshots and diagrams; use the correct file to tell it.