diff --git a/MANIFEST.in b/MANIFEST.in index a73cac35..0ce4d4d2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -36,7 +36,7 @@ recursive-include linkcheck/gui/rc Makefile *.png *.qrc recursive-include linkcheck/gui/ui *.ui include po/*.po po/*.pot po/Makefile include doc/*.example -recursive-include doc/html *.ico *.html *.jpg *.png +recursive-include doc/html *.ico *.html *.jpg *.png *.qhp *.qhcp Makefile include doc/po4a.conf doc/*.po doc/*.pot include doc/en/*.1 doc/en/*.5 include doc/de/*.1 doc/de/*.5 diff --git a/Makefile b/Makefile index 8968d9d9..1fc0bfc8 100644 --- a/Makefile +++ b/Makefile @@ -18,21 +18,20 @@ DEB_ORIG_TARGET=$(BUILDDIR)/linkchecker_$(VERSION).orig.tar.gz .PHONY: all all: - @echo "Read the file doc/source/install.txt to see how to build and install this package." + @echo "Read the file INSTALL.txt to see how to build and install this package." .PHONY: clean clean: -$(PYTHON) setup.py clean --all rm -f linkchecker-out.* *-stamp* $(MAKE) -C po clean - $(MAKE) -C doc clean + $(MAKE) -C doc/html clean $(MAKE) -C linkcheck/HtmlParser clean rm -f linkcheck/network/_network.so find . -name '*.py[co]' -exec rm -f {} \; .PHONY: distclean distclean: clean cleandeb - $(MAKE) -C doc clean rm -rf build linkchecker.egg-info rm -f _LinkChecker_configdata.py MANIFEST Packages.gz # clean aborted dist builds and -out files @@ -56,6 +55,7 @@ locale: # to build in the current directory .PHONY: localbuild localbuild: MANIFEST + $(MAKE) -C doc/html $(MAKE) -C linkcheck/HtmlParser $(PYTHON) setup.py build cp -f build/lib.linux-$(MACHINE)-$(PYVER)/linkcheck/HtmlParser/htmlsax.so linkcheck/HtmlParser @@ -79,10 +79,6 @@ release: distclean releasecheck dist-stamp sign_distfiles homepage upload @echo "Register at Python Package Index..." $(PYTHON) setup.py register -.PHONY: homepage -homepage: - $(MAKE) -C doc homepage - .PHONY: chmod chmod: -chmod -R a+rX,u+w,go-w -- * diff --git a/config/lccollection.qhc b/config/lccollection.qhc new file mode 100644 index 00000000..8970f4c6 Binary files /dev/null and b/config/lccollection.qhc differ diff --git a/debian/linkchecker-gui.install b/debian/linkchecker-gui.install index 311bc366..19fa2eef 100644 --- a/debian/linkchecker-gui.install +++ b/debian/linkchecker-gui.install @@ -3,3 +3,4 @@ usr/lib/python2.5/site-packages/linkcheck/gui usr/share/man/man1/linkchecker-gui.1 usr/share/man/de/man1/linkchecker-gui.1 usr/share/linkchecker/lccollection.qhc +usr/share/linkchecker/lcdoc.qch diff --git a/doc/Makefile b/doc/Makefile index 5ea27704..b6ddaf04 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,24 +1,12 @@ -HELPFILES = lccollection.qhc - -all: $(HELPFILES) - -clean: - -rm -f *.qhc *.qch +all: test: xmllint --valid --noout *.html - -%.qhc: %.qhcp lcdoc.qhp - qcollectiongenerator $< -o $@ - po4a: po4a --localized-charset=UTF-8 po4a.conf api: epydoc --html -o api --name "LinkChecker source documentation" --url ../index.html ../linkcheck/ -.PHONY: po4a api clean -favicon.ico: favicon32x32.png favicon16x16.png - png2ico favicon.ico favicon32x32.png favicon16x16.png - +.PHONY: po4a api test diff --git a/doc/html/Makefile b/doc/html/Makefile new file mode 100644 index 00000000..bddf2d01 --- /dev/null +++ b/doc/html/Makefile @@ -0,0 +1,13 @@ +HELPFILES = lccollection.qhc + +all: $(HELPFILES) + +.PHONY: clean +clean: + -rm -f *.qhc *.qch + +%.qhc: %.qhcp lcdoc.qhp + qcollectiongenerator $< -o $@ + +favicon.ico: favicon32x32.png favicon16x16.png + png2ico favicon.ico favicon32x32.png favicon16x16.png diff --git a/doc/html/lccollection.qhc b/doc/html/lccollection.qhc new file mode 100644 index 00000000..3a303087 Binary files /dev/null and b/doc/html/lccollection.qhc differ diff --git a/doc/lccollection.qhcp b/doc/html/lccollection.qhcp similarity index 81% rename from doc/lccollection.qhcp rename to doc/html/lccollection.qhcp index e336ec07..b71034ee 100644 --- a/doc/lccollection.qhcp +++ b/doc/html/lccollection.qhcp @@ -2,9 +2,9 @@ LinkChecker - html/favicon16x16.png + favicon16x16.png bfk/LinkChecker - qthelp://bfk.app.linkchecker/doc/html/index.html + qthelp://bfk.app.linkchecker/doc/index.html false false false diff --git a/doc/html/lcdoc.qch b/doc/html/lcdoc.qch new file mode 100644 index 00000000..36e456db Binary files /dev/null and b/doc/html/lcdoc.qch differ diff --git a/doc/lcdoc.qhp b/doc/html/lcdoc.qhp similarity index 90% rename from doc/lcdoc.qhp rename to doc/html/lcdoc.qhp index 330c5f1f..5f0d5504 100644 --- a/doc/lcdoc.qhp +++ b/doc/html/lcdoc.qhp @@ -7,7 +7,7 @@
- html/index.html + index.html diff --git a/linkcheck/gui/__init__.py b/linkcheck/gui/__init__.py index cfe89bf0..075ed9c2 100644 --- a/linkcheck/gui/__init__.py +++ b/linkcheck/gui/__init__.py @@ -30,7 +30,7 @@ from .. import configuration, checker, director, add_intern_pattern, \ from ..containers import enum -DocBaseUrl = "qthelp://bfk.app.linkchecker/doc/html/" +DocBaseUrl = "qthelp://bfk.app.linkchecker/doc/" Status = enum('idle', 'checking') @@ -51,7 +51,13 @@ class LinkCheckerMain (QtGui.QMainWindow, Ui_MainWindow): self.checker = CheckerThread() self.contextmenu = ContextMenu(parent=self) # Note: we can't use QT assistant here because of the .exe packaging - qhcpath = os.path.join(configuration.configdata.install_data, "doc", "lccollection.qhc") + path = configuration.configdata.install_data + # here lies the help file when developing + qhcpath = os.path.join(path, "doc", "html", "lccollection.qhc") + if not os.path.isfile(qhcpath): + # here lies the help file after installing as a package + path = configuration.configdata.config_dir + qhcpath = os.path.join(path, "lccollection.qhc") self.assistant = HelpWindow(self, qhcpath) # setup this widget self.init_treewidget() diff --git a/setup.py b/setup.py index d2a6cdfa..de0c5631 100755 --- a/setup.py +++ b/setup.py @@ -369,7 +369,8 @@ myemail = "calvin@users.sourceforge.net" data_files = [ ('share/linkchecker', - ['config/linkcheckerrc', 'config/logging.conf', 'doc/lccollection.qhc', ]), + ['config/linkcheckerrc', 'config/logging.conf', + 'doc/html/lccollection.qhc', 'doc/html/lcdoc.qch']), ('share/linkchecker/examples', ['cgi-bin/lconline/leer.html.en', 'cgi-bin/lconline/leer.html.de',