[webkit-qt] How can I get my application to use an alternative libqtwebkit (harmattan)?
Felipe Crochik
felipe at crochik.com
Sat Apr 14 09:00:39 PDT 2012
[SOLVED]
I have tried many ...many things, like rebuilding Webkit from source so I
could change the --install-libs, delete pkgconfig and original webkit from
sysroots, use LIBS with -Wl,-rpath=/opt/GApp/lib and all failed. :)
In the end this is what it worked (and I did not even need to use my custom
build of webkit - just used the libqtwebkit library from the SDK:
unix:!mac{
QMAKE_LFLAGS += -Wl,--rpath=/opt/GApp/lib
QMAKE_RPATH=
}
LIBS = -L/opt/GApp/lib -lqtwebkit
I wouldn't be surprised if the only thing really needed is to change the
QMAKE_LFLAGS and unset? the QMAKE_RPATH.
Thanks all for the help
Felipe
On Thu, Apr 12, 2012 at 8:55 AM, Harri Pasanen <grego at mpaja.com> wrote:
> You could try loading it explicitly.
>
> "man dlopen" on linux will tell you more.
>
> /Harri
>
>
> On 04/12/2012 02:50 PM, Coda Highland wrote:
>
>> It LOOKS right, so the remaining thought I have is to try tracing the
>> program on the device to see how it's doing the loading.
>>
>> Don't ask me how to do that though>.> I don't know.
>>
>> /s/ Adam
>>
>> On Thu, Apr 12, 2012 at 7:17 AM, Felipe Crochik<felipe at crochik.com>
>> wrote:
>>
>>> Hi,
>>> First of all: thank you!
>>> I tried removing webkit from QT += and adding:
>>>
>>> INCLUDEPATH += /usr/include/qt4/QtWebKit
>>>
>>> LIBS += -L/opt/GApp/lib -Wl,-rpath,/opt/GApp/lib -lqtwebkit
>>>
>>>
>>> It built OK but on the device still uses the "standard" webkit library on
>>> /usr/lib
>>>
>>> Did I get anything wrong?
>>> Felipe
>>>
>>>
>>>
>>> On Wed, Apr 11, 2012 at 10:30 PM, Coda Highland<chighland at gmail.com>
>>> wrote:
>>>
>>>> LD_LIBRARY_PATH is probably taking a back seat to the rpath set in your
>>>> binary.
>>>>
>>>> I would recommend taking QT+=webkit out of your .pro file and manually
>>>> adding the include paths and linker flags, so that you can specify the
>>>> rpath linker flag explicitly to a different path.
>>>>
>>>> /s/ Adam
>>>>
>>>> On Wed, Apr 11, 2012 at 8:39 PM, Felipe Crochik<felipe at crochik.com>
>>>> wrote:
>>>>
>>>>> Since there is a regression with PR1.2 (autosizecontents) I am trying
>>>>> to
>>>>> find a work around so I can distribute my application. My goal is to
>>>>> use
>>>>> the
>>>>> "qt on the device" + "libwebkit.so" (from PR1.1) without changing any
>>>>> of
>>>>> the
>>>>> shared libraries on the device.
>>>>>
>>>>> I just tested using the libqtwevkit.so from the package on the SDK
>>>>> (libqtwebkit4_2.1.1~**git20110418-0maemo2+0m6_armel.**deb) and it
>>>>> works just
>>>>> fine. Now the challenge is how to deploy it without affecting any other
>>>>> applications.
>>>>>
>>>>> I am copying the libQtWebKit.so.4 to a sub folder of my application
>>>>> (/opt/GApp/lib) and I tried without success:
>>>>>
>>>>> 1. "export LD_LIBRARY_PATH=/opt/GApp/lib" and then running my
>>>>> application
>>>>> using the x-terminal
>>>>> 2. changing the source code of my application to include
>>>>> "QCoreApplication::**addLibraryPath("/opt/GApp/lib"**);"
>>>>> 3. changing the PATH to start with "my lib" folder and then running my
>>>>> application.
>>>>>
>>>>> On all 3 cases the application used the "official" webkit and not "my
>>>>> version".
>>>>>
>>>>> So far the only way I managed to have my application use the
>>>>> "alternative"
>>>>> webkit was by changing the symbolic link on /usr/lib/libQtWebKit.so.4
>>>>> to
>>>>> point to "my" webkit version.
>>>>>
>>>>> What is the correct/recommended way? Since I am using the "official"
>>>>> 1.1
>>>>> package I assume it expects to be installed to /usr/lib ...don't know
>>>>> if
>>>>> this is the problem or not.
>>>>>
>>>>> BTW, I am not using the qml webview.
>>>>>
>>>>> Thanks in advance,
>>>>> Felipe
>>>>>
>>>>> ______________________________**_________________
>>>>> webkit-qt mailing list
>>>>> webkit-qt at lists.webkit.org
>>>>> http://lists.webkit.org/**mailman/listinfo.cgi/webkit-qt<http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt>
>>>>>
>>>>>
>>> ______________________________**_________________
>> webkit-qt mailing list
>> webkit-qt at lists.webkit.org
>> http://lists.webkit.org/**mailman/listinfo.cgi/webkit-qt<http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20120414/1cc97869/attachment.html>
More information about the webkit-qt
mailing list