06-20-2012 07:50 AM
Last night I succeeded in getting the core of one of my QML apps ported from MeeGo & Symbian running on the BB10 Dev Alpha.
It's not hard, but I've written it up in case anyone else is looking to get started. Main points:
06-23-2012 04:27 PM
Going one step further, I've now got a single source tree (for my app, Bedside) which I can use with Qt Creator (to target Symbian, Maemo & MeeGo) and the BlackBerry 10 Native SDK (to target the BB10 Dev Alpha).
I merged in files from a Cascades project:
Assets
Since I had an existing, Qt Creator-based, file structure I changed bar-descriptor.xml to match the existing 'images' and 'qml/Bedside' directories I wanted deployed. However, the BlackBerry Native SDK's structure is nicer out-of-the-box so I'd probably use it for future projects, and change the .pro file to match for Qt SDK.
Makefile
This was a straightforward copy, merging in the target I already had for generating Debian control file icons.
.pro file
Here was a bit more tricky, but I used the following to wrap up the BB10-specific bits:
device|simulator {
...
}
The names 'device' and 'simulator' are obviously a little generic, but it looks like these should be trivial to change in Makefile.
Qt Creator doesn't seem to like wildcards on SOURCES and HEADERS, so I had to continue to list them explicitly.
main.cpp
In my existing main.cpp I could use Q_OS_BLACKBERRY with #ifdef to bypass the missing Qt Mobility, set the appropriate BAR-relative path and configure other device-specific properties (e.g. is a close icon needed: it's not on swipe-based UIs like BB10 & N9).
06-25-2012 10:40 AM - edited 06-25-2012 10:40 AM
I would suggest adding BB10NDK to QtCreator as new gcc toolchain and Qt version (simply by pointing to qmake executable). After this you'll be a happy user of QtCreator which builds apps for the BB10 device ![]()
06-26-2012 04:04 AM
trollixx wrote:
I would suggest adding BB10NDK to QtCreator as new gcc toolchain and Qt version (simply by pointing to qmake executable). After this you'll be a happy user of QtCreator which builds apps for the BB10 device
That wouldn't give any of the deployment & debugging options, would it?
06-26-2012 04:11 AM
06-26-2012 05:43 AM
I'm using a QtSDK that has those plugins bundled (not sure where I've got it from) and it works fine. I can build, deploy and run from QtCreator just fine ![]()
07-05-2012 07:16 AM - edited 07-05-2012 07:46 AM
I have cloned qnx-qt-creator from gitorious and installed BB10 NDK.
When I tell Qt Creator to add a new Qt Version pointing it to
/opt/bbndk-10.0.4-beta/host/linux/x86/usr/bin/qmak
And what should I put in Toolchain under "Compiler path", "ABI", "debugger" and "mkspecs" ?
I am using Debian sid 64 bit
thanks for any hints
07-05-2012 01:49 PM
Hi lildeimos,
I'm still using the Playbook SDK instead of the BB10 SDK. It basically does the same but more stable ![]()
Selecting qmake did work for me and I think the toolchain was automatically detected. There is however a problem with the default mkspec in BB10 SDK. I never fixed it properly because so far I've used the BB10 SDK only from command line and there appending "-spec unsupported/blackberry-armv7le-g++" to the qmake call was enough. If you find a way to set that mkspec as a default it should fix your problem.
I've created to screenshots that show my Qt Creator setup. Maybe it helps.
http://twitpic.com/a49a84/full
http://twitpic.com/a49acs/full
08-06-2012 06:31 AM
Great example, Jaffa! ![]()
Works so far for my testing project. But I have a problem with the makefile.
You've edited it yourself?
My project compiles just great inside the BB10 native SDK using the makefile the SDK generated for the example. But as soon as I start QtCreator and compile my project there for the N9 the makefile gets modified and after this I'm unable to compile the project again in the BB10 SDK.
Have you got similar issues while testing or let your QtCreator the makefile untouched?
Has anyone a Idea how to use just both files with just different naming?
It would be the preferred soultion for me.
08-06-2012 06:39 AM
Have you got similar issues while testing or let your QtCreator the makefile untouched?
Qt Creator leaves my Makefile untouched. In fact, it never touched it as, before this, it just had a single target in it for updated debian/control.