Bug 101735 - [Qt] Fix installation of QtWebProcess binary
Summary: [Qt] Fix installation of QtWebProcess binary
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andras Becsi
URL:
Keywords:
Depends on: 101774
Blocks: 76773
  Show dependency treegraph
 
Reported: 2012-11-09 03:06 PST by Simon Hausmann
Modified: 2012-11-29 03:05 PST (History)
5 users (show)

See Also:


Attachments
Patch (7.29 KB, patch)
2012-11-28 09:44 PST, Andras Becsi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 2012-11-09 03:06:23 PST
There are a few issues with QtWebProcess right now:

    (1) It has to be in the PATH
    (2) However it should be in libexec
    (3) The file name should be versioned.

We should implement something like Shane's proposal from

http://lists.qt-project.org/pipermail/development/2012-October/007423.html
Comment 1 Simon Hausmann 2012-11-19 01:27:13 PST
Zeno fixed the first part in http://trac.webkit.org/changeset/134161 by falling back to QLibraryInfo's BinariesPath. As discussed with Ossi, the next step is the introduction of libexec in Qt and then we can move QtWebProcess there.
Comment 2 Simon Hausmann 2012-11-28 04:35:56 PST
After https://codereview.qt-project.org/#change,38225 landed in qtbase, libexecdir is now available :)
Comment 3 Andras Becsi 2012-11-28 09:44:51 PST
Created attachment 176498 [details]
Patch
Comment 4 Simon Hausmann 2012-11-29 00:04:16 PST
Comment on attachment 176498 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=176498&action=review

> Source/WebKit2/Shared/qt/ProcessExecutablePathQt.cpp:51
> +#if USE(LIBEXECDIR)
> +    expectedPath = QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) + QDir::separator() + baseName;
> +    if (QFile::exists(expectedPath))
> +        return String(expectedPath);
> +#endif
> +
>      expectedPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() + baseName;
>      if (QFile::exists(expectedPath))
>          return String(expectedPath);

This could be an #else ... #endif here. Feel free to change before landing :)
Comment 5 Simon Hausmann 2012-11-29 00:19:12 PST
Comment on attachment 176498 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=176498&action=review

>> Source/WebKit2/Shared/qt/ProcessExecutablePathQt.cpp:51
>>          return String(expectedPath);
> 
> This could be an #else ... #endif here. Feel free to change before landing :)

Alternatively you could introduce a QLibraryInfo::LibraryLocation variable to pass to ::location() and set it according to the #ifdef. That might be cleaner/shorter.
Comment 6 Simon Hausmann 2012-11-29 02:57:59 PST
Landed manually with suggested change for swift integration into qt5.git

Committed r136116: <http://trac.webkit.org/changeset/136116>
Comment 7 Andras Becsi 2012-11-29 03:05:25 PST
Comment on attachment 176498 [details]
Patch

Thanks, Simon.