relocatable kdoctools

Ben Cooksley bcooksley at kde.org
Tue Aug 22 09:32:04 UTC 2017


On Tue, Aug 22, 2017 at 9:25 PM, Harald Sitter <sitter at kde.org> wrote:
> Ahoy ahoy

Hi Harald,

>
> I've just stumbled upon a rather puzzling situation with kdoctools. It
> has code branching to turn its assets relocatable [1] (i.e. resolve
> paths relative rather than hardcode their location). Now the weird bit
> about this is that it is only used on windows.
>
> The reason this puzzles me is that the relocatable code for Windows
> would work just fine for Linux and OSX, from what I can tell there is
> no real downside to it besides the additional code, which we need
> anyway. On the other hand, the conditional treatment of Windows gives
> the Windows code branch substantially less implicit run exposure (i.e.
> most devs/testers aren't on Windows, so fewer people build the
> relevant if-branch).
>
> With that in mind: how about we drop the harcoding code path and make
> the Windows code path the default and have kdoctools assets always be
> relocatable?

The CI system relocates binaries and other resources on FreeBSD, so
this should be working on other platforms as well (otherwise anything
that depends on KDocTools would fail to compile on CI) unless i've
missed something.

In general though: relocation is always a good thing. Hardcoded paths
are a bad thing.

>
> [1] https://phabricator.kde.org/source/kdoctools/browse/master/src/CMakeLists.txt;8c32e153fae80186375d83dbab82bcfc228b1484$9

Cheers,
Ben


More information about the Kde-frameworks-devel mailing list