| 410 | |
| 411 | = 5. Alternative methods if the above tutorial fails = |
| 412 | |
| 413 | This section has been tested on N9 with PR1.2 (30.2012.07.1) used with openmode pached kernel. |
| 414 | |
| 415 | == 5.1 Building QtWebKit with prebuilt Qt5 libraries == |
| 416 | |
| 417 | Sometimes you may have difficulties when you try to build Qt5. In this case you may use LMouras prebuilt Qt5 libraries: http://wiki.qt-project.org/Qt_5_on_Nokia_N9 . |
| 418 | |
| 419 | For this method you have to use ScratchBox as building environment, read more about this in [http://trac.webkit.org/wiki/SettingUpDevelopmentEnvironmentForN9?version=19#a1.ScratchboxInstructions previous version of the tutorial]. |
| 420 | |
| 421 | Inside ScratchBox: |
| 422 | |
| 423 | {{{ |
| 424 | get http://qtlabs.org.br/~lmoura/qt5/conf/qt5-repository_0.3_all.deb |
| 425 | dpkg -i qt5-repository_0.3_all.deb |
| 426 | apt-get update |
| 427 | apt-get install "qt5-*" |
| 428 | }}} |
| 429 | |
| 430 | Repeat these steps on you N9/N950 device after you logged in as root with devel-su (password: rootme). |
| 431 | |
| 432 | Clone WebKit repository to your ~/swork/webkit directory. Build QtWebKit with the following inside ScratchBox: |
| 433 | {{{ |
| 434 | export PATH=/opt/qt5/bin/:$PATH |
| 435 | export WEBKITOUTPUTDIR=/home/$USER/swork/qtwebkit-webkit2-dev-builddir-armel-m6 |
| 436 | cd /home/$USER/swork/webkit |
| 437 | ./Tools/Scripts/build-webkit --qt --release --makeargs=-j9 --no-3d-canvas |
| 438 | }}} |
| 439 | |
| 440 | == 5.2 Mounting NFS == |
| 441 | Add your key to the device if you not done already: |
| 442 | {{{ |
| 443 | ssh developer@device "mkdir -p .ssh" |
| 444 | scp ~/.ssh/id_rsa.pub developer@device:./.ssh/authorized_keys |
| 445 | }}} |
| 446 | |
| 447 | Install required utils and settings to your host: |
| 448 | {{{ |
| 449 | sudo apt-get install nfs-kernel-server portmap |
| 450 | sudo echo "/scratchbox/users/$USER/home/$USER/swork 192.168.2.15(rw,all_squash,anonuid=1000,anongid=1000)" >> /etc/exports |
| 451 | sudo echo "/home/$USER/swork 192.168.2.15(rw,sync,no_root_squash)" >> /etc/exports |
| 452 | sudo /etc/init.d/nfs-kernel-server restart |
| 453 | }}} |
| 454 | |
| 455 | Log in to your N9/N950 device and install: |
| 456 | {{{ |
| 457 | ssh developer@192.168.2.15 |
| 458 | devel-su |
| 459 | rootme |
| 460 | |
| 461 | cd /root |
| 462 | apt-get install wget |
| 463 | |
| 464 | wget http://repo.pub.meego.com/home:/rzr:/harmattan/MeeGo_1.2_Harmattan_Maemo.org_MeeGo_1.2_Harmattan_standard/armel/libwrap0_7.6.dbs-maemo6.1_armel.deb |
| 465 | wget http://repo.pub.meego.com/home:/rzr:/debian/harmattan/armel/portmap_6.0.0-2_armel.deb |
| 466 | wget http://maemo.cloud-7.de/HARM/N9/openmode_kernel_PR1.1/opensh/opensh.deb |
| 467 | |
| 468 | AEGIS_FIXED_ORIGIN=com.nokia.maemo dpkg -i libwrap0_7.6.dbs-maemo6.1_armel.deb |
| 469 | AEGIS_FIXED_ORIGIN=com.nokia.maemo dpkg -i portmap_6.0.0-2_armel.deb |
| 470 | AEGIS_FIXED_ORIGIN=com.nokia.maemo dpkg -i opensh.deb |
| 471 | apt-get install libxslt1.1 |
| 472 | logout |
| 473 | logout |
| 474 | }}} |
| 475 | |
| 476 | You can create mount script on your N9/N950 by running on your host: |
| 477 | {{{ |
| 478 | ssh developer@192.168.2.15 "mkdir -p /home/developer/swork; \ |
| 479 | echo 'opensh -c \"/sbin/portmap; /sbin/modprobe nfs; mount -t nfs 192.168.2.14:/home/$USER/swork /home/developer/swork\"' > nfsmount.sh; \ |
| 480 | chmod +x nfsmount.sh " |
| 481 | }}} |
| 482 | |
| 483 | Log in to your device and run: |
| 484 | {{ |
| 485 | ssh developer@device |
| 486 | . nfsmount.sh |
| 487 | }}} |
| 488 | |
| 489 | == 5.3 Run QtWebKit with prebuilt Qt5 on N9/N950 == |
| 490 | |
| 491 | You can create a script that loads the environment variables by running this on your host: |
| 492 | {{{ |
| 493 | ssh developer@192.168.2.15 "echo 'export QTDIR=/opt/qt5' > n9env.sh; \ |
| 494 | echo 'export QT_IMPORT_PATH=/opt/qt5/imports' >> n9env.sh; \ |
| 495 | echo 'export QML_IMPORT_PATH=/opt/qt5/imports' >> n9env.sh; \ |
| 496 | echo 'export LD_LIBRARY_PATH=/opt/qt5/lib:/home/developer/swork/qtwebkit-webkit2-dev-builddir-armel-m6/Release/lib' >> n9env.sh; \ |
| 497 | echo 'export QT_PLUGIN_PATH=/opt/qt5/qtbase/plugins' >> n9env.sh; \ |
| 498 | echo 'export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt5/plugins/platforms' >> n9env.sh; \ |
| 499 | echo 'export QT_QPA_PLATFORM=xcb' >> n9env.sh; \ |
| 500 | echo 'export WEBKIT_TESTFONTS=/home/developer/swork/testfonts' >> n9env.sh; \ |
| 501 | echo '# export TZ=/developer/share/zoneinfo/America/Los_Angeles' >> n9env.sh; \ |
| 502 | echo 'export PATH=/opt/qt5/bin:$PATH' >> n9env.sh" |
| 503 | }}} |
| 504 | |
| 505 | Finally, you can run MiniBrowser or QtTestBrowser on N9/N950: |
| 506 | {{{ |
| 507 | ssh developer@192.168.2.15 |
| 508 | . n9env.sh |
| 509 | ./swork/qtwebkit-webkit2-dev-builddir-armel-m6/Release/bin/MiniBrowser |
| 510 | ./swork/qtwebkit-webkit2-dev-builddir-armel-m6/Release/bin/QtTestBrowser |
| 511 | }}} |