Paths to internal executables (c.f. libexec) hard-coded
Kevin Funk
kfunk at kde.org
Wed Aug 26 11:15:15 UTC 2015
Heya,
This is problem on Windows because the *final* installation location is not
known at compile-time (obviously software is installed via installers, users
can pick up the installation prefix). Of course this also limits the
relocateability on other platforms, so it's not just a Windows issue per se.
I've found this, which describes the issue in detail:
https://www.mail-archive.com/kde-frameworks-devel@kde.org/msg01833.html
Consider this code (kio.git):
const QLatin1String libExecDir(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5);
const QString kioslaveExecutable =
QStandardPaths::findExecutable("kioslave", {libExecDir});
Similar code exists in other frameworks.
Problem:
- Hard-coding the install path is a no-go (for sure on Windows)
How can we solve this?
Proposals:
- Generic solution:
- Add new API such as KSomeFittingClass::libexecPaths()
which returns a list of candidates based on the platform
- Then just do:
`QSP::findExecutable("myexe", KSomeFittingClass::libexecPaths())`
- Windows solution only (also less pretty):
- In every place where CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 is used:
- Replace install prefix by QCA::applicationDirPath() via #ifdef
Opinions?
--
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150826/38042efc/attachment.sig>
More information about the Kde-frameworks-devel
mailing list