From ada75f176822b68de2bda42eb9fe346800f7eaa9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 3 Sep 2005 12:47:14 +0000 Subject: [PATCH] Install the mkvmerge GUI guide by default into ${datadir}/mkvtoolnix, e.g. into /usr/share/mkvtoolnix. --- Makefile.in | 28 ++++++++++++++++++++-------- debian/rules | 10 ---------- src/mmg/mmg.cpp | 3 +++ 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Makefile.in b/Makefile.in index f012325ec..66f039d68 100644 --- a/Makefile.in +++ b/Makefile.in @@ -87,7 +87,8 @@ LDFLAGS = @LDFLAGS@ CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" CXXFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -CXXFLAGS += -DMTX_LOCALE_DIR=\"$(localedir)\" +CXXFLAGS += -DMTX_LOCALE_DIR=\"$(localedir)\" \ + -DMTX_PKG_DATA_DIR=\"$(pkgdatadir)\" # Which additional stuff to compile USE_WXWINDOWS = @USE_WXWINDOWS@ @@ -136,7 +137,7 @@ HTMLHELPBOOKS = mkvmerge-gui-book all: $(APPLICATIONS) $(TRANSLATIONS_MOS) $(HTMLHELPBOOKS) -install: install-programs install-mans install-trans +install: install-programs install-mans install-trans install-guide install-programs: $(APPLICATIONS) $(mkinstalldirs) $(DESTDIR)$(bindir) @@ -152,18 +153,29 @@ install-programs: $(APPLICATIONS) install-mans: $(mkinstalldirs) $(DESTDIR)$(man1dir) - for i in $(MANPAGES); do \ + @for i in $(MANPAGES); do \ inst=`echo $$i | sed -e 's/^.*\///'`; \ echo " $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst; \ done install-trans: - for i in $(TRANSLATIONS); do \ - echo "$(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES"; \ - $(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES; \ - echo "$(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo"; \ - $(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo; \ + @for i in $(TRANSLATIONS); do \ + echo "$(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES"; \ + $(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES; \ + echo "$(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo"; \ + $(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo; \ + done + +install-guide: + $(mkinstalldirs) $(pkgdatadir) + @for i in doc/mkvmerge-gui.*; do \ + echo " $(INSTALL_DATA) $$i $(pkgdatadir)/"; \ + $(INSTALL_DATA) $$i $(pkgdatadir)/; \ + done + @for i in doc/images/*gif; do \ + echo " $(INSTALL_DATA) $$i $(pkgdatadir)/"; \ + $(INSTALL_DATA) $$i $(pkgdatadir)/; \ done SYSTEM_INCLUDES = $(AVILIB_INCLUDES) \ diff --git a/debian/rules b/debian/rules index d5d963380..1842d17a3 100755 --- a/debian/rules +++ b/debian/rules @@ -74,16 +74,6 @@ binary-indep: build install dh_installchangelogs ChangeLog dh_installdocs -# Install the images belonging the GUI guide. - install -d $(INSTPREFIX)/share/doc/mkvtoolnix/doc/images - for i in doc/mkvmerge-gui.*; do \ - install -m 0644 $$i \ - $(INSTPREFIX)/share/doc/mkvtoolnix/doc/; \ - done - for i in doc/images/*gif; do \ - install -m 0644 $$i \ - $(INSTPREFIX)/share/doc/mkvtoolnix/doc/images/; \ - done # Create HTML files from the man page. for i in doc/mkvmerge.1; do \ groff -man -Thtml $$i > $(INSTPREFIX)/share/doc/mkvtoolnix/doc/`basename $$i .1`.html; \ diff --git a/src/mmg/mmg.cpp b/src/mmg/mmg.cpp index 93d454c73..62889e1e2 100644 --- a/src/mmg/mmg.cpp +++ b/src/mmg/mmg.cpp @@ -1181,6 +1181,9 @@ mmg_dialog::on_help(wxCommandEvent &evt) { potential_help_paths.push_back(wxT("/usr/local/share/doc/mkvtoolnix")); potential_help_paths.push_back(wxT("/usr/local/share/doc/packages/mkvtoolnix")); potential_help_paths.push_back(wxT("/usr/local/share/doc/mkvtoolnix-" VERSION)); + // New location + potential_help_paths.push_back(wxT(MTX_PKG_DATA_DIR)); + potential_help_paths.push_back(wxT(MTX_PKG_DATA_DIR "-" VERSION)); #endif if (cfg->Read(wxT("help_path"), &help_path)) potential_help_paths.push_back(help_path);