| 158 | | There are at least two Android ports of Qt Components. |
| 159 | | |
| 160 | | The koyinings one based on the Symbian Qt Components: |
| 161 | | {{{ |
| 162 | | https://gitorious.org/~koying/qt-components/android-qt-components |
| 163 | | }}} |
| 164 | | And the one that is based on MeeGo Qt Components by Filip Brcic: |
| 165 | | {{{ |
| 166 | | https://qt.gitorious.org/~brcha/qt-components/qt-components-android |
| 167 | | }}} |
| 168 | | |
| 169 | | I've been able to successfully compile both component sets. As my applications are using the MeeGo based components on Fremantle & Harmattan, I'll start with those. |
| 170 | | |
| 171 | | ==== Compiling Qt Components with Necessitas ==== |
| | 158 | There are at least three Android ports of Qt Components. |
| | 159 | |
| | 160 | The modified Ineans Qt Components:[[BR]] |
| | 161 | [https://qt.gitorious.org/~martink/qt-components/martinks-ineans-qt-components/commits/android] |
| | 162 | |
| | 163 | The koyinings one based on the Symbian Qt Components:[[BR]] |
| | 164 | [https://gitorious.org/~koying/qt-components/android-qt-components] |
| | 165 | |
| | 166 | And the one that is based on !MeeGo Qt Components by Filip Brcic:[[BR]] |
| | 167 | [https://qt.gitorious.org/~brcha/qt-components/qt-components-android] |
| | 168 | |
| | 169 | I've been able to successfully compile both component sets. As my applications are using the !MeeGo based components on Fremantle & Harmattan, I'll start with those. |
| | 170 | |
| | 171 | |
| | 172 | ==== Compiling Qt Components with necessitas ==== |
| | 173 | The modified Inens Qt components are based on both the Inneans Fremantle component port & Martin Kolmans changes for BB10 support. These components use the familiar Fremantle & Harmattan import syntax: |
| | 174 | |
| | 175 | {{{ |
| | 176 | import com.nokia.meego 1.0 |
| | 177 | }}} |
| | 178 | |
| | 179 | So it is possible to reuse code from Fremantle & Harmattan (and BB10 project using these components) without having to rewrite the import statement. |
| | 180 | |
| | 181 | First clone the components and then switch to the ''android'' branch: |
| | 182 | |
| | 183 | {{{ |
| | 184 | git clone git://gitorious.org/~martink/qt-components/martinks-ineans-qt-components.git |
| | 185 | cd qt-components-android |
| | 186 | checkout android |
| | 187 | }}} |
| | 188 | |
| | 189 | The export path to the Necessitas Qt libraries to compile against: |
| | 190 | |
| | 191 | {{{ |
| | 192 | export QTDIR=<path to the Necessitas SDK>/Android/Qt/482/armeabi |
| | 193 | export PATH="$QTDIR/bin:$PATH" |
| | 194 | }}} |
| | 195 | |
| | 196 | '''NOTE:''' Check out the Qt version in your Necessitas SDK version, it might not be exactly 482 (Qt 4.8.2) but older or newer. |
| | 197 | |
| | 198 | Then configure the components for building: |
| | 199 | {{{ |
| | 200 | ./configure -fremantle -no-maliit -make cssu -force-local-theme -mobility -no-xrandr -no-xdamage -nomake examples |
| | 201 | }}} |
| | 202 | |
| | 203 | And build them: |
| | 204 | |
| | 205 | {{{ |
| | 206 | make -j 5 |
| | 207 | }}} |
| | 208 | |
| | 209 | Once the build is finished, the results are available in the ''imports'' folder. Just move it somewhere to your Android device or inside your application package and set the ''QML_IMPORT_PATH'' environmental variable to point where the folder is located. |
| | 210 | |
| | 211 | '''Modifineg the components''' |
| | 212 | For some reason, the source code is present in multiple copies (probably because of of how the SSU/CSSU versions were patched from the upstream Qt Components ?). Anyway, if want your modifications to the source code to take effect once reconfigured & recompiled, edit the files in ''src/fremantle/cssu/''. Modifing the others has no effect on the components that are actually built using the configure options described above. |
| | 213 | |
| | 214 | |
| | 215 | ==== Compiling Brchas Qt Components with Necessitas ==== |