From eb51b04c45f075577f71199d3a62c8fc6c5996f2 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 9 Aug 2019 19:29:31 +0200 Subject: [PATCH] help: migrate from scrollkeeper to yelp Fixes #81 --- Makefile.am | 7 +- README.md | 5 - configure.ac | 20 +--- docs/help/bt-edit/C/.gitignore | 2 - docs/help/bt-edit/C/Makefile.am | 43 +------- docs/help/bt-edit/C/buzztrax-edit-C.omf.in | 34 ------ .../C/{buzztrax-edit.xml => index.docbook} | 0 docs/help/bt-edit/Makefile.am | 22 +++- omf.make | 54 ---------- src/ui/edit/main-menu.c | 4 +- xmldocs.make | 101 ------------------ 11 files changed, 28 insertions(+), 264 deletions(-) delete mode 100644 docs/help/bt-edit/C/buzztrax-edit-C.omf.in rename docs/help/bt-edit/C/{buzztrax-edit.xml => index.docbook} (100%) delete mode 100644 omf.make delete mode 100644 xmldocs.make diff --git a/Makefile.am b/Makefile.am index ed4da036d..00db66ee1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,8 +15,7 @@ DISTCHECK_CONFIGURE_FLAGS = \ --enable-debug \ --disable-update-desktop \ --disable-update-mime \ - --disable-update-icon-cache \ - --disable-scrollkeeper + --disable-update-icon-cache AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ @@ -43,8 +42,6 @@ EXTRA_DIST = \ intltool-merge.in \ intltool-update.in \ COPYING-DOCS \ - omf.make \ - xmldocs.make \ README.md TODO \ docs/version.entities.in \ docs/buzztrax.xsd \ @@ -150,8 +147,6 @@ uninstall-hook: update-icon-cache update-desktop-db update-mime-db ## We get warnings for left-over files when doing 'make distuninstallcheck' distuninstallcheck_listfiles = find . -type f -print -## Workaround for scrollkeeper bug -distuninstallcheck_listfiles += | grep -v '/var/scrollkeeper' ## Workaround for installing files in own prefix distuninstallcheck_listfiles += | grep -v '/share/mime' ## Workaround for installing icon theme in own prefix diff --git a/README.md b/README.md index 9e7c479af..e2f020a25 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,6 @@ environment variables. To use the apps these variables are enough: export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/buzztrax/share" update-mime-database $HOME/buzztrax/share/mime/ -to see the manual in yelp, you can skip this if reading the help -from buzztrax-edit's help menu is good enough for you: - - export OMF_DIR="$OMF_DIR:$HOME/buzztrax/share/omf" - Likewise for the man-pages to be found: export MANPATH=\$MANPATH:$prefix/share/man diff --git a/configure.ac b/configure.ac index ca0d0c754..643b83e90 100644 --- a/configure.ac +++ b/configure.ac @@ -505,27 +505,13 @@ AC_ARG_ENABLE(man, AC_PATH_PROG([XSLTPROC], [xsltproc]) AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno) -dnl Check for scrollkeeper -AC_PATH_PROG(scrollkeeper_config, scrollkeeper-config, no) -if test x$scrollkeeper_config = xno; then - have_scrollkeeper=no - AC_MSG_WARN([Couldn't find scrollkeeper-config, please install the scrollkeeper package]) -dnl if test x$xsltproc = xno; then -dnl AC_MSG_WARN([Couldn't find xsltproc, please install the libxml/libxslt package]) -dnl fi -else - have_scrollkeeper=yes -fi -AM_CONDITIONAL(ENABLE_SCROLLKEEPER, test x$scrollkeeper_config != xno) -SCROLLKEEPER_BUILD_REQUIRED=0.3.5 -AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED) - +dnl User Documentation +YELP_HELP_INIT dnl Check for aspell (spellcheck the docs) AC_CHECK_PROGS(ASPELL,[aspell],[]) AM_CONDITIONAL(WITH_ASPELL,[test "x$ASPELL" != "x"]) - dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS( \ @@ -682,7 +668,6 @@ AC_CONFIG_FILES(Makefile \ docs/version.entities \ docs/help/bt-edit/Makefile \ docs/help/bt-edit/C/Makefile \ - docs/help/bt-edit/C/buzztrax-edit-C.omf \ docs/reference/bt-cmd/Makefile \ docs/reference/bt-core/Makefile \ docs/reference/bt-core/buzztrax-core.types \ @@ -717,7 +702,6 @@ Configuration Documentation (API) : ${enable_gtk_doc} Documentation (Man) : ${enable_man} - Documentation (User) : ${have_scrollkeeper} Bindings Metadata (GIR) : ${enable_gir} Alsa seq. for interaction ctrl. : ${use_alsa} diff --git a/docs/help/bt-edit/C/.gitignore b/docs/help/bt-edit/C/.gitignore index 37f49db7d..c4a9d05f9 100644 --- a/docs/help/bt-edit/C/.gitignore +++ b/docs/help/bt-edit/C/.gitignore @@ -1,6 +1,4 @@ *~ -buzztrax-edit-C.omf -buzztrax-edit-C.omf.out buzztrax-edit.xml Makefile Makefile.in diff --git a/docs/help/bt-edit/C/Makefile.am b/docs/help/bt-edit/C/Makefile.am index cc82a0410..193ea85fa 100644 --- a/docs/help/bt-edit/C/Makefile.am +++ b/docs/help/bt-edit/C/Makefile.am @@ -1,53 +1,19 @@ -figdir = figures -docname = buzztrax-edit -lang = C -omffile = buzztrax-edit-C.omf -entities = legal.xml version.entities - -all-local: - @-chmod -R u+w $(srcdir) - @cp $(top_builddir)/docs/version.entities $(srcdir)/version.entities - -clean-local: - -@rm -f version.entities - -# FIXME: only do this if ENABLE_SCROLLKEEPER ? -include $(top_srcdir)/xmldocs.make -dist-hook: app-dist-hook - # make a pdf using dblatex # - it seems unneccesarily hard to get our logo onto the titlepage # - we tried all sort of customizations ( -p dblatex_pdf.xsl ) -buzztrax-edit.pdf: buzztrax-edit.xml dblatex_pdf.xsl +buzztrax-edit.pdf: index.docbook dblatex_pdf.xsl dblatex \ -o buzztrax-edit.pdf \ -I figures \ - buzztrax-edit.xml + index.docbook -buzztrax-edit.txt: buzztrax-edit.xml +buzztrax-edit.txt: index.docbook xmlto txt buzztrax-edit.xml -buzztrax-edit2.pdf: buzztrax-edit.xml - xsltproc \ - --stringparam paper.type A4 \ - --stringparam fop.extentions 1 \ - --stringparam fop1.extentions 1 \ - --stringparam admon.graphics 1 \ - http://docbook.sourceforge.net/release/xsl/current/fo/fo.xsl \ - buzztrax-edit.xml >buzztrax-edit.fo; \ - fop -fo buzztrax-edit.fo -pdf buzztrax-edit.pdf - # statistics for index building: # sed -e 's/[[:space:]]\+/\n/g' buzztrax-edit.txt | sed 's/[,.\(\)"]//g' | egrep -v '^ *$' | sort -f | uniq -ic | sort -n # sed -e 's/[[:space:]]\+/\n/g' buzztrax-edit.txt | sed 's/[,.\(\)"]//g' | egrep -v '^ *$' | egrep -v '^..?$' | sort -f | uniq -ic | sort -n - -# here we should -# a) invoke xslproc, if available -# stylesheet=/opt/gnome/share/sgml/docbook/yelp/docbook/html/docbook.xsl -# xsltproc --nonet $(stylesheet) $(docname).xml -# b) simple install pregenerated html (pdf) - # this relies on particular names in the tests # it would be nicer to fix the names in the tests and apply some rule: # $$base/(*).png -> figures/\1.png @@ -132,7 +98,4 @@ update_figures: pngtopnm "$$base/buzztrax_settings_ui.png" | ../../mk-shadow.sh | pnmtopng >figures/settings-ui.png; \ fi; -## add shadows (now integrated above) -## for PNG in *.png; do pngtopnm "$PNG" | ../../../mk-shadow.sh | pnmtopng > "${PNG//.png}"-with-shadow.png - .PHONY: update-figures \ No newline at end of file diff --git a/docs/help/bt-edit/C/buzztrax-edit-C.omf.in b/docs/help/bt-edit/C/buzztrax-edit-C.omf.in deleted file mode 100644 index 36138246e..000000000 --- a/docs/help/bt-edit/C/buzztrax-edit-C.omf.in +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - buzztrax-devel@lists.sourceforge.net (buzztrax developer team) - - - - Buzztrax Music Editor - - - @BT_RELEASE_DATE@ - - - - - User manual for the buzztrax music editor - - - user's guide - - - - - - - - - diff --git a/docs/help/bt-edit/C/buzztrax-edit.xml b/docs/help/bt-edit/C/index.docbook similarity index 100% rename from docs/help/bt-edit/C/buzztrax-edit.xml rename to docs/help/bt-edit/C/index.docbook diff --git a/docs/help/bt-edit/Makefile.am b/docs/help/bt-edit/Makefile.am index c0dbaff13..62a72e6c3 100644 --- a/docs/help/bt-edit/Makefile.am +++ b/docs/help/bt-edit/Makefile.am @@ -1,9 +1,27 @@ -SUBDIRS = C +@YELP_HELP_RULES@ +HELP_ID = buzztrax-edit + +HELP_FILES = \ + index.docbook \ + legal.xml \ + version.entities -DOC_MODULE = buzztrax-edit +# TODO(ensonic): not complete list, see update_figures +HELP_MEDIA = \ + figures/main-window.png + +# We have no translation for the manual +HELP_LINUAGS = + +SUBDIRS = C EXTRA_DIST = C/aspell.pws +version.entities: $(abs_top_srcdir)/docs/version.entities + @cp $< $@ + +CLEANFILES = version.entities + if WITH_ASPELL check-local: @echo "Spellchecking C/$(DOC_MODULE).xml..." diff --git a/omf.make b/omf.make deleted file mode 100644 index c8368f8f2..000000000 --- a/omf.make +++ /dev/null @@ -1,54 +0,0 @@ -# -# No modifications of this Makefile should be necessary. -# -# This file contains the build instructions for installing OMF files. It is -# generally called from the makefiles for particular formats of documentation. -# -# Note that you must configure your package with --localstatedir=/var/lib -# so that the scrollkeeper-update command below will update the database -# in the standard scrollkeeper directory. -# -# If it is impossible to configure with --localstatedir=/var/lib, then -# modify the definition of scrollkeeper_localstate_dir so that -# it points to the correct location. Note that you must still use -# $(localstatedir) in this or when people build RPMs it will update -# the real database on their system instead of the one under RPM_BUILD_ROOT. -# -# Note: This make file is not incorporated into xmldocs.make because, in -# general, there will be other documents install besides XML documents -# and the makefiles for these formats should also include this file. -# -# About this file: -# This file was taken from scrollkeeper_example2, a package illustrating -# how to install documentation and OMF files for use with ScrollKeeper -# 0.3.x and 0.4.x. For more information, see: -# http://scrollkeeper.sourceforge.net/ -# Version: 0.1.2 (last updated: March 20, 2002) -# - -omf_dest_dir=$(datadir)/omf/$(docname) -scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper -CLEANFILES += *.out - -omf: omf_timestamp - -omf_timestamp: $(omffile) - -for file in $(omffile); do \ - scrollkeeper-preinstall $(docdir)/$(docname).xml $$file $$file.out; \ - done - touch omf_timestamp - -install-data-hook-omf: - $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir) - for file in $(omffile); do \ - $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \ - done - -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) - -uninstall-local-omf: - -for file in $(srcdir)/*.omf; do \ - basefile=`basename $$file`; \ - rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \ - done - -rmdir $(DESTDIR)$(omf_dest_dir) - -scrollkeeper-update -p $(scrollkeeper_localstate_dir) diff --git a/src/ui/edit/main-menu.c b/src/ui/edit/main-menu.c index 8e32d382c..d97277101 100644 --- a/src/ui/edit/main-menu.c +++ b/src/ui/edit/main-menu.c @@ -543,8 +543,8 @@ on_menu_help_activate (GtkMenuItem * menuitem, gpointer user_data) //BtMainMenu *self=BT_MAIN_MENU(user_data); GST_INFO ("menu help event occurred"); - // use "ghelp:buzztrax-edit?topic" for context specific help - gtk_show_uri_simple (GTK_WIDGET (menuitem), "ghelp:buzztrax-edit"); + // use "help:buzztrax-edit?topic" for context specific help + gtk_show_uri_simple (GTK_WIDGET (menuitem), "help:buzztrax-edit"); } static void diff --git a/xmldocs.make b/xmldocs.make deleted file mode 100644 index 09758a802..000000000 --- a/xmldocs.make +++ /dev/null @@ -1,101 +0,0 @@ -# -# No modifications of this Makefile should be necessary. -# -# To use this template: -# 1) Define: figdir, docname, lang, omffile, and entities in -# your Makefile.am file for each document directory, -# although figdir, omffile, and entities may be empty -# 2) Make sure the Makefile in (1) also includes -# "include $(top_srcdir)/xmldocs.make" and -# "dist-hook: app-dist-hook". -# 3) Optionally define 'entities' to hold xml entities which -# you would also like installed -# 4) Figures must go under $(figdir)/ and be in PNG format -# 5) You should only have one document per directory -# 6) Note that the figure directory, $(figdir)/, should not have its -# own Makefile since this Makefile installs those figures. -# -# example Makefile.am: -# figdir = figures -# docname = scrollkeeper-manual -# lang = C -# omffile=scrollkeeper-manual-C.omf -# entities = fdl.xml -# include $(top_srcdir)/xmldocs.make -# dist-hook: app-dist-hook -# -# About this file: -# This file was taken from scrollkeeper_example2, a package illustrating -# how to install documentation and OMF files for use with ScrollKeeper -# 0.3.x and 0.4.x. For more information, see: -# http://scrollkeeper.sourceforge.net/ -# Version: 0.1.2 (last updated: March 20, 2002) -# - - -# ************* Begin of section some packagers may need to modify ************** -# This variable (docdir) specifies where the documents should be installed. -# This default value should work for most packages. -# docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang) -docdir = $(datadir)/gnome/help/$(docname)/$(lang) - -# ************** You should not have to edit below this line ******************* -xml_files = $(entities) $(docname).xml - -EXTRA_DIST = $(xml_files) $(omffile) -CLEANFILES = omf_timestamp - -if ENABLE_SCROLLKEEPER -# If the following file is in a subdir (like help/) you need to add that to the path -include $(top_srcdir)/omf.make - -all: omf - -$(docname).xml: $(entities) -## -ourdir=`pwd`; \ -## cd $(srcdir); \ -## cp $(entities) $$ourdir - -endif - -app-dist-hook: - if test "$(figdir)"; then \ - $(mkinstalldirs) $(distdir)/$(figdir); \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ - done \ - fi - -if ENABLE_SCROLLKEEPER -install-data-local: omf - $(mkinstalldirs) $(DESTDIR)$(docdir) - for file in $(xml_files); do \ - cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ - done - if test "$(figdir)"; then \ - $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ - done \ - fi - -install-data-hook: install-data-hook-omf - -uninstall-local: uninstall-local-doc uninstall-local-omf - -uninstall-local-doc: - -if test "$(figdir)"; then \ - for file in $(srcdir)/$(figdir)/*.png; do \ - basefile=`echo $$file | sed -e 's,^.*/,,'`; \ - rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ - done; \ - rmdir $(DESTDIR)$(docdir)/$(figdir); \ - fi - -for file in $(xml_files); do \ - rm -f $(DESTDIR)$(docdir)/$$file; \ - done - -rmdir $(DESTDIR)$(docdir) - -endif