Embedding/IPCLiteAPI: Difference between revisions

 
(9 intermediate revisions by the same user not shown)
Line 31: Line 31:
     embedapp->Start(EmbedLiteApp::EMBED_THREAD/PROCESS);
     embedapp->Start(EmbedLiteApp::EMBED_THREAD/PROCESS);


   [https://github.com/romaxa/mozilla-central/blob/embedlite/embedding/embedlite/tests/embedLiteCoreInitTest.cpp Core Embed Initialization example]
   [https://github.com/tmeshkova/gecko-dev/blob/embedlite/embedding/embedlite/tests/embedLiteCoreInitTest.cpp Core Embed Initialization example]


  6. After EmbedLiteAppListener[Derived] received "Initialized" notification, new EmbedLiteView can be created with:
  6. After EmbedLiteAppListener[Derived] received "Initialized" notification, new EmbedLiteView can be created with:
Line 38: Line 38:
     view->SetListener(MyEmbedLiteViewListener);
     view->SetListener(MyEmbedLiteViewListener);
   
   
   [https://github.com/romaxa/mozilla-central/blob/embedlite/embedding/embedlite/tests/embedLiteViewInitTest.cpp View Embed Initialization example]
   [https://github.com/tmeshkova/gecko-dev/blob/embedlite/embedding/embedlite/tests/embedLiteViewInitTest.cpp View Embed Initialization example]


   
   
Line 51: Line 51:
== [https://bugzilla.mozilla.org/show_bug.cgi?id=746800 BMO Bug 746800(OMTC)]  ==
== [https://bugzilla.mozilla.org/show_bug.cgi?id=746800 BMO Bug 746800(OMTC)]  ==


== Build instructions: ==
== Development Build instructions: ==
 
Clone repository with submodules structure


Build mozilla engine with embedlite API
<pre>
<pre>
git clone git://github.com/tmeshkova/mozilla-central.git
git clone git://github.com/tmeshkova/xulrunner-package.git
cd mozilla-central
</pre>
git checkout embedlite
cp embedding/embedlite/config/mozconfig.qtdesktop  mozconfig
MOZCONFIG=$(pwd)/mozconfig make -f client.mk build_all


# Simple test to check
Build it with simple script run:
cd obj-xr-qt/dist/bin
<pre>
./embedLiteCoreInitTest
cd xulrunner-package
 
# Pull all latest changes
./pull.all.sh
 
# Not after each pull.all especially after major engine updates it make sense to do rm -f objdir-xxxx-xxx/full_*
 
# Check list of available options
./build.sh -h
 
# Haramttan
./build.sh -t harmattan
 
# Fremantle
./build.sh -t fremantle
 
# Desktop - Qt is default
./build.sh -t desktop
 
# For debug builds add -d argument


# For development it is better to link xulrunner objdir to system
After build is finished you fill see inline message about how to run test UI
./link_to_system.sh obj-xr-qt /usr/local
You can also export SWRENDER=1 - if your desktop or device does not support HW acceleration


# Create *.pc files for building qtmozembed
cd obj-xr-qt/xulrunner/installer
make libxul.pc libxul-embedding.pc mozilla-nspr.pc mozilla-js.pc


</pre>
</pre>


Build qtmozembed - Qt wrapper library around EmbedLite API for quick integration into QML.
== Packaged Build instructions (debian desktop, N9): ==
 
Clone repositories
 
<pre>
<pre>
mkdir ~/mozembed
cd ~/mozembed
# Gecko Engine with EmbedLite API
git clone git://github.com/tmeshkova/gecko-dev.git
# Embedlite toolkit independent components (History,prompt et.c.)
git clone git@github.com:tmeshkova/embedlite-components.git
# qtmozembed - Qt wrapper library around EmbedLite API for quick integration into QML.
git clone git@github.com:tmeshkova/qtmozembed.git
git clone git@github.com:tmeshkova/qtmozembed.git
cd qtmozembed
 
qmake
# qmlmozbrowser UI application which works as simple reference UI
make -j9
git clone git@github.com:tmeshkova/qmlmozbrowser.git
./link_to_system.sh
</pre>
 
Build with dpkg-buildpackage
<pre>
cd ~/mozembed/mozilla-central
dpkg-buildpackage -us -uc -b -nc
dpkg -i ../xulrunner*.deb
 
cd ~/mozembed/embedlite-components
dpkg-buildpackage -us -uc -b -nc
dpkg -i ../embedlite-components*.deb
 
cd ~/mozembed/qtmozembed
dpkg-buildpackage -us -uc -b -nc
dpkg -i ../libqtmozembed*.deb
 
cd ~/mozembed/qmlmozbrowser
dpkg-buildpackage -us -uc -b -nc
dpkg -i ../qmlmozbrowser*.deb
</pre>
</pre>


Build embedlite toolkit independent components (History,prompt et.c.)
# Simple test to check
<pre>
<pre>
git clone git@github.com:tmeshkova/embedlite-components.git
/usr/lib/xulrunner-21.0a1/embedLiteCoreInitTest
cd embedlite-components
./autogen.sh
make -j9
./link_to_system.sh
</pre>
</pre>


Build qmlmozbrowser UI application which works as simple reference UI
# For development it is better to link xulrunner objdir to system (on desktop or on device with ~/mozembed mounted via NFS)
<pre>
<pre>
git clone git@github.com:tmeshkova/qmlmozbrowser.git
cd ~/mozembed/mozilla-central
cd qmlmozbrowser
./link_to_system.sh obj-xr-qt /usr
qmake
# for embedlite-components, qtmozembed, qmlmozbrowser just run
make -j9
./link_to_system.sh
./link_to_system.sh
</pre>
</pre>
Line 103: Line 142:
Finally run test example:
Finally run test example:
<pre>
<pre>
GRE_HOME=/usr/lib/xulrunner-21.0a1 qmlMozEmbedTest -url about:license
qmlMozEmbedTest -url about:license
</pre>
</pre>


Line 132: Line 171:
./qmlMozEmbedTest -url linux.org.ru
./qmlMozEmbedTest -url linux.org.ru


</pre>
=== Troubleshooting: ===
* If embedding does not start and libxul.so location differs from what has been used while building QtMozEmbed, then export path to GRE_HOME (path to folder with libxul.so)
<pre>
ex: export GRE_HOME=/opt/mozilla/xulrunner
</pre>
</pre>


Confirmed users
180

edits