relocatable kdoctools

Harald Sitter sitter at kde.org
Tue Aug 29 12:16:00 UTC 2017


On Thu, Aug 24, 2017 at 3:20 PM, Ralf Habacker <ralf.habacker at freenet.de> wrote:
> 10. The conclusion of 9. is that it might also be a solution on windows
> to patch only all generated files after 3. and before 4.

Hm, I may be missing a piece of the puzzle in my mind, but it appears
to me this should be working with the cmake code paths at hand, no? I
mean, it appears the paths for that mingw32 build are a bit all over
the place, but if that wasn't the case it should be fine. Which seems
where the sed in your point 9 comes in. Your actually generated
relativity is incorrect considering what you want/need.

i.e. ../../../../../../../../../share (which supposedly goes to
/usr/share/ on the build system itself)
vs. ../../../.. (which I do not know where it is meant to go but you
expec the docbook to be there)

So I think the problem is your relativity more than anything. How to
fix that I can't say as I lack some background knowledge of how
mingw32 works on opensuse.

>From a windows POV we'd have this line up though:

/c/kdoctools/dist/ <-- destination for distributable dir
/c/kdoctools/dist/data/xml/docbook <-- docbook assets for distribution
(loaded by kdoctools dtd/xsl files)
/c/kdoctools/build <-- cmake build dir
/c/kdoctools/source <-- cmake build dir

The original docbook assets in there come from building docbook which
we'll need to build kdoctools.

We'd invoke cmake in `/c/kdoctools/build` with something like
`cmake /c/kdoctools/source -DCMAKE_INSTALL_PREFIX=/c/kdoctools/dist`

Which will find the assets in `/c/kdoctools/dist/data/docbook`. It
then proceeds to calculate the relativity from where we want to
install our assets. We'll install (I think) to
`/c/kdoctools/dist/data/kdoctools/customization/dtd/foo.dtd`, which
will result in a realtive load path for the docbooks assets in
`../../../docbook` that is the path that gets embedded into our
foo.dtd.

After installation the line up will look something like this (mostly
guessing since I have no working win32 build system right now):
/c/kdoctools/dist/meinproc5.exe
/c/kdoctools/dist/data/kdoctools
/c/kdoctools/dist/data/xml/docbook
/c/kdoctools/dist/...

This dist directory is relocatable. The foo.dtd in data/kdoctools will
always find its docbook assets in the same relative path to itself.

HS


More information about the Kde-frameworks-devel mailing list