| 572 | |
| 573 | #ifndef BUILD_LITE |
| 574 | QString privateLibDirPath(const QString& srcSubdirName) { |
| 575 | // PRIVATE_LIBDIR will be a relative path most likely |
| 576 | // therefore, we need to detect the install prefix based on our own binary path, and then calculate the path to |
| 577 | // the helper tools based on that |
| 578 | const QString ownBinaryDirPath = QFileInfo(getOwnBinaryPath().get()).dir().absolutePath(); |
| 579 | const QString installPrefixPath = QFileInfo(ownBinaryDirPath).dir().absolutePath(); |
| 580 | QString privateLibDirPath = installPrefixPath + "/" + PRIVATE_LIBDIR; |
| 581 | |
| 582 | // the following lines make things work during development: here, the build dir path is inserted instead, which |
| 583 | // allows for testing with the latest changes |
| 584 | if (!QDir(privateLibDirPath).exists()) { |
| 585 | // this makes sure that when we're running from a local dev build, we end up in the right directory |
| 586 | // very important when running this code from the daemon, since it's not in the same directory as the helpers |
| 587 | privateLibDirPath = ownBinaryDirPath + "/../" + srcSubdirName; |
| 588 | } |
| 589 | |
| 590 | // if there is no such directory like <prefix>/bin/../lib/... or the binary is not found there, there is a chance |
| 591 | // the binary is just next to this one (this is the case in the update/remove helpers) |
| 592 | // therefore we compare the binary directory path with PRIVATE_LIBDIR |
| 593 | if (!QDir(privateLibDirPath).exists()) { |
| 594 | if (privateLibDirPath.contains(PRIVATE_LIBDIR)) { |
| 595 | privateLibDirPath = ownBinaryDirPath; |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | return privateLibDirPath; |
| 600 | } |
| 601 | #endif |
| 602 | |
| 603 | bool installDesktopFileAndIcons(const QString& pathToAppImage, bool resolveCollisions) { |
no test coverage detected