qt qtwebkit
Qt for Linux/X11 - Building from Source: http://qt-project.org/doc/qt-5/linux-building.html
Qt for X11 Requirements: http://qt-project.org/doc/qt-5/linux-requirements.html
Qt WebKit Examples: http://qt-project.org/doc/qt-5/qtwebkitexamples-index.html
Qt Configure Options: http://qt-project.org/doc/qt-5/configure-options.html
All Modules: http://qt-project.org/doc/qt-5/qtmodules.html
构建来自 Git 的 Qt 5: http://qt-project.org/wiki/Building-Qt-5-from-Git-SimplifiedChinese
Building Qt 5 from Git: http://qt-project.org/wiki/Building_Qt_5_from_Git
配置Qt/X11安装包: http://blog.csdn.net/daysummer/article/details/1824677
windows android 编程: http://blog.csdn.net/jin761153454/article/details/17316777
http://qun.yunpan.360.cn/file/listpreview?gid=12187698
qt-everywhere-opensource-src-5.2.0]$ vim ./qtbase/src/corelib/global/qfeatures.txt
Building Qt 5 from Git: http://qt-project.org/wiki/Building_Qt_5_from_Git
question 1:
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ ./configure -prefix /opt/Qt-5.2 -opensource -confirm-license -nomake tests -skip doc -skip svg -no-qml-debug -release -system-libjpeg -system-libpng
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
See src/plugins/platforms/xcb/README.
Answer:
#sudo yum install libxcb.i686 #which not work for this build
# ./configure -qt-xcb #this can work;
#sudo yum install libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel
question 2:
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ make module-qtwebkit
Encountered 2 configuration warning(s):
! QtQuick module not found, QML APIs will not be built
! Qt not configured to use system libpng, QImageDecoder will decode PNG images
The WebKit build was disabled for the following reasons:
* ICU is required. To build QtWebKit with Qt 5 you need to build Qt 5 with libICU support. Check for ICU support being mentioned in qtbase/config.summary.
Answer:
#sudo yum install icu.i686 libicu.i686 libicu-devel.i686 libpng-devel.i686
Question 3:
Cannot configure directfb and opengl:
Ansewer
////////opengl should has the same version to successful ./configurell
#sudo yum install ghc-OpenGL-devel.i686
#directfb-devel.i686 ////////cannot build
#download DirectFB-1.7.0 and ./configure ; make; make install;
#sudo yum install freetype-devel.i686 ftgl.i686
#sudo yum install openssl-devel.i686
Question 4: cannot find so files
[leosu@localhost domtraversal]$ ./domtraversal
./domtraversal: error while loading shared libraries: libQt5WebKitWidgets.so.5: cannot open shared object file: No such file or directory
Answer:
第一步:确认有哪些Lib无法Load
第二步:系统要确认动态库的地址,把动态库的路径放到/etc/ld.so.conf中
建议:在/etc/ld.so.conf.d/上新建动态库相应的文件配置文件/etc/ld.so.conf.d/qt-leo_webkit.conf,
在该文件中填上该动态库的绝对路径
此例:
sudo vim /etc/ld.so.conf.d/qt-leo_webkit.conf
--->>>>>> /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtwebkit/lib
第三步:运行ldconfig重建/etc/ld.so.cache
#sudo ldconfig
Question 5, cannot find or load "xcb"
[leosu@localhost domtraversal]$ ./domtraversal
This application failed to start because it could not find or load the Qt platform plugin "xcb".
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libqxcb.so
./qtbase/plugins/platforms/libqxcb.so
(1)将依赖的包及相应的软连接拷贝到部署机的任意目录下,并设定环境变量LD_LIBRARY_PATH,这些依赖包列表可以通过ldd命令查询
(2)无法加载插件,解决方法有如下两个
方法1:
export QT_PLUGIN_PATH=/opt/Qt5.1.1/Tools/QtCreator/bin/plugins/
export LD_LIBRARY_PATH=/opt/Qt5.1.1/Tools/QtCreator/bin/plugins/platforms:$LD_LIBRARY_PATH
将开发机器上/opt/Qt5.1.1/Tools/QtCreator/bin/plugins/platforms目录及下面的文件libqxcb.so拷贝到部署机上,并设定环境变量
方法2:qt.conf加plugins
[Paths]
Prefix=.
Plugins=plugins
在开发机器上的程序所在目录新建plugins/platforms目录,并将开发机器上/opt/Qt5.1.1/Tools/QtCreator/bin/plugins/platforms下的插件文件(libqxcb.so)拷贝过来。
均能找到插件,但仍然无法加载,提示信息如下:
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
(3)ldd libqxcb.so 发现xcb插件依赖的libQt5DBus.so.5找不到,目前暂时无法通过方法二来手动指定目录,只能按照方法一:
将开发机/opt/Qt5.1.1/Tools/QtCreator/lib/qtcreator目录及文件libQt5DBus.so.5拷贝到部署机上相应位置。
(4)运行程序,终于调出了界面,大功告成!综上,将程序依赖的QT库文件拷贝到部署机,并设定环境变量(见(1));对于插件,将开发机的对应目录结构及必须文件拷贝到部署机上,并设定环境变量(见(2)和(3))。
# sudo yum install libXrender.i686 xcb-util-renderutil.i686 libXrender-devel.i686 xcb-util-renderutil-devel.i686
# sudo yum install libxcb-devel.i686 xcb-util-devel.i686 xcb-util-keysyms-devel.i686 xcb-util-renderutil-devel.i686 libxcb.i686 libxcb.i686 xcb-util-wm-devel.i686
#sudo yum install libnice-devel.i686
#####I solved the problem. There were some packages missing. Namely libx11-xcb1 and libx11-xcb-dev. I think it’s just easier to install all packages mentioned in qtbase/src/plugins/platforms/xcb/README:
6 ,Question for Qt WebKit; xcb; need????
webkit:
Ubuntu/Debian:
#sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
Fedora:
#su - -c "yum install flex bison gperf libicu-devel libxslt-devel rub
Libxcb
Libxcb [xcb.freedesktop.org] is now the default window-system backend for platforms based on X11/Xorg, and you should therefore install libxcb and its accompanying packages. Qt5 should build with whatever libxcb version is available in your distro’s packages (but you may optionally wish to use v1.8 or higher to have threaded rendering support). src/plugins/platforms/xcb/README
Fedora 17+ (xcb-util-renderutil is currently available in updates repository until it goes stable):
#su - -c "yum --enablerepo=updates install libxcb libxcb-devel xcb-util xcb-util-devel xcb-util-*-devel"
Ubuntu/Debian:
#sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
Qt 5.2
Select the file according to your operating system from the list below to get the latest Qt 5.2 for your computer. The binary packages include Qt 5.2.0 libraries and Qt Creator 3.0.0
Qt Creator
Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers.
It is part of the Qt Project [qt-project.org]
#./configure -prefix /opt/Qt-5.2 -opensource -nomake tests -skip doc -skip svg -no-qml-debug
./configure -prefix /opt/Qt-5.2 -opensource -confirm-license -qt-xcb -nomake tests -skip doc -skip svg -release -system-libjpeg -system-libpng
#make -j 4
#gmake install
# make confclean; ./configure; make -j 4; make install; make confclean;.......
/////compile modules.......
#make -j4 module-qtscript module-qtwebkit ////only build module-qtscript module-qtwebkit
#make docs /After configuring and compiling Qt, building the documentation is possible by running
#make install_docs //After having built the documentation, you need to install it with the following command;
//// The documentation is installed in the path set to $QT_INSTALL_DOCS.
#qmake -query ////Running "qmake -query" will list the value of QT_INSTALL_DOCS.
// Information about Qt 5's documentation is located in qtbase/doc/README ;
/// or in the following page: http://qt-project.org/wiki/Qt5DocumentationProject
////example test
[leosu@localhost browser]$ pwd
/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtwebkit-examples/examples/webkitwidgets/browser
# /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake browser.pro -o Makefile
# make -f Makefile
cd customvideowidget/ && ( test -e Makefile || /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtmultimedia/examples/multimediawidgets/customvideosurface/customvideowidget/customvideowidget.pro -o Makefile ) && make -f Makefile
./configure -prefix /opt/Qt-5.2 -opensource -nomake tests -release -confirm-license -skip doc -skip svg -no-qml-debug
-opengl es2 \
-directfb \
./configure -prefix /opt/Qt-5.2 -opensource -confirm-license -nomake tests -skip doc -skip svg -no-qml-debug -release -system-libjpeg -system-libpng -no-feature-UNDOSTACK -no-feature-UNDOGROUP -no-feature-UNDOVIEW -no-feature-PRINTER -no-feature-TEXTODFWRITER -no-feature-DRAGNADDROP -no-kms -skip translations
#make install ======>>>>>>>>>>gmake install; other wise will get the following error!!!!!!
make[4]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtconnectivity/examples/bluetooth/bttennis'
cd scanner/ && ( test -e Makefile || /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtbase/bin/qmake /mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtconnectivity/examples/bluetooth/scanner/scanner.pro -o Makefile ) && make -f Makefile install
Project ERROR: Unknown module(s) in QT: quick
make[3]: *** [sub-scanner-install_subtargets] Error 3
make[3]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtconnectivity/examples/bluetooth'
make[2]: *** [sub-bluetooth-install_subtargets] Error 2
make[2]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtconnectivity/examples'
make[1]: *** [sub-examples-install_subtargets] Error 2
make[1]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtconnectivity'
make: *** [module-qtconnectivity-install_subtargets] Error 2
####gmake install; ????????????!
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Qt-5.2.0/lib -o accelbubble .obj/main.o .obj/qrc_accelbubble.o -L/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtdeclarative/lib -lQt5Quick -L/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtbase/lib -L/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsvg/lib -lQt5Svg -lQt5Qml -lQt5Widgets -lQt5Xml -L/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsensors/lib -lQt5Sensors -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread
/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsvg/lib/libQt5Svg.so: undefined reference to `z_inflateInit2_'
/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsvg/lib/libQt5Svg.so: undefined reference to `z_inflateReset'
/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsvg/lib/libQt5Svg.so: undefined reference to `z_inflateEnd'
/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsvg/lib/libQt5Svg.so: undefined reference to `z_inflate'
collect2: error: ld returned 1 exit status
gmake[4]: *** [accelbubble] Error 1
gmake[4]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsensors/examples/sensors/accelbubble'
gmake[3]: *** [sub-accelbubble-install_subtargets] Error 2
gmake[3]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsensors/examples/sensors'
gmake[2]: *** [sub-sensors-install_subtargets] Error 2
gmake[2]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsensors/examples'
gmake[1]: *** [sub-examples-install_subtargets] Error 2
gmake[1]: Leaving directory `/mnt/qt_webkit/qt-everywhere-opensource-src-5.2.0/qtsensors'
gmake: *** [module-qtsensors-install_subtargets] Error 2
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ pwd
/mnt/qt_webkit/qt-every/qt-everywhere-opensource-src-5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5WebKit.so.5.2.0
./qtwebkit/lib/libQt5WebKit.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libWebCore.a
./qtwebkit/Source/WebCore/libWebCore.a
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libWebKit2.a
./qtwebkit/Source/WebKit2/libWebKit2.a
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libJavaScriptCore.a
./qtwebkit/Source/JavaScriptCore/libJavaScriptCore.a
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libANGLE.a
./qtwebkit/Source/ThirdParty/ANGLE/libANGLE.a
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libWTF.a
./qtwebkit/Source/WTF/libWTF.a
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Gui.so.5.2.0
./qtbase/lib/libQt5Gui.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Network.so.5.2.0
./qtbase/lib/libQt5Network.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Core.so.5.2.0
./qtbase/lib/libQt5Core.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Sql.so.5.2.0
./qtbase/lib/libQt5Sql.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Positioning.so.5.2.0
./qtlocation/lib/libQt5Positioning.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Quick.so.5.2.0
./qtdeclarative/lib/libQt5Quick.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Qml.so.5.2.0
./qtdeclarative/lib/libQt5Qml.so.5.2.0
[leosu@localhost qt-everywhere-opensource-src-5.2.0]$ find . -name libQt5Sensors.so.5.2.0
./qtsensors/lib/libQt5Sensors.so.5.2.0
./configure -opensource -confirm-license -no-linuxfb -opengl -v -directfb -no-openvg -qt-pcre -qpa directfbeglfs -qpa directfb -qt-xcb
/////this build cannot find module-qtwebkit; so didn't build webkit;
#./configure -qt-xcb -skip qttools -skip doc -skip svg -v -opensource -no-largefile -no-accessibility -no-audio-backend -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-gif -make libs -no-nis -no-cups -no-iconv -no-pch -no-dbus -no-gtkstyle -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-mitshm -no-xinput -no-xkb -no-glib -no-openvg -qt-pcre -no-libudev -no-fontconfig -no-linuxfb -no-c++11 -qreal float -nomake tools -nomake tests -nomake examples -no-feature-DBUS -no-feature-UNDOSTACK -no-feature-UNDOGROUP -no-feature-UNDOVIEW -no-feature-PRINTER -no-feature-TEXTODFWRITER -no-feature-DRAGNADDROP -no-kms -confirm-license -release -no-qml-debug
-prefix /usr/qt
-qpa directfbegl
-no-pkg-config
-no-feature-SOCKS5
-skip translations
-bindir /usr/bin -libdir /usr/lib -plugindir /usr/lib
-no-eglfs -no-widgets
-no-xcb
-directfb
-no-openssl
-datadir /etc/qmake
-system-libjpeg
-system-sqlite
-system-libpng
-opengl es2
my install for qt build:
sudo yum install sqlite.i686
sudo yum install libjpeg-turbo.i686 libjpeg-turbo-devel.i686
sudo yum install gstreamer.i686 gstreamer-devel.i686 qt-gstreamer-devel.i686 qt-gstreamer.i686
sudo yum gperf.i686 bison.i686 bison-devel.i686 flex.i686
Dependencies
The code should be easily built on any Linux distribution which has development packages for Qt installed. Below is the list of dependencies: Qt version 5.0.0 or later
gperf (v3.0 or later)
bison (v2.4.1 or later)
flex (v2.5.33 or later)
sqlite (development files)
fontconfig (development files)
xrender (development files)
phonon (development files)
libjpeg (development files)
libpng (development files)
我跑qt的directfb非OpenGL程序不会出问题,但是跑OpenGL相关的程序就会出问题,
提示:“Could not retrieve IDirectFBGL in QDirectFbWindow::glcontext()”
跟了下,是调用surface->GetGL方法时出错了。
请问是qt本身就不支持directfb的OpenGL吗?还是出了其它问题呢?
我用的是x11后端,在ubuntu10.10 PC 系统下跑的。
我跑的是qt4.8,用-qpa选项编译的, 运行时选择-platform directfb。
我确认pc上有opengl支持,因为-platform xlib时opengl的例子是可以跑起来的
Build webkitDFB and Lite(from zhoujun) :
1. Make sure you have avip2952 webkit build of HEDERA_work
2. LiTE:
2.1 git clone ssh://yourcoreid@build05/data4/a23212/code/Browser_EG/LiTE-0.8.10 -b master
2.2 Edit bcm45_devenv_build.sh, change BSG_ROOT and THIRD_PARTY_DIST to your own path
2.3 Build using ./bcm45_devenv_build.sh
3. ICU:
3.1 git clone ssh://yourcoreid@build05/data4/a23212/code/Browser_EG/ICU_48_rc1 -b master
3.2 Edit bcm45_devenv_build.sh, change BSG_ROOT and THIRD_PARTY_DIST to your own path
3.3 Build using ./bcm45_devenv_build.sh
4. WebKitDFB:
4.1 git clone ssh://yourcoreid@build05/data4/a23212/code/Browser_EG/WebKitDFB -b webkitdfb-zhoujun
4.2 Edit bcm45_devenv_build.sh, change BSG_ROOT and THIRD_PARTY_DIST to your own path
4.3 Build using ./bcm45_devenv_build.sh
5. Run on box:
Use nfs boot
sudo mv $THIRD_PARTY_DIST/bin/* rootdisk/usr/bin/
sudo mv $THIRD_PARTY_DIST/lib/lib* rootdisk/usr/lib/
sudo cp -r $THIRD_PARTY_DIST/lib/icu rootdisk/usr/lib
sudo cp -r $THIRD_PARTY_DIST/lib/pkgconfig rootdisk/usr/lib
sudo mv $THIRD_PARTY_DIST/sbin/* rootdisk/usr/sbin/
sudo cp -r $THIRD_PARTY_DIST/share/* rootdisk/usr/share/
sudo mkdir -p rootdisk/$THIRD_PARTY_DIST
sudo cp -r $THIRD_PARTY_DIST/share rootdisk/$THIRD_PARTY_DIST