Building QtJsonDb from Git: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:HowTo]]<br />[[Category:Developing_with_Qt::Qt 5]] | |||
'''English''' | '''English''' | ||
=Building QtJsonDb from Git= | [toc align_right="yes&quot; depth="3&quot;] | ||
= Building QtJsonDb from Git = | |||
==Introduction== | == Introduction == | ||
Todo. | Todo. | ||
==System Requirements== | == System Requirements == | ||
QtJsonDb is one of the addons of Qt 5, hence before building qtjsondb you need to build dependent modules | QtJsonDb is one of the addons of Qt 5, hence before building qtjsondb you need to build dependent modules - qtbase, qtxmlpatterns, qtjsbackend and qtdeclarative. See [[Building_Qt_5_from_Git]] for more information. | ||
At this moment the only supported platforms for qtjsondb are '''Linux''' and '''Mac OS X''' | At this moment the only supported platforms for qtjsondb are '''Linux''' and '''Mac OS X''' | ||
===Linux/X11=== | === Linux/X11 === | ||
QtJsonDb depends on libedit and libicu(optionally): | QtJsonDb depends on libedit and libicu(optionally): | ||
====QtJsonDb dependencies on Ubuntu/Debian:==== | ==== QtJsonDb dependencies on Ubuntu/Debian: ==== | ||
<code><br />sudo apt-get install libedit-dev<br />sudo apt-get install libicu-dev<br /></code> | |||
==== QtJsonDb dependencies on Mandriva/ROSA/Unity: ==== | |||
<code><br />urpmi 'pkgconfig(libedit)'<br />urpmi 'pkgconfig(libicu)'<br /></code> | |||
===Mac OS X=== | === Mac OS X === | ||
QtJsonDb depends on libicu(optionally). | QtJsonDb depends on libicu(optionally). | ||
====Via | ==== Via "HomeBrew&quot;:http://mxcl.github.com/homebrew/ ==== | ||
You need to have HomeBrew installed at first. | You need to have HomeBrew installed at first. | ||
<code><br />brew install icu4c<br /></code> | |||
==== Via "MacPorts&quot;:http://www.macports.org/ ==== | |||
<code><br />port install icu<br /></code> | |||
== Getting the source code == | |||
First clone the QtJsonDb git repository(for example, under <code&gt;<sub>/dev/git&lt;/code&gt;): | |||
<br /><code><br />git clone git://gitorious.org/qt/qtjsondb.git qtjsondb<br /></code> | |||
<br />h3. Current temporary patch | |||
<br />Only for enable collation feature based on whether ICU header files are available or not on Mac. | |||
<br />h4. Mac OS X | |||
<br />For '''HomeBrew''' users, patch "this file&quot;:https://gist.github.com/2584990 or "download the patch directly&quot;:https://gist.github.com/gists/2584990/download .<br /><code><br />git am</sub>/Downloads/0001-tmp-patch-for-add-path-for-icu-on-mac-with-brew.patch<br /></code> | |||
For '''MacPorts''' users, patch "this file&quot;:https://gist.github.com/2659021 or "download the patch directly&quot;:https://gist.github.com/gists/2659021/download .<br /><code><br />git am <sub>/Downloads/0001-tmp-patch-for-add-path-for-icu-on-mac-with-macports.patch<br /></code> | |||
<br />h2. Qmakeing and building | |||
<br />Now start to qmake and make a shadow build:<br /><code><br />mkdir</sub>/build/qtjsondb<br />cd <sub>/build/qtjsondb<br /></sub>/build/qt5/qtbase/bin/qmake -o Makefile <sub>/dev/git/qtjsondb/qtjsondb.pro<br /></code> | |||
<br />If you have seen following output, then the ICU was enabled successfully:<br /><code><br />Configuration tests:<br /> icu: yes<br /> libedit: yes<br /></code> | |||
<br />h2. How to run examples | |||
<br />Launch jsondb daemon in a terminal(the first): | |||
<br /><code><br />cd</sub>/dev/git/qtjsondb/examples/declarative<br /><sub>/build/qt5/qtbase/bin/jsondb<br /></code> | |||
<br />Run the example code in another terminal(the second): | |||
<br /><code><br />cd</sub>/dev/git/qtjsondb/examples/declarative/simplelistmodel<br /><sub>/build/qt5/qtbase/bin/qmlscene ./simplelistmodel.qml<br /></code> | |||
<br />If want to clean the db files after running(in the first terminal): | |||
<br /><code><br />cd</sub>/dev/git/qtjsondb/examples/declarative<br />rm *.db |
Revision as of 10:20, 24 February 2015
English
[toc align_right="yes" depth="3"]
Building QtJsonDb from Git
Introduction
Todo.
System Requirements
QtJsonDb is one of the addons of Qt 5, hence before building qtjsondb you need to build dependent modules - qtbase, qtxmlpatterns, qtjsbackend and qtdeclarative. See Building_Qt_5_from_Git for more information.
At this moment the only supported platforms for qtjsondb are Linux and Mac OS X
Linux/X11
QtJsonDb depends on libedit and libicu(optionally):
QtJsonDb dependencies on Ubuntu/Debian:
<br />sudo apt-get install libedit-dev<br />sudo apt-get install libicu-dev<br />
QtJsonDb dependencies on Mandriva/ROSA/Unity:
<br />urpmi 'pkgconfig(libedit)'<br />urpmi 'pkgconfig(libicu)'<br />
Mac OS X
QtJsonDb depends on libicu(optionally).
Via "HomeBrew":http://mxcl.github.com/homebrew/
You need to have HomeBrew installed at first.
<br />brew install icu4c<br />
Via "MacPorts":http://www.macports.org/
<br />port install icu<br />
Getting the source code
First clone the QtJsonDb git repository(for example, under <code>/dev/git</code>):
<br />git clone git://gitorious.org/qt/qtjsondb.git qtjsondb<br />
h3. Current temporary patch
Only for enable collation feature based on whether ICU header files are available or not on Mac.
h4. Mac OS X
For HomeBrew users, patch "this file":https://gist.github.com/2584990 or "download the patch directly":https://gist.github.com/gists/2584990/download .
<br />git am</sub>/Downloads/0001-tmp-patch-for-add-path-for-icu-on-mac-with-brew.patch<br />
For MacPorts users, patch "this file":https://gist.github.com/2659021 or "download the patch directly":https://gist.github.com/gists/2659021/download .
<br />git am <sub>/Downloads/0001-tmp-patch-for-add-path-for-icu-on-mac-with-macports.patch<br />
h2. Qmakeing and building
Now start to qmake and make a shadow build:
<br />mkdir</sub>/build/qtjsondb<br />cd <sub>/build/qtjsondb<br /></sub>/build/qt5/qtbase/bin/qmake -o Makefile <sub>/dev/git/qtjsondb/qtjsondb.pro<br />
If you have seen following output, then the ICU was enabled successfully:
<br />Configuration tests:<br /> icu: yes<br /> libedit: yes<br />
h2. How to run examples
Launch jsondb daemon in a terminal(the first):
<br />cd</sub>/dev/git/qtjsondb/examples/declarative<br /><sub>/build/qt5/qtbase/bin/jsondb<br />
Run the example code in another terminal(the second):
<br />cd</sub>/dev/git/qtjsondb/examples/declarative/simplelistmodel<br /><sub>/build/qt5/qtbase/bin/qmlscene ./simplelistmodel.qml<br />
If want to clean the db files after running(in the first terminal):
cd/dev/git/qtjsondb/examples/declarative
rm *.db